/* ── Design Tokens ───────────────────────────────────────────── */
:root {
  --bg:           #FFFFFF;
  --bg-alt:       #F8F8F6;
  --bg-warm:      #F4F2EE;
  --bg-card:      #FFFFFF;
  --sidebar-bg:   #FAFAFA;
  --border:       #E8E8E8;
  --border-mid:   #CCCCCC;

  --ink:          #0D0D0D;
  --ink-2:        #2A2A2A;
  --ink-3:        #555555;
  --ink-4:        #888888;
  --ink-5:        #BBBBBB;

  --accent:       #0D0D0D;
  --accent-soft:  #EFEFED;
  --green:        #16A34A;
  --blue:         #1D4ED8;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Space Grotesk', system-ui, -apple-system, sans-serif;
  --mono:  'Space Mono', 'Courier New', monospace;

  --sidebar-w:  256px;
  --section-px: 72px;
  --section-py: 104px;

  --shadow-xs:  0 1px 3px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.07), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-md:  0 8px 24px rgba(0,0,0,0.09), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-lg:  0 20px 60px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.06);
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
img { display: block; max-width: 100%; }

/* ── Layout ──────────────────────────────────────────────────── */
#sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 40px 24px 32px;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
#main { margin-left: var(--sidebar-w); }

/* ── Sidebar: Profile ────────────────────────────────────────── */
.sidebar-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-mid);
  margin-bottom: 14px;
  flex-shrink: 0;
}
.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
/* Fallback initials */
.sidebar-avatar-fallback {
  width: 100%;
  height: 100%;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: #fff;
}

.sidebar-name {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 3px;
}
.sidebar-role {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-4);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sidebar-sep {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ── Sidebar: Nav ────────────────────────────────────────────── */
.sidebar-nav ul { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 400;
  color: var(--ink-3);
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.nav-link:hover  { background: var(--border); color: var(--ink); }
.nav-link.active {
  background: var(--accent-soft);
  color: var(--ink);
  border-left-color: var(--ink);
  font-weight: 500;
}

/* ── Sidebar: Social icons ───────────────────────────────────── */
.sidebar-social {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-3);
  transition: background 0.15s, color 0.15s;
}
.social-link:hover { background: var(--border); color: var(--ink); }
.social-link svg  { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.7; }
.social-link:hover svg { opacity: 1; }

/* ── Mobile hamburger ────────────────────────────────────────── */
.hamburger {
  display: none;
  position: fixed;
  top: 14px; right: 14px;
  z-index: 200;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 11px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  box-shadow: var(--shadow-xs);
}
.hamburger span {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--ink);
}
#mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 99;
  backdrop-filter: blur(3px);
}

/* ═══════════════════════════════════════════════════════════════
   HERO — split layout: text left, portrait right
   ═══════════════════════════════════════════════════════════════ */
#hero {
  display: grid;
  grid-template-columns: 55fr 45fr;
  min-height: 100vh;
  align-items: stretch;
}

/* Left: text content */
.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px var(--section-px);
  background: var(--bg);
  position: relative;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-4);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 32px;
}
.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  position: relative;
}
/* Two ripple rings that radiate outward alternately */
.hero-dot::before,
.hero-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--green);
  animation: radiate 2.4s ease-out infinite;
  pointer-events: none;
}
.hero-dot::after { animation-delay: 1.2s; }
@keyframes radiate {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(4.5); opacity: 0;   }
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(56px, 7.5vw, 96px);
  font-weight: 300;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin-bottom: 20px;
}
.hero-name em { font-style: italic; }

.hero-title {
  font-size: 16px;
  font-weight: 400;
  color: var(--ink-3);
  margin-bottom: 36px;
  line-height: 1.5;
}

.hero-divider {
  width: 48px; height: 2px;
  background: var(--ink);
  opacity: 0.15;
  margin-bottom: 32px;
}

