/* Layout: dark blueprint hero → white/grey alternating bands → dark contact band.
   Single light theme by design; the navy bands are fixed brand colour, not a dark mode. */
:root {
  --navy: #0a1422;
  --navy-2: #13223a;
  --navy-line: rgba(160, 190, 230, 0.10);
  --bg: #ffffff;
  --grey: #f4f6f9;
  --text: #0f141a;
  --text-2: #5b6470;
  --line: #e3e6ea;
  --accent: #2d5fa8;
  --accent-hover: #234c88;
  --accent-light: #7fa8e0;
  --green: #12a46f;
  --green-hover: #0e8a5c;
  --amber: #d98a1c;
  --on-dark: #ffffff;
  --on-dark-2: #a9b6c8;
  --display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --nav-h: 72px;
  --radius: 10px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 60; background: var(--navy); transition: background-color .2s;
}
body.nav-solid::before { background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; font-family: var(--display); letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
section[id] { scroll-margin-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); }

.wrap {
  max-width: calc(1180px + 48px); margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 6px; }
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

.label { font-size: 12px; line-height: 1.4; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); }
.muted { color: var(--text-2); }
.ph { color: var(--text-2); font-style: italic; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 6px;
  font: 600 15px/1 var(--font); white-space: nowrap; cursor: pointer;
  border: 1px solid transparent; transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-hover); }
