/* ==========================================================================
   divarci.com.tr — Özgür Mustafa Divarcı
   Design language: quiet, editorial, premium graphic-design studio.
   References: Bugatti (mono labels, wide tracking), Framer (poster-grade
   display tracking), Apple (alternating light/dark rhythm), Linear (surface
   ladder, hairlines), Ferrari (one accent, used scarcely).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.76, 0, .24, 1);
  --ease-soft: cubic-bezier(.25, .8, .25, 1);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1520px;
  --section: clamp(96px, 14vw, 200px);
  --radius: 18px;
  --radius-sm: 10px;
  --header-h: 72px;

  color-scheme: dark;
  --bg: #0a0a0a;
  --bg-2: #111111;
  --bg-3: #191919;
  --bg-inv: #f3f1ec;
  --ink: #f3f1ec;
  --ink-2: #c8c5be;
  --muted: #8b8881;
  --muted-2: #5f5d58;
  --line: rgba(243, 241, 236, .10);
  --line-2: rgba(243, 241, 236, .2);
  --accent: #5b7cff;
  --accent-ink: #ffffff;
  --ok: #3ddc84;
  --grain-opacity: .07;
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, .6);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f1ec;
  --bg-2: #ebe8e1;
  --bg-3: #e1ddd3;
  --bg-inv: #0a0a0a;
  --ink: #0d0d0c;
  --ink-2: #393834;
  --muted: #6e6b65;
  --muted-2: #9d9a93;
  --line: rgba(13, 13, 12, .10);
  --line-2: rgba(13, 13, 12, .2);
  --accent: #1f3fd6;
  --accent-ink: #ffffff;
  --ok: #1c9c55;
  --grain-opacity: .045;
  --shadow: 0 30px 70px -25px rgba(30, 25, 15, .28);
}

/* ---------- Reset ---------- */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: auto; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .6s var(--ease-soft), color .6s var(--ease-soft);
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; background: none; border: 0; }
button { cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Language pending: hide until EN strings are swapped in (prevents TR flash) */
html[data-lang="en"]:not(.i18n-ready) body { opacity: 0; }

/* ---------- Grain overlay ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  width: 200%; height: 200%;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); position: relative; }
.section--tight { padding-block: calc(var(--section) * .6); }

/* ---------- Type ---------- */
.label {
  font-family: var(--f-mono); font-size: 11px; line-height: 1.4;
  letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}
.label--ink { color: var(--ink); }
.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.accent { color: var(--accent); }
.display {
  font-weight: 500; letter-spacing: -.055em; line-height: .88;
  font-size: clamp(3.4rem, 12.5vw, 13rem);
}
.h1 { font-weight: 500; letter-spacing: -.045em; line-height: .95; font-size: clamp(2.8rem, 7.4vw, 7.5rem); }
.h2 { font-weight: 500; letter-spacing: -.04em; line-height: 1; font-size: clamp(2.2rem, 5vw, 4.6rem); }
.h3 { font-weight: 500; letter-spacing: -.03em; line-height: 1.1; font-size: clamp(1.4rem, 2.2vw, 2rem); }
.lead { font-size: clamp(1.15rem, 1.6vw, 1.45rem); line-height: 1.45; color: var(--ink-2); letter-spacing: -.01em; }
.body { color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--muted); }

.section-head {
  display: grid; grid-template-columns: 1fr; gap: 28px;
  margin-bottom: clamp(48px, 7vw, 110px);
}
.section-head__meta { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.section-head__index { display: inline-flex; align-items: center; gap: 10px; }
.section-head__index::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  --h: 52px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: var(--h); padding: 0 26px; border-radius: 999px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  overflow: hidden; isolation: isolate; white-space: nowrap;
  transition: color .5s var(--ease-out), border-color .5s var(--ease-out), transform .4s var(--ease-out);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  transform: translateY(101%); transition: transform .6s var(--ease-out);
}
.btn:hover::before { transform: translateY(0); }
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid::before { background: var(--accent); }
.btn--solid:hover { color: var(--accent-ink); }
.btn--ghost { border: 1px solid var(--line-2); color: var(--ink); }
.btn--ghost::before { background: var(--ink); }
.btn--ghost:hover { color: var(--bg); border-color: var(--ink); }
.btn__arrow { width: 14px; height: 14px; transition: transform .5s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px) rotate(-45deg); }
.btn--sm { --h: 40px; padding: 0 18px; font-size: 11px; }

.link-u { position: relative; display: inline-block; }
.link-u::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease-out);
}
.link-u:hover::after { transform: scaleX(1); transform-origin: left; }

.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 999px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
  transition: all .4s var(--ease-out);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); position: relative; flex: none; }
.dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--ok); animation: ping 2s var(--ease-out) infinite; }
.dot--accent { background: var(--accent); } .dot--accent::after { border-color: var(--accent); }
@keyframes ping { 0% { transform: scale(.4); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--header-h);
  transition: transform .6s var(--ease-out), background-color .5s, border-color .5s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--line);
}
.header.is-hidden { transform: translateY(-100%); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: 13px; letter-spacing: -.02em;
  transition: transform .8s var(--ease-out), background-color .5s;
}
.brand:hover .brand__mark { transform: rotate(-360deg); background: var(--accent); color: var(--accent-ink); }
.brand__name { font-family: var(--f-mono); font-size: 12px; letter-spacing: .32em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav__link { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); transition: color .3s; }
.nav__link:hover, .nav__link.is-active { color: var(--ink); }
.nav__link sup { color: var(--accent); font-size: 8px; margin-left: 3px; letter-spacing: .1em; }
.controls { display: flex; align-items: center; gap: 8px; }
.ctrl {
  height: 36px; min-width: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
  transition: border-color .3s, color .3s, background-color .3s;
}
.ctrl:hover { border-color: var(--ink); color: var(--ink); }
.ctrl--icon { padding: 0; width: 36px; }
.lang-switch span { opacity: .4; transition: opacity .3s; }
.lang-switch span.is-on { opacity: 1; color: var(--ink); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }
.menu-btn { display: none; }
.menu-btn__lines { width: 16px; height: 8px; position: relative; }
.menu-btn__lines::before, .menu-btn__lines::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .5s var(--ease-out), top .5s var(--ease-out);
}
.menu-btn__lines::before { top: 0; } .menu-btn__lines::after { top: 100%; }
.menu-open .menu-btn__lines::before { top: 50%; transform: rotate(45deg); }
.menu-open .menu-btn__lines::after { top: 50%; transform: rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 55; background: var(--bg);
  padding: calc(var(--header-h) + 32px) var(--gutter) 32px;
  display: flex; flex-direction: column; justify-content: space-between;
  clip-path: inset(0 0 100% 0); transition: clip-path .9s var(--ease-in-out); visibility: hidden;
}
.menu-open .mobile-menu { clip-path: inset(0 0 0 0); visibility: visible; }
.mobile-menu__links a {
  display: flex; align-items: baseline; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line);
  font-size: clamp(2.4rem, 11vw, 4.4rem); font-weight: 500; letter-spacing: -.045em; line-height: 1;
  transform: translateY(40px); opacity: 0; transition: transform .8s var(--ease-out), opacity .8s var(--ease-out);
}
.mobile-menu__links a .label { font-size: 10px; }
.menu-open .mobile-menu__links a { transform: none; opacity: 1; }
.menu-open .mobile-menu__links a:nth-child(2) { transition-delay: .05s; }
.menu-open .mobile-menu__links a:nth-child(3) { transition-delay: .1s; }
.menu-open .mobile-menu__links a:nth-child(4) { transition-delay: .15s; }
.menu-open .mobile-menu__links a:nth-child(5) { transition-delay: .2s; }
.menu-open .mobile-menu__links a:nth-child(6) { transition-delay: .25s; }
.mobile-menu__foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }

