/* ==========================================================================
   Kanat Turusbaev - personal site
   Palette knob: change --accent-base below. Alternates from the original design:
   #96700A (gold) / #2F6B5E (green) / #3B5B92 (blue) / #7A4B8C (violet)
   ========================================================================== */

:root {
  --accent-base: #96700A;

  --bg: #F6F2EA;
  --panel: #FFFCF6;
  --ink: #1D1B17;
  --muted: #6B6459;
  --line: #DED6C7;
  --accent: #96700A;
  --accent-soft: #F0E3BE;

  --serif: 'Newsreader', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --shell: 1120px;
}

/* Browsers with color-mix get the exact tints the design was built with. */
@supports (color: color-mix(in oklab, red, blue)) {
  :root {
    --accent: var(--accent-base);
    --accent-soft: color-mix(in oklab, var(--accent-base) 18%, #FFFCF6);
  }
}

[data-theme="dark"] {
  --bg: #15140F;
  --panel: #1E1C17;
  --ink: #EFEADF;
  --muted: #A29A8B;
  --line: #322F27;
  --accent: #E0855F;
  --accent-soft: #2E2119;
}

@supports (color: color-mix(in oklab, red, blue)) {
  [data-theme="dark"] {
    --accent: color-mix(in oklab, var(--accent-base) 58%, white);
    --accent-soft: color-mix(in oklab, var(--accent-base) 26%, #15140F);
  }
}

* { box-sizing: border-box; }

/* Beats the display values set on .slot, .page and friends. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-soft); }
a:hover { color: var(--ink); border-bottom-color: var(--ink); }
button { font: inherit; cursor: pointer; }

img { max-width: 100%; display: block; }

::selection { background: var(--accent-soft); color: var(--ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

@keyframes riseIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(26px) scale(0.99); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- shared type ------------------------------------------------------- */

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 32px; }

.eyebrow {
  margin: 0 0 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.section { margin-top: 96px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 28px;
}
.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 36px;
  letter-spacing: -0.02em;
}
.section-head span { font-size: 13.5px; color: var(--muted); }

.pill {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
}
.pill.mono { padding: 7px 15px; font-family: var(--mono); }

/* --- header ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
@supports (background: color-mix(in oklab, red, transparent)) {
  .site-header { background: color-mix(in oklab, var(--bg) 86%, transparent); }
}

.site-header .shell {
  padding-top: 15px;
  padding-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink);
  text-align: left;
}
.brand-name { font-family: var(--serif); font-size: 20px; letter-spacing: -0.01em; }
.brand-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }

.nav-link {
  padding: 8px 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-link:hover { color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--ink); }

.theme-toggle {
  margin-left: 10px;
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink); }

/* --- page frame -------------------------------------------------------- */

.page { max-width: var(--shell); margin: 0 auto; padding: 84px 32px 104px; animation: riseIn 0.4s ease both; }
.page[hidden] { display: none; }

.page-title {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 56px;
  line-height: 1.04;
  letter-spacing: -0.028em;
  max-width: 20ch;
}

/* --- hero -------------------------------------------------------------- */

.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: start; }

.hero h1 {
  margin: 0 0 26px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 64px;
  line-height: 1.02;
  letter-spacing: -0.028em;
  text-wrap: pretty;
}
.hero-lede { margin: 0 0 34px; font-size: 18px; max-width: 52ch; color: var(--muted); text-wrap: pretty; }

.hero-media { position: relative; }
.hero-media .slot { aspect-ratio: 4 / 5; border-radius: 4px; border: 1px solid var(--line); }
.hero-badge {
  position: absolute;
  left: -18px;
  bottom: -18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- contact dropdown -------------------------------------------------- */

.contact { position: relative; display: inline-block; }

.contact-trigger {
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  border: 0;
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 0.15s ease;
}
.contact-trigger:hover { opacity: 0.88; }
.contact-caret { font-size: 11px; }

.contact-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 30;
  min-width: min(340px, calc(100vw - 56px));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 18px 40px rgba(20, 18, 14, 0.16);
  animation: sheetIn 0.2s ease both;
}
.contact-menu[hidden] { display: none; }

.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 5px;
  border: 0;
  color: var(--ink);
}
.contact-row:hover { background: var(--accent-soft); color: var(--ink); }
.contact-row .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 62px;
}
.contact-row .v { font-size: 15px; overflow-wrap: anywhere; }

/* --- programs ---------------------------------------------------------- */

.programs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }

