/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --bg-page:    #eef7f0;
  --bg-alt:     #e4f0e8;
  --bg-white:   #ffffff;

  --g900: #0f3320;
  --g800: #1a5235;
  --g700: #236642;
  --g500: #2e8b57;
  --g300: #8ecba8;
  --g200: #b8dfc8;
  --g100: #d4eedd;
  --g50:  #f0faf4;

  --text:     #111827;
  --text-2:   #4b5563;
  --text-3:   #9ca3af;
  --border:   #c3dcc9;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 4px 8px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.04);

  --r:    10px;
  --r-sm: 6px;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-page);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}
.section        { padding: 80px 0; }
.section-alt    { background: var(--bg-alt); }

/* ============================================================
   NAV
   ============================================================ */
#navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(238,247,240,.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--g800);
  letter-spacing: .08em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-links a {
  font-size: .83rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color .18s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--g800); }

.nav-cta {
  background: var(--g800) !important;
  color: #fff !important;
  padding: 6px 15px;
  border-radius: var(--r-sm);
  transition: background .18s !important;
}
.nav-cta:hover { background: var(--g700) !important; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--g800);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  border-radius: var(--r-sm);
  font-size: .875rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: background .18s, border-color .18s, color .18s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--g800);
  color: #fff;
  border-color: var(--g800);
}
.btn-primary:hover {
  background: var(--g700);
  border-color: var(--g700);
}
.btn-outline {
  background: transparent;
  color: var(--g800);
  border-color: var(--g800);
}
.btn-outline:hover { background: var(--g100); }

.btn-outline-light {
  background: transparent;
  color: rgba(255,255,255,.85);
  border-color: rgba(255,255,255,.4);
}
.btn-outline-light:hover { background: rgba(255,255,255,.1); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 100px 0 88px;
}
.hero-eyebrow {
  font-size: .9rem;
  font-weight: 500;
  color: var(--g500);
  margin-bottom: 10px;
  letter-spacing: .02em;
}
.hero-name {
  font-size: clamp(2.6rem, 6vw, 3.8rem);
  font-weight: 700;
  color: var(--g900);
  line-height: 1.1;
  margin-bottom: 14px;
}
.hero-role {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
}
.hero-sub {
  font-size: .875rem;
  color: var(--text-3);
  margin-bottom: 32px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--g900);
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--g200);
}

/* ============================================================
   CARDS (shared base)
   ============================================================ */
.card,
.entry-card,
.skill-card,
.project-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s;
  display: flex;
  flex-direction: column;
}
.entry-card .media-carousel,
.entry-card .pdf-carousel,
.entry-card .media-slot,
.project-card .media-carousel,
.project-card .pdf-carousel,
.project-card .media-slot {
  margin-top: auto;
  padding-top: 14px;
}
.card:hover,
.entry-card:hover,
.project-card:hover { box-shadow: var(--shadow); }

/* Card header row */
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.card-head h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.card-head-right {
  text-align: right;
  flex-shrink: 0;
}
.card-head-right .location {
  font-size: .78rem;
  color: var(--text-3);
  margin-top: 5px;
}

/* Subtitle / role */
.role-label {
  font-size: .82rem;
  font-weight: 500;
  color: var(--g500);
  margin-top: 2px;
}
.meta-text {
  font-size: .8rem;
  color: var(--text-3);
  margin-bottom: 10px;
}
.location { font-size: .8rem; color: var(--text-3); }

/* Pill badge */
.pill {
  display: inline-block;
  background: var(--g100);
  color: var(--g800);
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Tags */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.tag {
  background: var(--g50);
  border: 1px solid var(--g200);
  color: var(--g800);
  font-size: .75rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ============================================================
   BULLET LIST
   ============================================================ */
.bullets {
  margin: 10px 0 4px;
}
.bullets li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 5px;
  font-size: .855rem;
  color: var(--text-2);
  line-height: 1.55;
}
.bullets li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--g500);
  font-size: 1.15rem;
  line-height: 1.35;
  font-weight: 700;
}

/* ============================================================
   MEDIA PLACEHOLDER
   ============================================================ */
.media-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--g50);
  border: 1.5px dashed var(--g200);
  border-radius: var(--r-sm);
  color: var(--text-3);
  font-size: .78rem;
  font-style: italic;
}
.media-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--g300);
}

/* ============================================================
   ENTRY LIST (timeline)
   ============================================================ */
.entry-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 2-column grid variant for Ongoing */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Compact experience cards */
.entry-card.compact { padding: 18px 22px; }

/* Role + date + location on one line */
.entry-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 12px;
}
.location-tag {
  font-size: .78rem;
  color: var(--text-3);
}

/* Subsection labels within Experience */
.subsection-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--g500);
  margin: 28px 0 12px;
}
.subsection-title:first-of-type { margin-top: 0; }