/* ---------- Scroll progress ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 70; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }

/* ---------- Cursor ---------- */
.cursor, .cursor-dot { position: fixed; top: 0; left: 0; z-index: 100; pointer-events: none; border-radius: 50%; }
.cursor {
  width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 1px solid var(--ink);
  display: grid; place-items: center; mix-blend-mode: difference; border-color: #fff;
  transition: width .45s var(--ease-out), height .45s var(--ease-out), margin .45s var(--ease-out), background-color .45s, opacity .3s, border-color .3s;
}
.cursor-dot { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; background: var(--accent); }
.cursor__label { font-family: var(--f-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #000; opacity: 0; transition: opacity .3s; white-space: nowrap; }
.cursor.is-link { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: #fff; }
.cursor.is-view { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: #fff; }
.cursor.is-view .cursor__label { opacity: 1; }
.cursor.is-hidden, .cursor-dot.is-hidden { opacity: 0; }
@media (hover: none), (pointer: coarse) { .cursor, .cursor-dot { display: none; } }

/* ---------- Preloader & page transition ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 120; background: #0a0a0a; color: #f3f1ec;
  display: flex; flex-direction: column; justify-content: space-between; padding: var(--gutter);
  transition: clip-path 1.1s var(--ease-in-out); clip-path: inset(0 0 0 0);
}
.preloader.is-done { clip-path: inset(0 0 100% 0); }
.preloader__top, .preloader__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.preloader__count { font-size: clamp(5rem, 22vw, 18rem); font-weight: 500; letter-spacing: -.06em; line-height: .8; font-variant-numeric: tabular-nums; }
.preloader__bar { position: absolute; left: 0; bottom: 0; height: 2px; background: #5b7cff; width: 0; }
.preloader .label { color: #8b8881; }

.transition {
  position: fixed; inset: 0; z-index: 110; pointer-events: none;
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.transition span { background: var(--ink); transform: scaleY(0); transform-origin: bottom; }
.transition.is-in span { transform: scaleY(1); transition: transform .6s var(--ease-in-out); }
.transition.is-out span { transform: scaleY(0); transform-origin: top; transition: transform .7s var(--ease-in-out); }
.transition span:nth-child(2) { transition-delay: .04s !important; }
.transition span:nth-child(3) { transition-delay: .08s !important; }
.transition span:nth-child(4) { transition-delay: .12s !important; }
.transition span:nth-child(5) { transition-delay: .16s !important; }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-fade { opacity: 0; transition: opacity 1.4s var(--ease-out); transition-delay: var(--d, 0s); }
.reveal-fade.is-in { opacity: 1; }
.split-line { display: block; overflow: hidden; padding-top: .16em; margin-top: -.16em; padding-bottom: .08em; margin-bottom: -.08em; }
.split-line > span { display: inline-block; transform: translateY(110%) rotate(4deg); transform-origin: left bottom; transition: transform 1.3s var(--ease-out); transition-delay: var(--d, 0s); }
.is-in .split-line > span, .split-line.is-in > span { transform: none; }
.reveal-line { transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease-out); transition-delay: var(--d, 0s); }
.reveal-line.is-in { transform: none; }
.no-js .reveal, .no-js .reveal-fade { opacity: 1; transform: none; }
.no-js .split-line > span { transform: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: calc(var(--header-h) + 40px); overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero__glow {
  position: absolute; z-index: 0; width: 60vw; height: 60vw; max-width: 900px; max-height: 900px; right: -12vw; top: -10vw;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%);
  filter: blur(40px); opacity: .55; pointer-events: none; animation: drift 18s ease-in-out infinite alternate;
}
:root[data-theme="light"] .hero__glow { opacity: .35; }
@keyframes drift { to { transform: translate(-8vw, 10vw) scale(1.15); } }
.hero > .wrap { position: relative; z-index: 2; }
/* columns follow the number of visible items (e.g. when the status is hidden) */
.hero__meta { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 24px; padding-bottom: clamp(32px, 6vh, 72px); }
.hero__meta div { display: flex; flex-direction: column; gap: 6px; }
.hero__meta strong { font-weight: 400; font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .06em; color: var(--ink); display: inline-flex; align-items: center; gap: 10px; }
.hero__title { position: relative; }
.hero__title .row { display: flex; align-items: flex-end; gap: clamp(12px, 2vw, 32px); flex-wrap: wrap; }
.hero__title .serif-tag { font-size: clamp(1.6rem, 4.2vw, 4.6rem); line-height: 1; padding-bottom: .55em; color: var(--ink-2); letter-spacing: -.02em; }
.hero__title .row--right { justify-content: flex-end; }
.hero__foot {
  display: grid; grid-template-columns: 1.2fr 1fr auto; align-items: end; gap: 32px;
  padding-block: clamp(32px, 6vh, 64px) 40px; border-top: 1px solid var(--line); margin-top: clamp(28px, 4vh, 48px);
}
.hero__intro { max-width: 46ch; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-start; }
.badge-rotate { width: 112px; height: 112px; position: relative; display: grid; place-items: center; }
.badge-rotate svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 18s linear infinite; }
.badge-rotate text { font-family: var(--f-mono); font-size: 7.2px; letter-spacing: 1px; text-transform: uppercase; fill: var(--ink-2); }
.badge-rotate__core { width: 42px; height: 42px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; color: var(--accent-ink); transition: transform .6s var(--ease-out); }
.badge-rotate:hover .badge-rotate__core { transform: scale(1.18) rotate(45deg); }
.badge-rotate__core svg { position: static; width: 16px; height: 16px; animation: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 22px; position: relative; background: var(--bg); }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__group { display: flex; align-items: center; gap: clamp(28px, 4vw, 56px); padding-right: clamp(28px, 4vw, 56px); flex: none; }
.marquee__item { font-size: clamp(1.6rem, 3.6vw, 3.2rem); font-weight: 500; letter-spacing: -.04em; white-space: nowrap; line-height: 1; }
.marquee__item.serif { font-weight: 400; color: var(--ink-2); }
.marquee__star { width: clamp(16px, 2vw, 26px); height: auto; color: var(--accent); flex: none; }

/* ---------- About ---------- */
.about__statement { font-size: clamp(1.9rem, 4.1vw, 4rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.08; max-width: 22ch; }
.about__statement .w { opacity: .14; transition: opacity .25s linear; }
.about__statement .w.is-lit { opacity: 1; }
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 120px); margin-top: clamp(64px, 9vw, 140px); align-items: start; }
.about__text { display: grid; gap: 22px; }
.about__text p { color: var(--ink-2); font-size: 1.06rem; max-width: 56ch; }
.about__text p:first-child::first-letter { font-family: var(--f-serif); font-style: italic; float: left; font-size: 4.4em; line-height: .78; padding: 6px 12px 0 0; color: var(--accent); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); margin-top: 18px; }
.facts div { padding: 22px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.facts div:nth-child(odd) { padding-right: 18px; border-right: 1px solid var(--line); }
.facts div:nth-child(even) { padding-left: 18px; }
.facts strong { font-weight: 500; font-size: 1.05rem; letter-spacing: -.01em; }

/* Specimen card (identity) */
.spec-stage { perspective: 1400px; display: grid; place-items: center; position: sticky; top: 120px; }
.spec {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  width: min(100%, 440px); aspect-ratio: .74; border-radius: 22px; position: relative; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line-2);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .6s var(--ease-out); box-shadow: var(--shadow);
  display: flex; flex-direction: column; padding: 26px;
}
.spec::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255,255,255,.4), transparent 45%);
}
.spec__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.spec__glyph {
  margin: 20px 0; flex: 1; border-radius: 14px; position: relative; overflow: hidden; border: 1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 25% 100%,
    var(--bg);
  display: grid; place-items: center;
}
.spec__glyph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.spec__glyph b { font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: clamp(7rem, 15vw, 11rem); line-height: 1; letter-spacing: -.04em; position: relative; }
.spec__glyph b::before { content: ""; position: absolute; left: -12%; right: -12%; top: 78%; height: 1px; background: var(--accent); }
.spec__corner { position: absolute; font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; color: var(--muted); }
.spec__corner--tl { left: 12px; top: 10px; } .spec__corner--br { right: 12px; bottom: 10px; }
.spec__swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 18px; }
.spec__swatches i { height: 30px; border-radius: 6px; border: 1px solid var(--line); }
.spec__rows { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.spec__rows div { display: grid; gap: 3px; }
.spec__rows strong { font-weight: 500; font-size: 14px; letter-spacing: -.01em; }

/* ---------- Services (expertise rows) ---------- */
.services { border-top: 1px solid var(--line); }
.service {
  position: relative; display: grid; grid-template-columns: 80px 1.1fr 1fr 40px; gap: 24px; align-items: center;
  padding: clamp(24px, 3vw, 40px) 0; border-bottom: 1px solid var(--line); overflow: hidden;
}
.service::before {
  content: ""; position: absolute; inset: 0; background: var(--ink); z-index: 0;
  transform: scaleY(0); transform-origin: bottom; transition: transform .7s var(--ease-out);
}
.service > * { position: relative; z-index: 1; transition: color .5s var(--ease-out), transform .7s var(--ease-out); }
.service:hover::before { transform: scaleY(1); }
.service:hover > * { color: var(--bg); }
.service:hover .service__title { transform: translateX(16px); }
.service__title { font-size: clamp(1.6rem, 3.4vw, 3.2rem); font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.service__desc { color: var(--ink-2); font-size: .98rem; max-width: 44ch; }
.service__arrow { width: 28px; height: 28px; justify-self: end; transition: transform .7s var(--ease-out) !important; }
.service:hover .service__arrow { transform: rotate(-45deg); }


/* ---------- Work ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { cursor: pointer; }
.filter.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter:hover:not(.is-on) { border-color: var(--ink); color: var(--ink); }
.filter sup { font-size: 9px; opacity: .6; }
.work-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(16px, 2vw, 28px); row-gap: clamp(40px, 5vw, 80px); }
.work-card { grid-column: span 6; display: flex; flex-direction: column; gap: 18px; cursor: pointer; transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.work-card.is-wide { grid-column: span 7; }
.work-card.is-narrow { grid-column: span 5; }
.work-card.is-narrow { margin-top: clamp(0px, 8vw, 140px); }
.work-card.is-filtered-out { display: none; }
.work-card__media { position: relative; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
.work-card.is-wide .work-card__media { aspect-ratio: 16/11; }
.work-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.work-card:hover .work-card__media img { transform: scale(1.045); }
.work-card__tag { position: absolute; top: 14px; left: 14px; z-index: 2; background: color-mix(in srgb, #0a0a0a 55%, transparent); color: #f3f1ec; border-color: rgba(255,255,255,.18); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.work-card__info { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: baseline; }
.work-card__title { font-size: clamp(1.25rem, 1.9vw, 1.7rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; }
.work-card__year { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.work-card__sub { grid-column: 1 / -1; color: var(--muted); font-size: .95rem; }
.work-note { margin-top: 56px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; padding-top: 28px; border-top: 1px solid var(--line); }

/* ---------- Project title card (shown until real cover images are added) ---------- */
.cover-card {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(18px, 3vw, 32px); padding-top: 56px; background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 25% 100%,
    var(--bg-2);
  transition: transform 1.2s var(--ease-out);
}
.cover-card__title { font-size: clamp(2rem, 5.4vw, 5.2rem); font-weight: 500; letter-spacing: -.05em; line-height: .95; max-width: 12ch; }
.cover-card__top { align-self: flex-end; }
.work-card:hover .cover-card { transform: scale(1.03); }
.modal__hero .cover-card__title { font-size: clamp(2.4rem, 7vw, 7rem); }

/* ---------- Modal (project) ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: end center; pointer-events: none; }
.modal__scrim { position: absolute; inset: 0; background: rgba(0,0,0,.6); opacity: 0; transition: opacity .6s var(--ease-out); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal__panel {
  position: relative; width: min(1280px, 100%); max-height: 92svh; overflow: auto; overscroll-behavior: contain;
  background: var(--bg); border: 1px solid var(--line); border-bottom: 0; border-radius: 24px 24px 0 0;
  transform: translateY(100%); transition: transform .9s var(--ease-out);
}
.modal.is-open { pointer-events: auto; }
.modal.is-open .modal__scrim { opacity: 1; }
.modal.is-open .modal__panel { transform: none; }
.modal__bar { position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px clamp(16px, 3vw, 32px); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.modal__nav { display: flex; gap: 8px; }
.modal__body { padding: clamp(20px, 3vw, 40px) clamp(16px, 3vw, 32px) 56px; }
.modal__hero { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.modal__hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.modal__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 6vw, 96px); margin-top: 40px; }
.modal__specs { display: grid; border-top: 1px solid var(--line); align-content: start; }
.modal__specs div { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.modal__specs strong { font-weight: 500; text-align: right; }
.modal__embed { margin-top: 40px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.modal__embed iframe { display: block; width: 100%; height: min(85svh, 1100px); border: 0; }
.modal__gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.modal__gallery > div { position: relative; aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.modal__gallery img { width: 100%; height: 100%; object-fit: cover; }
body.is-locked { overflow: hidden; }

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.step { padding: 32px 28px 40px 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; min-height: 340px; position: relative; }
.step + .step { padding-left: 28px; }
.step:last-child { border-right: 0; }
.step__n { font-family: var(--f-serif); font-style: italic; font-size: clamp(3.6rem, 6vw, 5.6rem); line-height: .9; color: var(--muted-2); transition: color .5s; }
.step:hover .step__n { color: var(--accent); }
.step h3 { font-size: 1.45rem; font-weight: 500; letter-spacing: -.03em; margin-top: auto; }
.step p { color: var(--ink-2); font-size: .97rem; }
.step__bar { position: absolute; left: 0; top: -1px; height: 2px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease-out); }
.step:hover .step__bar { transform: scaleX(1); }
.step + .step .step__bar { left: 0; }

/* ---------- Experience / CV ---------- */
.inverse { background: var(--bg-inv); color: var(--bg); }
.inverse .label, .inverse .muted { color: color-mix(in srgb, var(--bg) 55%, var(--bg-inv)); }
.inverse .section-head__meta, .inverse .timeline__item, .inverse .tl-col h3 { border-color: color-mix(in srgb, var(--bg) 14%, transparent); }
.inverse .chip { border-color: color-mix(in srgb, var(--bg) 22%, transparent); color: var(--bg); }
.inverse .btn--ghost { border-color: color-mix(in srgb, var(--bg) 25%, transparent); color: var(--bg); }
.inverse .btn--ghost::before { background: var(--bg); }
.inverse .btn--ghost:hover { color: var(--bg-inv); }
.inverse .btn--solid { background: var(--bg); color: var(--bg-inv); }
.inverse .timeline__desc { color: color-mix(in srgb, var(--bg) 72%, var(--bg-inv)); }
.cv-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(48px, 7vw, 120px); }
.tl-col h3 { padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.timeline__item { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.timeline__when { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; padding-top: 6px; display: flex; gap: 8px; align-items: flex-start; }
.timeline__title { font-size: clamp(1.25rem, 2vw, 1.7rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; }
.timeline__org { font-family: var(--f-serif); font-style: italic; font-size: 1.2rem; margin-top: 2px; }
.timeline__desc { margin-top: 10px; color: var(--ink-2); max-width: 54ch; font-size: .98rem; }
.skills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.side-block + .side-block { margin-top: 48px; }
.lang-bars { display: grid; gap: 18px; margin-top: 18px; }
.lang-bar { display: grid; gap: 8px; }
.lang-bar__top { display: flex; justify-content: space-between; }
.lang-bar__track { height: 2px; background: color-mix(in srgb, currentColor 15%, transparent); position: relative; overflow: hidden; }
.lang-bar__fill { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform 1.6s var(--ease-out) .2s; }
.is-in .lang-bar__fill { transform: scaleX(var(--v)); }

/* ---------- Lab / tools ---------- */
.lab-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tool-card {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; min-height: 340px;
  display: flex; flex-direction: column; gap: 14px; overflow: hidden; background: var(--bg-2);
  transition: border-color .5s, transform .6s var(--ease-out);
}
.tool-card:hover { border-color: var(--line-2); transform: translateY(-6px); }
.tool-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .6s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%);
}
.tool-card:hover::before { opacity: 1; }
.tool-card__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: relative; }
.tool-card__icon { width: 52px; height: 52px; border-radius: 14px; border: 1px solid var(--line-2); display: grid; place-items: center; background: var(--bg); }
.tool-card__icon svg { width: 22px; height: 22px; }
.tool-card h3 { margin-top: auto; font-size: 1.5rem; font-weight: 500; letter-spacing: -.03em; position: relative; }
.tool-card p { color: var(--ink-2); font-size: .96rem; position: relative; }
.tool-card__progress { position: relative; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.tool-card__progress i { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, .2)); }
.status { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.status--soon { background: var(--bg-3); color: var(--ink-2); }
.tool-card--cta { background: var(--ink); color: var(--bg); border-color: var(--ink); justify-content: space-between; }
.tool-card--cta p { color: color-mix(in srgb, var(--bg) 70%, var(--ink)); }
.tool-card--cta .label { color: color-mix(in srgb, var(--bg) 55%, var(--ink)); }
.tool-card--cta .btn--ghost { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, transparent) !important; }
.tool-card--cta .btn--ghost::before { background: var(--bg); }
.tool-card--cta:hover .btn--ghost { color: var(--ink); }
.tool-card--cta:hover .btn--ghost::before { transform: translateY(0); }

