/* ==========================================================================
   Vidoje Gavrilovic — Portfolio
   Structure, type, density and motion: david-hckh design system.
   Palette: burnt orange #FC6C26 + vanilla #FFF4D6 (client direction).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "ProFontWindows";
  src: url("fonts/ProFontWindows-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "ProFontWindows";
  src: url("fonts/ProFontWindows-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Urbanist";
  src: url("fonts/Urbanist-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Urbanist";
  src: url("fonts/Urbanist-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Urbanist";
  src: url("fonts/Urbanist-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Urbanist";
  src: url("fonts/Urbanist-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Urbanist";
  src: url("fonts/Urbanist-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Urbanist";
  src: url("fonts/Urbanist-Black.ttf") format("truetype");
  font-weight: 900;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Tokens

   A single warm ramp from vanilla to espresso, hue-biased toward the accent
   so the neutrals read as chosen rather than inherited. One accent only.
   -------------------------------------------------------------------------- */
:root {
  --vanilla:  #fff4d6;   /* page ground                                  */
  --cream:    #f7e4be;   /* raised surface: cards, nav pill              */
  --sand:     #ebd2a2;   /* dividers, bar tracks, desk                   */
  --tan:      #c8a87e;   /* muted text on dark grounds        7.0:1      */
  --umber:    #7e5f41;   /* borders, muted text on light      5.3:1      */
  --espresso: #4a3524;   /* deep panels, bezels, hair                    */
  --ink:      #2e2016;   /* primary text, dark sections                  */
  --burnt:    #fc6c26;   /* the only accent                   5.5:1/ink  */
  --skin:     #efd3ac;   /* illustration only                            */

  /* Type */
  --font-display: "Urbanist", system-ui, sans-serif;
  --font-mono: "ProFontWindows", ui-monospace, "SF Mono", monospace;

  /* Radii — pill for controls, 24px for large surfaces */
  --radius-pill: 100px;
  --radius-card: 24px;

  /* Motion */
  --dur-fast: 100ms;
  --dur-base: 200ms;
  --dur-slow: 300ms;
  --dur-page: 400ms;
  --ease: ease-in-out;
  --ease-out: ease-out;

  /* Layout */
  --shell: 1280px;
  --gutter: 24px;
}

@media (min-width: 840px) {
  :root { --gutter: 40px; }
}

/* --------------------------------------------------------------------------
   3. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--vanilla);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { margin: 0; }
img, svg { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a {
  color: var(--ink);
  text-decoration: none;
  transition: color var(--dur-base) var(--ease);
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--burnt);
  outline-offset: 4px;
  border-radius: var(--radius-pill);
}

::selection { background: var(--burnt); color: var(--ink); }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 9999;
  padding: 10px 20px;
  background: var(--ink);
  color: var(--vanilla);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 14px;
  transform: translateY(-200%);
  transition: transform var(--dur-base) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* --------------------------------------------------------------------------
   4. Shared type utilities
   -------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--umber);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--burnt);
}

.section-title {
  font-size: clamp(34px, 5.4vw, 56px);
  font-weight: 900;
  margin-top: 16px;
}

.lede {
  font-size: 20px;
  line-height: 1.6;
  color: var(--umber);
  max-width: 62ch;
}

.section {
  padding-block: clamp(72px, 10vw, 128px);
  position: relative;
}

.section-head { margin-bottom: 56px; max-width: 720px; }

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background var(--dur-base) var(--ease),
              color var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease),
              transform var(--dur-base) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* Ink on burnt orange — white on #FC6C26 is only 2.9:1 and fails AA. */
.btn-primary { background: var(--burnt); color: var(--ink); }
.btn-primary:hover { background: var(--ink); color: var(--vanilla); }

.btn-ghost {
  background: transparent;
  border: 2px solid var(--umber);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--vanilla); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--cream);
  color: var(--ink);
  transition: background var(--dur-base) var(--ease),
              color var(--dur-base) var(--ease),
              transform var(--dur-base) var(--ease);
}
.icon-btn:hover { background: var(--ink); color: var(--vanilla); transform: translateY(-2px); }
.icon-btn svg { width: 20px; height: 20px; }

