/* ============ Tokens ============ */
:root {
  --bg: #faf9f6;
  --bg-2: #ffffff;
  --surface: #ffffff;
  --text: #1c1b19;
  --text-muted: #6a6862;
  --border: #e8e6df;
  --accent: #c2512e;        /* warm terracotta */
  --accent-2: #2f6f4f;      /* deep green */
  --accent-soft: #f7ece7;
  --ring: rgba(194, 81, 46, 0.14);
  --radius: 14px;
  --maxw: 940px;
  --font-sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

[data-theme="dark"] {
  --bg: #100f0e;
  --bg-2: #161514;
  --surface: #171614;
  --text: #f0eee9;
  --text-muted: #a09d95;
  --border: #2a2724;
  --accent: #e8794f;
  --accent-2: #6bbf95;
  --accent-soft: #241813;
  --ring: rgba(232, 121, 79, 0.18);
}

/* ============ Base ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.1; letter-spacing: -0.015em; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ============ Background orbs ============ */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.orb-1 { width: 460px; height: 460px; background: var(--accent); top: -160px; right: -120px; opacity: 0.16; }
.orb-2 { width: 400px; height: 400px; background: var(--accent-2); top: 40%; left: -180px; opacity: 0.13; }
[data-theme="dark"] .orb-1 { opacity: 0.22; }
[data-theme="dark"] .orb-2 { opacity: 0.18; }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.brand-mark {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent); color: #fff;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
}
.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-links { list-style: none; display: flex; gap: 26px; }
.nav-links a { position: relative; font-size: 0.92rem; color: var(--text-muted); transition: color 0.15s ease; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 2px; width: 0;
  background: var(--accent); transition: width 0.2s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--text); }

.theme-toggle, .nav-toggle {
  display: grid; place-items: center;
  background: none; border: 1px solid var(--border); border-radius: 10px;
  width: 38px; height: 38px; cursor: pointer; color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.theme-toggle:hover, .nav-toggle:hover { border-color: var(--text-muted); }
.ico-moon { display: none; }
[data-theme="dark"] .ico-sun { display: none; }
[data-theme="dark"] .ico-moon { display: block; }

.nav-toggle { display: none; flex-direction: column; gap: 4px; }
.nav-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; }

.nav-drawer {
  list-style: none; display: none; flex-direction: column;
  border-top: 1px solid var(--border); background: var(--bg);
}
.nav-drawer.open { display: flex; }
.nav-drawer li { border-bottom: 1px solid var(--border); }
.nav-drawer a { display: block; padding: 15px 24px; font-size: 0.98rem; }

/* ============ Reveal animation ============ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============ Hero ============ */
.hero { padding: 104px 24px 60px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted);
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); margin-bottom: 26px;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2);
  box-shadow: 0 0 0 0 var(--accent-2); animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-2) 60%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.hero h1 { font-size: clamp(2.3rem, 6.4vw, 4.1rem); margin-bottom: 26px; max-width: 15ch; }
.hero h1 .ital { font-style: italic; color: var(--accent); }
.hero h1 .hl { position: relative; white-space: nowrap; }
.hero h1 .hl::after {
  content: ""; position: absolute; left: -2px; right: -2px; bottom: 0.08em; height: 0.32em;
  background: var(--accent-soft); z-index: -1; border-radius: 3px;
}
.lede { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--text-muted); max-width: 600px; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--radius);
  font-size: 0.96rem; font-weight: 500;
  transition: transform 0.14s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 20px var(--ring); }
.btn-primary:hover { box-shadow: 0 10px 28px var(--ring); transform: translateY(-2px); }
.btn-primary .arr { transition: transform 0.18s ease; }
.btn-primary:hover .arr { transform: translateX(4px); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--text-muted); }

/* Stats */
.stats { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 56px; padding-top: 34px; border-top: 1px solid var(--border); }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 500; letter-spacing: -0.02em; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); }

/* ============ Marquee ============ */
.marquee { overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 16px 0; margin: 24px 0 8px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 26px; white-space: nowrap; width: max-content; animation: scroll 28s linear infinite; }
.marquee-track span { font-family: var(--font-mono); font-size: 0.95rem; color: var(--text-muted); }
.marquee-track span:nth-child(odd) { color: var(--text); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ============ Sections ============ */
.section { padding: 70px 24px; }
.section-head { margin-bottom: 40px; }
.section-num { display: block; font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); margin-bottom: 12px; letter-spacing: 0.02em; }
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.about-grid p { color: var(--text-muted); font-size: 1.05rem; }

/* ============ Projects ============ */
.projects-list { display: flex; flex-direction: column; }
.project {
  display: grid; grid-template-columns: 64px 1fr; gap: 20px;
  padding: 30px 8px; border-top: 1px solid var(--border);
  transition: background 0.2s ease, padding 0.2s ease;
}
.project:last-child { border-bottom: 1px solid var(--border); }
.project:hover { background: var(--surface); }
.project-index { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text-muted); padding-top: 6px; }
.project:hover .project-index { color: var(--accent); }
.project-title-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.project h3 { font-size: 1.4rem; }
.project-type { font-family: var(--font-mono); font-size: 0.76rem; color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 12%, transparent); padding: 3px 10px; border-radius: 999px; }
.project-main p { color: var(--text-muted); font-size: 0.98rem; margin-bottom: 16px; max-width: 62ch; }

