@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Mono:wght@300;400;500&family=Outfit:wght@300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── DARK THEME (default) ── */
:root, [data-theme="dark"] {
  --bg: #0d0d0f;
  --surface: #141416;
  --surface2: #1c1c20;
  --border: rgba(255,255,255,0.07);
  --accent: #c8f060;
  --accent2: #60d0f0;
  --text: #e8e8ec;
  --muted: #888892;
  --heading: #ffffff;
  --nav-bg: rgba(13,13,15,0.88);
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --nav-h: 72px;
  --max: 1100px;
  --r: 12px;
}

/* ── LIGHT THEME ── */
[data-theme="light"] {
  --bg: #f4f4f0;
  --surface: #ffffff;
  --surface2: #eaeae6;
  --border: rgba(0,0,0,0.09);
  --accent: #5c9e00;
  --accent2: #0080a8;
  --text: #2e2e34;
  --muted: #6a6a76;
  --heading: #0d0d0f;
  --nav-bg: rgba(244,244,240,0.92);
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; }

/* Smooth theme transitions */
*, *::before, *::after {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.15s ease;
}

/* But not animations */
.fade-up { transition: none !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  padding: 0 40px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: var(--heading);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex; gap: 8px; list-style: none;
}

.nav-links a {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.02em;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--heading);
  background: var(--surface2);
}

.nav-links a.active {
  color: var(--accent);
}

/* ── PAGE WRAPPER ── */
.page {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

/* ── HERO SECTION ── */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 120px 40px 100px;
  position: relative;
  overflow: hidden;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-eyebrow span {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.hero h1 { margin-bottom: 12px; }
.hero h1 em { font-style: italic; color: var(--accent); }

.hero-sub {
  font-size: 20px;
  color: var(--muted);
  margin-bottom: 40px;
  max-width: 540px;
  line-height: 1.55;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 80px;
}

.skills-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 60px;
  padding-top: 60px;
  border-top: 1px solid var(--border);
}

.glow {
  position: absolute;
  top: 60px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(200,240,96,0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* ── STATUS DOT ── */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(200,240,96,0.2);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(200,240,96,0.2); }
  50%       { box-shadow: 0 0 0 6px rgba(200,240,96,0.06); }
}

/* ── SECTION ── */
section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 60px 40px;
}

section.flush-top { padding-top: 0; }

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: -1.5px;
  color: var(--heading);
}

h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.8px;
  color: var(--heading);
  line-height: 1.15;
}

h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--heading);
}

p { color: var(--text); }

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px 32px;
  transition: border-color 0.25s, transform 0.25s;
}
.card:hover {
  border-color: rgba(200,240,96,0.25);
  transform: translateY(-2px);
}

/* ── TAG ── */
.tag {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(200,240,96,0.1);
  color: var(--accent);
  border: 1px solid rgba(200,240,96,0.2);
  letter-spacing: 0.04em;
}

.tag.blue {
  background: rgba(96,208,240,0.1);
  color: var(--accent2);
  border-color: rgba(96,208,240,0.2);
}

.tag.neutral {
  background: var(--surface2);
  color: var(--muted);
  border-color: var(--border);
}

/* ── BUTTON ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px; font-weight: 500;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #0d0d0f;
}
.btn-primary:hover { background: #d8ff70; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── DIVIDER ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 40px;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
  font-family: 'DM Mono', monospace;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-link {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 12px;
  transition: border-color 0.2s, color 0.2s;
}

.footer-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── THEME TOGGLE ── */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface);
}

/* Groups theme toggle + hamburger together on the right */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── GRAIN OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  opacity: 0;
  transform: translateY(24px);
}

.fade-up.visible {
  animation: fadeUp 0.6s ease forwards;
}

.fade-up.visible.d1 { animation-delay: 0.05s; }
.fade-up.visible.d2 { animation-delay: 0.12s; }
.fade-up.visible.d3 { animation-delay: 0.19s; }
.fade-up.visible.d4 { animation-delay: 0.26s; }
.fade-up.visible.d5 { animation-delay: 0.33s; }