/* --------------------------------------------------------------------------
   6. Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  padding-block: 20px;
  transition: padding var(--dur-slow) var(--ease);
}
.nav.is-stuck { padding-block: 12px; }

.nav-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* The mark is a real 3D object, not a picture of one: six copies of "VG" stacked
   along Z inside one perspective, so rotation reveals genuine extruded sides.
   Done in CSS rather than WebGL — v2 dropped three.js precisely to avoid 675KB,
   and a 48px nav mark cannot justify bringing it back. Cost here is zero bytes.

   The extrusion runs *away* from the viewer. Toward the viewer the front face
   would scale past the 48px disc and clip on the pill radius; away reads as
   struck into the disc and always stays inside its own footprint. */
.logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: var(--radius-pill);
  background: var(--ink);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  perspective: 220px;
  transition: background var(--dur-base) var(--ease);
}
.logo:hover { background: var(--burnt); }

/* WebGL mark. Hidden until logo3d.js reports a live context, at which point
   .has-webgl reveals it and retires the CSS stack — so the two never overlap,
   and a WebGL failure is a silent downgrade rather than an empty disc. */
.logo-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  border-radius: inherit;
}
.logo.has-webgl .logo-canvas { display: block; }
.logo.has-webgl .logo-3d { display: none; }

/* Two nested transforms on purpose. Keyframes own `transform` outright, so the
   idle rock and the hover pose cannot share an element without the hover being
   swallowed — or snapping when the animation resumes. The rock lives here. */
.logo-3d {
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: logoRock 7s var(--ease) infinite;
}

/* …and the hover lift lives here, one level in, free to transition. */
.logo-stack {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform var(--dur-slow) var(--ease);
}
.logo:hover .logo-stack { transform: translateZ(4px) scale(1.05); }

.logo-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Front face bright, each layer behind it a step darker down the warm ramp, so
   the exposed side reads as depth rather than as six offset copies. */
.logo-layer:nth-child(1) { color: var(--vanilla);  transform: translateZ(0);      }
.logo-layer:nth-child(2) { color: var(--cream);    transform: translateZ(-1.5px); }
.logo-layer:nth-child(3) { color: var(--tan);      transform: translateZ(-3px);   }
.logo-layer:nth-child(4) { color: var(--umber);    transform: translateZ(-4.5px); }
.logo-layer:nth-child(5) { color: var(--espresso); transform: translateZ(-6px);   }
.logo-layer:nth-child(6) { color: var(--espresso); transform: translateZ(-7.5px); }

/* On burnt orange the front face flips to ink — vanilla on #FC6C26 is 2.9:1 and
   fails AA, the same reason the primary button uses ink. */
.logo:hover .logo-layer:nth-child(1) { color: var(--ink); }

/* Bounded rock, never a full turn: past ~30deg the VG stops reading as VG, and a
   nav mark that periodically turns its back on you is a worse logo than a static
   one. This keeps both letters legible at every frame. */
@keyframes logoRock {
  0%, 100% { transform: rotateY(-17deg) rotateX(6deg);  }
  50%      { transform: rotateY(17deg)  rotateX(-5deg); }
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2px;
  margin-inline: auto;
  padding: 6px;
  border-radius: var(--radius-pill);
  background: var(--cream);
}
@media (min-width: 1024px) { .nav-links { display: flex; } }