/* ---------- Contact ---------- */
.contact__title { font-size: clamp(3rem, 10vw, 10.5rem); font-weight: 500; letter-spacing: -.06em; line-height: .88; }
.contact__grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(48px, 7vw, 120px); margin-top: clamp(56px, 8vw, 120px); }
.mail-link { display: inline-flex; align-items: center; gap: 14px; font-size: clamp(1.4rem, 2.6vw, 2.3rem); letter-spacing: -.03em; font-weight: 500; word-break: break-all; }
.copy-btn { position: relative; }
.copy-btn[data-copied]::after { content: attr(data-copied); position: absolute; bottom: calc(100% + 8px); left: 50%; translate: -50% 0; background: var(--ink); color: var(--bg); padding: 4px 10px; border-radius: 6px; font-size: 10px; letter-spacing: .1em; white-space: nowrap; }
.socials { display: grid; margin-top: 40px; border-top: 1px solid var(--line); }
.socials a { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; transition: padding .5s var(--ease-out), color .3s; }
.socials a:hover { padding-left: 12px; color: var(--accent); }
.socials a svg { width: 16px; height: 16px; transition: transform .5s var(--ease-out); }
.socials a:hover svg { transform: rotate(-45deg); }

.form { display: grid; gap: 8px; }
.field { position: relative; border-bottom: 1px solid var(--line-2); transition: border-color .4s; }
.field:focus-within { border-color: var(--ink); }
.field::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease-out); }
.field:focus-within::after { transform: scaleX(1); }
.field input, .field textarea {
  width: 100%; padding: 30px 0 14px; font-size: 1.2rem; letter-spacing: -.01em; outline: none; resize: vertical;
}
.field textarea { min-height: 140px; }
.field label { position: absolute; left: 0; top: 30px; color: var(--muted); font-size: 1.2rem; pointer-events: none; transition: all .4s var(--ease-out); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { top: 6px; font-size: 11px; font-family: var(--f-mono); letter-spacing: .16em; text-transform: uppercase; }
.field input::placeholder, .field textarea::placeholder { color: transparent; }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--ink); transition: background-color 9999s; }
.pick { display: grid; gap: 14px; padding: 24px 0 18px; border-bottom: 1px solid var(--line-2); }
.pick__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.pick__opts input { position: absolute; opacity: 0; pointer-events: none; }
.pick__opts label { cursor: pointer; }
.pick__opts input:checked + label { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pick__opts input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.form__foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 28px; flex-wrap: wrap; }
.form__note { font-size: .85rem; color: var(--muted); max-width: 36ch; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form.is-sending button[type=submit] { opacity: .6; pointer-events: none; }
.form__error { color: var(--accent); font-size: .9rem; display: none; }
.form.has-error .form__error { display: block; }

/* ---------- Footer ---------- */
.footer { position: relative; padding-top: clamp(64px, 8vw, 120px); overflow: hidden; border-top: 1px solid var(--line); }
.footer__top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: clamp(48px, 6vw, 96px); }
.footer__top h4 { margin-bottom: 16px; }
.footer__top ul { display: grid; gap: 8px; }
.footer__top a { color: var(--ink-2); transition: color .3s; }
.footer__top a:hover { color: var(--ink); }
.footer__tag { font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: -.03em; line-height: 1.15; max-width: 18ch; font-weight: 500; }
.footer__word {
  font-weight: 600; letter-spacing: -.07em; line-height: .76; text-align: center; white-space: nowrap;
  font-size: clamp(4rem, 33vw, 44rem); margin-inline: -1vw; user-select: none;
  background: linear-gradient(180deg, var(--ink) 30%, transparent 105%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0 28px; border-top: 1px solid var(--line); }
.to-top { display: inline-flex; align-items: center; gap: 8px; }
.to-top svg { width: 12px; height: 12px; transition: transform .5s var(--ease-out); }
.to-top:hover svg { transform: translateY(-3px); }

/* ---------- Sub-pages (tools / thanks / 404 / cv) ---------- */
.page-hero { padding-top: calc(var(--header-h) + clamp(64px, 10vw, 140px)); padding-bottom: clamp(48px, 7vw, 96px); position: relative; overflow: hidden; }
.page-hero__meta { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 48px); }
.notify { display: flex; gap: 8px; max-width: 520px; margin-top: 36px; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px; transition: border-color .3s; }
.notify:focus-within { border-color: var(--ink); }
.notify input { flex: 1; min-width: 0; padding: 0 18px; outline: none; font-size: 1rem; }
.notify input::placeholder { color: var(--muted); }

