/* ==========================================================================
   devpabs.io — palette and type taken from the Almat identity manual
   Accent  Pantone 2239 C  #00CFB4
   Black   Pantone Black 6 #101820
   Grey    Pantone 427 C   #D0D3D4
   White                   #FFFFFF
   Headings: Rational TW Text (licensed). Space Mono stands in until the
   font files are added to /assets/fonts — see the @font-face note below.
   Body: PT Sans.
   ========================================================================== */

/* To use the real Rational TW Text, drop the woff2 files in assets/fonts and uncomment:
@font-face { font-family: "Rational TW"; src: url("assets/fonts/RationalTWText-SemiBold.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Rational TW"; src: url("assets/fonts/RationalTWText-Book.woff2") format("woff2"); font-weight: 400; font-display: swap; }
*/

:root {
  --teal: #00cfb4;
  --ink: #101820;
  --grey: #d0d3d4;
  --white: #ffffff;

  --f-head: "Rational TW", "Space Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --f-body: "PT Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

/* ---------- themes ---------- */
:root,
:root[data-theme="dark"] {
  --bg: #0b1117;
  --bg-2: #101820;
  --bg-3: #16212b;
  --fg: #e9eeef;
  --fg-2: #a9b2b6;
  --fg-3: #6b777d;
  --line: rgba(208, 211, 212, .16);
  --line-2: rgba(208, 211, 212, .32);
  --accent: var(--teal);
  --accent-ink: #001d19;
  --glow: 0 0 .5em rgba(0, 207, 180, .45);
  --scan: .05;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-2: #f3f5f5;
  --bg-3: #e6e9ea;
  --fg: #101820;
  --fg-2: #3b474f;
  --fg-3: #7b868b;
  --line: rgba(16, 24, 32, .12);
  --line-2: rgba(16, 24, 32, .3);
  --accent: #00a891; /* teal deepened for contrast on white */
  --accent-ink: #ffffff;
  --glow: none;
  --scan: 0;
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.6 var(--f-body);
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
code, kbd { font-family: var(--f-head); font-size: .88em; }
kbd { border: 1px solid var(--line-2); border-bottom-width: 2px; padding: 0 .4em; border-radius: 3px; }
em { font-style: italic; }
.muted { color: var(--fg-3); }
.accent { color: var(--accent); text-shadow: var(--glow); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* svg graphics share one stroke language: hairlines, filled dots */
svg line, svg polyline, svg path, svg circle, svg polygon, svg rect { stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }
svg .fill { fill: currentColor; stroke: none; }
svg .bg-fill { fill: var(--bg-2); stroke: none; }
svg .accent-fill { fill: var(--accent); }
svg .thin { stroke-width: .5; opacity: .5; }
svg .thick { stroke-width: 4; }
svg circle:not(.fill):not(.bg-fill), svg path:not(.fill) { fill: none; }

/* CRT scanlines + vignette, dark mode only */
.crt {
  pointer-events: none;
  position: fixed; inset: 0; z-index: 90;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,var(--scan)) 2px 3px),
    radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,calc(var(--scan) * 5)) 100%);
  mix-blend-mode: multiply;
  transition: opacity .4s;
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .4s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.logo { font: 700 20px/1 var(--f-head); letter-spacing: .12em; color: var(--accent); text-shadow: var(--glow); white-space: nowrap; min-width: 9ch; }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a {
  font: 400 14px/1 var(--f-head); color: var(--fg-2);
  padding: 8px 10px; border-radius: 4px; position: relative;
  transition: color .2s;
}
.nav__links a .idx { color: var(--accent); font-size: 10px; margin-right: 4px; vertical-align: super; }
.nav__links a::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 4px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--fg); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }
.nav__tools { display: flex; align-items: center; gap: 8px; }
.clock { font: 400 12px/1 var(--f-head); color: var(--fg-3); display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; }
.clock .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: var(--glow); animation: blink 2s steps(1) infinite; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 6px;
  border: 1px solid var(--line); background: transparent; color: var(--fg);
  font: 700 13px/1 var(--f-head); cursor: pointer;
  transition: border-color .2s, color .2s, transform .2s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn:active { transform: scale(.94); }