.hero-bio {
  max-width: 500px;
  font-size: 15.5px;
  color: var(--ink-3);
  line-height: 1.85;
  margin-bottom: 44px;
}

.hero-stats {
  display: flex;
  gap: 0;
  max-width: 420px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: var(--shadow-xs);
  background: var(--bg);
}
.hero-stat {
  flex: 1;
  padding: 16px 18px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.hero-stat:last-child { border-right: none; }
.stat-value {
  display: block;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 5px;
  letter-spacing: -0.02em;
}
.stat-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-4);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* Right: portrait */
.hero-photo-panel {
  background: var(--bg-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
  position: relative;
  overflow: hidden;
  border-left: 1px solid var(--border);
}

/* Subtle decorative circles */
.hero-photo-panel::before,
.hero-photo-panel::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(0,0,0,0.04);
  pointer-events: none;
}
.hero-photo-panel::before {
  width: 340px; height: 340px;
  top: -80px; right: -80px;
}
.hero-photo-panel::after {
  width: 200px; height: 200px;
  bottom: -40px; left: -40px;
}

.hero-photo-frame {
  position: relative;
  width: 100%;
  max-width: 340px;
  z-index: 1;
}

/* The "card" outline behind photo */
.hero-photo-frame::before {
  content: '';
  position: absolute;
  inset: -10px -10px 10px 10px;
  border: 1.5px solid var(--border-mid);
  border-radius: 14px;
  z-index: 0;
  opacity: 0.5;
}

.hero-photo-wrap {
  position: relative;
  z-index: 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/5;
}
.hero-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Badge below photo */
.hero-photo-badge {
  position: absolute;
  bottom: -18px;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 16px;
  box-shadow: var(--shadow-sm);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.badge-text {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 13px 28px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.18s;
  letter-spacing: 0.01em;
}
.btn-primary  { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-primary:hover  { background: #333; border-color: #333; }
.btn-secondary { background: var(--bg); color: var(--ink-2); border-color: var(--border-mid); }
.btn-secondary:hover { border-color: var(--ink-3); color: var(--ink); }

/* ── Section base ────────────────────────────────────────────── */
.section {
  padding: var(--section-py) var(--section-px);
  border-bottom: 1px solid var(--border);
}
.section:nth-child(even) { background: var(--bg-alt); }
.section:last-of-type { border-bottom: none; }

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(44px, 5.5vw, 68px);
  font-weight: 300;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 56px;
}

/* ── Org Logo (shared: education + experience) ───────────────── */
.org-logo-link {
  display: inline-flex;
  flex-shrink: 0;
  border-radius: 10px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.org-logo-link:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.org-logo {
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
}
.org-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 5px;
}
.org-logo-fallback {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
  border-radius: 9px;
}

/* ── About ───────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 5fr 3fr;
  gap: 64px;
  align-items: start;
}
.about-text { font-size: 16px; color: var(--ink-2); line-height: 1.85; }
.about-text p + p { margin-top: 22px; }

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 26px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
  border-top: 3px solid var(--ink);
}
.about-card-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-4);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.about-card-text {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.45;
}

/* ── Timeline core — shared by Experience + Education ────────── */
.tl-wrap {
  position: relative;
}
/* Continuous vertical gradient line */
.tl-wrap::before {
  content: '';
  position: absolute;
  left: 6px;          /* centre of 14 px pip column */
  top: 18px;          /* start just below first pip */
  bottom: 14px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(
    to bottom,
    var(--green)      0px,
    var(--green)      52px,
    var(--ink)        140px,
    var(--border-mid) 100%
  );
}
/* Education: all past → no green at top */
.edu-wrap::before {
  background: linear-gradient(to bottom, var(--ink) 0%, var(--border) 100%);
  top: 14px;
}

/* Each row: pip column + content */
.tl-entry {
  display: grid;
  grid-template-columns: 14px 1fr;
  column-gap: 28px;
  padding-bottom: 52px;
  /* Scroll-reveal: hidden state */
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity   0.48s ease,
    transform 0.48s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: var(--tl-delay, 0s);
}
.tl-entry:last-child { padding-bottom: 0; }
.tl-entry.tl-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Pip (the dot) ───────────────────────────────────────────── */
.tl-pip {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2.5px solid var(--border-mid);
  position: relative;
  z-index: 1;
  margin-top: 3px;
  flex-shrink: 0;
  /* Spring scale-in on reveal */
  transform: scale(0);
  transition:
    transform    0.46s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 0.28s ease,
    background   0.28s ease;
  transition-delay: var(--tl-delay, 0s);
}
.tl-entry.tl-visible .tl-pip {
  transform: scale(1);
  border-color: var(--ink);
  background: var(--ink);
}

/* Active / current entry → green pip + dual radiate rings */
.tl-entry.tl-active .tl-pip {
  border-color: var(--green);
  background: var(--green);
}
.tl-entry.tl-active.tl-visible .tl-pip::before,
.tl-entry.tl-active.tl-visible .tl-pip::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--green);
  animation: tl-ping 2.4s ease-out infinite;
  pointer-events: none;
  opacity: 0;
}
.tl-entry.tl-active.tl-visible .tl-pip::after { animation-delay: 1.2s; }
@keyframes tl-ping {
  0%   { transform: scale(1);   opacity: 0.65; }
  100% { transform: scale(3.2); opacity: 0;    }
}