.nav-link {
  position: relative;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--umber);
  transition: color var(--dur-base) var(--ease), background var(--dur-base) var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link.is-active { background: var(--vanilla); color: var(--ink); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
@media (min-width: 1024px) { .nav-actions { margin-left: 0; } }

.nav-cta { display: none; }
@media (min-width: 480px) { .nav-cta { display: inline-flex; } }

.nav-toggle { display: inline-flex; }
@media (min-width: 1024px) { .nav-toggle { display: none; } }

/* Mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--vanilla);
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease), visibility var(--dur-slow) var(--ease);
}
.drawer.is-open { visibility: visible; opacity: 1; }

.drawer-close {
  position: absolute;
  top: 20px;
  right: var(--gutter);
}

.drawer-links {
  display: grid;
  gap: 10px;
  text-align: center;
}
.drawer-links a {
  font-family: var(--font-display);
  font-size: clamp(32px, 9vw, 52px);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  transition: color var(--dur-base) var(--ease);
}
.drawer-links a:hover { color: var(--burnt); }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 128px;
  padding-bottom: 96px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
}

/* Sized so "Gavrilovic" — 10 characters — still fits the hero column at
   every breakpoint. The .line clip that drives swipeUp would crop it. */
.hero-name {
  font-size: clamp(44px, 7vw, 104px);
  font-weight: 900;
  /* 1.2 (the heading default) rather than 0.9, so each .line box contains
     Urbanist's full descender — at 0.9 the overflow:hidden that masks swipeUp
     sliced the tail off the j in "Vidoje". The negative margins below put the
     baselines back at the 0.9 spacing the display type is drawn for, so this
     costs nothing visually and keeps swipeUp's 105% start fully hidden. */
  line-height: 1.2;
  letter-spacing: -0.05em;
  text-transform: capitalize;
  margin-block: -0.15em;
}
.hero-name .line { display: block; overflow: hidden; }
.hero-name .line + .line { margin-top: -0.3em; }
.hero-name .line > span { display: block; }

/* Proof band under the hero, full width. Named .proof, not .stat — the About
   section already owns .stat, and being defined later in the file its dt/dd
   rules silently won, which is what made a first attempt here render as cards. */
.proof {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 28px;
  margin: 8px 0 0;
  padding-top: 32px;
  border-top: 2px solid var(--sand);
}
@media (min-width: 720px) { .proof { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; } }

.proof-item dt {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--umber);
}
.proof-item dd {
  margin: 10px 0 0;
  font-size: clamp(32px, 3.4vw, 44px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.proof-unit { color: var(--burnt); }
/* The two word-valued figures get their own size and a nudge down, so all four
   baselines line up instead of the words towering over the numerals. */
.proof-item dd.proof-sm {
  font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  padding-top: 6px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 10px 20px;
  background: var(--ink);
  color: var(--vanilla);
  font-family: var(--font-mono);
  font-size: clamp(15px, 2.1vw, 22px);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--burnt);
  flex: none;
}

.hero-lede {
  margin-top: 32px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--umber);
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--cream);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--umber);
}
.chip svg { width: 16px; height: 16px; color: var(--burnt); }

.hero-art { position: relative; }
.hero-art svg { width: 100%; height: auto; }

/* Scroll cue — the design system's scrollIconDot motion */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--umber);
}
@media (min-width: 840px) { .scroll-cue { display: flex; } }

.scroll-mouse {
  width: 26px;
  height: 42px;
  border: 2px solid var(--umber);
  border-radius: var(--radius-pill);
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-mouse i {
  width: 4px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--burnt);
  animation: scrollIconDot 1600ms var(--ease) infinite;
}

@keyframes scrollIconDot {
  0%   { transform: translateY(0);    opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0);    opacity: 0; }
}

/* --------------------------------------------------------------------------
   8. Marquee
   -------------------------------------------------------------------------- */
.marquee {
  border-block: 2px solid var(--ink);
  background: var(--ink);
  color: var(--vanilla);
  padding-block: 16px;
  overflow: hidden;
  display: flex;
  user-select: none;
}
.marquee-row {
  display: flex;
  flex: none;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
  animation: marquee 32s linear infinite;
}
.marquee span {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.marquee span::after {
  /* CSS escape, not a literal glyph: this stylesheet is also inlined into a
     single-file build served without a charset, where a raw UTF-8 ◆ is read as
     Latin-1 and renders as mojibake. The escape is encoding-independent. */
  content: "\0025c6";
  margin-left: 40px;
  color: var(--burnt);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* --------------------------------------------------------------------------
   9. About + timeline
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  gap: 56px;
}
@media (min-width: 1024px) {
  .about-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 72px; }
}

.about-copy p + p { margin-top: 20px; }
.about-copy p { color: var(--umber); font-size: 19px; line-height: 1.65; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 40px;
}
.stat {
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--cream);
}
.stat dt {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--umber);
}
.stat dd {
  margin: 6px 0 0;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--sand);
}

.tl-item { position: relative; padding-bottom: 40px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-pill);
  background: var(--vanilla);
  border: 3px solid var(--umber);
  transition: border-color var(--dur-base) var(--ease), background var(--dur-base) var(--ease);
}
.tl-item.is-current::before { border-color: var(--burnt); background: var(--burnt); }