/* ── SHARED PAGE HEADER ── */
.page-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 40px 60px;
}

.page-header.narrow-bottom { padding-bottom: 20px; }

.page-header h1 em { font-style: italic; color: var(--accent); }

/* Page subtitle — used across all inner pages */
.page-subtitle {
  color: var(--muted);
  max-width: 480px;
  margin-top: 16px;
  font-size: 18px;
}

/* Accent em — italic accent-coloured text inline */
.accent-em {
  font-family: 'DM Serif Display', serif;
  color: var(--accent);
  font-style: italic;
}

/* ── ABOUT SECTION (index) ── */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-left h2 { margin-bottom: 20px; }
.about-left p  { color: var(--muted); margin-bottom: 16px; }
.about-intro   { margin-top: 24px; }

.about-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.about-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── STAT CARDS (index) ── */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 20px;
}

.stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 32px;
  color: var(--heading);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-num span { color: var(--accent); }
.stat-label { font-size: 13px; color: var(--muted); }

/* ── EXPERIENCE STRIP (index) ── */
.exp-strip {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

.exp-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  transition: border-color 0.2s;
}

.exp-row:hover { border-color: rgba(200,240,96,0.2); }

.exp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.exp-dot.blue { background: var(--accent2); }

.exp-title   { font-size: 14px; font-weight: 500; color: var(--heading); }
.exp-company { font-size: 13px; color: var(--muted); }

.exp-date {
  margin-left: auto;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.exp-more { margin-top: 24px; }

/* ── PROJECT CARD (shared) ── */
.proj-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 32px;
  transition: border-color 0.25s, transform 0.25s;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.proj-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity 0.3s;
}

.proj-card:hover {
  border-color: rgba(200,240,96,0.2);
  transform: translateY(-4px);
}

.proj-card:hover::before { opacity: 1; }

.proj-card p {
  font-size: 14px;
  color: var(--muted);
  flex-grow: 1;
  line-height: 1.6;
}

.proj-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(200,240,96,0.1);
  border: 1px solid rgba(200,240,96,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.proj-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.proj-link {
  margin-top: auto;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.proj-link:hover { color: #d8ff70; }

/* ── PROJECT GRID — index (3 cards) ── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 36px;
}

.projects-more { margin-top: 32px; }

/* ── CTA SECTION (index) ── */
.cta-section {
  text-align: center;
  padding-top: 80px;
  padding-bottom: 80px;
}

.cta-section .section-label { text-align: center; }
.cta-section h2 { margin-bottom: 16px; }

.cta-desc {
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 32px;
}

/* ── SIDEQUEST DIVIDER (index) ── */
.sidequest-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 40px auto 0;
  max-width: 320px;
}

.sidequest-divider::before,
.sidequest-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.sidequest-divider span {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.sidequest-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: color 0.2s, border-color 0.2s;
}

.sidequest-link:hover {
  color: var(--accent);
  border-color: rgba(200,240,96,0.3);
}

.sidequest-link .sq-icon { font-size: 14px; }
.sidequest-btn { margin-top: 20px; }

/* ── CONTACT PAGE ── */
.contact-layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 40px 100px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: start;
}

.contact-info h2 { font-size: clamp(28px, 3.5vw, 42px); margin-bottom: 16px; }
.contact-info > p { color: var(--muted); font-size: 15px; max-width: 320px; margin-bottom: 40px; }

.contact-items { display: flex; flex-direction: column; gap: 12px; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}

.contact-item:hover {
  border-color: rgba(200,240,96,0.3);
  transform: translateX(4px);
  color: var(--heading);
}

.contact-item--static { pointer-events: none; cursor: default; }

.contact-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(200,240,96,0.08);
  border: 1px solid rgba(200,240,96,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.contact-item-icon.blue {
  background: rgba(96,208,240,0.08);
  border-color: rgba(96,208,240,0.15);
}

/* LinkedIn "in" text icon */
.contact-item-icon--li {
  font-family: 'DM Serif Display', serif;
  font-size: 13px;
  font-weight: bold;
}

/* Larger emoji icon */
.contact-item-icon--lg { font-size: 18px; }

.contact-item-text { display: flex; flex-direction: column; gap: 2px; }

.contact-item-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-item-value { font-size: 14px; color: var(--text); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
}

.form-heading {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  color: var(--heading);
  margin-bottom: 8px;
}

.form-sub { font-size: 14px; color: var(--muted); margin-bottom: 32px; }

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: rgba(200,240,96,0.4); }

.form-group select option { background: var(--surface); }
.form-group textarea { min-height: 130px; }

.form-optional {
  color: var(--muted);
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0;
}

.field-error { border-color: rgba(255,80,80,0.5) !important; }

.field-error-msg {
  font-size: 11px;
  color: #ff6060;
  margin-top: 5px;
  display: none;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.04em;
}

.field-error-msg.visible { display: block; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-submit {
  margin-top: 8px;
  width: 100%;
  justify-content: center;
  font-size: 15px;
  padding: 14px;
}

.form-success { display: none; text-align: center; padding: 40px 20px; }
.success-icon { font-size: 48px; margin-bottom: 16px; }
.form-success h3 { font-size: 22px; margin-bottom: 8px; color: var(--heading); }
.form-success p  { font-size: 14px; color: var(--muted); }

.form-error {
  display: none;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255,80,80,0.08);
  border: 1px solid rgba(255,80,80,0.2);
  color: #ff6060;
  font-size: 13px;
  text-align: center;
}

/* ── EDUCATION PAGE ── */
.edu-section  { max-width: var(--max); margin: 0 auto; padding: 0 40px 80px; }
.course-section   { max-width: var(--max); margin: 0 auto; padding: 60px 40px 80px; }
.research-section { max-width: var(--max); margin: 0 auto; padding: 60px 40px 80px; }

.edu-grid { display: grid; gap: 24px; margin-top: 40px; }

.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 36px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: start;
  transition: border-color 0.25s, transform 0.25s;
}

