/* ==========================================================================
   S. Sadra Mousavi — personal site
   Palette: warm paper / graphite ink / copper signal ("PCB" direction)
   Type:    Space Grotesk (display) · IBM Plex Sans (text) · IBM Plex Mono (labels)
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  color-scheme: light;

  --paper:      #f6f5f2;
  --paper-2:    #efeee9;
  --surface:    #ffffff;
  --ink:        #14161a;
  --ink-2:      #4c525b;   /* 6.6:1 on --paper-2 */
  --ink-3:      #626973;   /* 4.8:1 on --paper-2 — safe for small labels */
  --line:       rgba(20, 22, 26, .11);
  --line-2:     rgba(20, 22, 26, .06);

  --copper:     #a8481a;   /* 5.3:1 on paper — safe for body-size links */
  --copper-hi:  #c25a24;   /* hover / large text */
  --copper-ink: #8f3d16;   /* copper text on a --copper-dim tint */
  --copper-dim: rgba(168, 72, 26, .10);
  --copper-ghost: rgba(168, 72, 26, .22);

  --shadow-sm: 0 1px 2px rgba(20, 22, 26, .04), 0 2px 8px rgba(20, 22, 26, .04);
  --shadow-md: 0 2px 4px rgba(20, 22, 26, .04), 0 14px 34px rgba(20, 22, 26, .09);

  --display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --sans:    "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --nav-h: 64px;
  --wrap:  1140px;

  --s-1: 8px;  --s-2: 16px; --s-3: 24px; --s-4: 32px;
  --s-5: 48px; --s-6: 64px; --s-7: 96px; --s-8: 128px;

  --r-sm: 8px; --r-md: 14px; --r-lg: 20px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper:   #0e1013;
    --paper-2: #131619;
    --surface: #16191e;
    --ink:     #eae7e1;
    --ink-2:   #a2a8b0;
    --ink-3:   #838a94;   /* 5.1:1 on --surface */
    --line:    rgba(234, 231, 225, .13);
    --line-2:  rgba(234, 231, 225, .07);
    --copper:     #e08a4b;   /* 7.0:1 on #0e1013 */
    --copper-hi:  #f2a163;
    --copper-ink: #f0a877;
    --copper-dim: rgba(224, 138, 75, .12);
    --copper-ghost: rgba(224, 138, 75, .28);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .25);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, .3), 0 14px 34px rgba(0, 0, 0, .45);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper:   #0e1013;
  --paper-2: #131619;
  --surface: #16191e;
  --ink:     #eae7e1;
  --ink-2:   #a2a8b0;
  --ink-3:   #838a94;
  --line:    rgba(234, 231, 225, .13);
  --line-2:  rgba(234, 231, 225, .07);
  --copper:     #e08a4b;
  --copper-hi:  #f2a163;
  --copper-ink: #f0a877;
  --copper-dim: rgba(224, 138, 75, .12);
  --copper-ghost: rgba(224, 138, 75, .28);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .25);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, .3), 0 14px 34px rgba(0, 0, 0, .45);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; margin: 0; }
p { margin: 0 0 var(--s-2); }
a { color: inherit; }
img, svg { max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 600; }

::selection { background: var(--copper-ghost); }

:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap { width: min(100% - 2 * var(--s-3), var(--wrap)); margin-inline: auto; }

.i { width: 1em; height: 1em; flex: none; }

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  transform: translateY(-200%);
  background: var(--ink); color: var(--paper);
  padding: 13px 18px; border-radius: var(--r-sm);
  font: 500 14px/1 var(--sans); text-decoration: none;
}
.skip-link:focus { transform: none; }

/* ---------- scroll progress ---------- */
.progress {
  position: fixed; inset: 0 auto auto 0; z-index: 120;
  height: 2px; width: 100%;
  background: var(--copper);
  transform: scaleX(0); transform-origin: 0 50%;
  will-change: transform;
}

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--line); }

.nav__inner {
  width: min(100% - 2 * var(--s-3), var(--wrap));
  margin-inline: auto; height: 100%;
  display: flex; align-items: center; gap: var(--s-3);
}