.tl-year {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--umber);
}
.tl-role { font-size: 24px; font-weight: 800; margin-top: 6px; }
.tl-company {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: var(--cream);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tl-desc { margin-top: 12px; color: var(--umber); font-size: 17px; line-height: 1.6; }

/* --------------------------------------------------------------------------
   10. Skills
   -------------------------------------------------------------------------- */
.skills { background: var(--cream); }

.skill-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.skill {
  padding: 22px;
  border-radius: var(--radius-card);
  background: var(--vanilla);
  transition: transform var(--dur-base) var(--ease);
}
.skill:hover { transform: translateY(-4px); }

/* No tier pill and no bar any more: the card is icon + name, so the row is the
   whole card and needs no bottom spacing. */
.skill-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.skill-top svg { width: 22px; height: 22px; flex: none; color: var(--burnt); }
.skill-name {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Full toolchain. The bars above are the headline claims; this is the complete
   inventory, grouped as on the CV. Deliberately no percentages — self-rating
   thirty-eight tools would read as noise, and the grouping carries more signal. */
.stack-head { margin-top: 64px; margin-bottom: 24px; }

.stack {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.stack-group {
  padding: 22px;
  border-radius: var(--radius-card);
  background: var(--vanilla);
  transition: transform var(--dur-base) var(--ease);
}
.stack-group:hover { transform: translateY(-4px); }

.stack-cat {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.stack-cat svg { width: 20px; height: 20px; flex: none; color: var(--burnt); }
.stack-count {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--umber);
  font-variant-numeric: tabular-nums;
}

.stack-list { display: flex; flex-wrap: wrap; gap: 6px; }
/* --cream on --vanilla, umber text: 4.7:1, so the inventory stays legible
   while reading quieter than the bars. */
.stack-chip {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--cream);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--umber);
}

/* --------------------------------------------------------------------------
   11. Projects
   -------------------------------------------------------------------------- */
.project-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.project {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-card);
  background: var(--cream);
  overflow: hidden;
  transition: transform var(--dur-slow) var(--ease);
}
.project:hover { transform: translateY(-6px); }

.project-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--espresso);
  overflow: hidden;
}
.project-cover svg { width: 100%; height: 100%; }

.project-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--vanilla);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-body { padding: 26px; display: flex; flex-direction: column; flex: 1; }
.project-title { font-size: 24px; font-weight: 800; }
.project-desc { margin-top: 12px; color: var(--umber); font-size: 17px; line-height: 1.6; }

/* Sits where a link used to. Saying the code is private is a stronger signal
   than a dead "View details" — and it is what actually distinguishes a client
   engagement from the public repos further down. */
.project-note {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--umber);
}

/* Public repos. Framed as a reference list, not as case studies — they are
   small and mostly old, and presenting them as flagship work would read as
   padding next to the platform engagements above. */
.repos { margin-top: 56px; padding-top: 32px; border-top: 2px solid var(--sand); }
.repos-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.repos-head svg { width: 18px; height: 18px; color: var(--burnt); }

.repo-list {
  display: grid;
  gap: 2px;
  margin-top: 18px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.repo-list a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 12px 16px;
  border-radius: var(--radius-card);
  transition: background var(--dur-base) var(--ease);
}
.repo-list a:hover { background: var(--cream); }
.repo-list span {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.repo-list em { font-style: normal; font-size: 14px; color: var(--umber); }

.tech-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.tech {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--vanilla);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--umber);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid var(--sand);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
.project-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--dur-base) var(--ease);
}
.project-link:hover { color: var(--burnt); }
.project-link:hover svg { transform: translate(3px, -3px); }

/* --------------------------------------------------------------------------
   12. Contact
   -------------------------------------------------------------------------- */
.contact { background: var(--ink); color: var(--vanilla); }
.contact .eyebrow { color: var(--tan); }
.contact .lede { color: var(--tan); }

.contact-title {
  font-size: clamp(40px, 8vw, 92px);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-top: 16px;
}