/* ── Experience content ──────────────────────────────────────── */
.exp-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.exp-hd-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.exp-hd-text { flex: 1; }

.exp-co-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.exp-co-link svg { width: 11px; height: 11px; color: var(--ink-5); flex-shrink: 0; }
.exp-company {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.15;
  transition: color 0.15s;
}
.exp-co-link:hover .exp-company { color: var(--blue); }

.exp-role { font-family: var(--mono); font-size: 11px; color: var(--blue); letter-spacing: 0.05em; font-weight: 700; margin: 4px 0 3px; }
.exp-loc  { font-size: 12px; color: var(--ink-5); }

.exp-period-badge {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0.06em;
  white-space: nowrap;
  padding-top: 5px;
  flex-shrink: 0;
}
/* "Present" period badge glows green */
.tl-entry.tl-active .exp-period-badge { color: var(--green); font-weight: 700; }

.exp-bullets { display: flex; flex-direction: column; gap: 10px; }
.exp-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.65;
}
.exp-bullet-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ink-4);
  flex-shrink: 0;
  margin-top: 9px;
}

/* ── Education content (inside About) ────────────────────────── */
.edu-inner  { display: flex; gap: 12px; align-items: flex-start; }
.edu-degree { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.edu-meta   { font-family: var(--mono); font-size: 10px; color: var(--blue); letter-spacing: 0.04em; margin-bottom: 5px; }
.edu-thesis { font-size: 12px; color: var(--ink-4); line-height: 1.55; font-style: italic; }

/* ── Projects ────────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.22s, transform 0.22s;
}
.project-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.project-number { font-family: var(--mono); font-size: 10px; color: var(--ink-5); margin-bottom: 12px; letter-spacing: 0.1em; }
.project-name   { font-family: var(--serif); font-size: 22px; font-weight: 500; color: var(--ink); margin-bottom: 12px; line-height: 1.2; }
.project-tech   { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tech-tag {
  padding: 3px 10px;
  background: var(--accent-soft);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.project-desc { font-size: 14px; color: var(--ink-3); line-height: 1.75; flex: 1; margin-bottom: 18px; }
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--blue);
  transition: gap 0.15s;
  margin-top: auto;
}
.project-link:hover { gap: 8px; }

/* ── Skills (icon grid) ──────────────────────────────────────── */
.skills-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}
.skill-filter-btn {
  padding: 7px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.skill-filter-btn:hover  { border-color: var(--border-mid); color: var(--ink-2); background: var(--bg-alt); }
.skill-filter-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 12px;
}