.theme-toggle svg { transition: transform .5s var(--ease), opacity .3s; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="light"] .i-moon { display: none; }
.menu-btn { display: none; gap: 4px; align-content: center; }
.menu-btn span { display: block; width: 16px; height: 1.5px; background: currentColor; transition: transform .3s, opacity .3s; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 14px/1 var(--f-head); letter-spacing: .02em;
  padding: 14px 20px; border-radius: 4px;
  border: 1px solid var(--line-2); color: var(--fg); background: transparent; cursor: pointer;
  position: relative; overflow: hidden; isolation: isolate;
  transition: color .25s, border-color .25s, transform .2s;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--accent); transform: translateY(101%); transition: transform .35s var(--ease);
}
.btn:hover { color: var(--accent-ink); border-color: var(--accent); }
.btn:hover::before { transform: translateY(0); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: var(--glow); }
.btn--primary::before { background: var(--fg); }
.btn--primary:hover { color: var(--bg); border-color: var(--fg); }
.btn--small { padding: 9px 14px; font-size: 12px; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px 0 80px; overflow: hidden;
}
.hero__scatter { position: absolute; inset: 0; pointer-events: none; }
.hero__scatter span {
  position: absolute; font: 700 clamp(13px, 1.4vw, 18px)/1 var(--f-head); letter-spacing: .3em;
  color: var(--fg-3); opacity: 0; white-space: nowrap;
  animation: drift 14s ease-in-out infinite alternate, fadein 1.2s var(--ease) forwards;
}
.hero__scatter span.is-official { color: var(--accent); text-shadow: var(--glow); }
.hero__inner { position: relative; }
.eyebrow { font: 400 13px/1 var(--f-head); color: var(--fg-2); letter-spacing: .04em; display: flex; align-items: center; gap: 10px; margin: 0 0 28px; }
.eyebrow strong { color: var(--fg); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); position: relative; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--accent); animation: ping 2s var(--ease) infinite; }
.hero__title {
  font: 700 clamp(56px, 13vw, 168px)/.88 var(--f-head);
  letter-spacing: -.04em; margin: 0 0 28px;
}
.hero__title .line { display: block; }
.hero__type { font: 400 clamp(15px, 2vw, 20px)/1.4 var(--f-head); color: var(--fg); margin: 0 0 24px; min-height: 1.4em; }
.hero__type .prompt { color: var(--accent); margin-right: 8px; }
.caret { color: var(--accent); animation: blink 1s steps(1) infinite; margin-left: 2px; }
.hero__lede { max-width: 58ch; font-size: clamp(17px, 1.6vw, 20px); color: var(--fg-2); margin: 0 0 36px; }
.hero__lede em { color: var(--fg); font-style: italic; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__meta {
  position: relative; margin-top: 72px;
  display: flex; align-items: center; gap: 20px;
  font: 400 11px/1 var(--f-head); color: var(--fg-3); letter-spacing: .08em;
}
.hero__meta svg { width: 140px; height: 46px; color: var(--fg-3); flex: none; }
.g-analysis circle { animation: slide 6s ease-in-out infinite alternate; }
.scroll-cue { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); color: var(--fg-3); animation: bob 2.4s ease-in-out infinite; }
.scroll-cue:hover { color: var(--accent); }

/* ---------- sections ---------- */
.section { padding: clamp(80px, 12vw, 160px) var(--gutter); }
.section.wrap { padding-left: var(--gutter); padding-right: var(--gutter); }
.section--alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background-color .4s; }
.section__head {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px;
  border-top: 1px solid var(--fg); padding-top: 18px; margin-bottom: clamp(40px, 6vw, 72px);
  position: relative;
}
.section__idx { position: absolute; right: 0; top: 12px; font: 400 12px/1 var(--f-head); color: var(--fg-3); letter-spacing: .06em; }
.section__head .btn { margin-left: auto; }
h2 { font: 700 clamp(34px, 6vw, 68px)/1.05 var(--f-head); letter-spacing: -.03em; margin: 18px 0 0; }

