/* =====================
   Reset & Base
===================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #faf9f4;
  --bg-2: #f1f0e6;
  --bg-card: #ffffff;
  --beige: #d0d6b5;
  --beige-soft: #e4e7d3;
  --border: #2a344014;
  --border-hover: #2a344028;
  --accent: #4f7cac;
  --accent-2: #3d6389;
  --accent-glow: #4f7cac1a;
  --gold: #2f5276;
  --gold-bg: #2f527612;
  --silver: #4f7cac;
  --silver-bg: #4f7cac12;
  --bronze: #7fa0c4;
  --bronze-bg: #7fa0c412;
  --green: #3d6389;
  --green-bg: #3d638912;
  --text: #26303b;
  --text-muted: #5c6670;
  --text-dim: #8b939b;
  --white: #26303b;
  --font-main: 'Archivo', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius: 6px;
  --radius-sm: 4px;
  --transition: 0.25s ease;
  --nav-h: 72px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 999px; }

/* =====================
   Utility
===================== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 28px; }
.section { padding: 110px 0; }

.section-header { text-align: left; margin-bottom: 60px; }

.section-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-main);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
  line-height: 1.2;
}

.section-subtitle {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.92rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--accent-2);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-hover);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-2);
  background: var(--accent-glow);
  transform: translateY(-2px);
}

.btn-full { width: 100%; justify-content: center; }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* =====================
   Navigation
===================== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background var(--transition);
}
#navbar.scrolled {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-main);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.nav-links { display: flex; gap: 30px; }
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* =====================
   Hero
===================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--nav-h) 28px 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: left;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 90px;
}

.hero-eyebrow {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  transition-delay: 0.05s;
}

.hero-name {
  font-family: var(--font-main);
  font-size: clamp(3.2rem, 8vw, 6.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 22px;
}
.hero-name .accent {
  color: var(--accent);
}

.hero-tagline {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--text-muted);
  margin-bottom: 36px;
  transition-delay: 0.15s;
}

/* Stats strip (below hero) */
.stats-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 56px;
  padding-top: 26px;
  padding-bottom: 26px;
}
.stat { text-align: left; }
.stat-num {
  display: block;
  font-family: var(--font-main);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border-hover);
  flex-shrink: 0;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: flex-start;
  flex-wrap: wrap;
  transition-delay: 0.3s;
}

.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: fadeInUp 1s ease 1.6s both;
}
.scroll-line {
  width: 1px; height: 48px;
  background: var(--text-dim);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.3; transform: scaleY(0.5); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* =====================
   About
===================== */
.about { background: var(--bg-2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 60px;
  align-items: start;
}

.about-intro {
  font-size: 1.1rem;
  color: var(--white);
  margin-bottom: 18px;
  line-height: 1.65;
}
.about-text p { color: var(--text-muted); margin-bottom: 14px; }

.about-traits { margin-top: 32px; display: flex; flex-direction: column; gap: 18px; }

.trait { display: flex; gap: 14px; align-items: flex-start; }
.trait-icon {
  flex-shrink: 0;
  margin-top: 2px;
  width: 40px; height: 40px;
  color: var(--accent);
  background: var(--beige-soft);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.trait strong { display: block; color: var(--white); font-weight: 600; margin-bottom: 3px; }
.trait p { font-size: 0.88rem; color: var(--text-muted); margin: 0; }

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}
.info-card h3 {
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.info-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.info-list li { display: flex; flex-direction: column; gap: 2px; }
.info-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); font-weight: 500; }
.info-value { font-size: 0.88rem; color: var(--text); font-weight: 500; }

/* =====================
   Awards
===================== */
.awards { background: var(--bg); }

.awards-col-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.awards-group-title {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.group-icon {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
}

.award-list { display: flex; flex-direction: column; gap: 10px; }

.award-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color var(--transition), transform var(--transition);
}
.award-item:hover { transform: translateX(4px); }

.award-item.gold { border-left: 3px solid var(--gold); }
.award-item.gold:hover { border-color: var(--gold); }
.award-item.silver { border-left: 3px solid var(--silver); }
.award-item.silver:hover { border-color: var(--silver); }
.award-item.bronze { border-left: 3px solid var(--bronze); }
.award-item.bronze:hover { border-color: var(--bronze); }

.award-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  flex-shrink: 0;
  white-space: nowrap;
}
.gold .award-badge { background: var(--gold-bg); color: var(--gold); border: 1px solid var(--gold); }
.silver .award-badge { background: var(--silver-bg); color: var(--silver); border: 1px solid var(--silver); }
.bronze .award-badge { background: var(--bronze-bg); color: var(--bronze); border: 1px solid var(--bronze); }

.award-body strong { display: block; font-size: 0.88rem; color: var(--white); font-weight: 600; margin-bottom: 4px; }
.award-body p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; margin-bottom: 6px; }
.award-date { font-size: 0.72rem; color: var(--text-dim); }

/* --award-img-h is measured in script.js. Expanding to the exact image
   height avoids the dead time and mid-animation clip that a guessed
   max-height ceiling produces. */