.contact-mail {
  display: inline-block;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: clamp(20px, 3.6vw, 40px);
  font-weight: 700;
  color: var(--burnt);
  letter-spacing: 0.02em;
  border-bottom: 3px solid transparent;
  transition: border-color var(--dur-base) var(--ease);
}
.contact-mail:hover { border-bottom-color: var(--burnt); }

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 44px;
}
.contact .btn-ghost { border-color: var(--tan); color: var(--vanilla); }
.contact .btn-ghost:hover { background: var(--vanilla); border-color: var(--vanilla); color: var(--ink); }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--ink);
  color: var(--tan);
  padding-block: 32px;
  border-top: 2px solid var(--espresso);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer a { color: var(--tan); }
.footer a:hover { color: var(--burnt); }
.footer-social { display: flex; gap: 8px; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: var(--espresso);
  color: var(--vanilla);
  transition: background var(--dur-base) var(--ease),
              color var(--dur-base) var(--ease),
              transform var(--dur-base) var(--ease);
}
.footer-social a:hover { background: var(--burnt); color: var(--ink); transform: translateY(-2px); }
.footer-social svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   14. Reveal motion
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-page) var(--ease), transform var(--dur-page) var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* Hero entrance — the design system's swipeUp */
@keyframes swipeUp {
  from { transform: translateY(105%); }
  to   { transform: translateY(0); }
}
.hero .line > span { animation: swipeUp var(--dur-page) var(--ease) both; }
.hero .line:nth-child(1) > span { animation-delay: 100ms; }
.hero .line:nth-child(2) > span { animation-delay: 200ms; }

.hero-badge,
.hero-lede,
.hero-actions,
.hero-meta,
.hero-art {
  animation: fadeUp var(--dur-page) var(--ease-out) both;
}
.hero-badge   { animation-delay: 300ms; }
.hero-lede    { animation-delay: 360ms; }
.hero-actions { animation-delay: 420ms; }
.hero-meta    { animation-delay: 480ms; }
.hero-art     { animation-delay: 300ms; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   15. Desk scene — character animation

   Every animated SVG node gets transform-box: fill-box so transform-origin
   resolves against the node itself, not the whole viewBox.
   -------------------------------------------------------------------------- */
.hero-art [class*="anim-"] {
  transform-box: fill-box;
  transform-origin: center;
}

/* shoulders and head rise and settle */
.anim-breathe { animation: breathe 4600ms var(--ease) infinite; }
@keyframes breathe {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

/* eyes blink twice, then hold */
.anim-eye { animation: blinkEye 5200ms var(--ease) infinite; }
@keyframes blinkEye {
  0%, 90%, 94%, 100% { transform: scaleY(1); }
  92%, 96%           { transform: scaleY(0.1); }
}

/* hands tap the keyboard out of phase */
.anim-hand-l { animation: tap 760ms var(--ease) infinite; }
.anim-hand-r { animation: tap 900ms var(--ease) infinite 180ms; }
@keyframes tap {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* steam off the mug */
.anim-steam-a { animation: steam 3200ms var(--ease-out) infinite; }
.anim-steam-b { animation: steam 3200ms var(--ease-out) infinite 1100ms; }
@keyframes steam {
  0%   { opacity: 0; transform: translateY(8px)   scaleX(0.7); }
  30%  { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(-18px) scaleX(1.2); }
}

/* terminal cursor */
.anim-cursor { animation: cursorBlink 1100ms steps(1, end) infinite; }
@keyframes cursorBlink {
  0%, 50%   { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* rack LEDs */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.2; }
}
.anim-led-a { animation: blink 1400ms steps(1, end) infinite; }
.anim-led-b { animation: blink 1400ms steps(1, end) infinite 400ms; }
.anim-led-c { animation: blink 1400ms steps(1, end) infinite 800ms; }

/* ambient float for the wall pieces */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.anim-float-a { animation: float 5200ms var(--ease) infinite; }

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

  /* The logo keeps its depth, loses its motion. Without this the 1ms clamp above
     runs logoRock to completion and — with no fill mode — drops the transform
     entirely, flattening the mark into six coincident copies. Hold the pose. */
  .logo-3d { animation: none; transform: rotateY(-15deg) rotateX(5deg); }
  .logo:hover .logo-stack { transform: none; }
}