.mark {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-family: var(--display); font-weight: 700;
  letter-spacing: -.015em; font-size: 16px;
  margin-right: auto; margin-left: -6px;
  padding: 9px 6px; border-radius: var(--r-sm);
}
.mark__chip { display: grid; place-items: center; width: 26px; height: 26px; color: var(--copper); }
.mark__chip svg { width: 100%; height: 100%; }
.mark__text { white-space: nowrap; }
@media (max-width: 400px) { .mark__text { display: none; } }

.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links > a:not(.btn) {
  position: relative;
  padding: 8px 11px;
  font-size: 14.5px; font-weight: 500;
  color: var(--ink-2); text-decoration: none;
  border-radius: var(--r-sm);
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav__links > a:not(.btn):hover { color: var(--ink); background: var(--line-2); }
.nav__links > a.is-active { color: var(--copper); }
.nav__links > a.is-active::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 3px;
  height: 1.5px; background: var(--copper); border-radius: 2px;
}
.nav__cv { margin-left: var(--s-2); }

.nav__tools { display: flex; align-items: center; gap: 6px; }

.iconbtn {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: transparent; color: var(--ink-2);
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.iconbtn:hover { color: var(--ink); border-color: var(--ink-3); background: var(--line-2); }
.iconbtn .i { width: 18px; height: 18px; }
.i--moon { display: none; }
:root[data-theme="dark"] .i--sun { display: none; }
:root[data-theme="dark"] .i--moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i--sun { display: none; }
  :root:not([data-theme="light"]) .i--moon { display: block; }
}

.burger { display: none; position: relative; }
.burger span {
  position: absolute; left: 11px; width: 18px; height: 1.6px;
  background: currentColor; border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { bottom: 15px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.2px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-6.2px) rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink);
  font: 500 15px/1 var(--sans); text-decoration: none;
  cursor: pointer; white-space: nowrap;
  transition: transform .18s var(--ease), border-color .18s var(--ease),
              background .18s var(--ease), box-shadow .18s var(--ease);
}
.btn .i { width: 17px; height: 17px; }
.btn:hover { border-color: var(--ink-3); background: var(--surface); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: none; }

.btn--solid {
  background: var(--copper); border-color: var(--copper); color: #fff;
}
:root[data-theme="dark"] .btn--solid { color: #17110b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn--solid { color: #17110b; } }
.btn--solid:hover { background: var(--copper-hi); border-color: var(--copper-hi); }

.btn--sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn--sm .i { width: 15px; height: 15px; }

/* ---------- shared section furniture ---------- */
.sec { padding: var(--s-7) 0; position: relative; }
.sec--alt { background: var(--paper-2); border-block: 1px solid var(--line-2); }

.sec__head { max-width: 62ch; margin-bottom: var(--s-6); }
.sec__num {
  display: inline-block; margin-bottom: 12px;
  font: 500 12px/1 var(--mono); letter-spacing: .16em;
  color: var(--copper);
}
.sec__num::after { content: " ——"; color: var(--ink-3); letter-spacing: 0; }
.sec__head h2 { font-size: clamp(30px, 4.4vw, 44px); }
.sec__note { margin: 14px 0 0; color: var(--ink-2); font-size: 17px; }

.eyebrow {
  font: 500 12.5px/1.5 var(--mono);
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-2); margin: 0 0 var(--s-3);
}

/* ---------- hero ---------- */
.hero { position: relative; padding: calc(var(--nav-h) + var(--s-7)) 0 var(--s-6); overflow: hidden; }