.program {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.program.is-primary { border-color: var(--accent); }
.program-mark {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 5px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.program-mark svg { width: 21px; height: 21px; display: block; }
.program-mark.has-logo { background: transparent; }
.program-mark.has-logo img { width: 30px; height: 30px; object-fit: contain; }
.program-text { min-width: 0; }
.program-name { font-size: 15px; font-weight: 500; line-height: 1.25; }
.program-note {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.program.is-primary .program-note { color: var(--accent); }

.languages { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.languages-list { display: flex; flex-wrap: wrap; gap: 8px; }

/* --- facts ------------------------------------------------------------- */

.facts {
  margin-top: 96px;
  border-top: 1px solid var(--line);
  padding-top: 34px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.fact .label { display: block; margin-bottom: 10px; }
.fact-value { font-family: var(--serif); font-size: 25px; line-height: 1.2; }
.fact-note { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* --- skills ------------------------------------------------------------ */

.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.skill-group .label { display: block; margin-bottom: 14px; }
.skill-items { display: flex; flex-wrap: wrap; gap: 8px; }

/* --- jump cards -------------------------------------------------------- */

.jumps {
  margin-top: 96px;
  border-top: 1px solid var(--line);
  padding-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.jump {
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 26px 28px;
  color: var(--ink);
  transition: border-color 0.15s ease;
}
.jump:hover { border-color: var(--accent); }
.jump .label { display: block; color: var(--accent); margin-bottom: 12px; }
.jump-title { font-family: var(--serif); font-size: 24px; line-height: 1.25; }

/* --- experience -------------------------------------------------------- */

.roles { border-top: 1px solid var(--line); display: flex; flex-direction: column; }

.role {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 32px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.role-aside { padding-top: 6px; display: flex; flex-direction: column; gap: 14px; }
.role-aside .slot { aspect-ratio: 4 / 3; border-radius: 5px; border: 1px solid var(--line); background: var(--panel); }
.role-meta { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.role-title { font-size: 20px; font-weight: 500; }
.role-org { font-size: 15px; color: var(--accent); margin-bottom: 8px; }
.role-lede { margin: 0 0 12px; font-size: 16px; max-width: 72ch; }
.role-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15.5px;
  color: var(--muted);
  max-width: 72ch;
}

/* --- tabs (creative + life) -------------------------------------------- */

.tabs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
}
.tab {
  padding: 11px 20px 13px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -0.01em;
  margin-bottom: -1px;
  transition: color 0.15s ease;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tab-meta {
  margin-left: auto;
  padding-bottom: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.tabs.years { margin-bottom: 34px; }
.tabs.years .tab { padding: 12px 22px 14px; font-size: 26px; }
.tabs.years .tab-meta { padding-bottom: 18px; }

.creative-intro { margin: -14px 0 32px; font-size: 18px; color: var(--muted); max-width: 56ch; }

/* --- project cards ----------------------------------------------------- */

.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }

.project {
  cursor: pointer;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  color: var(--ink);
  transition: border-color 0.15s ease;
}
.project:hover { border-color: var(--accent); }
.project-media { position: relative; }
.project-media .slot { aspect-ratio: 16 / 10; background: var(--accent-soft); border-radius: 0; }
.project-body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.project-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.project-tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.project-year { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.project-status {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.project h3 { margin: 0 0 10px; font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.2; }
.project-summary { margin: 0 0 20px; font-size: 15.5px; color: var(--muted); }
.project-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
}
.project-more { font-size: 14px; color: var(--accent); font-weight: 500; }
.project-file { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

/* --- detail overlay ---------------------------------------------------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 13, 10, 0.55);
  backdrop-filter: blur(3px);
  overflow-y: auto;
  padding: 48px 24px;
  animation: fadeIn 0.18s ease both;
}
.overlay[hidden] { display: none; }

.sheet {
  max-width: 900px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  animation: sheetIn 0.26s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.sheet-hero { position: relative; aspect-ratio: 16 / 9; background: var(--accent-soft); }
.sheet-hero .slot { border-radius: 0; height: 100%; }
.sheet-player { position: absolute; inset: 0; background: #0B0A08; }
.sheet-player iframe,
.sheet-player video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: contain;
  background: #0B0A08;
}
.sheet-close { z-index: 2; }
.sheet-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 0;
  background: rgba(20, 18, 14, 0.72);
  color: #F6F2EA;
  font-size: 17px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.sheet-close:hover { background: rgba(20, 18, 14, 0.95); }
.sheet-body { padding: 36px 40px 40px; }
.sheet-body h2 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.sheet-paras { margin: 0 0 28px; display: flex; flex-direction: column; gap: 16px; max-width: 66ch; }
.sheet-paras p { margin: 0; font-size: 17px; color: var(--muted); }
.sheet-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.sheet-cols .label { display: block; margin-bottom: 14px; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 15.5px; }
.steps li { display: flex; gap: 12px; }
.steps .n { color: var(--accent); font-family: var(--mono); font-size: 12.5px; padding-top: 2px; }
.specs { display: flex; flex-direction: column; gap: 10px; }
.spec { display: flex; gap: 16px; font-size: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.spec .k { color: var(--muted); min-width: 96px; }
.spec .v { margin-left: auto; text-align: right; }
.sheet-shots { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet-shots .slot { aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 4px; }
.sheet-download {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.download-btn {
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-size: 14.5px;
  font-weight: 500;
  border: 0;
}
.download-btn:hover { color: var(--bg); opacity: 0.88; border-color: transparent; }
.download-meta { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.download-note { margin: 10px 0 0; width: 100%; font-size: 14px; color: var(--muted); }

/* --- life -------------------------------------------------------------- */

.life-quote {
  margin: 0 0 54px;
  padding-left: 20px;
  border-left: 2px solid var(--accent);
  font-family: var(--serif);
  font-style: italic;
  font-size: 25px;
  line-height: 1.35;
  color: var(--ink);
  max-width: 30ch;
}

.life-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }

.life-grid figure {
  margin: 0;
  animation: riseIn 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

/* A gentle stagger as a year's photos come in. */
.life-grid figure:nth-child(1) { animation-delay: 0.02s; }
.life-grid figure:nth-child(2) { animation-delay: 0.07s; }
.life-grid figure:nth-child(3) { animation-delay: 0.12s; }
.life-grid figure:nth-child(4) { animation-delay: 0.17s; }
.life-grid figure:nth-child(5) { animation-delay: 0.22s; }
.life-grid figure:nth-child(6) { animation-delay: 0.27s; }

.life-frame {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 7px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(20, 18, 14, 0.06), 0 0 0 1px var(--line);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.life-frame .slot { border-radius: 0; height: 100%; background: var(--panel); }
.life-frame .slot img,
.life-frame .slot video { transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1); }

/* Only frames with something in them are clickable. */
.life-frame.is-open { cursor: zoom-in; }
.life-frame.is-open:hover,
.life-frame.is-open:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(20, 18, 14, 0.16), 0 0 0 1px var(--accent);
}
.life-frame.is-open:hover .slot img,
.life-frame.is-open:hover .slot video { transform: scale(1.045); }

/* Scrim + expand cue, revealed on hover. */
.life-frame.is-open::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(16, 14, 10, 0.42), transparent 46%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.life-frame.is-open:hover::after,
.life-frame.is-open:focus-visible::after { opacity: 1; }

.life-expand {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(20, 18, 14, 0.6);
  color: #F6F2EA;
  font-size: 13px;
  opacity: 0;
  transform: scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.life-frame.is-open:hover .life-expand,
.life-frame.is-open:focus-visible .life-expand { opacity: 1; transform: none; }

/* Empty frames: a quiet dashed placeholder instead of a flat slab. */
.life-frame.is-empty {
  background: transparent;
  box-shadow: none;
  border: 1px dashed var(--line);
}
.life-frame.is-empty .slot { background: transparent; }
.life-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  opacity: 0.72;
}
.life-empty svg { width: 22px; height: 22px; opacity: 0.85; }
.life-empty span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
/* "Video" badge on a Creative project card. */
.media-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(20, 18, 14, 0.78);
  color: #F6F2EA;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.life-grid figcaption {
  margin-top: 12px;
  padding-left: 11px;
  border-left: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
  transition: border-color 0.3s ease, color 0.3s ease;
}
.life-grid figure:hover figcaption { border-left-color: var(--accent); color: var(--ink); }

/* --- lightbox ---------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 30px 20px;
  background: rgba(13, 12, 9, 0.95);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease both;
}

.lb-figure {
  margin: 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  justify-content: center;
}

.lb-stage {
  min-height: 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.lb-stage img,
.lb-stage video,
.lb-stage iframe {
  max-width: 100%;
  max-height: 100%;
  border-radius: 5px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.5);
  animation: sheetIn 0.32s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.lb-stage iframe { width: min(100%, 1100px); aspect-ratio: 16 / 9; height: auto; border: 0; }
.lb-stage video { background: #000; }

.lb-caption {
  flex: none;
  max-width: 72ch;
  display: flex;
  align-items: baseline;
  gap: 18px;
  color: #EDE7DA;
  font-size: 15px;
  line-height: 1.5;
  text-wrap: pretty;
}
.lb-count {
  margin-left: auto;
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #A49B88;
}

.lb-btn {
  display: grid;
  place-items: center;
  border: 1px solid rgba(243, 238, 227, 0.2);
  border-radius: 999px;
  background: rgba(243, 238, 227, 0.06);
  color: #F3EEE3;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.lb-btn:hover { background: rgba(243, 238, 227, 0.16); border-color: rgba(243, 238, 227, 0.45); }
.lb-btn[disabled] { opacity: 0.25; cursor: default; }
.lb-btn[disabled]:hover { background: rgba(243, 238, 227, 0.06); border-color: rgba(243, 238, 227, 0.2); }

.lb-prev,
.lb-next { width: 46px; height: 46px; font-size: 26px; line-height: 1; padding-bottom: 4px; }

.lb-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  width: 38px;
  height: 38px;
  font-size: 16px;
}

/* --- image slots ------------------------------------------------------- */

.slot {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  min-height: 60px;
}
.slot img { width: 100%; height: 100%; object-fit: cover; }
.slot-placeholder {
  padding: 12px 16px;
  text-align: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.5;
}

/* --- footer ------------------------------------------------------------ */

.site-footer { background: #16150F; color: #F3EEE3; margin-top: 40px; }
.footer-top {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 92px 32px 52px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 64px;
  align-items: end;
}
.footer-eyebrow {
  margin: 0 0 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #EBC65B;
}
.footer-top h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 46px;
  line-height: 1.08;
  letter-spacing: -0.028em;
  text-wrap: pretty;
}
.footer-links { display: flex; flex-direction: column; }
.footer-link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 19px 2px;
  border-top: 1px solid rgba(243, 238, 227, 0.15);
  border-bottom: 0;
  color: #F3EEE3;
  transition: color 0.15s ease, padding 0.15s ease;
}
.footer-link:hover { color: #EBC65B; padding-left: 10px; padding-right: 0; border-bottom: 0; }
.footer-link .k {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #A49B88;
  margin-bottom: 5px;
}
.footer-link .v { display: block; font-size: 16.5px; overflow-wrap: anywhere; }
.footer-link .arrow { font-size: 15px; color: #EBC65B; }

.footer-bottom { max-width: var(--shell); margin: 0 auto; padding: 0 32px 34px; }
.footer-bar {
  border-top: 1px solid rgba(243, 238, 227, 0.15);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #A49B88;
}
.footer-dot { color: #EBC65B; }
.to-top {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px;
  border: 1px solid rgba(243, 238, 227, 0.22);
  border-radius: 999px;
  background: transparent;
  color: #F3EEE3;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.to-top:hover { border-color: #EBC65B; color: #EBC65B; }

/* --- responsive -------------------------------------------------------- */

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 44px; }
  .hero h1 { font-size: 52px; }
  .hero-badge { left: 12px; bottom: 12px; }
  .programs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .skills { grid-template-columns: 1fr 1fr; gap: 32px; }
  .jumps { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 44px; padding-top: 72px; }
  .footer-top h2 { font-size: 38px; }
}

@media (max-width: 760px) {
  .site-header .shell { flex-wrap: wrap; gap: 10px; padding-top: 12px; padding-bottom: 10px; }
  .brand { order: 1; }
  .theme-toggle { order: 2; margin-left: auto; }
  .nav {
    order: 3;
    margin-left: 0;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .page { padding: 56px 22px 76px; }
  .shell, .footer-top, .footer-bottom { padding-left: 22px; padding-right: 22px; }
  .hero h1 { font-size: 40px; }
  .page-title { font-size: 40px; }
  .section { margin-top: 68px; }
  .facts, .jumps { margin-top: 68px; }
  .section-head h2 { font-size: 29px; }
  .programs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skills { grid-template-columns: 1fr; }
  .role { grid-template-columns: 1fr; gap: 18px; }
  .role-aside { flex-direction: row; align-items: flex-start; gap: 16px; }
  .role-aside .slot { width: 150px; flex: none; }
  .life-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .life-grid figure { grid-column: span 2 !important; }
  .life-quote { font-size: 21px; }
  .lightbox { grid-template-columns: 1fr; gap: 14px; padding: 60px 14px 20px; }
  .lb-prev, .lb-next {
    position: absolute;
    bottom: 18px;
    width: 42px;
    height: 42px;
    background: rgba(243, 238, 227, 0.12);
  }
  .lb-prev { left: 20px; }
  .lb-next { right: 20px; }
  .lb-figure { padding-bottom: 52px; }
  .lb-caption { flex-direction: column; gap: 6px; font-size: 14px; }
  .lb-count { margin-left: 0; }
  .sheet-body { padding: 26px 22px 30px; }
  .sheet-body h2 { font-size: 30px; }
  .sheet-cols { grid-template-columns: 1fr; gap: 28px; }
  .overlay { padding: 20px 12px; }
  .footer-top h2 { font-size: 31px; }
}

@media (max-width: 460px) {
  .programs { grid-template-columns: 1fr; }
  .life-grid { grid-template-columns: 1fr; }
  .life-grid figure { grid-column: span 1 !important; }
}