/* Tags */
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 400;
  padding: 5px 11px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 16%, transparent);
}

/* ============ Skills ============ */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }
.skill-group h4 { font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 16px; }

/* ============ Timeline ============ */
.timeline { display: flex; flex-direction: column; margin-bottom: 40px; }
.timeline-item { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 24px 0; border-top: 1px solid var(--border); position: relative; }
.timeline-item:last-child { border-bottom: 1px solid var(--border); }
.timeline-meta { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-muted); padding-top: 4px; }
.timeline-body h3 { font-size: 1.2rem; margin-bottom: 6px; }
.timeline-body h3 .at { font-family: var(--font-sans); font-weight: 400; font-size: 0.95rem; color: var(--accent-2); }
.timeline-body p { color: var(--text-muted); font-size: 0.96rem; }

.education { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.edu-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; background: var(--surface); transition: border-color 0.15s ease, transform 0.15s ease; }
.edu-item:hover { border-color: var(--accent); transform: translateY(-3px); }
.edu-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.edu-item h3 { font-size: 1.12rem; }
.edu-date { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); }
.edu-org { color: var(--text-muted); font-size: 0.92rem; }

/* ============ Contact ============ */
.contact-card {
  border: 1px solid var(--border); border-radius: 22px;
  background: var(--surface); padding: 48px clamp(24px, 5vw, 56px);
  position: relative; overflow: hidden;
}
.contact-card::before {
  content: ""; position: absolute; top: -80px; right: -60px;
  width: 260px; height: 260px; border-radius: 50%;
  background: var(--accent); opacity: 0.08; filter: blur(30px);
}
.contact-card .section-num { color: var(--accent); }
.contact-card h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 14px; }
.contact-lede { color: var(--text-muted); font-size: 1.1rem; max-width: 520px; margin-bottom: 32px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 14px; }
.contact-link {
  display: flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 22px; min-width: 210px; background: var(--bg);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
a.contact-link:hover { border-color: var(--accent); transform: translateY(-3px); }
.contact-label { font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.contact-value { font-weight: 500; }

/* ============ Footer ============ */
.site-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 30px; padding-bottom: 44px; margin-top: 40px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.9rem; flex-wrap: wrap; gap: 10px; }
.back-top { font-family: var(--font-mono); font-size: 0.85rem; transition: color 0.15s ease; }
.back-top:hover { color: var(--accent); }

/* ============ Research ============ */
.research-lede { color: var(--text-muted); font-size: 1.08rem; max-width: 68ch; margin-bottom: 32px; }

.research-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin-bottom: 40px;
}
.rstat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.rstat-num { font-family: var(--font-display); font-size: 1.9rem; font-weight: 500; letter-spacing: -0.02em; display: block; }
.rstat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; display: block; }

/* Collapsible results toggle */
.results-toggle {
  display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap;
  width: 100%; margin: 26px 0 0; padding: 18px 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  cursor: pointer; text-align: left; color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.results-toggle:hover { border-color: var(--accent); }
.results-toggle .rt-label { font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; }
.results-toggle .rt-sub { flex: 1; font-size: 0.9rem; color: var(--text-muted); }
.results-toggle .rt-chevron { display: grid; place-items: center; color: var(--accent); transition: transform 0.2s ease; }
.results-toggle.open .rt-chevron { transform: rotate(180deg); }
.research-results[hidden] { display: none; }
.research-results { margin-top: 22px; }
@media (max-width: 560px) { .results-toggle .rt-sub { flex-basis: 100%; } }

/* Pipeline funnel */
.funnel { margin: 8px 0 14px; }
.fn-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fn-bar {
  display: flex; align-items: baseline; gap: 12px; min-width: 240px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 10px; padding: 12px 18px;
}
.fn-count { font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; color: var(--accent); white-space: nowrap; }
.fn-title { font-size: 0.95rem; color: var(--text); }
.fn-res { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); }
.fn-join { width: 2px; height: 16px; background: var(--border); margin: 5px 0 5px 30px; }

.chart-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 26px clamp(18px, 3vw, 30px); margin-bottom: 22px;
}
.chart-block h3 { font-size: 1.2rem; margin-bottom: 8px; }
.chart-note { color: var(--text-muted); font-size: 0.94rem; max-width: 72ch; margin-bottom: 20px; line-height: 1.6; }
.chart { width: 100%; overflow-x: auto; }
.chart svg { display: block; width: 100%; height: auto; }

.chart-legend { display: flex; gap: 20px; margin-top: 14px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); }
.chart-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart-legend .sw-pos { background: var(--accent-2); }
.chart-legend .sw-neg { background: var(--accent); }
.chart-legend .legend-note { color: var(--text-muted); opacity: 0.8; }

.research-split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