.hero__bg {
  position: absolute; inset: 0; pointer-events: none;
  color: var(--copper);
  opacity: .17;
  mask-image: radial-gradient(120% 95% at 78% 22%, #000 8%, transparent 68%);
  -webkit-mask-image: radial-gradient(120% 95% at 78% 22%, #000 8%, transparent 68%);
}
:root[data-theme="dark"] .hero__bg { opacity: .24; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero__bg { opacity: .24; } }

.traces {
  position: absolute; right: -4%; top: -6%;
  width: min(1000px, 82vw); height: auto;
}
.traces .flow {
  stroke-dasharray: 10 14;
  animation: flow 5.5s linear infinite;
}
@keyframes flow { to { stroke-dashoffset: -48; } }

.hero__inner {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: var(--s-6) var(--s-6); align-items: start;
}

.hero__name {
  font-size: clamp(48px, 9vw, 96px);
  letter-spacing: -.038em; line-height: .96;
  margin: 0 0 var(--s-3);
}
.hero__name span { display: block; }
.hero__last { color: var(--copper); }

.hero__lede { font-size: clamp(18px, 2vw, 21px); line-height: 1.6; max-width: 60ch; color: var(--ink); }
.hero__lede strong { font-weight: 600; box-shadow: inset 0 -.42em 0 var(--copper-dim); }
.hero__sub { color: var(--ink-2); max-width: 58ch; font-size: 16.5px; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--s-4); }

/* datasheet card */
.sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  font-family: var(--mono);
  margin-top: 10px;
}
.sheet__head {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(var(--line-2), transparent);
  font-size: 11.5px; letter-spacing: .16em; color: var(--ink-2);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--copper);
  box-shadow: 0 0 0 3px var(--copper-dim);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 6px transparent; } }

.sheet__body { margin: 0; padding: 6px 16px; }
.sheet__body > div {
  display: flex; align-items: baseline; gap: 12px;
  padding: 9px 0; border-bottom: 1px dashed var(--line-2);
}
.sheet__body > div:last-child { border-bottom: 0; }
.sheet__body dt {
  font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2); width: 92px; flex: none;
}
.sheet__body dd { margin: 0; font-size: 13.5px; color: var(--ink); }

.sheet__foot {
  display: flex; gap: 4px; padding: 10px 12px;
  border-top: 1px solid var(--line); background: var(--line-2);
}
.sheet__foot a {
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: var(--r-sm); color: var(--ink-2);
  transition: color .18s var(--ease), background .18s var(--ease);
}
.sheet__foot a:hover { color: var(--copper); background: var(--surface); }
.sheet__foot svg { width: 18px; height: 18px; }

/* stats */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; margin-top: var(--s-6);
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
}
.stats li { background: var(--paper); padding: var(--s-3) var(--s-3) calc(var(--s-3) - 4px); }
.stats b {
  display: block; font-family: var(--display); font-weight: 700;
  font-size: clamp(26px, 3.2vw, 36px); letter-spacing: -.03em; line-height: 1.1;
}
.stats b span { font-size: .55em; color: var(--ink-3); font-weight: 500; }
.stats__k {
  display: block; margin-top: 6px;
  font: 400 12.5px/1.45 var(--mono);
  color: var(--ink-2); letter-spacing: .01em;
}

/* ---------- focus grid ---------- */
.focus { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: var(--s-2); }
.focus__item {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--s-3);
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.focus__item:hover { transform: translateY(-3px); border-color: var(--copper-ghost); box-shadow: var(--shadow-md); }
.focus__item .i { width: 26px; height: 26px; color: var(--copper); margin-bottom: 14px; }
.focus__item h3 { font-size: 18px; letter-spacing: -.012em; margin-bottom: 7px; }
.focus__item p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; }

.focus__item--cta {
  display: flex; flex-direction: column; justify-content: center;
  background: var(--copper-dim); border-color: var(--copper-ghost); border-style: dashed;
}
.focus__item--cta h3 { color: var(--ink); }
.focus__item--cta p { color: var(--ink-2); margin-bottom: 14px; }
.focus__link {
  align-self: start; display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; margin: -12px -4px; padding: 12px 4px;
  font: 500 14px/1 var(--mono); color: var(--copper);
  text-decoration: underline; text-decoration-color: var(--copper-ghost);
  text-underline-offset: 5px; text-decoration-thickness: 1px;
  transition: text-decoration-color .18s var(--ease);
}
.focus__link:hover { text-decoration-color: var(--copper); }
.focus__link .i { width: 14px; height: 14px; transition: transform .18s var(--ease); }
.focus__item--cta:hover .focus__link .i { transform: translate(2px, -2px); }

/* ---------- two-column layout ---------- */
.cols { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--s-6); align-items: start; }