.btn-outline { background: var(--bg); color: var(--text); border-color: var(--line); }
.btn-outline:hover { border-color: var(--text); }
.btn-ghost-dark { background: rgba(255,255,255,0.06); color: var(--on-dark); border-color: rgba(255,255,255,0.22); }
.btn-ghost-dark:hover { background: rgba(255,255,255,0.12); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn.is-disabled { opacity: .55; cursor: not-allowed; position: relative; }
.btn.is-disabled::after {
  content: "Coming soon"; position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  background: var(--text); color: #fff; font: 500 12px/1 var(--font); padding: 6px 8px; border-radius: 4px;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s;
}
.btn.is-disabled:hover::after, .btn.is-disabled:focus-visible::after { opacity: 1; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 50;
  background: transparent; border-bottom: 1px solid transparent;
  transition: background-color .2s, border-color .2s, box-shadow .2s;
}
.nav .wrap { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-name { font-family: var(--display); font-weight: 700; font-size: 19px; color: var(--on-dark); }
.nav-name span { color: var(--accent-light); }
.nav-name:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a:not(.btn) { color: var(--on-dark-2); font-size: 15px; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav-links a:not(.btn):hover { color: var(--on-dark); text-decoration: none; }
.nav-links a.is-active { color: var(--on-dark); border-bottom-color: var(--accent-light); }
.nav-actions { display: flex; gap: 10px; margin-left: 12px; }
.nav .btn-nav { min-height: 38px; padding: 0 14px; font-size: 14px; background: transparent; color: var(--on-dark); border-color: rgba(255,255,255,0.25); }
.nav .btn-nav:hover { background: rgba(255,255,255,0.1); }
.menu-btn { display: none; min-height: 44px; padding: 0 4px; background: none; border: 0; font: 600 15px/1 var(--font); color: var(--on-dark); cursor: pointer; }

.nav.is-solid { background: rgba(255,255,255,0.96); border-bottom-color: var(--line); box-shadow: 0 1px 2px rgba(10,20,34,0.05); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.nav.is-solid .nav-name { color: var(--text); }
.nav.is-solid .nav-name span { color: var(--accent); }
.nav.is-solid .nav-links a:not(.btn) { color: var(--text-2); }
.nav.is-solid .nav-links a:not(.btn):hover { color: var(--text); }
.nav.is-solid .nav-links a.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.nav.is-solid .btn-nav { color: var(--text); border-color: var(--line); }
.nav.is-solid .btn-nav:hover { border-color: var(--text); background: transparent; }
.nav.is-solid .menu-btn { color: var(--text); }

@media (max-width: 920px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px));
  }
  .nav-links[data-open="false"] { display: none; }
  .nav-links a:not(.btn), .nav.is-solid .nav-links a:not(.btn) { color: var(--text); padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-links a.is-active, .nav.is-solid .nav-links a.is-active { color: var(--accent); border-bottom-color: var(--line); }
  .nav-actions { margin: 16px 0 0; }
  .nav-actions .btn, .nav .btn-nav { flex: 1; color: var(--text); border-color: var(--line); }
  .nav.menu-open { background: var(--bg); border-bottom-color: var(--line); }
  .nav.menu-open .nav-name { color: var(--text); }
  .nav.menu-open .nav-name span { color: var(--accent); }
  .nav.menu-open .menu-btn { color: var(--text); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; background: var(--navy); color: var(--on-dark);
  min-height: min(100svh, 940px); display: flex; flex-direction: column; justify-content: center;
  padding-block: calc(var(--nav-h) + 48px) 96px;
}
.hero::before { /* blueprint grid */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--navy-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--navy-line) 1px, transparent 1px);
  background-size: 48px 48px;
}
.hero-art {
  position: absolute; right: -4%; top: 50%; width: min(62vw, 980px); transform: translateY(-46%);
  opacity: 0.22; pointer-events: none; user-select: none;
}
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, var(--navy) 18%, rgba(10,20,34,0.55) 55%, rgba(10,20,34,0.2)); pointer-events: none; }
.hero .wrap { position: relative; width: 100%; }
.hero-name {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(64px, 13.5vw, 184px); line-height: 0.88; letter-spacing: -0.035em;
}
.hero-name span { display: block; }
.hero-name .alt { color: var(--accent-light); }
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.pill {
  display: inline-flex; align-items: center; gap: 9px; border-radius: 999px; padding: 8px 16px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid rgba(127,168,224,0.45); color: var(--accent-light); background: rgba(45,95,168,0.12);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-amber { border-color: rgba(217,138,28,0.5); color: #f0b45c; background: rgba(217,138,28,0.10); }
.hero-sub { font-family: var(--display); font-size: clamp(20px, 2.4vw, 28px); font-weight: 600; margin-top: 28px; line-height: 1.3; }
.hero-line { color: var(--on-dark-2); margin-top: 10px; font-size: 18px; max-width: 64ch; }
.hero-meta { color: var(--on-dark-2); margin-top: 14px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 16px; height: 16px; flex: none; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 6px; color: var(--on-dark-2);
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em;
}
.scroll-cue:hover { text-decoration: none; color: var(--on-dark); }
.scroll-cue svg { width: 16px; height: 16px; }

/* ---------- Sections ---------- */
.section { padding-block: 112px; }
.section-grey { background: var(--grey); }
.section-title { font-size: clamp(32px, 4vw, 44px); line-height: 1.1; font-weight: 700; margin-bottom: 20px; }
.section-lede { color: var(--text-2); max-width: 70ch; margin-bottom: 40px; }

/* ---------- About ---------- */
.about-text { display: grid; gap: 18px; max-width: 70ch; font-size: 18px; }
.focus-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.focus-card {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  background: var(--navy-2); isolation: isolate;
}
.focus-card img { width: 100%; height: 100%; object-fit: cover; }
.focus-card.on-white img { object-fit: contain; background: #fff; padding: 18px 18px 90px; }
.focus-card .fallback {
  position: absolute; inset: 0; z-index: -1; background-color: var(--navy-2);
  background-image: linear-gradient(var(--navy-line) 1px, transparent 1px), linear-gradient(90deg, var(--navy-line) 1px, transparent 1px);
  background-size: 32px 32px;
}
.focus-card .over {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px;
  background: rgba(10,20,34,0.82); color: #fff;
}
.focus-card .over .label { color: var(--accent-light); font-size: 11.5px; }
.focus-card .over h3 { font-size: 18px; margin-top: 4px; }
.focus-card .over p { font-size: 14px; color: var(--on-dark-2); margin-top: 2px; line-height: 1.45; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.about-chips { margin-top: 28px; }
.chip { border-radius: 6px; font-size: 14px; font-weight: 600; line-height: 1.3; padding: 8px 14px; background: #e9edf2; color: var(--text); }
.chip-blue { background: var(--accent); color: #fff; }
.chip-outline { background: var(--bg); border: 1px solid var(--line); }

/* ---------- Project ---------- */
.project + .project { margin-top: 96px; padding-top: 96px; border-top: 1px solid var(--line); }
.project-title { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.05; font-weight: 700; }
.project-sub { color: var(--text-2); font-size: 18px; margin-top: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
  border: 1px solid rgba(45,95,168,0.35); background: rgba(45,95,168,0.07); color: var(--accent);
  border-radius: 999px; font-size: 13.5px; font-weight: 600; padding: 6px 14px;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }

.gallery-card {
  margin-top: 36px; border: 1px solid var(--line); border-radius: 14px; padding: 20px;
  box-shadow: 0 10px 30px rgba(10,20,34,0.06); background: var(--bg);
}
.gallery { display: grid; gap: 14px; min-width: 0; }
.viewer { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.viewer-img { width: 100%; height: 100%; object-fit: contain; padding: 20px 20px 76px; cursor: zoom-in; }
.viewer-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 20px; background: rgba(10,20,34,0.86); color: #fff;
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; pointer-events: none;
}
.viewer-cap strong { font-weight: 600; font-size: 16px; }
.viewer-cap .count { color: var(--on-dark-2); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.viewer-arrow {
  position: absolute; top: calc(50% - 30px); transform: translateY(-50%); width: 44px; height: 44px;
  display: grid; place-items: center; background: rgba(255,255,255,0.95); border: 1px solid var(--line);
  border-radius: 50%; color: var(--text); cursor: pointer; box-shadow: 0 2px 8px rgba(10,20,34,0.1);
}
.viewer-arrow:hover { border-color: var(--text); }
.viewer-arrow svg { width: 18px; height: 18px; }
.viewer-arrow.prev { left: 14px; } .viewer-arrow.next { right: 14px; }
.thumbs { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 6px; }
.thumb {
  flex: 0 0 132px; aspect-ratio: 4 / 3; padding: 4px; background: #fff; cursor: pointer; scroll-snap-align: start;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; opacity: .7; transition: opacity .15s;
}
.thumb:hover { opacity: 1; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb[aria-current="true"] { border: 2px solid var(--accent); padding: 3px; opacity: 1; }
.slot { width: 100%; height: 100%; display: grid; place-items: center; text-align: center; background: var(--grey); color: var(--text-2); font-size: 13px; padding: 12px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.stat { background: var(--grey); border-radius: var(--radius); padding: 28px 20px; display: grid; gap: 8px; justify-items: center; text-align: center; align-content: center; }
.stat-num { font-family: var(--display); font-size: 38px; line-height: 1.05; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -0.02em; }
.stat .label { font-size: 12.5px; }

.project-body { display: grid; gap: 28px; max-width: 78ch; margin-top: 36px; }
.subhead { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.highlights { display: grid; gap: 10px; }
.highlights li { position: relative; padding-left: 22px; }
.highlights li::before { content: ""; position: absolute; left: 3px; top: 0.6em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.project-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 32px; }
.project-bar .left { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.details-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 8px 0; font: 600 15px/1 var(--font); color: var(--accent); cursor: pointer; min-height: 44px; }
.details-toggle svg { width: 18px; height: 18px; transition: transform .2s; }
.details-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.doc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.details-panel { margin-top: 20px; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.details-panel > * { min-width: 0; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); background: var(--grey); }
td.num, th.num { text-align: right; }
tr.flag td { background: #fff7ea; }
.table-note { font-size: 13.5px; color: var(--text-2); margin-top: 10px; max-width: 80ch; }
.basis { display: grid; grid-template-columns: max-content 1fr; font-size: 15px; margin: 0; }
.basis dt, .basis dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); }
.basis dt { color: var(--text-2); padding-right: 28px; font-weight: 600; }

.next-card { border: 2px dashed var(--line); border-radius: 14px; padding: 48px 32px; text-align: center; color: var(--text-2); }
.next-card h3 { font-size: 26px; color: var(--text); margin-top: 6px; }

/* ---------- Experience ---------- */
.exp-head { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--text-2); font-size: 15px; margin-bottom: 36px; }
.jobs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.job { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.job-top {
  position: relative; background: var(--navy); color: #fff; padding: 28px 28px 24px; min-height: 140px;
  display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; isolation: isolate;
}
.job-top::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--navy-line) 1px, transparent 1px), linear-gradient(90deg, var(--navy-line) 1px, transparent 1px); background-size: 28px 28px; }
.job-tag { position: absolute; top: 16px; left: 16px; background: #fff; color: var(--accent); font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
.job-org { font-family: var(--display); font-size: 24px; font-weight: 700; line-height: 1.15; }
.job-body { padding: 24px 28px 28px; display: grid; gap: 14px; }
.job-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--text-2); font-size: 14px; }
.job-role { font-size: 19px; font-weight: 700; }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.skill-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg); }
.skill-card .bar { height: 6px; background: var(--accent); }
.skill-card.green .bar { background: var(--green); }
.skill-card.amber .bar { background: var(--amber); }
.skill-inner { padding: 26px 26px 28px; }
.skill-title { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.skill-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: #fff; flex: none; }
.skill-card.green .skill-icon { background: var(--green); }
.skill-card.amber .skill-icon { background: var(--amber); }
.skill-icon svg { width: 22px; height: 22px; }
.skill-title h3 { font-family: var(--font); font-size: 14px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.skill-card li { position: relative; padding: 6px 0 6px 18px; font-size: 16px; line-height: 1.45; }
.skill-card li::before { content: ""; position: absolute; left: 2px; top: 0.95em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- Education ---------- */
.edu { display: grid; grid-template-columns: 200px 1fr; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg); }
.edu-mark { background: var(--navy); color: #fff; display: grid; place-items: center; font-family: var(--display); font-size: 40px; font-weight: 700; letter-spacing: 0.04em; padding: 28px; }
.edu-body { padding: 30px 32px; display: grid; gap: 10px; }
.edu-body h3 { font-size: 24px; font-weight: 700; }
.edu-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* ---------- Contact ---------- */
.contact { background: var(--navy); color: #fff; text-align: center; padding-block: 120px; position: relative; overflow: hidden; }
.contact::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--navy-line) 1px, transparent 1px), linear-gradient(90deg, var(--navy-line) 1px, transparent 1px); background-size: 48px 48px; pointer-events: none; }
.contact .wrap { position: relative; }
.contact h2 { font-size: clamp(40px, 6vw, 68px); line-height: 1.02; font-weight: 700; }
.contact h2 span { display: block; color: var(--accent-light); }
.contact-sub { color: var(--on-dark-2); margin-top: 20px; font-size: 18px; }
.contact-email { margin-top: 40px; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.contact-email .btn { min-height: 56px; font-size: 17px; padding: 0 28px; }
.copy-btn { min-height: 56px; }
.contact-actions { margin-top: 12px; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.contact-meta { margin-top: 36px; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 28px; font-size: 15px; color: var(--on-dark-2); }
.contact-meta a { color: var(--accent-light); display: inline-flex; align-items: center; gap: 8px; }
.contact-meta span { display: inline-flex; align-items: center; gap: 8px; }
.contact-meta svg { width: 17px; height: 17px; }

.footer { background: #070e18; color: var(--on-dark-2); font-size: 14px; padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); }
.footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }

/* ---------- Floating resume ---------- */
.float-resume {
  position: fixed; z-index: 40; right: calc(24px + env(safe-area-inset-right, 0px)); bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 8px 24px rgba(18,164,111,0.35); opacity: 0; pointer-events: none; transform: translateY(8px);
}
.float-resume.is-visible { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 80; background: rgba(255,255,255,0.98); display: grid; grid-template-rows: auto 1fr auto;
  padding: calc(12px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.lb-top { display: flex; justify-content: flex-end; }
.lb-stage { position: relative; min-height: 0; display: grid; place-items: center; }
.lb-stage .viewer-arrow { top: 50%; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-caption { text-align: center; font-size: 15px; padding-top: 12px; }
.lb-caption .count { color: var(--text-2); margin-left: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .focus-cards { grid-template-columns: minmax(0, 1fr); }
  .focus-card { aspect-ratio: 16 / 9; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jobs, .skills { grid-template-columns: minmax(0, 1fr); }
  .hero-art { width: 110vw; right: -30%; opacity: 0.14; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  :root { --nav-h: 64px; }
  .section { padding-block: 72px; }
  .hero { min-height: auto; padding-block: calc(var(--nav-h) + 48px) 88px; }
  .hero-name { font-size: clamp(56px, 19vw, 96px); }
  .scroll-cue { display: none; }
  .hero-line { font-size: 16px; }
  .hero-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .hero-actions .btn { width: 100%; padding: 0 10px; font-size: 14px; gap: 8px; }
  .about-text { font-size: 16px; }
  .gallery-card { padding: 10px; border-radius: 12px; }
  .viewer { aspect-ratio: 4 / 3; }
  .viewer-img { padding: 10px 10px 64px; }
  .viewer-cap { padding: 10px 14px; }
  .viewer-cap strong { font-size: 14px; }
  .viewer-arrow { width: 38px; height: 38px; }
  .viewer-arrow.prev { left: 8px; } .viewer-arrow.next { right: 8px; }
  .thumb { flex-basis: 96px; }
  .stats { gap: 10px; }
  .stat { padding: 20px 10px; }
  .stat-num { font-size: 26px; }
  .stat .label { font-size: 11px; }
  .project-bar { flex-direction: column; align-items: stretch; }
  .doc-actions .btn { width: 100%; }
  .details-panel { padding: 18px; }
  .basis { grid-template-columns: minmax(0, 1fr); }
  .basis dt { padding-bottom: 0; border-bottom: 0; }
  .job-top { padding: 24px 20px 20px; min-height: 120px; }
  .job-body { padding: 20px; }
  .job-org { font-size: 21px; }
  .edu { grid-template-columns: minmax(0, 1fr); }
  .edu-mark { padding: 22px; font-size: 32px; justify-items: start; }
  .edu-body { padding: 22px 20px; }
  .contact { padding-block: 88px; }
  .contact-email .btn { width: 100%; font-size: 15px; padding: 0 12px; }
  .contact-actions .btn { flex: 1 1 140px; }
  .float-resume { right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 380px) { .stat-num { font-size: 22px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
