/* How I Work: a focused, dark "next move" panel.
   Desktop: the panel pins full screen, the rest of the page dims behind it, and scrolling steps
   through the four situations (see script.js). Phones / reduced motion: a normal tabbed panel. */
.hw { position: relative; z-index: 61; padding: 40px 0 110px; --hw-ink: #f2f4f8; --hw-muted: #8d94a3; --hw-line: rgba(255,255,255,.1);
  --hw-build: #7d9bff; --hw-grow: #3fd6a4; --hw-connect: #f2ad55; }
.hw-stage { width: min(calc(100% - 32px), 1040px); margin-inline: auto; }
.hw-panel { position: relative; overflow: hidden; color: var(--hw-ink); background: #0b0d13; border: 1px solid rgba(255,255,255,.09); border-radius: 12px;
  padding: clamp(22px, 3.2vw, 44px); box-shadow: 0 40px 120px rgba(10,16,40,.35), inset 0 1px 0 rgba(255,255,255,.06); }
.hw-panel::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 80% at 100% 0%, rgba(49,92,255,.22), transparent 60%), radial-gradient(50% 60% at 0% 100%, rgba(63,214,164,.07), transparent 70%); }
.hw-panel > * { position: relative; }
html[data-theme="dark"] .hw-panel { background: #0e1220; border-color: rgba(125,155,255,.22); box-shadow: 0 40px 120px rgba(0,0,0,.6), 0 0 0 1px rgba(125,155,255,.06), inset 0 1px 0 rgba(255,255,255,.06); }

.hw-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--hw-line);
  font: 600 11px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--hw-muted); }