.edu-card:hover { border-color: rgba(200,240,96,0.25); transform: translateY(-2px); }

.edu-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(200,240,96,0.1);
  border: 1px solid rgba(200,240,96,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.edu-icon.blue { background: rgba(96,208,240,0.1); border-color: rgba(96,208,240,0.2); }

.edu-meta {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.edu-card h3  { font-size: 20px; margin-bottom: 4px; }
.edu-school   { font-size: 15px; color: var(--muted); margin-bottom: 4px; }
.edu-location { font-size: 13px; color: var(--muted); margin-bottom: 8px; opacity: 0.7; }

.edu-honours {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(200,240,96,0.08);
  border: 1px solid rgba(200,240,96,0.2);
  border-radius: 6px;
  padding: 4px 10px;
  margin-bottom: 16px;
}

.edu-honours::before { content: '★'; font-size: 10px; }

.edu-card p      { font-size: 14px; color: var(--muted); max-width: 540px; margin-bottom: 16px; }
.edu-tag-row     { display: flex; gap: 8px; flex-wrap: wrap; }

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 32px;
}

.course-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color 0.2s;
}

.course-card:hover { border-color: rgba(96,208,240,0.25); }

.course-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent2);
  margin-top: 8px;
  flex-shrink: 0;
}

.course-card span { font-size: 14px; color: var(--text); line-height: 1.4; }

.research-grid { display: grid; gap: 16px; margin-top: 32px; }

.research-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 28px 32px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
  transition: border-color 0.2s, transform 0.2s;
}

.research-card:hover { border-color: rgba(200,240,96,0.25); transform: translateY(-2px); }