/* ---------- timeline ---------- */
.tl { position: relative; padding-left: var(--s-4); }
.tl::before {
  content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px;
  width: 1px; background: linear-gradient(var(--line), var(--line), transparent);
}
.tl__item { position: relative; padding-bottom: var(--s-5); }
.tl__item:last-child { padding-bottom: 0; }
.tl__item::before {
  content: ""; position: absolute; left: -31px; top: 9px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--copper); border: 2.5px solid var(--paper);
  box-shadow: 0 0 0 1px var(--copper-ghost);
}
.sec--alt .tl__item::before { border-color: var(--paper-2); }
.tl__item--muted::before { background: var(--ink-3); box-shadow: 0 0 0 1px var(--line); }

.tl__when {
  display: block; margin-bottom: 7px;
  font: 500 12px/1 var(--mono); letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-3);
}
.tl__item h3 { font-size: 20px; margin-bottom: 5px; }
.tl__role { color: var(--copper); font-size: 15px; font-weight: 500; margin-bottom: 10px; }
.tl__item p:last-child { margin-bottom: 0; }
.tl__item > ul { display: grid; gap: 7px; }
.tl__item > ul li {
  position: relative; padding-left: 18px;
  color: var(--ink-2); font-size: 15.5px; line-height: 1.6;
}
.tl__item > ul li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 6px; height: 1.5px; background: var(--ink-3);
}
.tl--wide { max-width: 78ch; }

/* ---------- awards ---------- */
.awards { display: grid; gap: var(--s-2); }
.award {
  display: flex; gap: var(--s-2);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--s-3);
}
.award .i { width: 24px; height: 24px; color: var(--copper); margin-top: 3px; }
.award h3 { font-size: 17px; margin-bottom: 6px; }
.award__when {
  display: inline-block; margin-left: 8px; vertical-align: 1px;
  font: 400 11.5px/1 var(--mono); letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-3);
}
.award p { margin: 0; color: var(--ink-2); font-size: 15.5px; }