/* Individual skill tile */
.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.22s, transform 0.22s;
  cursor: default;
}
/* Brand-colour accent bar slides in from left on hover */
.skill-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--sk-accent, var(--border-mid));
  border-radius: 3px 3px 0 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}
.skill-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.skill-card:hover::before { transform: scaleX(1); }

.skill-icon-wrap {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.skill-icon-wrap i   { font-size: 38px; line-height: 1; display: block; }
.skill-icon-wrap img { width: 38px; height: 38px; object-fit: contain; }

/* Coloured text box for abstract concepts */
.skill-txt-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.2;
}

.skill-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
  text-align: center;
  line-height: 1.3;
  max-width: 100%;
}

/* ── Research ────────────────────────────────────────────────── */
.research-list { display: flex; flex-direction: column; gap: 28px; }
.research-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.2s;
}
.research-item:hover { box-shadow: var(--shadow-md); }

.research-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.research-badge {
  padding: 4px 12px;
  background: var(--ink);
  color: #fff;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.research-institution { font-size: 12.5px; color: var(--ink-4); font-family: var(--mono); }
.research-year        { font-family: var(--mono); font-size: 11px; color: var(--ink-5); margin-left: auto; }

.research-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 14px;
}
.research-desc {
  font-size: 15px;
  color: var(--ink-3);
  line-height: 1.78;
  margin-bottom: 18px;
}
.research-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.research-tag {
  padding: 4px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-3);
}

.research-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 4px;
}
.research-photo {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  border: 1px solid var(--border);
  cursor: zoom-in;
}
.research-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.research-photo:hover img { transform: scale(1.04); }

.research-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--blue);
  transition: gap 0.15s;
  margin-top: 14px;
}
.research-link:hover { gap: 8px; }

/* ── Certifications ──────────────────────────────────────────── */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 64px;
}
.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cert-issuer { font-family: var(--mono); font-size: 9.5px; color: var(--blue); letter-spacing: 0.12em; text-transform: uppercase; }
.cert-name   { font-family: var(--serif); font-size: 21px; font-weight: 400; color: var(--ink); line-height: 1.25; }
.cert-meta   { display: flex; align-items: center; gap: 12px; }
.cert-code   { font-family: var(--mono); font-size: 10.5px; color: var(--ink-4); background: var(--bg-alt); padding: 3px 9px; border-radius: 4px; }
.cert-score  { font-family: var(--mono); font-size: 11px; color: var(--green); font-weight: 700; }
.cert-link   { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; color: var(--blue); transition: gap 0.15s; margin-top: 4px; }
.cert-link:hover { gap: 8px; }

/* ── Awards ──────────────────────────────────────────────────── */
.awards-eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 10px; color: var(--ink-4);
  letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 20px;
}
.awards-eyebrow::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.photo-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 44px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-mid) transparent;
}
.photo-strip::-webkit-scrollbar { height: 4px; }
.photo-strip::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 2px; }

.strip-photo {
  flex-shrink: 0;
  width: 280px; height: 188px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  cursor: zoom-in;
}
.strip-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.strip-photo:hover img { transform: scale(1.05); }

.award-list { display: flex; flex-direction: column; }
.award-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}
.award-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.award-title { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.award-event { font-family: var(--mono); font-size: 10px; color: var(--blue); letter-spacing: 0.04em; margin-bottom: 5px; }
.award-desc  { font-size: 13.5px; color: var(--ink-3); line-height: 1.6; }

/* ── Contact ─────────────────────────────────────────────────── */
#contact { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}
.contact-heading {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 300;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.015em;
}
.contact-sub { font-size: 16px; color: var(--ink-3); line-height: 1.8; margin-bottom: 32px; }

.contact-links { display: flex; flex-direction: column; gap: 10px; }
.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.contact-row:hover { border-color: var(--border-mid); box-shadow: var(--shadow-xs); }
.contact-row-label {
  font-family: var(--mono);
  font-size: 9px; color: var(--ink-4);
  letter-spacing: 0.14em; text-transform: uppercase;
  width: 64px; flex-shrink: 0;
}
.contact-row-val {
  font-size: 13.5px; color: var(--ink-2);
  transition: color 0.15s;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.contact-row:hover .contact-row-val { color: var(--blue); }

/* ── Footer ──────────────────────────────────────────────────── */
footer {
  padding: 28px var(--section-px);
  text-align: center;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-5);
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

/* ── Lightbox ────────────────────────────────────────────────── */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 4, 4, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  /* Hidden state */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.26s ease, visibility 0.26s ease;
}
#lightbox.open {
  opacity: 1;
  visibility: visible;
}