.center-page { min-height: 100svh; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.center-page__main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: calc(var(--header-h) + 40px); padding-bottom: 40px; position: relative; z-index: 2; }
.grid-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .55;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 80px 80px;
  mask-image: radial-gradient(ellipse at 70% 50%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 50%, #000 10%, transparent 70%);
}
.check-svg { width: clamp(72px, 9vw, 120px); height: auto; }
.check-svg circle { stroke: var(--line-2); }
.check-svg .ring { stroke: var(--accent); stroke-dasharray: 302; stroke-dashoffset: 302; animation: draw 1.4s var(--ease-out) .5s forwards; }
.check-svg .tick { stroke: var(--ink); stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .9s var(--ease-out) 1.4s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.big-num { font-size: clamp(7rem, 24vw, 22rem); font-weight: 600; letter-spacing: -.08em; line-height: .78; display: flex; user-select: none; }
.big-num span { display: inline-block; transition: transform .3s var(--ease-out); }
.big-num span:nth-child(2) { color: var(--accent); font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.04em; }
.timing { display: grid; grid-template-columns: repeat(3, auto); gap: 8px 32px; justify-content: start; }
.timing strong { font-family: var(--f-mono); font-weight: 400; font-size: 1.05rem; font-variant-numeric: tabular-nums; }

/* CV page — single column, text-only, paper look on screen (ATS-friendly) */
.cv-page { padding-bottom: var(--section); }
.cv-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; max-width: 210mm; margin: 0 auto 20px; }
.cv-toolbar__actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.cv-toolbar__hint { max-width: 46ch; text-align: right; text-transform: none; letter-spacing: .02em; font-size: 11.5px; }
.cv-paper {
  --cv-ink: #111111; --cv-ink-2: #3a3a3a; --cv-muted: #6b6b6b; --cv-line: #d9d9d9;
  max-width: 210mm; min-height: 297mm; margin: 0 auto; background: #fff; color: var(--cv-ink);
  padding: 18mm 18mm 16mm; border-radius: 6px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.06);
  font-family: var(--f-sans); font-size: 10.5pt; line-height: 1.45; -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.cv-paper ::selection { background: #1f3fd6; color: #fff; }
.cv-paper a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--cv-line); }
.cv-paper a:hover { border-color: var(--cv-ink); }
.cvx-head { padding-bottom: 12pt; border-bottom: 1.5pt solid var(--cv-ink); }
.cvx-name { font-size: 26pt; font-weight: 600; letter-spacing: -.035em; line-height: 1.05; color: var(--cv-ink); }
.cvx-role { font-size: 12.5pt; font-weight: 500; color: var(--cv-ink-2); margin-top: 3pt; letter-spacing: -.01em; }
.cvx-contact { margin-top: 7pt; font-size: 9.5pt; color: var(--cv-ink-2); }
.cvx-sep { color: var(--cv-muted); }
.cvx-section { margin-top: 13pt; }
.cvx-section > h2 { font-family: var(--f-sans); font-size: 9.5pt; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--cv-ink); padding-bottom: 4pt; margin-bottom: 7pt; border-bottom: .75pt solid var(--cv-line); }
.cvx-section p { color: var(--cv-ink-2); }
.cvx-section p + p { margin-top: 3pt; }
.cvx-section strong { color: var(--cv-ink); font-weight: 600; }
.cvx-entry + .cvx-entry { margin-top: 8pt; }
.cvx-entry__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12pt; }
.cvx-entry__head h3 { font-size: 10.5pt; font-weight: 600; color: var(--cv-ink); letter-spacing: -.005em; }
.cvx-date { flex: none; font-size: 9.5pt; color: var(--cv-muted); font-variant-numeric: tabular-nums; }
.cvx-entry ul { margin-top: 3pt; padding-left: 13pt; list-style: disc; color: var(--cv-ink-2); }
.cvx-entry li { padding-left: 2pt; }
.cvx-entry li + li { margin-top: 2pt; }
.cvx-entry li::marker { color: var(--cv-muted); }
.cvx-entry > p { margin-top: 2pt; }
@media screen and (max-width: 860px) {
  .cv-paper { min-height: 0; padding: 28px 20px; font-size: 10pt; }
  .cvx-name { font-size: 22pt; }
  .cvx-entry__head { flex-direction: column; gap: 0; }
  .cv-toolbar__hint { text-align: left; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .hero__foot { grid-template-columns: 1fr auto; }
  .hero__foot .hero__cta { grid-column: 1 / -1; grid-row: 2; }
  .lab-grid { grid-template-columns: 1fr 1fr; }
  .process { grid-template-columns: 1fr 1fr; }
  .step:nth-child(2) { border-right: 0; }
  .step:nth-child(3) { padding-left: 0; }
  .step:nth-child(n+3) { border-top: 1px solid var(--line); }
  .footer__top { grid-template-columns: 1fr 1fr 1fr; }
  .footer__top > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .hero__meta { grid-auto-flow: row; grid-template-columns: 1fr 1fr; row-gap: 18px; }
  .about__grid, .cv-grid, .contact__grid, .modal__grid { grid-template-columns: 1fr; }
  .spec-stage { position: relative; top: 0; }
  .service { grid-template-columns: 44px 1fr 28px; }
  .service__desc { grid-column: 2 / 3; grid-row: 2; }
  .service__arrow { grid-column: 3; grid-row: 1; width: 22px; height: 22px; }
  .work-card, .work-card.is-wide, .work-card.is-narrow { grid-column: 1 / -1; margin-top: 0; }
  .work-card.is-wide .work-card__media { aspect-ratio: 4/3; }
  .timeline__item { grid-template-columns: 1fr; gap: 8px; }
  .brand__name { display: none; }
  .modal__gallery { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .lab-grid, .process { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 28px 0 32px; border-right: 0; min-height: 0; }
  .step + .step { border-top: 1px solid var(--line); }
  .hero__foot { grid-template-columns: 1fr; }
  .badge-rotate { display: none; }
  .facts { grid-template-columns: 1fr; }
  .facts div:nth-child(odd), .facts div:nth-child(even) { padding: 18px 0; border-right: 0; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .controls .ctrl--hide-sm { display: none; }
  .hero__title.display { font-size: 23vw; }
  .hero__title .row { gap: 4px 12px; }
  .hero__title .serif-tag { font-size: 7.5vw; padding-bottom: .5em; }
  .hero__title .row--right { flex-direction: column; align-items: flex-end; gap: 0; }
  .hero__title .row--right .serif-tag { padding-bottom: 0; margin-top: 10px; }
  .timing { grid-template-columns: 1fr 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .reveal, .reveal-fade { opacity: 1; transform: none; }
  .split-line > span { transform: none; }
  .about__statement .w { opacity: 1; }
  .grain { animation: none; }
}

/* ---------- Print (CV) ---------- */
@media print {
  /* margin:0 removes the browser's own header/footer (URL, date) from the PDF */
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; color: #000; }
  .header, .footer, .grain, .cursor, .cursor-dot, .progress, .no-print, .transition, .preloader, .mobile-menu { display: none !important; }
  .page-hero, .cv-page { padding: 0 !important; margin: 0 !important; }
  .wrap { padding: 0 !important; max-width: none !important; }
  .reveal, .reveal-fade { opacity: 1 !important; transform: none !important; transition: none !important; }
  .cv-paper { max-width: none; min-height: 0; margin: 0; border-radius: 0; box-shadow: none; padding: 12mm 15mm 10mm; font-size: 10pt; line-height: 1.4; }
  .cvx-name { font-size: 24pt; }
  .cvx-section { margin-top: 10pt; }
  .cvx-section > h2 { margin-bottom: 5pt; }
  .cvx-entry + .cvx-entry { margin-top: 6pt; }
  .cvx-entry li + li { margin-top: 1pt; }
  .cv-paper a { border-bottom: 0; }
  .cvx-entry, .cvx-section > h2 { break-inside: avoid; }
  .cvx-section > h2 { break-after: avoid; }
}