/* Almat-style strikethrough heading — line draws in when revealed */
.strike { position: relative; display: inline-block; }
.strike::after {
  content: ""; position: absolute; left: 0; right: 0; top: 52%;
  height: max(2px, .055em); background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform 1s .35s var(--ease);
}
.is-in .strike::after, .strike.is-in::after { transform: scaleX(1); }

.label { font: 700 12px/1 var(--f-head); text-transform: uppercase; letter-spacing: .14em; color: var(--fg-3); margin: 0 0 20px; }
.big { font: 400 clamp(21px, 2.4vw, 28px)/1.4 var(--f-body); color: var(--fg); margin: 0 0 28px; }
.todo { font: 400 .78em/1 var(--f-head); color: #e0a100; background: rgba(224,161,0,.1); padding: 1px 4px; border-radius: 2px; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.about__text p { color: var(--fg-2); }
.about__text p strong { color: var(--fg); }
.portrait { margin: 0; position: sticky; top: 110px; }
.portrait__frame { position: relative; aspect-ratio: 5 / 6; padding: 14px; }
.portrait__frame picture, .wide-fig__frame picture { display: block; width: 100%; height: 100%; }
.portrait__frame img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter .6s var(--ease); background: var(--bg-2); }
.portrait__frame:hover img { filter: grayscale(0); }
.wide-fig { margin: 0 0 clamp(48px, 7vw, 88px); }
.wide-fig__frame { position: relative; padding: 14px; }
.wide-fig__frame img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; filter: grayscale(.85) contrast(1.05); transition: filter .6s var(--ease); background: var(--bg-3); }
.wide-fig__frame:hover img { filter: grayscale(0); }
.wide-fig figcaption { font: 400 11px/1 var(--f-head); color: var(--fg-3); margin-top: 12px; letter-spacing: .06em; }
.hello { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.hello img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 1px solid var(--accent); padding: 3px; background: var(--bg); }
.hello__status { font: 400 12px/1.4 var(--f-head); color: var(--fg-2); }
.placeholder {
  position: relative; width: 100%; height: 100%;
  background:
    radial-gradient(circle, var(--line-2) 1px, transparent 1.4px) 0 0 / 16px 16px,
    var(--bg-2);
  display: grid; place-items: end center; overflow: hidden; color: var(--fg-3);
}
.placeholder svg { width: 78%; height: auto; }
.placeholder::after {
  content: attr(data-label); position: absolute; top: 14px; left: 14px;
  font: 400 11px/1 var(--f-head); color: var(--fg-3); letter-spacing: .06em;
}
.corner { position: absolute; width: 18px; height: 18px; border-color: var(--accent); border-style: solid; border-width: 0; }
.corner.c-tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.corner.c-tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.corner.c-bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.corner.c-br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.portrait figcaption { font: 400 11px/1 var(--f-head); color: var(--fg-3); margin-top: 12px; letter-spacing: .06em; }

.term-card { border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); overflow: hidden; transition: background-color .4s; }
.term-card__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.term-card__bar span { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--line-2); }
.term-card__bar span:first-child { background: var(--accent); border-color: var(--accent); }
.term-card__bar em { margin-left: 8px; font: 400 12px/1 var(--f-head); font-style: normal; color: var(--fg-3); }
.kv { margin-top: 36px; }
.kv dl { margin: 0; padding: 16px 18px; font: 400 14px/1.5 var(--f-head); }
.kv dl div { display: grid; grid-template-columns: 9ch 1fr; gap: 12px; padding: 5px 0; }
.kv dl div + div { border-top: 1px dashed var(--line); }
.kv dt { color: var(--accent); }
.kv dt::after { content: ":"; color: var(--fg-3); }
.kv dd { margin: 0; color: var(--fg); }
.ok { color: var(--accent); text-shadow: var(--glow); }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 27px; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
.tl { display: grid; grid-template-columns: 56px 1fr; gap: 28px; padding: 0 0 56px; position: relative; }
.tl:last-child { padding-bottom: 0; }
.tl__mark { width: 56px; height: 56px; padding: 8px; background: var(--bg-2); color: var(--fg); position: relative; z-index: 1; transition: color .3s, background-color .4s; }
.tl:hover .tl__mark { color: var(--accent); }
.tl__chap { font: 400 12px/1 var(--f-head); color: var(--accent); letter-spacing: .06em; }
.tl h3 { font: 700 clamp(22px, 2.6vw, 30px)/1.15 var(--f-head); margin: 10px 0 10px; letter-spacing: -.02em; }
.tl p { margin: 0; color: var(--fg-2); max-width: 64ch; }
.tl code { color: var(--accent); }

