:root {
  color-scheme: adark;
  --bg: #0c1016;
  --panel: #121822;
  --text: #f1f5fb;
  --muted: #a7b3c5;
  --line: #2c3748;
  --accent: #baf57c;
  --mono: ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.6 system-ui, sans-serif; }
a { color: inherit; text-underline-offset: .25em; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.skip { position: absolute; z-index: 2; top: .5rem; left: .5rem; padding: .5rem 1rem; background: var(--panel); }
.skip:not(:focus) { clip-path: inset(50%); }
.shell { width: min(76rem, calc(100% - 4rem)); margin-inline: auto; }
.masthead, .footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.15rem; }
.masthead, .section, .footer { border-color: var(--line); }
.masthead { border-bottom: 1px solid var(--line); }
.masthead a, .footer a { text-decoration: none; }
.masthead a:hover, .footer a:hover { color: var(--accent); }
.brand { font-weight: 720; white-space: nowrap; }
.brand span { color: var(--accent); margin-right: .25em; }
nav { display: flex; gap: clamp(.6rem, 3vw, 2rem); color: var(--muted); }
.outline, .primary { display: inline-flex; align-items: center; gap: .65rem; border-radius: .5rem; padding: .55rem .85rem; white-space: nowrap; }
.outline { border: 1px solid var(--line); }
.hero { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 2rem; padding-block: clamp(3rem, 9vw, 7.5rem); }
.label { color: var(--accent); font: .75rem/1.5 var(--mono); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .8rem; }
.signal { display: inline-block; width: .5em; height: .5em; margin: 0 .45em .12em 0; background: var(--accent); border-radius: 50%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1; }
h1 { font-size: clamp(3rem, 8.2vw, 8.2rem); letter-spacing: -.085em; margin-bottom: 1.25rem; }
h1 em { color: var(--accent); font-style: normal; }
h2 { font-size: clamp(2.35rem, 5vw, 4.6rem); letter-spacing: -.065em; margin-bottom: 0; }
h3 { font-size: clamp(1.2rem, 2vw, 1.65rem); letter-spacing: -.035em; margin-bottom: .6rem; }
.intro, .muted, dd { color: var(--muted); }
.intro { max-width: 46ch; font-size: 1.08rem; margin-bottom: 1.6rem; }
.primary { background: var(--accent); color: #13210b; font-weight: 750; text-decoration: none; padding: .75rem 1rem; }
.primary:hover { background: #d4ffa5; }
.section { border-top: 1px solid var(--line); padding-block: clamp(2.5rem, 6vw, 5rem); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.7rem; }
.section-heading .muted { margin: 0; }
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: .9rem; overflow: hidden; }
.card-body { padding: 1.15rem; }
.preview { min-height: 11.5rem; padding: 1rem; border-bottom: 1px solid var(--line); background: #171f2b; }
.assistant-preview { display: grid; align-content: center; gap: .6rem; font-size: .79rem; }
.prompt, .answer { width: fit-content; border: 1px solid #44546a; border-radius: .45rem; padding: .5rem .65rem; background: #111823; }
.prompt { justify-self: end; }
.answer { display: flex; gap: .55rem; }
.answer b, .answer small { color: var(--accent); }
.answer small { display: block; margin-top: .2rem; }
.analytics-preview { display: grid; grid-template-rows: auto 1fr; gap: .6rem; }
.chart-caption { display: flex; justify-content: space-between; gap: .5rem; font: .7rem/1.5 var(--mono); color: var(--muted); }
.bars { display: flex; align-items: end; gap: 6%; padding-inline: 5%; background: repeating-linear-gradient(to top, #344152 0 1px, transparent 1px 25%); }
.bars i { flex: 1; height: 33%; border-radius: .2rem .2rem 0 0; background: #89b7ff; }
.bars i:nth-child(2) { height: 50%; }
.bars i:nth-child(3) { height: 41%; }
.bars i:nth-child(4) { height: 67%; }
.bars i:nth-child(5) { height: 55%; }
.bars i:nth-child(6) { height: 78%; }
.bars i:nth-child(7) { height: 86%; background: var(--accent); }
.workflow-preview { display: grid; place-content: center; justify-items: center; font: .75rem/1.4 var(--mono); }
.workflow-preview span { padding: .3rem .65rem; border: 1px solid #645781; border-radius: .3rem; background: #242034; }
.workflow-preview b { color: #dac9ff; line-height: 1.15; }
details { border-top: 1px solid var(--line); padding-top: .75rem; }
summary { cursor: pointer; color: var(--accent); width: fit-content; font-size: .9rem; }
details p { margin: .6rem 0 0; color: var(--muted); }
.two-column { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 2rem; }
.focus-list { margin: 0; }
.focus-list div { display: grid; grid-template-columns: 7.5rem 1fr; gap: .75rem; border-bottom: 1px solid var(--line); padding-block: .75rem; }
dt { font-weight: 700; }
dd { margin: 0; }
.contact { font-size: clamp(1.2rem, 3vw, 2rem); color: var(--accent); overflow-wrap: anywhere; justify-self: start; }
.footer { border-top: 1px solid var(--line); color: var(--muted); }
@media (max-width: 56rem) {
  .hero { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 42rem) {
  .shell { width: calc(100% - 2rem); }
  .hero, .projects, .two-column { grid-template-columns: 1fr; }
  .hero { gap: 2rem; }
  .section-heading { display: block; }
  .section-heading .muted { margin-top: .6rem; }
  .masthead { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* The opening plays once on the home view. Deep links open directly. */
@media (prefers-reduced-motion: no-preference) {
  .play-opening .masthead {
    animation: opening-nav 650ms 190ms both;
  }
  .play-opening .hero {
    animation: opening-scene 1250ms cubic-bezier(.2,.72,.24,1) both;
  }
  .play-opening .hero-copy > * {
    animation: opening-copy 780ms cubic-bezier(.2,.72,.24,1) both;
  }
  .play-opening .hero-copy > .label { animation-delay: 160ms !important; }
  .play-opening .hero-copy > h1 { animation-delay: 285ms !important; }
  .play-opening .hero-copy > .intro { animation-delay: 440ms !important; }
  .play-opening .hero-copy > .primary { animation-delay: 550ms; }
  .play-opening .film-screen canvas {
    animation: opening-visual 1175ms 130ms cubic-bezier(.22,.72,.23,1) both;
  }
  .masthead:focus-within,
  .hero:focus-within,
  .hero-copy:focus-within > * { animation: none !important; }

  @keyframes opening-nav {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: none; }
  }
  @keyframes opening-scene {
    from { opacity: .25; }
    to { opacity: 1; }
  }
  @keyframes opening-copy {
    from { opacity: 0; transform: perspective(700px) translateY(25px) rotateX(-12deg); }
    to { opacity: 1; transform: none; }
  }
  @keyframes opening-visual {
    from { opacity: 0; clip-path: inset(46% 4% round 1rem); transform: perspective(850px) translateZ(-95px) rotateY(-12deg); }
    to { opacity: 1; clip-path: inset(0 round 1rem); transform: none; }
  }
}


.film { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1rem, 4vw, 4rem); }
.film-story { grid-area: 1 / 1; min-width: 0; }
.film-screen { grid-area: 1 / 2; position: sticky; top: 0; height: 100svh; align-self: start; display: grid; place-items: center; pointer-events: none; }
.film-screen canvas { width: 100%; height: min(75svh, 43rem); display: block; }
.film .hero { display: flex; min-height: calc(100svh - 4rem); }
.film h1 { font-size: clamp(3rem, 7.4vw, 7rem); }
.film .section-heading { display: block; }
.film .section-heading .muted { margin-top: .65rem; }
.film .projects { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.film .card { margin-bottom: clamp(3rem, 22vh, 14rem); scroll-margin-top: 3rem; }
.film .card:last-child { margin-bottom: clamp(2rem, 10vh, 7rem); }
@media (max-width: 42rem) {
  .film { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .film-screen { grid-area: 1 / 1; height: 39svh; z-index: 1; background: linear-gradient(var(--bg) 75%, transparent); }
  .film-screen canvas { height: 39svh; }
  .film .hero { min-height: 90svh; align-items: end; padding-top: 39svh; }
  .film .card { scroll-margin-top: 40svh; margin-bottom: 43svh; }
  .film .card:last-child { margin-bottom: 10vh; }
  .film #work { scroll-margin-top: 39svh; }
}
@media (prefers-reduced-motion: reduce) {
  .film-screen { position: static; }
}



.about-section { display: grid; gap: clamp(1.5rem, 5vw, 3.5rem); }
.profile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: clamp(1.25rem, 5vw, 4rem); align-items: center; }
.portrait-slot {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 22rem);
  aspect-ratio: 5 / 6;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: radial-gradient(ellipse at 50% 38%, #263a37, transparent 72%), var(--panel);
  color: var(--muted);
}
.portrait-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait-slot:has(img) span { display: none; }
.bio p:last-child { color: var(--muted); max-width: 56ch; margin: 1rem 0 0; }
.about-section .focus-list div { grid-template-columns: minmax(6.5rem, 1fr) minmax(0, 2.7fr); }
.primary, .outline, .contact, summary {
  min-height: 44px;
  border-radius: 999px;
}
.primary, .outline, .contact { padding: .55rem 1rem; }
.primary, .outline, .contact, summary { transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease, border-color 160ms ease; }
.primary:hover { box-shadow: 0 0 1.5rem #baf57c38; }
.outline:hover, .contact:hover, summary:hover { background: #222d38; border-color: #7b8b9e; }
.primary:active, .outline:active, .contact:active, summary:active { transform: scale(.96); }
.contact { display: inline-flex; align-items: center; gap: .65rem; border: 1px solid var(--line); font-size: 1rem; text-decoration: none; }
summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; padding: .45rem .85rem; border: 1px solid var(--line); list-style: none; }
summary::-webkit-details-marker { display: none; }
summary span::before { content: '+'; font: 1.1rem var(--mono); }
details[open] summary span::before { content: '−'; }
@media (max-width: 42rem) {
  .profile { grid-template-columns: 1fr; }
  .portrait-slot { width: min(100%, 16rem); }
}
@media (prefers-reduced-motion: reduce) {
  .primary, .outline, .contact, summary { transition: none; }
  .primary:active, .outline:active, .contact:active, summary:active { transform: none; }
}

.film .hero-copy {
  width: 100%;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: linear-gradient(145deg, #18232a, var(--panel) 72%);
}
.film h1 { font-size: clamp(2.25rem, 6.4vw, 6.1rem); }
.card-frame { min-width: 0; }
.film .card { margin-bottom: 0; }
.film .card-frame:not(:last-child) { margin-bottom: clamp(3rem, 22vh, 14rem); }
.film .card-frame:last-child { margin-bottom: clamp(2rem, 10vh, 7rem); }
@media (max-width: 42rem) {
  .film .card-frame:not(:last-child) { margin-bottom: 43svh; }
}
@media (prefers-reduced-motion: no-preference) {
  .film .hero-copy, .film .card {
    transform: perspective(950px) translateZ(var(--panel-z, 0px)) rotateX(var(--panel-x, 0deg)) rotateY(var(--panel-y, 0deg));
    transform-origin: center;
    backface-visibility: hidden;
  }
  .film .hero-copy:focus-within, .film .card:focus-within { transform: none; }
}

.brand { display: inline-flex; align-items: center; gap: .55rem; }
.brand img { display: block; flex: none; }

.chapter-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chapter-nav a, .demo button { border: 1px solid var(--line); border-radius: 99px; padding: .6rem .9rem; background: #151e29; color: var(--text); text-decoration: none; font: inherit; }
.chapter-nav a[aria-current], .demo button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.chapter-nav a:hover, .demo button:hover { background: #253344; }
.film .card-frame { min-height: 76svh; margin-bottom: 0; scroll-margin-top: 2rem; }
.film .card-frame:not(:last-child), .film .card-frame:last-child { margin-bottom: 0; }
.film .card { position: sticky; top: 17svh; }
.film .card-body { padding: clamp(1rem, 3vw, 2rem); }
.demo { padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; background: #0e151e; }
.demo-question { margin-bottom: .7rem; }
.demo button { cursor: pointer; min-height: 44px; }
.demo button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.demo-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.demo-result { margin: .75rem 0 0; color: var(--accent); font-size: .93rem; }
.demo-result:empty { margin: 0; }
@media (max-width: 42rem) {
  .film .card-frame { min-height: 66svh; scroll-margin-top: 40svh; }
  .film .card { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  .film .card { position: static; }
  .film .card-frame { min-height: 0; }
  .film .card-frame + .card-frame { margin-top: 1rem; }
}

.experience-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.experience-card { border: 1px solid var(--line); border-radius: 1rem; background: var(--panel); overflow: hidden; }
.experience-copy { padding: 1.25rem; }
.experience-copy .muted { margin-bottom: 0; }
.experience-stage {
  --scene-color: #c6a6ff;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 15rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  perspective: 560px;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--scene-color) 20%, transparent), transparent 65%),
    radial-gradient(circle, #344155 1px, transparent 1.5px) 0 0 / 16px 16px, #0e151f;
}
.stage-data { --scene-color: #84c8ff; }
.stage-flow { --scene-color: var(--accent); }
.experience-model { position: relative; width: 10rem; height: 8rem; transform-style: preserve-3d; transform: rotateX(18deg) rotateY(-28deg); }
.experience-model i, .experience-model b { position: absolute; display: block; border: 1px solid var(--scene-color); }
.model-ai i { inset: 0 1rem; border-radius: 50%; }
.model-ai i:nth-child(2) { transform: rotateX(64deg); }
.model-ai i:nth-child(3) { transform: rotateY(64deg); }
.model-ai b { inset: 37% 40%; border-radius: 50%; background: var(--scene-color); box-shadow: 0 0 1.7rem var(--scene-color); transform: translateZ(25px); }
.model-data i { bottom: 10%; left: calc(8% + var(--bar) * 23%); width: 15%; height: var(--height); background: #2f648c; transform-style: preserve-3d; }
.model-data i::after { content: ""; position: absolute; inset: -1px; border: inherit; background: #234563; transform: rotateY(-90deg); transform-origin: right; width: 85%; left: auto; }
.model-data i:nth-child(1) { --bar: 0; --height: 27%; }
.model-data i:nth-child(2) { --bar: 1; --height: 44%; }
.model-data i:nth-child(3) { --bar: 2; --height: 37%; }
.model-data i:nth-child(4) { --bar: 3; --height: 72%; background: #4a84ac; }
.model-flow i { inset: 19% 17%; border-radius: .55rem; background: #1d342c; transform: translate3d(var(--shift), var(--shift), var(--depth)); }
.model-flow i:nth-child(1) { --shift: -1.25rem; --depth: -30px; }
.model-flow i:nth-child(2) { --shift: 0rem; --depth: 0px; }
.model-flow i:nth-child(3) { --shift: 1.25rem; --depth: 30px; background: #324d32; }
.model-flow i::after { content: ""; position: absolute; inset: 29% 23%; border-block: 1px solid var(--scene-color); }
@media (prefers-reduced-motion: no-preference) {
  .experience-model { transition: transform 650ms cubic-bezier(.2,.75,.25,1); }
  .experience-card:hover .experience-model { transform: rotateX(-12deg) rotateY(32deg) translateZ(23px); }
}
@media (max-width: 48rem) {
  .experience-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 34rem) {
  .experience-grid { grid-template-columns: 1fr; }
  .masthead nav { flex-wrap: wrap; }
}

.experience-grid { display: block; }
.experience-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.25rem, 6vw, 5rem);
  min-height: 100svh;
  overflow: visible;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding-block: clamp(2rem, 7vh, 5rem);
  background: none;
}
.experience-stage { grid-column: 2; grid-row: 1; min-height: clamp(17rem, 62svh, 36rem); border: 1px solid var(--line); border-radius: 1rem; }
.experience-model { scale: 1.25; }
.experience-copy { grid-column: 1; grid-row: 1; padding: 0; }
.experience-copy h3 { margin-bottom: 1rem; font-size: clamp(2.75rem, 6vw, 6rem); letter-spacing: -.065em; }
.experience-role { margin-bottom: .15rem; font-size: clamp(1.25rem, 2.6vw, 2rem); }
.experience-dates { color: var(--accent); font: .9rem/1.5 var(--mono); }
.experience-copy .muted { max-width: 40ch; }
@media (max-width: 42rem) {
  .experience-card { grid-template-columns: minmax(0, 1fr); align-content: center; }
  .experience-copy, .experience-stage { grid-area: auto; }
  .experience-copy { grid-row: 1; }
  .experience-stage { min-height: clamp(12rem, 38svh, 21rem); }
}


.experience-stage .experience-model {
  position: absolute;
  inset: auto 8% 7% auto;
  opacity: .42;
  scale: 1;
}
.career-lanyard {
  position: absolute;
  inset: 16% auto auto;
  width: min(58%, 13rem);
  transform-origin: 50% -20%;
  transform-style: preserve-3d;
  transform: rotateZ(4deg) rotateY(-12deg);
}
.career-lanyard::before {
  content: "";
  display: block;
  width: 1.05rem;
  height: clamp(2.5rem, 10svh, 6rem);
  margin-inline: auto;
  background: repeating-linear-gradient(125deg, #19242f 0 4px, #2e4050 4px 6px);
  box-shadow: inset 0 0 0 1px var(--scene-color);
}
.career-pass {
  display: grid;
  gap: .4rem;
  padding: clamp(.8rem, 2vw, 1.4rem);
  border: 1px solid var(--scene-color);
  border-radius: .9rem;
  background: linear-gradient(155deg, #233040, #111823 70%);
  box-shadow: .32rem .24rem 0 #293647, 0 1.25rem 2.4rem #0007;
}
.career-pass img { margin-bottom: .3rem; }
.career-pass span { font: .7rem/1.3 var(--mono); color: var(--scene-color); }
.career-pass strong { font-size: clamp(1rem, 2.5vw, 1.4rem); line-height: 1.15; }
@media (max-width: 42rem) {
  .career-lanyard { top: 8%; }
  .career-lanyard::before { height: 2.35rem; }
  .experience-stage .experience-model { scale: .75; }
}

/* Editorial portfolio */
:root {
  color-scheme: light;
  --bg: #f4f0e6;
  --panel: #ebe5d7;
  --text: #182439;
  --muted: #455167;
  --line: #c9c2b3;
  --accent: #364a32;
}
.masthead { flex-wrap: wrap; }
.masthead nav { flex-wrap: wrap; }
.brand img { border-radius: .5rem; }
.hero {
  position: relative;
  min-height: min(54rem, 90svh);
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(2rem, 6vw, 5rem);
}
.hero h1, h2, .experience-copy h3 {
  font-family: Georgia, serif;
  font-weight: 400;
  letter-spacing: -.065em;
}
.hero h1 { font-size: clamp(4rem, 10vw, 10rem); }
.hero h1 em { font-weight: 400; font-style: italic; color: #46583c; }
.hero .intro { font-size: clamp(1.15rem, 3vw, 1.7rem); }
.hero-portrait {
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  aspect-ratio: 4 / 5;
  background: linear-gradient(145deg, #d9d9c4, #e9dfca 68%);
  border: 1px solid var(--line);
  border-radius: 49% 49% 1rem 1rem;
  color: var(--muted);
}
.hero-portrait img { width: clamp(5rem, 14vw, 10rem); height: auto; box-shadow: 0 1rem 2.5rem #18243932; border-radius: 24%; }
.primary, .primary:hover { color: #fff; background: var(--text); }
.outline:hover, .contact:hover, summary:hover { background: #ded8cb; border-color: #6f796d; }
.about-section { background: #ece7db; padding-inline: clamp(1rem, 5vw, 4rem); }
.portrait-slot { background: radial-gradient(ellipse at 50% 38%, #d8dac6, transparent 72%), var(--panel); }
.skills-section h2 { margin-bottom: .8rem; }
.skill-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 1.25rem; }
.skill-filters button { background: transparent; border: 1px solid var(--line); border-radius: 99px; color: inherit; font: inherit; min-height: 44px; padding: .45rem .9rem; cursor: pointer; }
.skill-filters button[aria-pressed="true"] { background: var(--text); color: #fff; }
.skill-filters button:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.skill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); gap: .5rem; margin: 0; padding: 0; list-style: none; }
.skill-grid li { min-height: 7rem; padding: .7rem; border: 1px solid var(--line); border-radius: .55rem; background: var(--panel); color: var(--text); }
.skill-grid li[hidden] { display: none; }
.skill-grid b { display: block; font: 1.55rem/1.6 var(--mono); }
.film-screen canvas { background: #192439; border-radius: 1rem; }
.demo { background: #f4f0e6; margin-top: .75rem; }
.chapter-nav a, .demo button { background: #e5ddcc; }
.chapter-nav a:hover, .demo button:hover { background: #d9d3c2; }
.experience-stage { --scene-color: #c6a6ff; color: #f1f5fb; }
.stage-data { --scene-color: #84c8ff; }
.stage-flow { --scene-color: #baf57c; }
@media (max-width: 42rem) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-portrait { width: min(100%, 24rem); margin-inline: auto; aspect-ratio: 5 / 4; }
}
@media (prefers-reduced-motion: no-preference) {
  .play-opening .hero-portrait { animation: opening-visual 1175ms 130ms cubic-bezier(.22,.72,.23,1) both; }
}

.editorial-hero {
  isolation: isolate;
  overflow: clip;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: min(52rem, 88svh);
  gap: 0;
  padding-inline: clamp(.25rem, 4vw, 4rem);
  background: radial-gradient(ellipse at 73% 47%, #e3deca, transparent 63%);
}
.hero-watermark {
  position: absolute;
  z-index: -1;
  inset: 8% auto auto -1%;
  font-size: clamp(5rem, 17vw, 16rem);
  line-height: .85;
  font-weight: 800;
  letter-spacing: -.09em;
  color: #18243909;
  white-space: nowrap;
  pointer-events: none;
}
.editorial-hero .hero-copy { z-index: 1; }
.editorial-hero .label { color: #45513e; }
.editorial-hero h1 { font-size: clamp(4rem, 10vw, 9rem); margin-block: .55rem 1.1rem; line-height: .86; }
.editorial-hero .intro { font-size: clamp(1rem, 2vw, 1.25rem); max-width: 31ch; }
.hero-artwork {
  display: grid;
  place-items: center;
  justify-self: center;
  width: min(100%, 38rem);
  aspect-ratio: 1;
  border: 0;
  border-radius: 0;
  background: none;
  perspective: 900px;
  pointer-events: none;
}
.hero-depth {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  transform: rotateX(12deg) rotateY(-19deg);
}
.hero-orbit {
  position: absolute;
  width: 87%;
  aspect-ratio: 1;
  border: 1px solid #8c8064;
  border-radius: 50%;
}
.hero-orbit-wide { transform: rotateX(64deg) rotateZ(-20deg) translateZ(-8px); }
.hero-orbit-upright { width: 76%; transform: rotateY(58deg) rotateX(-18deg); border-color: #97876b80; }
.hero-emblem { position: relative; width: 54%; aspect-ratio: 1; transform-style: preserve-3d; }
.hero-emblem i {
  position: absolute;
  inset: 0;
  clip-path: polygon(4% 92%, 4% 8%, 20% 8%, 50% 46%, 80% 8%, 96% 8%, 96% 92%, 77% 92%, 77% 40%, 50% 72%, 23% 40%, 23% 92%);
  background: #877650;
}
.hero-emblem i:nth-child(1) { transform: translateZ(-24px); }
.hero-emblem i:nth-child(2) { transform: translateZ(-16px); background: #a18d62; }
.hero-emblem i:nth-child(3) { transform: translateZ(-8px); background: #baab83; }
.hero-emblem i:nth-child(4) { background: #d3c49d; }
.hero-emblem i:nth-child(5) { transform: translateZ(8px); background: linear-gradient(140deg, #354563, #172238 72%); }
@media (prefers-reduced-motion: no-preference) {
  .editorial-hero .hero-artwork { animation: none; }
  .play-opening .editorial-hero .hero-artwork { animation: artwork-arrival 1300ms 130ms cubic-bezier(.18,.76,.24,1) both; }
  .hero-depth { animation: emblem-float 7s ease-in-out infinite alternate; }
  @keyframes artwork-arrival {
    from { opacity: 0; translate: 0 3rem; scale: .78; }
    to { opacity: 1; translate: 0; scale: 1; }
  }
  @keyframes emblem-float {
    from { transform: translateY(2%) rotateX(12deg) rotateY(-19deg); }
    to { transform: translateY(-3%) rotateX(-8deg) rotateY(18deg); }
  }
}
@media (max-width: 42rem) {
  .editorial-hero { grid-template-columns: 1fr; min-height: auto; }
  .editorial-hero .hero-artwork { width: min(100%, 24rem); margin-block: -.5rem -1.5rem; }
  .hero-watermark { inset-block-start: 3%; }
}

/* Editorial layouts below the opening */
.about-section {
  padding: clamp(2rem, 7vw, 6rem) clamp(1rem, 6vw, 5rem);
  background: #eae4d5;
}
.profile { grid-template-columns: minmax(0, .85fr) minmax(0, 1.3fr); gap: clamp(1.75rem, 7vw, 6rem); }
.portrait-slot {
  justify-self: center;
  width: min(100%, 21rem);
  border-radius: 48% 48% .5rem .5rem;
  border-color: #a99a79;
  background: radial-gradient(ellipse at 50% 30%, #f3ecda, #d1c7ab);
}
.portrait-slot:not(:has(img))::before {
  content: "M";
  font: italic clamp(6rem, 17vw, 13rem)/1 Georgia, serif;
  color: #82704b35;
}
.portrait-slot span { position: absolute; bottom: 1rem; font: .72rem var(--mono); }
.about-section .focus-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid #a99a79; }
.about-section .focus-list div { display: block; border-bottom: 0; padding: 1rem .75rem 0 0; }
.about-section dt { font: 1.5rem Georgia, serif; margin-bottom: .3rem; }

.skills-section { padding-block: clamp(3rem, 8vw, 7rem); }
.skill-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.skill-grid li {
  display: grid;
  align-content: space-between;
  min-height: clamp(5.5rem, 12vw, 9rem);
  padding: clamp(.55rem, 2vw, 1.3rem);
  border-radius: .25rem;
  overflow-wrap: anywhere;
}
.skill-grid li[data-skill="ai"] { background: #23334c; color: #f8f4ea; }
.skill-grid li[data-skill="data"] { background: #dbe0df; }
.skill-grid li[data-skill="flow"] { background: #e6dac1; }
.skill-grid b { font: clamp(1.4rem, 3vw, 2.6rem)/1 Georgia, serif; }
.skill-filters button:hover { border-color: var(--text); }

.film #work { padding-block-start: clamp(2.5rem, 7vw, 6rem); }
.film .card { border-radius: .35rem; border-top: 3px solid #927c51; background: #f8f4ea; box-shadow: 0 1rem 2.5rem #1824390e; }
.film .card .label, .experience-card .label, .experience-dates { color: #655331; }
.film .card h3 { font: clamp(2rem, 4vw, 3.25rem)/.98 Georgia, serif; letter-spacing: -.045em; }
.demo-panel summary { background: #eee6d6; }
.film-screen canvas { border-radius: .4rem; box-shadow: 0 1rem 2.5rem #18243919; }
.chapter-nav a { background: transparent; }

.experience-stage {
  --scene-color: #d7bd81;
  border-color: #8b7853;
  border-radius: 50% 50% .4rem .4rem;
  background: radial-gradient(ellipse at 50% 36%, #445069, #152033 73%);
}
.stage-data { --scene-color: #a6c8d3; }
.stage-flow { --scene-color: #c7d0a7; }
.career-pass { background: linear-gradient(145deg, #faf5e8, #ded3b9); color: #182439; box-shadow: .32rem .24rem 0 #a49270, 0 1.25rem 2.4rem #0007; }
.career-pass span { color: #554525; }
.experience-stage .experience-model { opacity: .66; }

#contact { background: #182439; color: #f8f4ea; border: 0; border-radius: .5rem; padding: clamp(2rem, 7vw, 6rem); grid-template-columns: minmax(0, 1fr) auto; }
#contact .label { color: #d7bd81; }
#contact .contact { background: #f8f4ea; color: #182439; border-color: #d7bd81; }
#contact .contact:hover { background: #e5d4ac; }
#contact .contact:focus-visible { outline-color: #d7bd81; }
.contact-note { margin: 1rem 0 0; color: #e0dacd; }
.footer { margin-top: 1.35rem; }

@media (max-width: 42rem) {
  .profile, #contact, .about-section .focus-list { grid-template-columns: 1fr; }
  .about-section .focus-list div + div { margin-top: .75rem; border-top: 1px solid var(--line); }
  .film-screen { background: linear-gradient(var(--bg) 87%, transparent); }
  .film-screen canvas { height: 36svh; }
}
@media (max-width: 23rem) {
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.opening-curtain { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .play-curtain .opening-curtain {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    overflow: hidden;
    place-items: center;
    pointer-events: none;
  }
  .curtain-wing { position: absolute; inset-block: 0; width: calc(50% + 1px); background: #000; }
  .curtain-left { left: 0; animation: curtain-open-left 720ms 1500ms cubic-bezier(.76,0,.24,1) both; }
  .curtain-right { right: 0; animation: curtain-open-right 720ms 1500ms cubic-bezier(.76,0,.24,1) both; }
  .curtain-mark {
    z-index: 1;
    position: absolute;
    bottom: 0;
    width: min(82vw, 36rem);
    height: 86%;
    overflow: visible;
    animation: curtain-mark-out 470ms 1440ms ease both;
  }
  .curtain-mark path {
    fill: none;
    stroke: var(--bg);
    stroke-width: 1.8;
    stroke-linecap: butt;
    stroke-linejoin: miter;
    stroke-dasharray: 1;
    animation: curtain-draw 1180ms 130ms cubic-bezier(.55,.04,.22,1) both;
  }
  @keyframes curtain-draw {
    from { stroke-dashoffset: 1; }
    to { stroke-dashoffset: 0; }
  }
  @keyframes curtain-mark-out { to { opacity: 0; transform: scale(1.035); } }
  @keyframes curtain-open-left { to { transform: translateX(-101%); } }
  @keyframes curtain-open-right { to { transform: translateX(101%); } }
}




.experience-stage {
  border: 1px solid #827456;
  border-radius: .45rem;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #354663, #111b2c 75%);
}
.employer-space {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  perspective: 850px;
  background: radial-gradient(circle, #d5cfac4a 1px, transparent 1.5px) 0 0 / 23px 23px;
}
.employer-orbits {
  position: absolute;
  width: min(78%, 26rem);
  height: auto;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  transform: rotateX(12deg) rotateY(-16deg);
}
.employer-orbits i {
  position: absolute;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--scene-color);
  border-radius: 50%;
  opacity: .63;
}
.employer-orbits i:nth-child(1) { transform: rotateX(64deg) rotateZ(24deg); }
.employer-orbits i:nth-child(2) { transform: rotateY(62deg) rotateX(-22deg); }
.employer-orbits i:nth-child(3) { transform: scale(.84) rotateX(-34deg) rotateY(-26deg); opacity: .32; }
.employer-logo {
  z-index: 1;
  display: grid;
  place-items: center;
  width: clamp(5rem, 15vw, 10.5rem);
  aspect-ratio: 1;
  padding: 14%;
  padding: clamp(.65rem, 2vw, 1.35rem);
  border: 1px solid var(--scene-color);
  border-radius: 50%;
  background: #f8f4ea;
  color: #182439;
  box-shadow: 0 0 0 .45rem #ffffff14, 0 1rem 3rem #0007;
  text-align: center;
}
.employer-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.employer-logo:has(img) span { display: none; }
.employer-logo span { font: .7rem/1.3 var(--mono); text-transform: uppercase; }
@media (prefers-reduced-motion: no-preference) {
  .employer-orbits { animation: employer-orbit 9s ease-in-out infinite alternate; }
  @keyframes employer-orbit {
    from { transform: rotateX(12deg) rotateY(-16deg) rotateZ(-10deg); }
    to { transform: rotateX(-12deg) rotateY(18deg) rotateZ(12deg); }
  }
}
@media (max-width: 42rem) {
  .employer-orbits { width: min(65%, 13rem); }
}


.portrait-orbit { position: relative; display: grid; place-items: center; isolation: isolate; }
.portrait-orbit::before, .portrait-orbit::after {
  content: ""; position: absolute; z-index: -1; width: 108%; aspect-ratio: 1;
  border: 1px solid #a99773; border-radius: 50%; pointer-events: none;
}
.portrait-orbit::before { transform: rotate(-27deg) scaleY(.55); }
.portrait-orbit::after { transform: rotate(28deg) scaleY(.64); }
.skill-grid li small { display: block; line-height: 1.45; margin-top: .4rem; }
.skill-grid li.skill-muted { background: #f0eadf; color: #536071; border-color: #d8d0c0; }
.film .project-gallery { display: grid; gap: .5rem; }
.film .project-gallery .card-frame { min-height: 0; scroll-margin-top: 1rem; }
.film .project-gallery .card { position: static; transform: none; height: 100%; }
.film .project-title { margin: 0; }
.project-title button {
  display: grid; gap: .45rem; width: 100%; padding: .85rem; border: 0; background: transparent;
  color: var(--text); font: clamp(1.15rem, 2vw, 1.8rem)/1.1 Georgia, serif;
  text-align: left; cursor: pointer; overflow-wrap: anywhere;
}
.project-title button span { font: .65rem/1.4 var(--mono); color: #655331; }
.project-title button:focus-visible { outline: 2px solid var(--text); outline-offset: -4px; }
.project-active .project-title button { background: #eee6d6; }
.project-gallery .card-body[hidden] { display: none; }
.film:has(.gallery-ready) { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.film:has(.gallery-ready) .film-screen { height: min(68svh, 35rem); top: 1rem; }
.film:has(.gallery-ready) .film-screen canvas { height: 100%; max-height: 32rem; }
@media (min-width: 62rem) {
  .film .gallery-ready { display: flex; align-items: stretch; }
  .gallery-ready .card-frame { flex: 1 1 0; min-width: 4.5rem; }
  .gallery-ready .card-frame.project-active { flex-grow: 6; }
  .gallery-ready .card-frame:not(.project-active) button { writing-mode: vertical-rl; min-height: 14rem; }
}
@media (max-width: 42rem) {
  .film:has(.gallery-ready) { grid-template-columns: minmax(0, 1fr); }
  .film:has(.gallery-ready) .film-screen { height: 34svh; top: 0; }
  .film:has(.gallery-ready) #work { padding-top: 37svh; }
  .film:has(.gallery-ready) .project-gallery .card-frame { scroll-margin-top: 36svh; }
}
@media (prefers-reduced-motion: no-preference) {
  .editorial-hero .hero-depth { scale: calc(1 - var(--departure, 0) * .26); translate: 0 calc(var(--departure, 0) * 4rem); }
  .portrait-orbit::before { transform: rotate(calc(-62deg + var(--arrival, 1) * 35deg)) scaleY(.55); }
  .portrait-orbit::after { transform: rotate(calc(65deg - var(--arrival, 1) * 37deg)) scaleY(.64); }
  .gallery-ready .card-frame { transition: flex-grow 360ms cubic-bezier(.22,.7,.26,1); }
  .employer-orbits { animation: none; transform: rotateX(var(--orbit-x, 12deg)) rotateY(var(--orbit-y, -16deg)); }
}
@media (min-width: 43rem) and (prefers-reduced-motion: no-preference) {
  .experience-card { align-items: start; }
  .experience-card .experience-copy { align-self: center; }
  .experience-card .experience-stage { position: sticky; top: 15svh; }
}

@media (prefers-reduced-motion: no-preference) {
  .play-opening .hero-copy > h1 {
    animation-name: opening-title;
    animation-duration: 850ms;
  }
  .play-opening .hero-copy > .intro {
    animation-name: opening-type;
    animation-duration: 780ms;
    animation-timing-function: steps(24, end);
  }
  @keyframes opening-title {
    from { opacity: 0; transform: translateY(28px); clip-path: inset(0 -8% 100% -8%); }
    to { opacity: 1; transform: none; clip-path: inset(0 -8% -10% -8%); }
  }
  @keyframes opening-type {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
  }
}

/* Midnight palette */
:root {
  color-scheme: dark;
  --bg: #0c111b;
  --panel: #151e2c;
  --text: #f5efe4;
  --muted: #b6c1d1;
  --line: #39465b;
  --accent: #e4c384;
  --surface-raised: #202c3e;
  --ink-on-gold: #1b1510;
}
.editorial-hero { background: radial-gradient(ellipse at 74% 48%, #25344d 0, transparent 64%); }
.hero-watermark { color: #b8c9ea0e; }
.editorial-hero .label, .hero h1 em,
.film .card .label, .experience-card .label, .experience-dates,
.project-title button span { color: var(--accent); }
.hero-orbit { border-color: #b6965e; }
.hero-orbit-upright, .portrait-orbit::before, .portrait-orbit::after { border-color: #a38b626e; }
.hero-emblem i:nth-child(1) { background: #654d31; }
.hero-emblem i:nth-child(2) { background: #846440; }
.hero-emblem i:nth-child(3) { background: #a48251; }
.hero-emblem i:nth-child(4) { background: #caa870; }
.hero-emblem i:nth-child(5) { background: linear-gradient(140deg, #f8e0a9, #be9457 76%); }

.about-section { background: var(--panel); }
.portrait-slot { border-color: #76664e; background: radial-gradient(ellipse at 50% 30%, #2f3c53, #141d2a); }
.portrait-slot:not(:has(img))::before { color: #e4c38438; }
.about-section .focus-list { border-color: var(--line); }

.primary, .skill-filters button[aria-pressed="true"], #contact .contact {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink-on-gold);
}
.primary:hover, #contact .contact:hover { background: #f4d8a0; color: var(--ink-on-gold); }
.outline:hover, summary:hover, .chapter-nav a:hover, .demo button:hover { background: var(--surface-raised); border-color: #8b7858; }
.skill-grid li[data-skill="ai"] { background: #23243e; color: var(--text); }
.skill-grid li[data-skill="data"] { background: #192e45; color: var(--text); }
.skill-grid li[data-skill="flow"] { background: #19332f; color: var(--text); }
.skill-grid li[data-skill="ai"] b { color: #cbbcf9; }
.skill-grid li[data-skill="data"] b { color: #a9d2fa; }
.skill-grid li[data-skill="flow"] b { color: #a9d9c8; }
.skill-grid li.skill-muted { background: #121b28; color: var(--muted); border-color: var(--line); }
.skill-grid li.skill-muted b { color: inherit; }

.film .card { background: var(--panel); border-top-color: #9c8050; box-shadow: 0 1rem 2.5rem #0005; }
.film-screen canvas { background: #101a2b; box-shadow: 0 1rem 2.5rem #0006; }
.demo { background: var(--bg); }
.demo-panel summary, .demo button, .project-active .project-title button { background: var(--surface-raised); }
.demo-panel summary:hover { background: #2b3a51; }
.chapter-nav a { background: transparent; }

.experience-stage { background: radial-gradient(ellipse at center, #293c58, #101828 75%); }
.employer-logo { background: #f5efe4; color: #182439; }
#contact { background: linear-gradient(135deg, #202f46, #121b29); color: var(--text); }
.contact-note { color: var(--muted); }
.curtain-mark path { stroke: var(--accent); }

@media (min-width: 62rem) {
  :root { --desktop-gutter: clamp(1.5rem, 3.2vw, 4rem); }
  .shell { width: calc(100% - 2 * var(--desktop-gutter)); }
  .editorial-hero {
    margin-inline: calc(-1 * var(--desktop-gutter));
    padding-inline: calc(var(--desktop-gutter) + clamp(1rem, 3.5vw, 4rem));
    background: radial-gradient(ellipse at 79% 49%, #293a55 0%, #172338 38%, transparent 76%);
  }
  .hero-watermark {
    inset-inline-start: var(--desktop-gutter);
    font-size: min(15vw, 19rem);
  }
  .editorial-hero .hero-artwork { width: min(100%, 44rem); }
}