.hw-kicker { color: #8aa4ff; }
.hw-count b { color: var(--hw-ink); font-weight: 600; }
.hw-title { margin: 26px 0 30px; max-width: 18ch; font-size: clamp(34px, 4.4vw, 60px); line-height: .98; letter-spacing: -.05em; font-weight: 720; text-wrap: balance; }
.hw-title span { color: var(--hw-muted); }

.hw-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(24px, 4vw, 56px); }
.hw-qs { position: relative; display: grid; align-content: start; padding-left: 18px; }
.hw-rail { position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--hw-line); border-radius: 2px; }
.hw-rail i { position: absolute; left: 0; top: 0; width: 100%; height: 25%; transition: transform .45s cubic-bezier(.2,.7,.2,1), height .45s cubic-bezier(.2,.7,.2,1); background: #8aa4ff; border-radius: 2px; }
.hw-q { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: baseline; width: 100%; padding: 15px 0; text-align: left; border: 0; border-bottom: 1px solid var(--hw-line);
  background: none; color: var(--hw-muted); font: inherit; cursor: pointer; transition: color .3s ease; }
.hw-q:last-of-type { border-bottom: 0; }
.hw-q:hover { color: var(--hw-ink); }
.hw-q:focus-visible { outline: 2px solid #8aa4ff; outline-offset: 4px; border-radius: 4px; }
.hw-q[aria-selected="true"] { color: var(--hw-ink); }
.hw-n { font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.hw-q[aria-selected="true"] .hw-n { color: #8aa4ff; }
.hw-q b { font-size: clamp(17px, 1.55vw, 21px); font-weight: 600; letter-spacing: -.025em; line-height: 1.25; }

.hw-answers { min-width: 0; padding: 20px 22px 22px; border-radius: 8px; background: rgba(255,255,255,.035); border: 1px solid var(--hw-line); }
.hw-label { margin-bottom: 12px; font: 600 10.5px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--hw-muted); }
.hw-ans { display: grid; gap: 18px; align-content: start; }
.hw-ans[hidden] { display: none; }
.hw-ans.is-on > * { animation: hwIn .5s cubic-bezier(.2,.7,.2,1) both; }
.hw-ans.is-on > *:nth-child(2) { animation-delay: .06s; }
.hw-ans.is-on > *:nth-child(3) { animation-delay: .12s; }
@keyframes hwIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hw-ans h3 { margin: 0; font-size: clamp(21px, 2vw, 28px); line-height: 1.12; letter-spacing: -.035em; font-weight: 650; text-wrap: balance; }
.hw-steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hw-line); }
.hw-steps li { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--hw-line); }
.hw-steps span { display: flex; align-items: center; gap: 8px; font: 600 10.5px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--c); }
.hw-steps span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.hw-steps p { margin: 0; font-size: 15px; line-height: 1.45; color: #d6dae3; }
.hw-build { --c: var(--hw-build); } .hw-grow { --c: var(--hw-grow); } .hw-connect { --c: var(--hw-connect); }
.hw-cta { justify-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 20px; border-radius: 8px;
  background: #315cff; color: #fff; font-size: 15px; font-weight: 650; letter-spacing: -.01em; transition: background .2s ease, transform .2s ease; }
.hw-cta:hover { background: #2448e0; transform: translateY(-1px); }
.hw-cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.hw-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--hw-line); font-size: 13px; color: var(--hw-muted); }
.hw-foot span { display: inline-flex; align-items: center; gap: 9px; }
.hw-dot { width: 7px; height: 7px; border-radius: 50%; background: #74d66a; box-shadow: 0 0 0 4px rgba(116,214,106,.14); }
.hw-foot a { color: var(--hw-ink); border-bottom: 1px solid rgba(255,255,255,.25); padding-bottom: 2px; }
.hw-foot a:hover { border-color: #8aa4ff; color: #8aa4ff; }

/* the dim layer that takes the rest of the page away while the panel is pinned */
.hw-veil { position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0; background: radial-gradient(120% 90% at 50% 50%, rgba(4,6,12,.8), rgba(4,6,12,.94)); }

/* pinned mode (desktop, GSAP): the stage fills the screen and centres the panel */
.hw.is-pinned { padding: 0; }
.hw.is-pinned .hw-stage { height: 100vh; display: grid; align-content: center; }

@media (max-width: 900px) {
  .hw { padding: 20px 0 80px; }
  .hw-body { grid-template-columns: 1fr; }
  .hw-title { margin: 20px 0 22px; }
}
@media (max-width: 560px) {
  .hw-stage { width: calc(100% - 20px); }
  .hw-steps li { grid-template-columns: 1fr; gap: 4px; }
  .hw-answers { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .hw-ans.is-on > * { animation: none; } .hw-rail i { transition: none; } }

/* Hero: fill the first screen */
.hero { min-height: calc(100svh - 90px); display: flex; flex-direction: column; justify-content: center; padding-top: clamp(40px, 6vh, 80px); padding-bottom: clamp(40px, 7vh, 88px); }
.hero h1 { font-size: clamp(56px, 8.6vw, 136px); }
.hero-bottom { margin-top: clamp(48px, 9vh, 112px); }
.hero-copy { font-size: clamp(19px, 2.1vw, 28px); }
@media (max-width: 900px) { .hero { min-height: calc(100svh - 80px); padding-top: 40px; } .hero h1 { font-size: clamp(44px, 12vw, 72px); } .hero-bottom { margin-top: 40px; } }
.hero h1 { max-width: none; }

/* About: AI collage portrait instead of the round photo (transparent PNG/WebP, sits on the page background) */
.about-grid { grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px); }
.about-visual { margin: 0; position: relative; }
.about-visual img { display: block; width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(30,60,160,.12)); }
html[data-theme="dark"] .about-visual img { filter: drop-shadow(0 30px 60px rgba(40,90,255,.18)); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } .about-visual { margin-inline: -8px; } }
.about-visual .av-dark { display: none; }
html[data-theme="dark"] .about-visual .av-dark { display: block; }
html[data-theme="dark"] .about-visual .av-light { display: none; }

/* About / Selected Work intro cards: cool blue-white instead of the warm paper tone (light mode) */
html:not([data-theme="dark"]) .intro-stack > #about-intro,
html:not([data-theme="dark"]) .intro-stack > #work {
  border-color: rgba(70,100,190,.16);
  background:
    radial-gradient(ellipse at 8% 20%, rgba(84,117,255,.13), transparent 55%),
    radial-gradient(ellipse at 92% 85%, rgba(94,181,255,.10), transparent 55%),
    linear-gradient(125deg, rgba(255,255,255,.55), rgba(255,255,255,.12) 60%),
    #eaeef8;
  box-shadow: 0 20px 52px rgba(30,44,92,.10), inset 0 1px 0 rgba(255,255,255,.8);
}
html:not([data-theme="dark"]) .intro-stack > #work {
  background:
    radial-gradient(ellipse at 90% 70%, rgba(94,181,255,.14), transparent 55%),
    radial-gradient(ellipse at 10% 10%, rgba(84,117,255,.08), transparent 50%),
    linear-gradient(130deg, rgba(255,255,255,.6), rgba(255,255,255,.12) 58%),
    #e8edf8;
  box-shadow: 0 26px 66px rgba(30,44,92,.14), inset 0 1px 0 rgba(255,255,255,.85);
}

