/* prokofiy.com, hand-built static site. Fonts are self-hosted (Piazzolla + Schibsted Grotesk, SIL OFL). */

@font-face {
  font-family: "Piazzolla";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/piazzolla-latin-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Piazzolla";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/piazzolla-latin-ext-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Piazzolla";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/piazzolla-cyrillic-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Piazzolla";
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/piazzolla-latin-opsz-italic.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("/assets/fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: italic;
  font-display: swap;
  font-weight: 400 900;
  src: url("/assets/fonts/schibsted-grotesk-latin-wght-italic.woff2") format("woff2-variations");
}

:root {
  --paper: #f1f4f8;
  --paper-2: #e3e9f1;
  --ink: #0b1f33;
  --ink-2: #44546a;
  --cobalt: #005f9f;
  --cobalt-deep: #00487a;
  --gold: #f8b400;
  --gold-light: #f8b400;
  --line: #c9d3e1;
  --navy: #0b2238;
  --white: #ffffff;

  --serif: "Piazzolla", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.625rem;
  --step-3: 2.125rem;
  --step-4: clamp(2.25rem, 4.2vw, 3.25rem);
  --step-5: clamp(2.75rem, 6vw, 4.5rem);

  --max: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --measure: 66ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.55;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--cobalt); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--cobalt-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 2px; }