/* ---------- projects ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--s-4); }
.chip {
  min-height: 44px; padding: 0 17px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink-2);
  font: 500 13.5px/1 var(--mono); letter-spacing: .02em;
  cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.chip:hover { color: var(--ink); border-color: var(--ink-3); }
.chip.is-on { color: #fff; border-color: var(--copper); background: var(--copper); }
:root[data-theme="dark"] .chip.is-on { color: #17110b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.is-on { color: #17110b; } }

.grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: var(--s-2);
}
.card { grid-column: span 2; }
.card--wide { grid-column: span 3; }

.card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--s-3);
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), opacity .2s var(--ease);
}
.card:hover { transform: translateY(-3px); border-color: var(--copper-ghost); box-shadow: var(--shadow-md); }
.card.is-hidden { display: none; }

.card__top { margin-bottom: 12px; }
.card__tag {
  font: 500 11px/1 var(--mono); letter-spacing: .13em; text-transform: uppercase;
  color: var(--copper-ink); padding: 5px 9px; border-radius: 5px; background: var(--copper-dim);
}
.card h3 { font-size: 19px; letter-spacing: -.015em; margin-bottom: 9px; }
.card h3 a { text-decoration: none; display: inline; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-md); }
.card { position: relative; }
.card h3 a:hover { color: var(--copper); }
.card__arrow {
  display: inline-block; margin-left: 6px; font-size: .82em; color: var(--ink-3);
  transition: transform .2s var(--ease), color .2s var(--ease);
}
.card:hover .card__arrow { color: var(--copper); transform: translate(2px, -2px); }
.card > p { color: var(--ink-2); font-size: 15.5px; line-height: 1.62; margin-bottom: var(--s-2); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tags li {
  font: 400 12px/1 var(--mono);
  padding: 6px 9px; border-radius: 5px;
  border: 1px solid var(--line); color: var(--ink-2);
}

.grid__empty { margin-top: var(--s-3); color: var(--ink-2); font-family: var(--mono); font-size: 14px; }
.more { margin: var(--s-4) 0 0; }

/* ---------- skills / spec table ---------- */
.specs { margin: 0; border-top: 1px solid var(--line); }
.spec {
  display: grid; grid-template-columns: 190px minmax(0, 1fr);
  gap: var(--s-3); align-items: baseline;
  padding: var(--s-3) 0; border-bottom: 1px solid var(--line);
}
.spec dt {
  font: 500 12px/1.4 var(--mono); letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-3);
}
.spec dd { margin: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.spec dd span {
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 14.5px; color: var(--ink);
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.spec dd span:hover { border-color: var(--copper-ghost); color: var(--copper); }

/* ---------- contact ---------- */
.sec--contact { padding-bottom: var(--s-8); }
.contact { display: grid; gap: var(--s-5); }

.contact__mail {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(21px, 3.6vw, 40px); letter-spacing: -.03em;
  color: var(--ink); text-decoration: none;
  word-break: break-word;
  transition: color .2s var(--ease);
}
.contact__mail .i { width: .58em; height: .58em; color: var(--copper); transition: transform .2s var(--ease); }
.contact__mail:hover { color: var(--copper); }
.contact__mail:hover .i { transform: translate(3px, -3px); }

.contact__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--s-2) var(--s-3); }
.contact__list li { display: flex; align-items: center; gap: 11px; min-height: 44px; color: var(--ink-2); font-size: 15.5px; }
.contact__list .i { width: 18px; height: 18px; color: var(--ink-3); }
.contact__list a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px;
  color: var(--ink); text-decoration: underline; text-decoration-color: var(--line);
  text-underline-offset: 4px; text-decoration-thickness: 1px;
  transition: color .18s var(--ease), text-decoration-color .18s var(--ease);
}
.contact__list a:hover { color: var(--copper); text-decoration-color: var(--copper); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: var(--s-4) 0; background: var(--paper-2); }
.foot__inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); }
.foot p { margin: 0; font: 400 13.5px/1.5 var(--mono); color: var(--ink-2); }
.foot__meta { color: var(--ink-3); }
.foot__top {
  margin-left: auto; margin-right: -8px;
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 44px; padding: 0 8px; border-radius: var(--r-sm);
  font: 500 13.5px/1 var(--mono); color: var(--ink-2); text-decoration: none;
  transition: color .18s var(--ease);
}
.foot__top:hover { color: var(--copper); }
.foot__top .i { width: 15px; height: 15px; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(14px); }
.js-ready .reveal { transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
html:not(.js-ready) .reveal { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--s-5); }
  .sheet { max-width: 460px; }
  .cols { grid-template-columns: 1fr; gap: var(--s-5); }
}

@media (max-width: 1040px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card--wide { grid-column: span 4; }
}

@media (max-width: 880px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .nav__links > a:not(.btn) { padding: 8px 8px; font-size: 14px; }
}

@media (max-width: 820px) {
  .burger { display: grid; }

  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: var(--s-2) var(--s-3) var(--s-4);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0; visibility: hidden;
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links > a:not(.btn) { padding: 13px 12px; font-size: 16px; border-radius: var(--r-sm); }
  .nav__links > a.is-active::after { display: none; }
  .nav__links > a.is-active { background: var(--copper-dim); }
  .nav__cv { margin: var(--s-2) 0 0; justify-content: center; min-height: 46px; font-size: 15px; }
}

@media (max-width: 760px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .card, .card--wide { grid-column: auto; }
}

@media (max-width: 620px) {
  :root { --s-7: 68px; --s-8: 84px; }
  body { font-size: 16.5px; }
  .hero { padding-top: calc(var(--nav-h) + var(--s-5)); }
  .stats { grid-template-columns: 1fr; }
  .spec { grid-template-columns: 1fr; gap: 12px; }
  .tl { padding-left: var(--s-3); }
  .tl::before { left: 4px; }
  .tl__item::before { left: -27px; }
  .traces { right: -30%; width: 140vw; }
}

/* ---------- print ---------- */
@media print {
  .nav, .progress, .hero__bg, .filters, .foot__top, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .sec { padding: 18pt 0; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .card, .focus__item, .award, .sheet { break-inside: avoid; }
}

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