/* Compact skills (when placed above Ongoing) */
.skills-compact { padding: 18px 0; }
.skills-compact-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--g500);
  margin-bottom: 8px;
}
.skills-compact-text { flex-direction: row; flex-wrap: wrap; gap: 4px 24px; }
.skills-compact-text p { font-size: .78rem; line-height: 1.5; }

/* Skills plain-text block */
.skills-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.skills-text p {
  font-size: .93rem;
  color: var(--text-2);
  line-height: 1.6;
}
.skills-category {
  font-weight: 600;
  color: var(--g700);
  margin-right: 8px;
}

/* ============================================================
   SKILLS GRID
   ============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}
.skill-card h4 {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--g700);
  margin-bottom: 2px;
}

/* ============================================================
   PROJECTS GRID
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.project-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.award-badge {
  display: inline-block;
  background: var(--g100);
  color: var(--g700);
  font-size: .72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  line-height: 1.4;
}
.project-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.project-desc {
  font-size: .845rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* ============================================================
   PDF CAROUSEL
   ============================================================ */
.pdf-carousel {
  position: relative;
  width: 100%;
  height: 250px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: #1a1a1a;
  border: 1px solid var(--border);
  outline: none;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pdf-carousel:focus {
  box-shadow: 0 0 0 2px var(--g500);
}
.pdf-canvas {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
}

/* PDF Lightbox */
.pdf-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.pdf-lightbox.open { display: flex; }
#lightbox-canvas {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--r-sm);
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
}
.lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  font-size: 1.4rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  z-index: 1001;
}
.lightbox-close:hover { background: rgba(255,255,255,.25); }
.pdf-lightbox .carousel-button { position: fixed; top: 50%; transform: translateY(-50%); }
.pdf-lightbox .carousel-button.prev { left: 16px; }
.pdf-lightbox .carousel-button.next { right: 16px; }
.pdf-lightbox .carousel-pagination {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .85rem;
  color: rgba(255,255,255,.8);
  background: rgba(0,0,0,.5);
  padding: 4px 12px;
  border-radius: 20px;
}

/* Image Lightbox */
.img-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.img-lightbox.open { display: flex; }
#img-lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--r-sm);
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
  display: block;
}
.img-lightbox .lightbox-close { position: fixed; top: 18px; right: 22px; }
.img-lightbox .carousel-button { position: fixed; top: 50%; transform: translateY(-50%); }
.img-lightbox .carousel-button.prev { left: 16px; }
.img-lightbox .carousel-button.next { right: 16px; }
.img-lightbox .carousel-pagination {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .85rem;
  color: rgba(255,255,255,.8);
  background: rgba(0,0,0,.5);
  padding: 4px 12px;
  border-radius: 20px;
}

/* ============================================================
   MEDIA CAROUSEL
   ============================================================ */
.media-carousel {
  position: relative;
  width: 100%;
  height: 250px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: #0a0a0a;
  border: 1px solid var(--border);
}
.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
}
.carousel-slide {
  display: none;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
}
.carousel-slide.active {
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
}
.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.45);
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  z-index: 2;
}
.carousel-button:hover { background: rgba(0,0,0,.7); }
.carousel-button.prev { left: 8px; }
.carousel-button.next { right: 8px; }
.carousel-pagination {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: .72rem;
  color: rgba(255,255,255,.8);
  background: rgba(0,0,0,.45);
  padding: 2px 7px;
  border-radius: 20px;
}

/* ============================================================
   AWARDS
   ============================================================ */
.awards-plain {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.awards-plain li {
  position: relative;
  padding-left: 16px;
  font-size: .875rem;
  color: var(--text-2);
  line-height: 1.6;
}
.awards-plain li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--g500);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer#contact {
  background: var(--g900);
  color: #fff;
  text-align: center;
  padding: 72px 0 48px;
}
.footer-title {
  font-size: 1.65rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.footer-sub {
  font-size: .9rem;
  color: rgba(255,255,255,.65);
  margin-bottom: 28px;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}
.footer-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.footer-copy {
  font-size: .78rem;
  color: rgba(255,255,255,.35);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .section  { padding: 56px 0; }
  .hero     { padding: 68px 0 56px; }

  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    background: var(--bg-page);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 0;
    z-index: 199;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 11px 24px;
    font-size: .9rem;
  }
  .nav-cta {
    margin: 8px 24px;
    border-radius: var(--r-sm) !important;
    padding: 9px 15px !important;
  }

  .card-head          { flex-direction: column; }
  .card-head-right    { text-align: left; }
  .entry-grid         { grid-template-columns: 1fr; }
  .projects-grid      { grid-template-columns: 1fr; }
  .footer-actions     { flex-direction: column; align-items: center; }
}