.band :focus-visible, .game-zone :focus-visible, .definition :focus-visible, .cine :focus-visible { outline-color: var(--gold); }
::selection { background: #ffe08a; color: var(--ink); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 560;
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { padding-left: 1.2em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: var(--measure); }
.muted { color: var(--ink-2); }
.small { font-size: var(--step--1); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: var(--white); padding: 0.6rem 1rem; z-index: 100; }
.skip-link:focus { top: 1rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand img { width: 44px; height: 44px; flex: none; }
.brand span { font-family: var(--serif); font-size: 1.125rem; font-weight: 560; letter-spacing: -0.005em; white-space: nowrap; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; }
.nav a {
  display: block; padding: 0.45rem 0.7rem; color: var(--ink); text-decoration: none;
  font-size: 0.97rem; font-weight: 500; border-radius: 3px;
}
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--cobalt); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }
.nav-toggle {
  display: none; font: inherit; font-weight: 600; background: none; border: 1px solid var(--line);
  color: var(--ink); padding: 0.45rem 0.85rem; border-radius: 3px; cursor: pointer;
}
@media (max-width: 960px) {
  .nav-toggle { display: inline-block; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); display: none; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; padding: 0.5rem var(--gutter) 1rem; }
  .nav a { padding: 0.75rem 0; font-size: 1.1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: none; }
}
@media (max-width: 420px) { .brand span { font-size: 1rem; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1.25rem;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  border-radius: 3px; border: 1.5px solid var(--cobalt); text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--cobalt); color: var(--white); }
.btn-primary:hover { background: var(--cobalt-deep); border-color: var(--cobalt-deep); color: var(--white); text-decoration: none; }
.btn-quiet { background: transparent; color: var(--cobalt); }
.btn-quiet:hover { background: var(--white); color: var(--cobalt-deep); text-decoration: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* Home hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero .wrap { position: relative; z-index: 1; padding-top: clamp(3rem, 8vw, 6.5rem); padding-bottom: clamp(3rem, 7vw, 6rem); }
.hero-name {
  font-size: clamp(3.2rem, 9vw, 8rem);
  font-weight: 520;
  line-height: 0.9;
  letter-spacing: -0.035em;
  margin: 0 0 0.35em;
}
.hero-name span { display: block; }
.hero-name span:nth-child(2) { padding-left: 0.42em; }
.hero-name span:nth-child(3) { padding-left: 0.12em; }
.hero-lede { font-size: clamp(1.15rem, 1.9vw, 1.4rem); line-height: 1.45; max-width: 36ch; color: var(--ink); margin: 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.hero-logo { position: relative; margin: 0; width: 100%; max-width: 520px; aspect-ratio: 1008 / 746; justify-self: end; }
.hero-logo img { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .hl-arcs { transform-origin: 39.4% 53.8%; animation: arcs-in 1.5s cubic-bezier(.2,.75,.2,1) both; }
  .hl-text { animation: text-in .8s ease-out .35s both; }
}
@keyframes arcs-in { from { opacity: 0; transform: rotate(-40deg) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes text-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-logo { order: -1; justify-self: start; max-width: 260px; }
}


/* Home: cinematic opening */
.cine { position: relative; overflow: hidden; color: #e8eef7; background: radial-gradient(120% 95% at 80% 38%, #12497f 0%, #0b2238 44%, #050c17 100%); }
.cine::after { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); opacity: .07; pointer-events: none; mix-blend-mode: screen; }
.cine-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; min-height: min(86vh, 860px); padding-block: clamp(4rem, 9vw, 7rem); }
.reel { margin: 0 0 2.5rem; display: flex; flex-direction: column; font-family: var(--serif); font-optical-sizing: auto; font-size: clamp(2.7rem, 6.6vw, 5.8rem); line-height: 1.02; letter-spacing: -0.03em; font-weight: 540; }
.reel a { color: #fff; text-decoration: none; width: fit-content; background-image: linear-gradient(var(--gold), var(--gold)); background-repeat: no-repeat; background-size: 0 3px; background-position: 0 94%; transition: background-size .35s ease; }
.reel a:hover, .reel a:focus-visible { background-size: 100% 3px; color: #fff; }
.reel span { color: var(--gold); }
.cine-credit::before { content: ""; display: block; width: 96px; height: 2px; background: var(--gold); margin-bottom: 1.5rem; transform-origin: left; }
.cine-name { font-family: var(--serif); font-size: clamp(1.6rem, 2.6vw, 2.35rem); color: #fff; font-weight: 560; letter-spacing: -0.01em; margin: 0 0 0.45rem; }
.cine-role { color: #aebdd3; max-width: 46ch; margin: 0; font-size: 1.1rem; line-height: 1.5; }
.cine .btn-primary { background: var(--gold); border-color: var(--gold); color: #0b1f33; }
.cine .btn-primary:hover { background: #fff; border-color: #fff; color: #0b1f33; }
.cine .btn-quiet { color: #fff; border-color: rgba(255,255,255,.45); background: transparent; }
.cine .btn-quiet:hover { background: rgba(255,255,255,.08); color: #fff; }
.cine-logo { position: relative; margin: 0; width: 100%; max-width: 520px; aspect-ratio: 1008 / 746; justify-self: end; }
.cine-logo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.cine-bar { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .cine-bar { display: block; position: absolute; left: 0; right: 0; height: 14vh; background: #000; z-index: 3; animation: bar-open 1.3s .15s cubic-bezier(.7,0,.2,1) forwards; }
  .cine-bar-top { top: 0; }
  .cine-bar-bottom { bottom: 0; --dir: 1; }
  .reel a { opacity: 0; filter: blur(14px); transform: translateY(.16em); animation: reel-in 1s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(.55s + var(--i) * .45s); }
  .cine-credit::before { animation: line-in .9s 2.45s cubic-bezier(.2,.7,.2,1) both; }
  .cine-credit > * { animation: credit-in .9s 2.6s ease-out both; }
  .cine-logo .hl-arcs { transform-origin: 39.4% 53.8%; animation: arcs-in 1.8s 1.2s cubic-bezier(.2,.75,.2,1) both; }
  .cine-logo .hl-text { animation: text-in 1s 2.3s ease-out both; }
}
@keyframes bar-open { to { transform: translateY(calc(-100% + var(--dir, 0) * 200%)); } }
@keyframes reel-in { to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes line-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes credit-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 860px) {
  .cine-grid { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .cine-logo { order: -1; justify-self: start; max-width: 230px; }
}

/* Home: Zhittya areas */
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
@media (max-width: 1100px) { .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pillars { grid-template-columns: minmax(0, 1fr); } }
.pillar { border-top: 2px solid var(--ink); padding-top: 1.1rem; scroll-margin-top: 6rem; }
.pillar h3 { font-size: var(--step-2); margin-bottom: 0.3rem; }
.pillar-fig { font-family: var(--serif); color: var(--cobalt); font-size: 1.2rem; font-weight: 560; margin-bottom: 0.7rem; }
.pillar p:last-child { margin-bottom: 0; color: var(--ink-2); }
.pillar:target { border-top-color: var(--gold); }

/* Home: origins strip */
.origins-strip { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.origins-strip-inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.75rem 2rem; padding-block: 1.5rem; }
.origins-strip p { margin: 0; max-width: 70ch; }
.origins-strip a { font-weight: 600; white-space: nowrap; }

/* About: origin cards */
.origin-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
@media (max-width: 760px) { .origin-cards { grid-template-columns: minmax(0, 1fr); } }
.origin-card { background: var(--white); border: 1px solid var(--line); padding: 1.75rem 2rem 1.5rem; }
.origin-fig { font-family: var(--serif); font-size: clamp(3rem, 6vw, 4.5rem); font-weight: 520; line-height: 1; color: var(--cobalt); margin-bottom: 0.9rem; letter-spacing: -0.02em; }
.origin-card h3 { font-size: var(--step-1); margin-bottom: 0.15rem; }
.origin-card .org { color: var(--ink-2); margin-bottom: 0.8rem; }
.origin-card p:last-child { margin-bottom: 0; }
.venture .tl-bullets { margin-top: 0.75rem; }

/* Sections */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.25rem; margin-bottom: 2rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--ink-2); max-width: 60ch; }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(1.5rem, 4vw, 4rem); }
@media (max-width: 820px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* Hub index (home) */
.hub { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.hub li { border-bottom: 1px solid var(--line); }
.hub a {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1.5rem; align-items: baseline;
  padding: 1.35rem 0; color: var(--ink); text-decoration: none;
}
.hub .hub-name { font-family: var(--serif); font-size: clamp(1.6rem, 3.2vw, 2.35rem); font-weight: 540; letter-spacing: -0.015em; line-height: 1.1; }
.hub .hub-desc { color: var(--ink-2); max-width: 52ch; }
.hub a:hover .hub-name { color: var(--cobalt); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 0.16em; }
@media (max-width: 680px) { .hub a { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; } }

/* Dark band */
.band { background: var(--navy); color: #dfe6f2; position: relative; overflow: hidden; }
.band a { color: var(--gold-light); }
.band a:hover { color: var(--white); }
.band h2, .band h3 { color: var(--white); }
.band .meta { color: #a9b6cf; }
.band .btn-primary { background: var(--gold-light); border-color: var(--gold-light); color: var(--navy); }
.band .btn-primary:hover { background: var(--white); border-color: var(--white); color: var(--navy); }
.band-arc { position: absolute; right: -170px; top: 50%; transform: translateY(-50%); width: 640px; opacity: 0.6; pointer-events: none; }
@media (max-width: 900px) { .band-arc { display: none; } }
.essay-feature { position: relative; padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.essay-feature h2 { font-size: clamp(2.4rem, 6vw, 4.75rem); line-height: 1; max-width: 14ch; letter-spacing: -0.03em; }
.essay-feature blockquote {
  margin: 2rem 0 0; padding: 0 0 0 1.5rem; border-left: 3px solid var(--gold);
  font-family: var(--serif); font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.4; color: var(--white); max-width: 44ch;
}

/* Now list */
.now-list { list-style: none; margin: 0; padding: 0; }
.now-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 1rem; }
.now-list li:first-child { padding-top: 0; }
.now-list strong { font-weight: 600; }
@media (max-width: 680px) { .now-list li { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; } }

/* Page header */
.page-head { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.page-head h1 { max-width: 18ch; }
.page-head .lede { font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.5; max-width: 52ch; margin: 0; }
.crumbs { font-size: var(--step--1); color: var(--ink-2); margin-bottom: 1.25rem; }
.crumbs a { color: var(--ink-2); }

/* About */
.portrait {
  position: relative; aspect-ratio: 4 / 5; background: var(--navy); border-radius: 2px; overflow: hidden; max-width: 380px;
}
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bio-short {
  background: var(--white); border: 1px solid var(--line); padding: 1.5rem 1.75rem; margin: 2rem 0; max-width: var(--measure);
}
.bio-short h2 { font-size: var(--step-1); margin-bottom: 0.6rem; }
.bio-short p:last-child { margin-bottom: 0; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1.5rem; padding: 1.6rem 0; border-top: 1px solid var(--line); }
.timeline .when { font-family: var(--serif); font-size: 1.15rem; font-weight: 560; color: var(--cobalt); font-variant-numeric: lining-nums tabular-nums; }
.timeline h3 { font-size: var(--step-1); margin-bottom: 0.15rem; }
.timeline .org { color: var(--ink-2); margin-bottom: 0.6rem; }
.timeline p { max-width: var(--measure); }
.timeline h3 a { color: var(--ink); text-decoration-color: var(--gold); }
.timeline h3 a:hover { color: var(--cobalt); }
.tl-bullets { margin: 0; padding-left: 1.1em; max-width: var(--measure); }
.tl-bullets li { margin-bottom: 0.45rem; padding-left: 0.2rem; }
.tl-bullets li::marker { color: var(--cobalt); }
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 0 2.5rem; margin: 0; }
.skills > div { border-top: 1px solid var(--line); padding: 1rem 0 1.2rem; }
.skills dt { font-family: var(--serif); font-size: 1.2rem; font-weight: 560; margin-bottom: 0.3rem; }
.skills dd { margin: 0; color: var(--ink-2); }
@media (max-width: 640px) { .timeline > li { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; } }

.places { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0 2rem; }
.places li { padding: 0.9rem 0; border-top: 1px solid var(--line); }
.places strong { display: block; font-family: var(--serif); font-size: 1.2rem; font-weight: 560; }

/* Work */
.ventures { list-style: none; margin: 0; padding: 0; }
.venture { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1rem, 3vw, 3rem); padding: 2.25rem 0; border-top: 1px solid var(--line); }
.venture:first-child { border-top: 1px solid var(--ink); }
.venture h2 { font-size: var(--step-3); margin-bottom: 0.3rem; }
.venture .role { color: var(--ink-2); margin: 0; }
.status { display: inline-block; margin-top: 0.85rem; font-size: 0.85rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink-2); }
.status-active { border-color: #9fb5e6; color: var(--cobalt-deep); }
.status-forming { border-color: #e7cf98; color: #7a5a12; background: #fbf5e7; }
.venture p:last-child { margin-bottom: 0; }
@media (max-width: 760px) { .venture { grid-template-columns: minmax(0, 1fr); } }

/* Writing index */
.essay-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.essay-list li { padding: 2rem 0; border-bottom: 1px solid var(--line); }
.essay-list h2 { font-size: var(--step-4); margin-bottom: 0.35rem; }
.essay-list h2 a { color: var(--ink); text-decoration: none; }
.essay-list h2 a:hover { color: var(--cobalt); text-decoration: underline; text-decoration-color: var(--gold); }
.essay-list .meta { color: var(--ink-2); margin-bottom: 0.75rem; }
.posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.25rem; }
.post { background: var(--white); border: 1px solid var(--line); padding: 1.4rem 1.5rem; margin: 0; }
.post p { font-family: var(--serif); font-size: 1.15rem; line-height: 1.5; }
.post footer { font-size: var(--step--1); color: var(--ink-2); }
.post .context { font-size: var(--step--1); color: var(--ink-2); margin-bottom: 0.6rem; font-family: var(--sans); }

/* Essay */
.essay-head { padding: clamp(3rem, 7vw, 5.5rem) 0 2.5rem; }
.essay-head h1 { font-size: clamp(2.6rem, 7vw, 5.25rem); line-height: 0.98; letter-spacing: -0.03em; max-width: 13ch; }
.essay-head .byline { color: var(--ink-2); margin: 0; }
.essay-layout { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 4rem; padding-bottom: 5rem; }
@media (max-width: 1020px) { .essay-layout { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }
.toc { position: sticky; top: 6rem; align-self: start; font-size: 0.95rem; }
.toc h2 { font-family: var(--sans); font-size: 0.95rem; font-weight: 600; margin-bottom: 0.6rem; letter-spacing: 0; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 0.3rem 0 0.3rem 0.9rem; color: var(--ink-2); text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--cobalt); border-left-color: var(--gold); }
.prose { font-family: var(--serif); font-size: 1.22rem; line-height: 1.68; max-width: 68ch; font-optical-sizing: auto; }
.prose p { margin-bottom: 1.15em; hanging-punctuation: first; }
.prose h2 { font-size: var(--step-3); margin: 2.2em 0 0.7em; scroll-margin-top: 6rem; }
.prose > p:first-of-type::first-letter {
  float: left; font-size: 4.6em; line-height: 0.82; padding: 0.06em 0.09em 0 0; color: var(--cobalt); font-weight: 600;
}
.prose .key-line { font-size: 1.45rem; line-height: 1.45; font-weight: 560; color: var(--ink); margin: 1.6em 0; }
.definition {
  background: var(--navy); color: #e3e9f3; padding: 1.75rem 2rem; margin: 0 0 2.5rem; max-width: 68ch; position: relative; overflow: hidden;
}
.definition dt { font-family: var(--serif); font-size: 1.65rem; font-weight: 560; color: var(--white); }
.definition dt small { font-family: var(--sans); font-size: 0.95rem; font-weight: 400; color: var(--gold-light); margin-left: 0.4rem; font-style: italic; }
.definition dd { margin: 0.5rem 0 0; font-family: var(--serif); font-size: 1.2rem; line-height: 1.55; }
.summary { border: 1px solid var(--line); background: var(--white); padding: 1.5rem 1.75rem; margin: 0 0 3rem; max-width: 68ch; }
.summary h2 { font-family: var(--sans); font-size: 1rem; font-weight: 700; margin-bottom: 0.6rem; letter-spacing: 0; }
.summary ul { margin: 0; padding-left: 1.1em; }
.summary li { margin-bottom: 0.4rem; }
.works-cited { font-family: var(--sans); font-size: 0.95rem; line-height: 1.5; color: var(--ink-2); padding-left: 1.4em; }
.works-cited li { margin-bottom: 0.6rem; padding-left: 0.3rem; }
.cite-box { border-top: 1px solid var(--ink); margin-top: 3rem; padding-top: 1.5rem; font-family: var(--sans); font-size: 0.97rem; max-width: 68ch; }
.cite-box code { font-family: var(--sans); background: var(--paper-2); padding: 0.75rem 1rem; display: block; line-height: 1.5; white-space: normal; }

/* Forms */
.form { display: grid; gap: 1.15rem; max-width: 40rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.98rem; }
.field .hint { display: block; font-weight: 400; color: var(--ink-2); font-size: 0.9rem; margin-top: -0.15rem; margin-bottom: 0.4rem; }
.field input[type="text"], .field input[type="email"], .field input[type="url"], .field input[type="number"], .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--white);
  border: 1.5px solid var(--line); border-radius: 3px; padding: 0.7rem 0.8rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px #c8d4f3; }
.field input[type="file"] { font: inherit; font-size: 0.95rem; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choices label { font-weight: 500; display: inline-flex; align-items: center; gap: 0.45rem; border: 1.5px solid var(--line); background: var(--white); padding: 0.5rem 0.8rem; border-radius: 3px; cursor: pointer; margin: 0; }
.choices input { accent-color: var(--cobalt); }
.choices label:has(input:checked) { border-color: var(--cobalt); background: #eef2fc; }
.hp { display: none; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 1rem 0; border-top: 1px solid var(--line); }
.contact-list .k { display: block; font-size: var(--step--1); color: var(--ink-2); }
.contact-list .v { font-family: var(--serif); font-size: 1.3rem; font-weight: 520; }
.contact-list address { font-style: normal; }

/* Microindustries */
.mi-hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; }
@media (max-width: 900px) { .mi-hero { grid-template-columns: minmax(0, 1fr); } }
.blueprint { margin: 0;
  background-color: #e8eef7;
  background-image:
    linear-gradient(#d3ddec 1px, transparent 1px),
    linear-gradient(90deg, #d3ddec 1px, transparent 1px);
  background-size: 24px 24px;
  border: 1px solid var(--line);
  padding: 1.25rem;
}
.blueprint svg { width: 100%; height: auto; }
.blueprint figcaption { font-size: var(--step--1); color: var(--ink-2); margin-top: 0.5rem; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2rem; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 1rem; }
.steps li::before { content: counter(step); font-family: var(--serif); font-size: 2.75rem; font-weight: 500; color: var(--cobalt); line-height: 1; display: block; margin-bottom: 0.6rem; font-variant-numeric: lining-nums; }
.steps h3 { font-size: var(--step-1); margin-bottom: 0.4rem; }
.materials { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.materials caption { text-align: left; color: var(--ink-2); padding-bottom: 0.75rem; }
.materials th, .materials td { text-align: left; vertical-align: top; padding: 1rem 1rem 1rem 0; border-top: 1px solid var(--line); }
.materials thead th { border-top: 0; border-bottom: 1px solid var(--ink); font-size: 0.9rem; color: var(--ink-2); font-weight: 600; padding-top: 0; }
.materials tbody th { font-family: var(--serif); font-size: 1.35rem; font-weight: 560; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.callout { border-left: 3px solid var(--gold); padding: 0.25rem 0 0.25rem 1.25rem; margin: 2rem 0 0; max-width: 60ch; font-size: 1.08rem; }
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.5rem 2.5rem; }
.rules h3 { font-size: var(--step-1); margin-bottom: 0.35rem; }
.faq details { border-top: 1px solid var(--line); padding: 1.1rem 0; max-width: 72ch; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-family: var(--serif); font-size: 1.3rem; font-weight: 540; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); color: var(--cobalt); font-weight: 600; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0.75rem 0 0; color: var(--ink-2); }

/* Microindustries: made in */
.made-in { list-style: none; margin: 1.4rem 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.made-in li { display: inline-flex; align-items: center; gap: 0.65rem; background: var(--white); border: 1px solid var(--line); padding: 0.5rem 0.9rem 0.5rem 0.6rem; border-radius: 3px; font-weight: 700; font-size: 0.98rem; }
.made-in .flag { height: 24px; width: auto; border-radius: 2px; box-shadow: 0 0 0 1px rgba(11,31,51,.12); }
.made-section { background: var(--navy); color: #dfe6f2; }
.made-section h2 { color: #fff; }
.made-section + .section { border-top: 0; }
.made-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.made-flags { display: flex; gap: 1rem; }
.made-flags .flag { height: clamp(56px, 8vw, 92px); width: auto; border-radius: 3px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
@media (max-width: 700px) { .made-grid { grid-template-columns: minmax(0, 1fr); } }

/* Microindustries part estimator */
.estimator-section { background: var(--paper-2); }
.estimator-section + .section { border-top: 0; }
.estimator-intro p { max-width: 44ch; }
.estimator-intro .small { margin-top: 1.25rem; }
.estimator { min-width: 0; }
.estimator .form { max-width: none; }
.estimator-form { background: var(--white); border: 1px solid var(--line); border-radius: 3px; padding: clamp(1.25rem, 3vw, 2rem); }
.estimator-form textarea { min-height: 7.5rem; }
.estimator-fallback { background: var(--white); border: 1px solid var(--line); padding: 1rem 1.25rem; border-radius: 3px; margin: 0; }
.estimator > .btn { margin-top: 1rem; }
.est-photo-preview { display: flex; align-items: center; gap: 1rem; }
.est-photo-preview[hidden], .estimator [hidden] { display: none; }
.est-photo-preview img { max-height: 112px; max-width: 160px; object-fit: cover; border: 1px solid var(--line); border-radius: 3px; }
.link-button { font: inherit; font-size: 0.95rem; color: var(--cobalt); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-button:hover { color: var(--cobalt-deep); }
.est-error { margin: 0; color: #9b1c1c; font-weight: 600; border-left: 3px solid #c0392b; padding: 0.15rem 0 0.15rem 0.75rem; }
.est-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.est-status { margin: 0; color: var(--ink-2); font-size: 0.95rem; flex: 1 1 16rem; }
.estimator.is-busy .est-status::after { content: ""; display: block; height: 3px; margin-top: 0.6rem; border-radius: 2px;
  background: linear-gradient(90deg, var(--line) 0 30%, var(--cobalt) 30% 55%, var(--line) 55% 100%); background-size: 200% 100%; }
@media (prefers-reduced-motion: no-preference) {
  .estimator.is-busy .est-status::after { animation: est-scan 1.3s linear infinite; }
}
@keyframes est-scan { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.btn[disabled] { opacity: 0.65; cursor: progress; }

.estimate { margin-top: 1.25rem; }
.estimate:focus { outline: none; }
.estimate:focus-visible .estimate-card { box-shadow: 0 0 0 3px #c8d4f3; }
.estimate-card { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--cobalt); border-radius: 3px; padding: clamp(1.25rem, 3vw, 2rem); }
.estimate-note p { margin: 0 0 1rem; font-size: 1.08rem; }
.estimate-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 2rem; align-items: start; }
.estimate-heading h3 { margin: 0 0 0.4rem; }
.estimate-summary { margin: 0; color: var(--ink-2); max-width: 52ch; }
.estimate-price { text-align: right; }
.estimate-price .price { font-family: var(--serif); font-size: var(--step-4); font-weight: 560; line-height: 1; margin: 0; letter-spacing: -0.02em; font-variant-numeric: lining-nums; white-space: nowrap; }
.estimate-price .price-note { margin: 0.5rem 0 0; font-size: 0.88rem; color: var(--ink-2); max-width: 22ch; margin-left: auto; }
@media (max-width: 640px) {
  .estimate-top { grid-template-columns: minmax(0, 1fr); }
  .estimate-price { text-align: left; }
  .estimate-price .price-note { margin-left: 0; max-width: none; }
}
.estimate-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem 1.75rem; margin: 1.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.estimate-specs dt { font-size: 0.88rem; font-weight: 600; color: var(--ink-2); margin-bottom: 0.2rem; }
.estimate-specs dd { margin: 0; }
.estimate-specs dd strong { display: block; font-size: 1.08rem; margin-bottom: 0.1rem; }
.estimate-block { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.estimate-block h4 { margin: 0 0 0.75rem; }
.estimate-block > p { max-width: 60ch; }
.design-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.design-list li { border-left: 2px solid var(--cobalt); padding-left: 1rem; }
.design-list a { font-family: var(--serif); font-size: 1.2rem; font-weight: 560; }
.design-meta { display: block; font-size: 0.88rem; color: var(--ink-2); margin-top: 0.15rem; }
.design-list p { margin: 0.35rem 0 0; }
.design-list + p { margin-top: 1rem; }
.library-links { font-size: 0.95rem; margin: 0.75rem 0 0; }
.ai-tag { display: inline-block; margin: 0 0 0.75rem; font-size: 0.85rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 999px; border: 1px solid #e7cf98; color: #7a5a12; background: #fbf5e7; }
.concept-features { margin: 0.75rem 0; padding-left: 1.2rem; }
.concept-features li { margin-bottom: 0.3rem; }
.cautions { list-style: none; margin: 1.5rem 0 0; padding: 0.25rem 0 0.25rem 1.1rem; border-left: 3px solid var(--gold); }
.cautions li + li { margin-top: 0.4rem; }
.followup label { display: block; font-weight: 600; margin: 0.9rem 0 0.35rem; font-size: 0.98rem; }
.followup textarea { width: 100%; font: inherit; padding: 0.7rem 0.8rem; border: 1.5px solid var(--line); border-radius: 3px; background: var(--white); color: var(--ink); resize: vertical; min-height: 5rem; }
.followup textarea:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px #c8d4f3; }
.followup .btn { margin-top: 0.75rem; }
.questions { margin: 0; padding-left: 1.2rem; }
.questions li + li { margin-top: 0.3rem; }
.breakdown { margin-top: 1.5rem; font-size: 0.95rem; }
.breakdown summary { cursor: pointer; color: var(--cobalt); font-weight: 600; }
.breakdown p { margin: 0.6rem 0 0; color: var(--ink-2); max-width: 64ch; }
.est-attached { margin: 0; padding: 0.6rem 0.9rem; border-left: 3px solid var(--gold); background: var(--white); font-weight: 600; }

/* Prokofiy Learning (Verba) */
.game-zone { background: #14120f; color: #ece6dc; }
.game-zone a { color: #f8b400; }
.game-zone a:hover { color: #fff; }
.game-zone h1, .game-zone h2, .game-zone h3 { color: #fff; }
.game-zone .muted { color: #b5ab9b; }
.game-zone .btn-primary { background: #f8b400; border-color: #f8b400; color: #14120f; }
.game-zone .btn-primary:hover { background: #fff; border-color: #fff; color: #14120f; }
.game-zone .btn-quiet { color: #f8b400; border-color: #6e604a; }
.game-zone .btn-quiet:hover { background: #221f1a; color: #fff; }
.game-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding-block: clamp(3rem, 8vw, 6rem); }
@media (max-width: 900px) { .game-grid { grid-template-columns: minmax(0, 1fr); } }
.game-title { font-size: clamp(3.5rem, 10vw, 7.5rem); letter-spacing: -0.04em; line-height: 0.9; margin-bottom: 0.3em; }
.demo { background: #1e1b16; border: 1px solid #3a342b; padding: 1.5rem; border-radius: 4px; }
.demo-word { min-height: 3.2rem; text-align: center; font-family: var(--serif); font-size: 2.2rem; letter-spacing: 0.12em; color: #fff; }
.demo-msg { min-height: 1.5rem; text-align: center; color: #b5ab9b; font-size: 0.97rem; margin-bottom: 0.5rem; }
.wheel { position: relative; width: min(100%, 300px); aspect-ratio: 1; margin: 0 auto; touch-action: none; user-select: none; -webkit-user-select: none; }
.wheel::before { content: ""; position: absolute; inset: 6%; border-radius: 50%; background: #29251e; }
.wheel svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wheel button {
  position: absolute; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; border: 0; background: #ece6dc; color: #14120f; font-family: var(--serif); font-size: clamp(1.4rem, 4vw, 1.9rem); font-weight: 600;
  cursor: pointer; display: grid; place-items: center; padding: 0; touch-action: none;
}
.wheel button.is-on { background: #f8b400; }
.demo-controls { display: flex; justify-content: center; gap: 0.6rem; margin-top: 1.1rem; flex-wrap: wrap; }
.demo-controls button { font: inherit; font-size: 0.95rem; font-weight: 600; background: transparent; color: #ece6dc; border: 1px solid #6e604a; padding: 0.5rem 0.9rem; border-radius: 3px; cursor: pointer; }
.demo-controls button:hover { background: #29251e; }
.found { list-style: none; padding: 0; margin: 1.1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; min-height: 2rem; }
.found li { background: #29251e; border: 1px solid #3a342b; padding: 0.25rem 0.6rem; border-radius: 3px; font-size: 0.92rem; }
.found li b { font-family: var(--serif); font-weight: 600; color: #fff; margin-right: 0.3rem; }

/* Footer */
.site-footer { background: var(--paper-2); border-top: 1px solid var(--line); padding: 3.5rem 0 2.5rem; font-size: 0.97rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2.6fr)); gap: 2rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-family: var(--sans); font-size: 0.95rem; font-weight: 700; margin-bottom: 0.6rem; letter-spacing: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer a { color: var(--ink); }
.site-footer a:hover { color: var(--cobalt); }
.site-footer address { font-style: normal; color: var(--ink-2); }
.footer-name { font-family: var(--serif); font-size: 1.5rem; font-weight: 560; margin-bottom: 0.5rem; line-height: 1.15; }
.footer-base { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 0.9rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }

/* 404 / thanks */
.center-page { min-height: 55vh; display: grid; align-content: center; padding-block: 5rem; }

@media print {
  .site-header, .site-footer, .toc, .cine-logo, .cine-bar, .band-arc { display: none !important; }
  body { background: #fff; }
  .prose { font-size: 11.5pt; }
}