.research-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(200,240,96,0.08);
  border: 1px solid rgba(200,240,96,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.research-venue {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.research-card h4 { font-size: 16px; color: var(--heading); margin-bottom: 8px; }
.research-card p  { font-size: 14px; color: var(--muted); margin-bottom: 16px; }

.pub-link-row { display: flex; gap: 10px; flex-wrap: wrap; }

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid rgba(200,240,96,0.25);
  border-radius: 6px;
  padding: 6px 12px;
  transition: background 0.2s, border-color 0.2s;
}

.pub-link:hover { background: rgba(200,240,96,0.08); border-color: rgba(200,240,96,0.5); }
.pub-link svg   { flex-shrink: 0; }

/* ── EXPERIENCE PAGE ── */
.timeline-section { max-width: var(--max); margin: 0 auto; padding: 0 40px 80px; }

.timeline { position: relative; padding-left: 28px; }

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

.timeline-item { position: relative; margin-bottom: 56px; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -32px; top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(200,240,96,0.15);
}

.timeline-item.blue-dot::before {
  background: var(--accent2);
  box-shadow: 0 0 0 3px rgba(96,208,240,0.15);
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.timeline-date {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.timeline-company {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: opacity 0.2s;
}

.timeline-company:hover { opacity: 0.75; }
.timeline-company.blue  { color: var(--accent2); }

.timeline-item h3  { margin-bottom: 6px; }
.timeline-loc      { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.timeline-item p   { font-size: 15px; color: var(--muted); max-width: 640px; margin-bottom: 14px; }

.bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 640px;
  margin-bottom: 16px;
}

.bullet-list li {
  font-size: 14px;
  color: var(--muted);
  padding-left: 18px;
  position: relative;
}

.bullet-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
}

.skill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.skills-section { max-width: var(--max); margin: 0 auto; padding: 60px 40px 80px; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
}

.skill-group h4 {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.skill-items { display: flex; flex-direction: column; gap: 8px; }

.skill-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}

.skill-item::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}

/* ── PROJECTS PAGE ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-btn {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.04em;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(200,240,96,0.05);
}

.proj-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.proj-icon-lg {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(200,240,96,0.08);
  border: 1px solid rgba(200,240,96,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.proj-icon-lg.blue {
  background: rgba(96,208,240,0.08);
  border-color: rgba(96,208,240,0.15);
}

.proj-links { display: flex; gap: 8px; }
.proj-links--offset { margin-top: 18px; }

.proj-links a {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
}

.proj-links a:hover { border-color: var(--accent); color: var(--accent); }

.proj-advisor {
  font-size: 12px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
}

.proj-date {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}

/* Small inline tag variant used on project cards */
.proj-card .t {
  display: inline-flex;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--surface2);
  color: var(--muted);
  border: 1px solid var(--border);
  letter-spacing: 0.04em;
}

/* Badges */
.badge {
  position: absolute;
  top: 16px; right: 16px;
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge-startup { background: rgba(200,240,96,0.1);   color: var(--accent);  border: 1px solid rgba(200,240,96,0.2); }
.badge-nasa    { background: rgba(96,208,240,0.1);   color: var(--accent2); border: 1px solid rgba(96,208,240,0.2); }
.badge-oss     { background: rgba(255,200,96,0.1);   color: #f0d060;        border: 1px solid rgba(255,200,96,0.2); }
.badge-wip     { background: rgba(200,240,96,0.07);  color: var(--accent);  border: 1px solid rgba(200,240,96,0.15); }

/* ── SIDEQUEST PAGE ── */
.page-intro {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 40px 56px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}

.page-intro p { color: var(--muted); font-size: 16px; max-width: 480px; line-height: 1.7; }

.shot-count {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-bottom: 4px;
}

.shot-count span {
  color: var(--accent);
  font-size: 28px;
  font-family: 'DM Serif Display', serif;
  letter-spacing: -1px;
  display: block;
  margin-bottom: 4px;
}

.gallery-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 40px 80px;
}

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

.photo-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: zoom-in;
}

.photo-item:hover .photo-overlay { opacity: 1; }
.photo-item:hover .photo-img     { transform: scale(1.04); }

.photo-img {
  width: 100%;
  display: block;
  aspect-ratio: 1740 / 2252;
  object-fit: cover;
  object-position: center;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background: var(--surface2);
}

.photo-overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  bottom: 54px;
  background: linear-gradient(to bottom, transparent 45%, rgba(0,0,0,0.62) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  pointer-events: none;
}

.overlay-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'DM Mono', monospace;
  font-size: 10.5px;
  color: #fff;
  letter-spacing: 0.07em;
  background: rgba(0,0,0,0.32);
  backdrop-filter: blur(8px);
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.14);
}