.award-img-wrap {
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
  transition:
    max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    margin-top 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.award-img-inner {
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 0.3s ease,
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.award-item.has-image:hover .award-img-wrap {
  max-height: var(--award-img-h, 600px);
  margin-top: 14px;
}
.award-item.has-image:hover .award-img-inner {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.08s;
}

.award-img-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.award-img-duo img {
  width: 100%;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
  aspect-ratio: 4/3;
}
.award-img-wrap img {
  width: 100%;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* =====================
   Projects / Tabs
===================== */
.projects { background: var(--bg-2); }

.project-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 9px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.tab-btn:hover { border-color: var(--border-hover); color: var(--text); }
.tab-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.projects-grid { display: flex; flex-direction: column; gap: 10px; }

.project-card {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: start;
  gap: 20px;
  padding: 24px 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}
.project-card:hover {
  border-color: var(--accent);
  background: #f3f6f9;
  transform: translateX(5px);
}
.project-card.featured { border-color: var(--gold); }
.project-card.featured:hover { border-color: var(--gold); background: #faf7ee; }

.project-badge {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 3px;
  background: var(--gold-bg);
  color: var(--gold);
  border: 1px solid var(--gold);
  margin-bottom: 8px;
}

.project-number {
  font-family: var(--font-main);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  padding-top: 3px;
}

.project-content h3 {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 6px;
}
.project-content p { font-size: 0.86rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 12px; }

.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project-media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
  align-items: start;
}
.project-media-grid img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
  aspect-ratio: 4/3;
}
.project-media-item video {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--bg-2);
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}
.project-link:hover { opacity: 0.7; }
.media-caption {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
  line-height: 1.4;
}
.project-video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.project-video-grid video {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  aspect-ratio: 9/16;
  object-fit: cover;
  background: var(--bg-2);
}
.project-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.project-photo-grid img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
  aspect-ratio: 4/3;
}
.project-tags span {
  font-size: 0.69rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 3px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.project-date {
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
  padding-top: 4px;
  flex-shrink: 0;
}
.link-date {
  font-size: 0.78rem;
  color: var(--accent-2);
  white-space: nowrap;
  padding-top: 4px;
  transition: color var(--transition);
}
.link-date:hover { color: var(--white); }

/* =====================
   Experience / Timeline
===================== */
.experience { background: var(--bg); }

.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 0;
  width: 1px;
  background: var(--border-hover);
}

.timeline-item {
  position: relative;
  padding-left: 32px;
  padding-bottom: 44px;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -6px;
  top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.timeline-date {
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.timeline-type {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 8px;
}
.timeline-type.work { background: var(--green-bg); color: var(--green); border: 1px solid var(--green); }
.timeline-type.academic { background: var(--accent-glow); color: var(--accent-2); border: 1px solid var(--accent); }

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 22px 24px;
  transition: border-color var(--transition);
}
.timeline-content:hover { border-color: var(--accent); }

.timeline-content h3 {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 8px;
}
.timeline-content p { font-size: 0.87rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.55; }

/* =====================
   Leadership
===================== */
.leadership { background: var(--bg-2); }

.leadership-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.lead-card {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), transform var(--transition);
}
.lead-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.lead-icon {
  flex-shrink: 0;
  width: 46px; height: 46px;
  color: var(--accent);
  background: var(--beige-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lead-role {
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 6px;
  line-height: 1.3;
}
.lead-body p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 10px; }
.lead-date { font-size: 0.7rem; color: var(--accent-2); }

/* =====================
   Contact
===================== */
.contact { background: var(--bg); }

.contact-block {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-email {
  font-family: var(--font-main);
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
  width: fit-content;
  border-bottom: 2px solid var(--border-hover);
  padding-bottom: 6px;
  transition: color var(--transition), border-color var(--transition);
  word-break: break-all;
}
.contact-email:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}
.contact-link:hover { color: var(--accent); }
.contact-link svg { color: var(--accent); }

/* =====================
   Footer
===================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 28px;
  text-align: center;
}
.footer p { font-size: 0.8rem; color: var(--text-dim); }
.footer-motto { margin-top: 6px; font-style: italic; }

/* =====================
   Reveal delays
===================== */
.reveal:nth-child(1) { transition-delay: 0s; }
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal:nth-child(6) { transition-delay: 0.4s; }

/* =====================
   Responsive
===================== */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; }
  .info-card { position: static; }
  .awards-col-wrap { grid-template-columns: 1fr; }
  .leadership-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .section { padding: 80px 0; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: var(--bg);
    justify-content: center;
    align-items: center;
    gap: 36px;
    font-size: 1.3rem;
    z-index: 99;
  }
  .nav-toggle { display: flex; }
  .hero-stats { flex-wrap: wrap; gap: 16px; }
  .stat { padding: 0; margin-right: 0; }
  /* Touch devices have no hover, so award certificates stay open */
  .award-item.has-image .award-img-wrap { max-height: none; margin-top: 14px; }
  .award-item.has-image .award-img-inner { opacity: 1; transform: none; }
  .stat-divider { display: none; }
  .leadership-grid { grid-template-columns: 1fr; }
  .project-card { grid-template-columns: 28px 1fr; }
  .project-date, .link-date { display: none; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: center; }
  .project-tabs { gap: 6px; }
  .tab-btn { padding: 8px 16px; font-size: 0.8rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-line { animation: none; }
  .award-img-wrap, .award-img-inner { transition: none; }
}