/* Inner wrapper: spring scale on open */
.lb-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 90vw;
  max-height: 90vh;

  /* Closed state */
  transform: scale(0.86) translateY(16px);
  opacity: 0;
  transition:
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    opacity   0.28s ease;
}
#lightbox.open .lb-inner {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Image frame */
.lb-img-frame {
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 40px 90px rgba(0,0,0,0.65),
    0 0 0 1px rgba(255,255,255,0.07);
  line-height: 0;
}
#lb-img {
  display: block;
  max-width: 88vw;
  max-height: 80vh;
  object-fit: contain;
}

/* Caption */
.lb-caption {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  max-width: 500px;
  line-height: 1.5;
}

/* Close button */
.lb-close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9001;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, transform 0.18s;
  backdrop-filter: blur(4px);
}
.lb-close:hover {
  background: rgba(255,255,255,0.22);
  transform: scale(1.1) rotate(90deg);
}

/* Counter */
.lb-counter {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.12em;
}

/* Prev / Next arrows */
.lb-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9001;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, transform 0.18s;
  backdrop-filter: blur(4px);
  user-select: none;
}
.lb-arrow:hover { background: rgba(255,255,255,0.2); }
.lb-arrow.prev { left: 16px; }
.lb-arrow.next { right: 16px; }
.lb-arrow:disabled { opacity: 0.2; cursor: default; }
.lb-arrow:disabled:hover { background: rgba(255,255,255,0.08); transform: translateY(-50%); }
.lb-arrow.prev:hover { transform: translateY(-50%) translateX(-2px); }
.lb-arrow.next:hover { transform: translateY(-50%) translateX(2px); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  #hero { grid-template-columns: 1fr; }
  .hero-photo-panel { display: none; }
  .hero-content { padding: 96px var(--section-px) 64px; }
}

@media (max-width: 1000px) {
  #sidebar { transform: translateX(-100%); box-shadow: 4px 0 28px rgba(0,0,0,0.12); }
  #sidebar.open { transform: translateX(0); }
  #main { margin-left: 0; }
  .hamburger { display: flex; }
  #mobile-overlay.show { display: block; }
  .section { padding: var(--section-py) 36px; }
  footer { padding: 28px 36px; }
  .about-grid  { grid-template-columns: 1fr; }
  .contact-grid{ grid-template-columns: 1fr; }
  /* Timeline: tighten gap on tablet */
  .tl-entry { column-gap: 18px; }
  .exp-hd   { flex-direction: column; gap: 6px; }
}

@media (max-width: 580px) {
  :root { --section-py: 64px; }
  .section { padding: var(--section-py) 20px; }
  .hero-content { padding: 80px 20px 56px; }
  footer { padding: 24px 20px; }
  .hero-stats { flex-direction: column; max-width: 220px; }
  .hero-stat { border-right: none; border-bottom: 1px solid var(--border); }
  .hero-stat:last-child { border-bottom: none; }
  .projects-grid  { grid-template-columns: 1fr; }
  .skills-grid    { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
  .cert-grid      { grid-template-columns: 1fr; }
  .strip-photo    { width: 220px; height: 148px; }
  .research-photos{ grid-template-columns: 1fr; }
}