/* How I Work continues the Studio reel's dark: a full-width dark band, panel lifted off it */
.hw { background: #0d0f14; margin-top: -1px; }
#studio:has(+ .hw), #studio { padding-bottom: 0; }
.hw-panel { background: #141927; border-color: rgba(138,164,255,.2); box-shadow: 0 40px 120px rgba(0,0,0,.5), 0 0 0 1px rgba(138,164,255,.05), inset 0 1px 0 rgba(255,255,255,.07); }
html[data-theme="dark"] .hw { background: #0b0d12; }
@media (max-width: 900px) { #studio { padding-bottom: 40px; } .hw { padding-top: 48px; } }

/* Longer, calmer approach into How I Work: dark lead-in space after the reel (desktop pinned mode only) */
.hw-lead { display: none; }
@media (min-width: 901px) and (min-height: 640px) and (prefers-reduced-motion: no-preference) {
  .hw-lead { display: block; height: 150vh; background: #0d0f14; margin-bottom: -1px; }
  html[data-theme="dark"] .hw-lead { background: #0b0d12; }
}

/* Nav without the name: links centred, actions on the right */
@media (min-width: 901px) {
  .site-header .nav { display: grid; grid-template-columns: 1fr auto 1fr; }
  .site-header .nav-links { grid-column: 2; }
  .site-header .nav-actions { grid-column: 3; justify-self: end; }
}
@media (max-width: 900px) { .site-header .nav { justify-content: flex-end; } }

/* Selected Work card: a quiet "scroll down" cue */
.intro-stack > #work .scroll-cue {
  position: absolute; left: 50%; bottom: clamp(22px, 4vh, 40px); z-index: 2;
  display: grid; place-items: center; width: 52px; height: 52px; margin-left: -26px; border-radius: 50%;
  color: var(--ink); background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.85);
  box-shadow: 0 10px 30px rgba(30,44,92,.12), inset 0 1px 0 rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
  transition: background .3s ease, color .3s ease, transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease;
}
.scroll-cue svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; animation: cueBob 2.6s cubic-bezier(.45,0,.55,1) infinite; }
.intro-stack > #work .scroll-cue:hover { background: var(--accent); color: #fff; transform: translateY(2px); box-shadow: 0 14px 34px rgba(49,92,255,.3); }
.intro-stack > #work .scroll-cue:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
@keyframes cueBob { 0%, 100% { transform: translateY(-2px); opacity: .7; } 50% { transform: translateY(3px); opacity: 1; } }
html[data-theme="dark"] .intro-stack > #work .scroll-cue { color: var(--ink); background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.08); }
@media (prefers-reduced-motion: reduce) { .scroll-cue svg { animation: none; } }

/* How I Work panel: match the site's rounder cards (reel 28px, project cards 30px, experience rows 22px) */
.hw-panel { border-radius: 28px; }
.hw-answers { border-radius: 20px; }
.hw-cta { border-radius: 999px; padding: 0 22px; }
.hw-q:focus-visible { border-radius: 12px; }
@media (max-width: 560px) { .hw-panel { border-radius: 22px; } .hw-answers { border-radius: 16px; } }