/* ---------- cv ---------- */
.cv { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(32px, 6vw, 88px); }
.job { display: grid; grid-template-columns: 7ch 1fr; gap: 20px; padding: 24px 0; border-top: 1px solid var(--line); transition: background-color .3s; }
.job:hover .job__when { color: var(--accent); }
.job__when { font: 400 13px/1.9 var(--f-head); color: var(--fg-3); transition: color .2s; }
.job h4 { font: 700 19px/1.3 var(--f-head); margin: 0 0 8px; letter-spacing: -.01em; }
.job .at { color: var(--fg-3); font-weight: 400; }
.job p { margin: 0 0 12px; color: var(--fg-2); }
.bullets { list-style: none; margin: 0 0 14px; padding: 0; }
.bullets li { position: relative; padding-left: 18px; color: var(--fg-2); font-size: 16px; margin-bottom: 6px; }
.bullets li::before { content: "—"; position: absolute; left: 0; color: var(--accent); font-family: var(--f-head); font-size: 12px; top: 3px; }
.job__when br { display: block; }
.langs li span { padding-right: 12px; }
.langs li em { white-space: nowrap; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font: 400 12px/1 var(--f-head); color: var(--fg-2); border: 1px solid var(--line-2); padding: 6px 8px; border-radius: 3px; transition: color .2s, border-color .2s; }
.tags li:hover { color: var(--accent); border-color: var(--accent); }
.tags--loose { margin-bottom: 40px; }
.cv__side .label:not(:first-child) { margin-top: 8px; }
.meters { list-style: none; margin: 0 0 40px; padding: 0; }
.meters li { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 8px 0; font: 400 13px/1 var(--f-head); }
.meters i {
  display: block; height: 10px; position: relative;
  background: linear-gradient(var(--line-2), var(--line-2)) left 50% / 100% 1px no-repeat;
}
.meters i::after {
  content: ""; position: absolute; inset: 0; right: auto; width: calc(var(--v) * 100%);
  background: repeating-linear-gradient(90deg, var(--accent) 0 4px, transparent 4px 6px);
  transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease);
}
.is-in.meters i::after, .meters.is-in i::after { transform: scaleX(1); }
.meters li:nth-child(2) i::after { transition-delay: .08s } .meters li:nth-child(3) i::after { transition-delay: .16s }
.meters li:nth-child(4) i::after { transition-delay: .24s } .meters li:nth-child(5) i::after { transition-delay: .32s }
.meters li:nth-child(6) i::after { transition-delay: .4s }  .meters li:nth-child(7) i::after { transition-delay: .48s }
.meters li:nth-child(8) i::after { transition-delay: .56s }
.langs { list-style: none; margin: 0 0 40px; padding: 0; font: 400 14px/1 var(--f-head); }
.langs li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.langs em { color: var(--fg-3); font-style: normal; }
.g-dots { width: 100%; color: var(--fg-3); }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.card {
  grid-column: span 2; position: relative;
  display: flex; flex-direction: column; gap: 10px;
  padding: 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg);
  transition: border-color .3s, transform .4s var(--ease), background-color .4s;
  overflow: hidden;
}
.card:hover { border-color: var(--accent); transform: translateY(-4px); }
.card--feature { grid-column: span 3; padding: 0; }
.card--feature .card__body { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.card__kind { font: 400 11px/1 var(--f-head); color: var(--accent); text-transform: uppercase; letter-spacing: .12em; }
.card h3 { font: 700 21px/1.2 var(--f-head); margin: 0; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--fg-2); font-size: 16px; }
.ext { display: inline-block; color: var(--fg-3); transition: transform .3s var(--ease), color .3s; }
.card:hover .ext { transform: translate(3px, -3px); color: var(--accent); }
.card__glyph { margin-top: auto; padding-top: 16px; width: 120px; height: auto; color: var(--fg-3); transition: color .3s; }
.card:hover .card__glyph { color: var(--fg); }
.card--more { background: transparent; border-style: dashed; }
.card__art { position: relative; aspect-ratio: 16 / 8; background: #05090c; color: #d0d3d4; overflow: hidden; border-bottom: 1px solid var(--line); }
.card__art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.clock-face { position: absolute; top: 14px; left: 16px; z-index: 1; font: 400 11px/1 var(--f-head); letter-spacing: .14em; color: var(--teal); }
.art-monastery { background: radial-gradient(circle at 50% 62%, rgba(255, 210, 140, .16), transparent 32%), #05090c; }
.art-monastery circle.fill { animation: flicker 3.2s steps(1) infinite; }
.art-forest { background: linear-gradient(to bottom, #0b1a1a, #05090c); }
.card:hover .card__art svg { transform: scale(1.04); }
.card__art svg { transition: transform 1.2s var(--ease); }

/* ---------- log (from X) ---------- */
.log { margin-top: 40px; }
.log ul { list-style: none; margin: 0; padding: 8px 18px; }
.log li { display: grid; grid-template-columns: 10ch 1fr; gap: 16px; padding: 12px 0; font-size: 16px; }
.log li + li { border-top: 1px dashed var(--line); }
.log time { font: 400 13px/1.7 var(--f-head); color: var(--accent); }
.log time::before { content: "#"; color: var(--fg-3); }
.log p { margin: 0; color: var(--fg-2); }
.log__more { display: block; padding: 12px 18px 16px; font: 400 13px/1 var(--f-head); color: var(--fg-2); border-top: 1px solid var(--line); }
.log__more:hover { color: var(--accent); }
@media (max-width: 640px) { .log li { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.offers { list-style: none; margin: 0 0 36px; padding: 0; }
.offers li { display: grid; grid-template-columns: 3ch 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.offers__k { font: 400 12px/1.9 var(--f-head); color: var(--accent); }
.offers h4 { font: 700 16px/1.3 var(--f-head); margin: 0 0 4px; }
.offers p { margin: 0; color: var(--fg-2); font-size: 15px; }
.socials { display: flex; flex-direction: column; gap: 8px; font: 400 14px/1 var(--f-head); }
.socials a { color: var(--fg-2); width: fit-content; transition: color .2s; }
.socials a::before { content: "→ "; color: var(--accent); }
.socials a:hover { color: var(--accent); }

.form { padding: 0 0 4px; }
.form > *:not(.term-card__bar) { margin-left: 20px; margin-right: 20px; }
.form__types { border: 0; padding: 0; margin-top: 20px; margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.form__types legend { font: 400 12px/1 var(--f-head); color: var(--fg-3); padding: 0; margin-bottom: 12px; }
.form__types label { cursor: pointer; }
.form__types input { position: absolute; opacity: 0; pointer-events: none; }
.form__types span {
  display: inline-block; font: 400 13px/1 var(--f-head); padding: 9px 12px;
  border: 1px solid var(--line-2); border-radius: 3px; color: var(--fg-2); transition: all .2s;
}
.form__types span::before { content: "[ ] "; color: var(--fg-3); }
.form__types input:checked + span { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.form__types input:checked + span::before { content: "[x] "; color: var(--accent); }
.form__types input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.field > span { font: 400 12px/1 var(--f-head); color: var(--accent); }
.field input, .field select, .field textarea {
  font: 400 16px/1.4 var(--f-body); color: var(--fg); background: var(--bg);
  border: 1px solid var(--line-2); border-radius: 4px; padding: 12px 14px; width: 100%;
  transition: border-color .2s, box-shadow .2s, background-color .4s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field input::placeholder, .field textarea::placeholder { color: var(--fg-3); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #ff6b5b; }
.form__foot { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.form__status { font: 400 13px/1.5 var(--f-head); color: var(--accent); min-height: 1.5em; margin-top: 14px; margin-bottom: 16px; }
.form__status.is-error { color: #ff6b5b; }

.form[hidden], .soon[hidden] { display: none; }
.soon__body { padding: 24px 20px; }
.soon__links { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 64px 0 48px; background: var(--bg); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; }
.footer__logos { display: grid; grid-template-columns: repeat(3, auto); gap: 10px 28px; font: 700 14px/1 var(--f-head); letter-spacing: .3em; color: var(--fg-3); }
.footer__logos span { transition: color .2s; cursor: default; }
.footer__logos span:hover, .footer__logos span.is-official { color: var(--accent); }
.footer__meta { text-align: right; font: 400 13px/1.6 var(--f-head); color: var(--fg-2); }
.footer__meta p { margin: 0; }

/* ---------- terminal ---------- */
.term { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(5, 9, 12, .6); backdrop-filter: blur(4px); animation: fadein .2s; }
.term[hidden] { display: none; }
.term__win { width: min(720px, 100%); height: min(460px, 80vh); display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.5); background: #070c10; color: #d7f5ef; border-color: rgba(0,207,180,.4); }
.term__win .term-card__bar em { color: #6b777d; }
.term__x { margin-left: auto; background: none; border: 0; color: #a9b2b6; font: 400 20px/1 var(--f-head); cursor: pointer; }
.term__x:hover { color: var(--teal); }
.term__out { flex: 1; overflow: auto; padding: 14px 16px 0; font: 400 14px/1.6 var(--f-head); white-space: pre-wrap; text-shadow: 0 0 .4em rgba(0, 207, 180, .35); }
.term__out .t-acc { color: var(--teal); }
.term__out .t-dim { color: #6b777d; }
.term__out a { color: var(--teal); text-decoration: underline; }
.term__in { display: flex; gap: 8px; padding: 10px 16px 16px; font: 400 14px/1 var(--f-head); }
.term__in .prompt { color: var(--teal); }
.term__in input { flex: 1; background: none; border: 0; outline: none; color: #e9eeef; font: inherit; caret-color: var(--teal); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- keyframes ---------- */
@keyframes blink { 50% { opacity: 0; } }
@keyframes ping { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(2.2); opacity: 0; } }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }
@keyframes fadein { from { opacity: 0; } to { opacity: var(--o, .55); } }
@keyframes drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(var(--dx, 10px), var(--dy, -14px), 0); } }
@keyframes slide { from { transform: translateX(-100px); } to { transform: translateX(0); } }
@keyframes flicker { 0%, 100% { opacity: 1; } 42% { opacity: .2; } 44% { opacity: 1; } 71% { opacity: .5; } 72% { opacity: 1; } }
@keyframes sway { from { transform: skewX(-1.5deg); } to { transform: skewX(1.5deg); } }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .nav__links {
    position: fixed; top: 66px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px;
    transform: translateY(-120%); transition: transform .4s var(--ease); z-index: -1;
  }
  .nav__links a { padding: 14px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav__links a::after { display: none; }
  .nav.menu-open .nav__links { transform: none; }
  .nav__tools { margin-left: auto; }
  .menu-btn { display: inline-grid; }
  .nav.menu-open .menu-btn span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
  .nav.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
  .nav.menu-open .menu-btn span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }
  .about, .cv, .contact { grid-template-columns: 1fr; }
  .portrait { position: relative; top: 0; max-width: 360px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card, .card--feature { grid-column: span 1; }
  .card--feature { grid-column: span 2; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .clock { display: none; }
  .hero__scatter { opacity: .35; }
  .cards { grid-template-columns: 1fr; }
  .card, .card--feature { grid-column: span 1; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .form > *:not(.term-card__bar) { margin-left: 16px; margin-right: 16px; }
  .section__idx { position: static; width: 100%; order: -1; }
  .section__head .btn { margin-left: 0; }
  .tl { grid-template-columns: 40px 1fr; gap: 18px; }
  .tl__mark { width: 40px; height: 40px; padding: 4px; }
  .timeline::before { left: 19.5px; }
  .job { grid-template-columns: 1fr; gap: 6px; }
  .footer__meta { text-align: left; }
  .footer__logos { grid-template-columns: repeat(2, auto); }
  .hero__meta svg { width: 90px; }
}

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