/* Table */
.table-scroll { overflow-x: auto; }
.research-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 480px; }
.research-table th {
  text-align: left; font-family: var(--font-mono); font-size: 0.74rem;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted);
  font-weight: 400; padding: 0 12px 10px 0; border-bottom: 1px solid var(--border);
}
.research-table th.num, .research-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.research-table td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--border); }
.research-table tr:last-child td { border-bottom: none; }
.research-table .sname { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent); }
.research-table .pos { color: var(--accent-2); font-weight: 500; }

/* Year cards */
.year-cards { display: flex; flex-direction: column; gap: 12px; }
.ycard { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--bg-2); border-radius: var(--radius); border: 1px solid var(--border); }
.ycard-year { font-family: var(--font-mono); font-size: 0.95rem; color: var(--accent); }
.ycard-wr { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; }
.ycard-meta { font-size: 0.8rem; color: var(--text-muted); }

/* Methodology */
.method-block { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 26px clamp(18px, 3vw, 30px); margin: 22px 0; }
.method-block h3 { font-size: 1.2rem; margin-bottom: 16px; }
.method-list { list-style: none; display: grid; gap: 12px; }
.method-list li { color: var(--text-muted); font-size: 0.96rem; line-height: 1.6; padding-left: 20px; position: relative; }
.method-list li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.method-list strong { color: var(--text); font-weight: 500; }

/* Limitations */
.limitations { border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; padding: 20px 24px; background: var(--bg-2); }
.limitations h4 { font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); margin-bottom: 10px; font-weight: 500; }
.limitations p { color: var(--text-muted); font-size: 0.93rem; line-height: 1.65; max-width: 76ch; }
.limit-list { list-style: none; display: grid; gap: 11px; max-width: 82ch; }
.limit-list li { color: var(--text-muted); font-size: 0.93rem; line-height: 1.6; padding-left: 18px; position: relative; }
.limit-list li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.limit-list strong { color: var(--text); font-weight: 500; }

/* SVG chart text */
.chart .ax { font-family: var(--font-mono); font-size: 10px; fill: var(--text-muted); }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .zero-line { stroke: var(--text-muted); stroke-width: 1; stroke-dasharray: 3 3; }

/* ============ View button ============ */
.view-btn {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 16px; padding: 9px 16px;
  font-family: var(--font-mono); font-size: 0.82rem; font-weight: 500;
  color: var(--text); background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.view-btn span { transition: transform 0.18s ease; }
.view-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.view-btn:hover span { transform: translate(3px, -3px); }
.view-btn.is-live { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.view-btn.is-live::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 22%, transparent);
}

/* ============ Modal ============ */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(12px, 3vw, 36px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 12, 10, 0.55); backdrop-filter: blur(4px); }
.modal-panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 1040px; height: min(86vh, 760px);
  display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  transform: translateY(14px) scale(0.985); transition: transform 0.28s cubic-bezier(.2,.7,.2,1);
}
.modal.open .modal-panel { transform: none; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--border); background: var(--bg-2);
}
.modal-header h3 { font-size: 1.15rem; }
.modal-sub { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.modal-header-actions { display: flex; align-items: center; gap: 10px; }
.modal-open-tab { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); padding: 7px 12px; border: 1px solid var(--border); border-radius: 9px; transition: border-color 0.15s ease; }
.modal-open-tab:hover { border-color: var(--accent); }
.modal-close {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--border); border-radius: 9px; background: none; color: var(--text); cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.modal-close:hover { border-color: var(--text-muted); background: var(--bg); }
.modal-body { flex: 1; overflow: auto; background: var(--bg-2); }
.modal-body iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }

/* Screenshot gallery */
.gallery { display: flex; flex-direction: column; gap: 26px; padding: 20px; }
.shot { margin: 0; }
.shot img { width: 100%; border-radius: 12px; border: 1px solid var(--border); display: block; background: #0c0c0c; }
.shot figcaption {
  margin-top: 10px; font-size: 0.9rem; color: var(--text-muted); line-height: 1.55;
  padding-left: 12px; border-left: 2px solid var(--accent);
}
.gallery-empty {
  min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 60px 24px; text-align: center; color: var(--text-muted);
}
.gallery-empty .ge-icon {
  width: 54px; height: 54px; display: grid; place-items: center; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent);
}
.gallery-empty h4 { font-family: var(--font-display); font-size: 1.25rem; color: var(--text); font-weight: 500; }
.gallery-empty p { max-width: 380px; font-size: 0.95rem; }
.gallery-empty code { font-family: var(--font-mono); font-size: 0.82rem; background: var(--bg); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--border); color: var(--accent); }

body.modal-locked { overflow: hidden; }

/* ============ Responsive ============ */
@media (max-width: 720px) {
  .modal-panel { height: 92vh; max-width: 100%; }
  .modal-open-tab { display: none; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 72px 24px 48px; }
  .stats { gap: 28px; }
  .stat-num { font-size: 1.8rem; }
  .about-grid { grid-template-columns: 1fr; gap: 18px; }
  .project { grid-template-columns: 1fr; gap: 8px; }
  .project-index { padding-top: 0; }
  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
  .timeline-meta { padding-top: 0; }
  .education { grid-template-columns: 1fr; }
}