.photo-caption {
  padding: 11px 14px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border);
}

.pin-icon { color: var(--accent); flex-shrink: 0; }
.caption-text { display: flex; flex-direction: column; gap: 1px; }

.caption-location {
  font-family: 'DM Mono', monospace;
  font-size: 11.5px;
  color: var(--text);
  letter-spacing: 0.03em;
}

.caption-note { font-size: 12px; color: var(--muted); }

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 60px 80px 40px;
}

.lightbox.open { display: flex; }

.lightbox-inner {
  position: relative;
  max-width: 520px;
  width: 100%;
  animation: lbIn 0.22s ease;
}

@keyframes lbIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.lb-img-wrap { border-radius: 10px; overflow: hidden; background: #111; line-height: 0; }

.lb-img-wrap img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

.lb-meta {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lb-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.06em;
}

.lb-note    { font-size: 13px; color: rgba(255,255,255,0.4); font-style: italic; }
.lb-counter { font-family: 'DM Mono', monospace; font-size: 11px; color: rgba(255,255,255,0.28); margin-left: auto; letter-spacing: 0.1em; }

.lb-close {
  position: absolute;
  top: -46px; right: 0;
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  transition: background 0.2s, color 0.2s;
}

.lb-close:hover { background: rgba(255,255,255,0.15); color: #fff; }

.lb-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  transition: background 0.2s, color 0.2s;
}

.lb-nav:hover { background: rgba(255,255,255,0.16); color: #fff; }
.lb-prev { left: -62px; }
.lb-next { right: -62px; }

/* ── MOBILE NAV — hamburger button ── */
.nav-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}

.nav-menu-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface);
}

/* Three-bar hamburger built from spans */
.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger::before { top: -5px; }
.hamburger::after  { top:  5px; }

/* Animate to × when open */
.nav-menu-btn.open .hamburger          { background: transparent; }
.nav-menu-btn.open .hamburger::before  { transform: rotate(45deg) translate(3.5px, 3.5px); }
.nav-menu-btn.open .hamburger::after   { transform: rotate(-45deg) translate(3.5px, -3.5px); }

/* ── MOBILE NAV — backdrop (light tap-away) ── */
.nav-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 149;
  background: transparent;
}

/* ── MOBILE NAV — floating box ── */
.nav-drawer {
  position: fixed;
  top: calc(var(--nav-h) + 8px);
  right: 16px;
  z-index: 150;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  padding: 8px;
  opacity: 0;
  transform: scale(0.95) translateY(-8px);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-drawer.open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* Close button inside the box */
.nav-drawer-close {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 6px 12px;
  margin-bottom: 4px;
}

.nav-drawer-close span {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-drawer-close button {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  transition: border-color 0.2s, color 0.2s;
}

.nav-drawer-close button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-drawer-links a {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  letter-spacing: 0.04em;
  transition: color 0.2s, background 0.2s;
}

.nav-drawer-links a:hover,
.nav-drawer-links a.active {
  color: var(--heading);
  background: var(--surface2);
}

.nav-drawer-links a.active { color: var(--accent); }

/* ── MOBILE ── */
@media (max-width: 900px) {
  .masonry { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  nav { padding: 0 20px; }
  .hero, section { padding-left: 20px; padding-right: 20px; }
  .divider { margin: 0 20px; }
  footer { padding: 24px 20px; }
  .nav-links { display: none; }
  .nav-menu-btn { display: flex; }
  .about-split { grid-template-columns: 1fr; }
  .page-header, .contact-layout, .edu-section, .course-section,
  .research-section, .timeline-section, .skills-section,
  .page-intro, .gallery-wrap { padding-left: 20px; padding-right: 20px; }
  .contact-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .edu-card      { grid-template-columns: 1fr; }
  .research-card { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .lightbox { padding: 48px 16px 30px; }
  .lb-prev, .lb-next { display: none; }
  .lightbox-inner { max-width: 100%; }
}

@media (max-width: 560px) {
  .masonry { grid-template-columns: 1fr; }
}