/* =========================================================
   Vlad Ciocan — personal site
   Monochrome "HUD" aesthetic: Big Shoulders Display for
   display type, Space Mono for interface labels, Inter for
   reading text.
   ========================================================= */

:root {
  color-scheme: dark;
  --bg: #000;
  --bg-2: #0a0a0a;
  --panel: rgba(16, 16, 16, 0.55);
  --fg: #ededed;
  --fg-2: #bdbdbd;
  --dim: #8a8a8a;
  --dimmer: #5a5a5a;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --line-3: rgba(255, 255, 255, 0.32);

  --display: "Big Shoulders Display", Oswald, Impact, sans-serif;
  --mono: "Space Mono", ui-monospace, Consolas, monospace;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-io: cubic-bezier(0.75, 0, 0.2, 1);
  --gutter: clamp(16px, 4vw, 32px);
}

*,
*::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-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }

/* column grid + dot screen + sparse stars, fixed behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.045) 0.8px, transparent 1.1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 4px 4px, calc(100% / 12) 100%;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff, transparent),
    radial-gradient(1px 1px at 68% 9%, #ccc, transparent),
    radial-gradient(1.4px 1.4px at 83% 41%, #fff, transparent),
    radial-gradient(1px 1px at 27% 63%, #aaa, transparent),
    radial-gradient(1px 1px at 52% 82%, #ddd, transparent),
    radial-gradient(1.2px 1.2px at 91% 76%, #bbb, transparent),
    radial-gradient(1px 1px at 6% 91%, #999, transparent),
    radial-gradient(1px 1px at 41% 34%, #888, transparent);
  background-size: 613px 613px, 877px 877px;
}

main, footer { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: #fff; color: #000; }

:focus-visible { outline: 1px solid #fff; outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mono { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.14em; }
.dim { color: var(--dim); }

.brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
}

/* ---------- reveal on scroll ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* =========================================================
   PRELOADER
   ========================================================= */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 28px var(--gutter) 30px;
  background: #000;
  transition: transform 1s var(--ease-io);
}
.loader.is-done { transform: translateY(-100%); }
.loader.is-gone,
html:not(.js) .loader,
.booted .loader { display: none; }
.loader__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.loader__top .mono { font-size: 10px; }
.loader__count {
  align-self: center;
  justify-self: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: min(36vw, 50vh);
  line-height: 0.8;
  font-variant-numeric: tabular-nums;
  position: relative;
}
.loader__count sup {
  position: absolute;
  top: 0.05em;
  right: -0.32em;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--dim);
}
.loader__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 10px;
}
.loader__row .dot {
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--dim); margin-right: 6px; vertical-align: 1px;
  animation: blink 1s steps(2) infinite;
}
.loader__enter {
  font-size: 10px;
  font-weight: 700;
  padding: 9px 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  opacity: 0.4;
  transition: opacity 0.3s, background 0.3s, color 0.3s;
}
.loader.is-ready .loader__enter { opacity: 1; background: #fff; color: #000; }
.loader__bar { height: 2px; background: var(--line); }
.loader__bar i { display: block; height: 100%; width: 0; background: #fff; }

@keyframes blink { 50% { opacity: 0.2; } }

/* =========================================================
   FIXED CHROME: brand + navigation pill
   ========================================================= */
.topfade {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 104px;
  z-index: 30;
  pointer-events: none;
  background: linear-gradient(#000 35%, rgba(0, 0, 0, 0.7) 65%, transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
.is-scrolled .topfade { opacity: 1; }

.brand--fixed {
  position: fixed;
  top: 30px;
  left: calc(var(--gutter) + 2px);
  z-index: 40;
  mix-blend-mode: difference;
}

.navpill {
  position: fixed;
  top: 24px;
  right: var(--gutter);
  z-index: 50;
  width: 270px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: rgba(14, 14, 14, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s;
}
.navpill.is-open { border-color: rgba(255, 255, 255, 0.55); }
.navpill__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 48px;
  padding: 0 7px 0 18px;
  text-align: left;
}
.navpill__idx { font-size: 11px; color: var(--dim); letter-spacing: 0.04em; }
.navpill__label {
  flex: 1;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
}
.navpill__btn {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 5px;
  background: #fff;
  transition: transform 0.4s var(--ease);
}
.navpill__btn svg { fill: #000; }
.navpill.is-open .navpill__btn { transform: rotate(45deg); }

.navpill__menu {
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: max-height 0.55s var(--ease), visibility 0s 0.55s;
}
.navpill.is-open .navpill__menu {
  max-height: 520px;
  visibility: visible;
  transition: max-height 0.55s var(--ease), visibility 0s;
}

.navpill__title {
  margin: 10px 18px 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
}
.navpill__title small { display: block; margin-top: 4px; font-size: 9px; font-weight: 400; color: var(--dim); }
.navpill ul { list-style: none; margin: 0; padding: 0 18px; display: grid; gap: 8px; }
.navpill li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.navpill li a::after {
  content: "";
  width: 4px; height: 4px; margin-left: auto;
  border-radius: 50%; background: var(--dimmer);
}
.navpill li a .mono { font-size: 10px; font-weight: 400; color: var(--dim); letter-spacing: 0.02em; }
.navpill li a:hover,
.navpill li a.is-current { background: rgba(255, 255, 255, 0.08); border-color: var(--line-3); }
.navpill li a.is-current::after { background: #fff; }
.navpill__social {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 18px 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.navpill__social a {
  display: grid;
  place-items: center;
  height: 42px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  transition: background 0.25s;
}
.navpill__social svg { fill: var(--fg-2); }
.navpill__social a:hover { background: rgba(255, 255, 255, 0.1); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__fallback {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 92%;
  width: auto;
  max-width: none;
  transform: translateX(-46%);
  filter: grayscale(1) contrast(1.1);
  opacity: 0.85;
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
          mask-image: linear-gradient(#000 70%, transparent);
}
.no-webgl .hero__fallback { display: block; }
.no-webgl .hero__canvas { display: none; }

.hero__panel {
  position: absolute;
  top: 10px;
  left: 10px;
  bottom: 10px;
  width: calc(50% - 10px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  backdrop-filter: blur(3px) saturate(0.7);
  -webkit-backdrop-filter: blur(3px) saturate(0.7);
  overflow: hidden;
}
.hero__scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 34%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35) 30%, rgba(255, 255, 255, 0.35) 70%, transparent);
  animation: scan 9s ease-in-out infinite alternate;
}
@keyframes scan { from { top: 18%; } to { top: 78%; } }

.hero__copy {
  position: relative;
  padding: 0 clamp(24px, 5.5vw, 90px);
  margin-top: -40px;
}
.hero__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(54px, 6.4vw, 112px);
  line-height: 0.86;
  text-transform: uppercase;
  letter-spacing: -0.005em;
}
.hero__title span { display: block; }
.outline {
  color: transparent;
  -webkit-text-stroke: 1px #e6e6e6;
}
.hero__title .outline { font-weight: 500; }
.hero__tag {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 30px 0 18px;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--fg-2);
}
.hero__tag i { width: 40px; height: 1px; background: var(--line-3); }
.hero__tag i:last-child { width: 46px; }
.hero__lead {
  max-width: 36ch;
  margin: 0 0 0 54px;
  padding: 4px 0 4px 16px;
  border-left: 1px solid var(--line-2);
  font-size: 12.5px;
  line-height: 1.75;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #a3a3a3;
}

/* ticker */
.ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42px;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
          mask-image: linear-gradient(90deg, #000 85%, transparent);
}
.ticker__track {
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  animation: ticker 36s linear infinite;
  padding-left: 18px;
}
.ticker__track b {
  font-weight: 400;
  font-size: 8.5px;
  letter-spacing: 0.12em;
  color: var(--dim);
  border: 1px solid var(--line-3);
  padding: 2px 7px;
  margin-right: 12px;
  vertical-align: 1px;
}
.ticker__track i { font-style: normal; color: var(--dimmer); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* stats HUD */
.hud { position: relative; }
.hud::before,
.hud::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.hud::before { top: -10px; left: -14px; border-top: 1px solid var(--line-3); border-left: 1px solid var(--line-3); }
.hud::after { bottom: -10px; right: -14px; border-bottom: 1px solid var(--line-3); border-right: 1px solid var(--line-3); }

.stats {
  position: absolute;
  top: 50%;
  right: clamp(40px, 10vw, 170px);
  width: 250px;
  transform: translateY(-46%);
  padding: 0 0 0 12px;
  border-left: 1px solid var(--line);
}
.stats__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 16px -12px;
  font-size: 8.5px;
  letter-spacing: 0.22em;
  color: var(--dim);
}
.stats__head > span:first-child { flex: 1; display: flex; gap: 8px; }
.stats__head > span:first-child::after { content: ""; flex: 1; border-bottom: 1px dotted var(--line-2); margin-bottom: 3px; }
.stats__live { color: var(--fg); font-weight: 700; letter-spacing: 0.08em; }
.stats__live i {
  display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%;
  background: #fff; vertical-align: 1px; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
  animation: blink 1.6s steps(2) infinite;
}
.stats__nums { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.stat { position: relative; }
.stat__n, .stat__plus {
  font-family: var(--display);
  font-weight: 500;
  font-size: 44px;
  line-height: 1;
  color: #d4d4d4;
}
.stat sup { position: absolute; top: 2px; right: 0; font-size: 7px; color: var(--dimmer); }
.stat__k { display: block; margin-top: 8px; font-size: 7.5px; letter-spacing: 0.12em; color: var(--dim); }
.stat__bar { display: block; position: relative; height: 1px; margin-top: 8px; background: var(--line); }
.stat__bar i { position: absolute; inset: 0 20% 0 0; background: #ddd; transform-origin: left; }
.stat__bar i::after { content: ""; position: absolute; right: -2px; top: -2px; width: 5px; height: 5px; border-radius: 50%; background: #fff; }
.stats__rows { margin: 18px 0 0; font-size: 8.5px; letter-spacing: 0.06em; }
.stats__rows div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dotted var(--line);
}
.stats__rows dt { color: var(--dim); }
.stats__rows dd { margin: 0; font-weight: 700; text-align: right; }

.hero__foot {
  position: absolute;
  right: var(--gutter);
  bottom: 24px;
  display: flex;
  gap: clamp(28px, 5vw, 64px);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  text-align: right;
}
.hero__foot .dim { display: block; color: var(--dim); }
.hero__time { margin: 0; }
.hero__hello { transition: opacity 0.2s; }
.hero__hello:hover { opacity: 0.7; }

/* =========================================================
   SECTIONS — shared
   ========================================================= */
.section { position: relative; padding: clamp(96px, 13vw, 170px) 0 0; }
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(16px, 5vw, 48px);
}
.wrap--narrow { max-width: 860px; }

.kicker {
  display: flex;
  gap: 12px;
  margin: 0 0 44px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  color: var(--dim);
}
.kicker b { color: var(--fg); }
.kicker--gap { margin-top: clamp(96px, 11vw, 150px); }
.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--dim);
}
.display {
  margin: 0 0 28px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(46px, 6.2vw, 92px);
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.002em;
}
.body {
  max-width: 62ch;
  margin: 0 0 18px;
  font-size: 16.5px;
  font-weight: 300;
  line-height: 1.7;
  color: #a9a9a9;
}
.section__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 52px;
}
.section__head .display { margin-bottom: 0; }
.section__intro { margin-bottom: 4px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li {
  padding: 5px 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--fg-2);
}

/* =========================================================
   ABOUT
   ========================================================= */
.about__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(40px, 8vw, 120px);
  align-items: start;
}
.portrait { margin: 120px 0 0; }
.portrait__frame {
  position: relative;
  border: 1px solid var(--line-2);
  background: #050505;
}
.portrait__frame img {
  width: 100%;
  height: auto;
  filter: grayscale(1) contrast(1.05) brightness(0.92);
}
/* vertical line screen + slow scan, echoing the hero */
.portrait__frame::before { z-index: 2; }
.portrait__scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(transparent 49.6%, rgba(255, 255, 255, 0.4) 50%, transparent 50.4%) 0 0 / 100% 200%,
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.32) 0 1px, transparent 1px 3px);
  animation: portraitScan 7s linear infinite;
}
@keyframes portraitScan { from { background-position: 0 100%, 0 0; } to { background-position: 0 -100%, 0 0; } }
.portrait figcaption {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 8.5px;
  color: var(--dimmer);
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: clamp(64px, 8vw, 110px) 0 0;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
}
.facts div { padding: 20px 22px; border-left: 1px solid var(--line); }
.facts div:first-child { border-left: 0; padding-left: 0; }
.facts dt { font-size: 8.5px; color: var(--dim); margin-bottom: 6px; }
.facts dd { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; }

/* =========================================================
   SERVICES
   ========================================================= */
.cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.card {
  grid-column: span 2;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 30px 28px 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(6, 6, 6, 0.7);
  transition: background 0.4s;
}
.card:nth-child(4), .card:nth-child(5) { grid-column: span 3; min-height: 280px; }
.card:hover { background: rgba(22, 22, 22, 0.85); }
.card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 0; height: 1px;
  background: #fff;
  transition: width 0.6s var(--ease);
}
.card:hover::before { width: calc(100% + 1px); }
.card__n { font-size: 10px; font-weight: 700; color: var(--fg); }
.card h3 {
  margin: 26px 0 14px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  text-transform: uppercase;
}
.card p { margin: 0 0 24px; font-size: 14.5px; line-height: 1.65; color: #9a9a9a; }
.card .tags { margin-top: auto; }

/* =========================================================
   PROJECTS
   ========================================================= */
.work__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 860px) minmax(0, 1fr);
  gap: 32px;
  padding: 0 var(--gutter);
}
.work__index,
.work__counter {
  position: sticky;
  top: 42vh;
  align-self: start;
}
.work__index { justify-self: start; padding-left: 8px; font-size: 9px; }
.work__index > span { display: block; margin-bottom: 18px; letter-spacing: 0.2em; }
.work__index ol {
  list-style: none;
  margin: 0;
  padding: 2px 0 2px 18px;
  border-left: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.work__index a { color: var(--dimmer); transition: color 0.3s; letter-spacing: 0.08em; }
.work__index a b { margin-right: 6px; }
.work__index li { position: relative; }
.work__index li.is-active a { color: #fff; }
.work__index li.is-active::before {
  content: "";
  position: absolute;
  left: -21px; top: -4px; bottom: -4px;
  width: 4px;
  border-radius: 3px;
  background: #fff;
}
.work__counter { justify-self: end; text-align: right; }
.work__counter p { margin: 0; }
.work__counter p:first-child {
  font-family: var(--display);
  font-weight: 700;
  font-size: 64px;
  line-height: 1;
  color: #d8d8d8;
}
.work__counter small { font-family: var(--mono); font-size: 10px; color: var(--dimmer); margin-left: 4px; }
.work__counter .mono { font-size: 9.5px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-weight: 700; }
.work__counter .mono.dim { border: 0; margin-top: 4px; padding: 0; font-weight: 400; }

.proj {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  gap: clamp(20px, 3.5vw, 40px);
  padding: 38px 0;
  border-bottom: 1px solid var(--line);
  transition: opacity 0.5s, filter 0.5s;
}
.proj:first-child { border-top: 1px solid var(--line); }
.js .work--focus .proj:not(.is-active) { opacity: 0.38; filter: blur(0.4px); }
.proj__thumb {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line-2);
  background: #070707;
  overflow: hidden;
}
.proj__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.25) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.proj__thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1); transition: transform 0.8s var(--ease); }
.proj:hover .proj__thumb img { transform: scale(1.06); }
.proj__thumb svg { width: 100%; height: 100%; fill: none; stroke: #e4e4e4; stroke-width: 1.2; }
.proj__thumb .grid-lines { stroke: rgba(255, 255, 255, 0.1); }
.proj__thumb .net { stroke: rgba(255, 255, 255, 0.55); }
.proj__thumb .nodes { fill: #fff; stroke: none; }
.proj__thumb .pulse { stroke: #fff; opacity: 0.5; transform-origin: 95px 70px; animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { from { transform: scale(0.4); opacity: 0.8; } to { transform: scale(2.2); opacity: 0; } }
.proj__thumb .db { stroke: rgba(255, 255, 255, 0.7); }
.proj__thumb .flow { stroke: #fff; stroke-dasharray: 4 5; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -18; } }
.proj__thumb .rows { fill: rgba(255, 255, 255, 0.28); stroke: none; }
.proj__thumb .rows .ghost { fill: rgba(255, 255, 255, 0.1); }
.proj__thumb .sheet { stroke: rgba(255, 255, 255, 0.45); }
.proj__thumb .checks { stroke: #fff; stroke-width: 2; }
.proj__thumb .planet { stroke: rgba(255, 255, 255, 0.5); fill: rgba(255, 255, 255, 0.04); }
.proj__thumb .orbits { stroke: rgba(255, 255, 255, 0.25); stroke-dasharray: 2 4; }
.proj__thumb .sat { fill: #fff; stroke: none; }
.proj__thumb .plus { stroke: #fff; stroke-width: 1.5; }
.proj__thumb .ring { stroke: rgba(255, 255, 255, 0.35); }
.proj__thumb .ring--2 { stroke: rgba(255, 255, 255, 0.18); stroke-dasharray: 3 5; animation: spin 18s linear infinite; transform-origin: 100px 100px; }
.proj__thumb .wave { stroke: #fff; stroke-width: 3; stroke-linecap: round; }
.proj__thumb .wave path { animation: talk 1.4s ease-in-out infinite alternate; transform-origin: 100px 100px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes talk { from { transform: scaleY(0.55); } to { transform: scaleY(1); } }

/* more work: compact archive table */
.archive { list-style: none; margin: -30px 0 0; padding: 0; }
.archive li {
  display: grid;
  grid-template-columns: 130px minmax(180px, 0.9fr) 1.6fr 200px;
  gap: 24px;
  align-items: baseline;
  padding: 22px 12px;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}
.archive li:hover { background: rgba(255, 255, 255, 0.03); }
.archive li > span:first-child { font-size: 10px; color: var(--fg-2); }
.archive h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.05;
  text-transform: uppercase;
}
.archive p { margin: 0; font-size: 14px; line-height: 1.6; color: #959595; }
.archive li > span:last-child { font-size: 9px; text-align: right; letter-spacing: 0.1em; }
.archive a { color: #fff; border-bottom: 1px solid var(--line-3); }
.archive a:hover { border-color: #fff; }
.proj__thumb .dash { stroke: rgba(255, 255, 255, 0.3); stroke-dasharray: 6 6; }

.proj__meta { margin: 0 0 12px; font-size: 9px; letter-spacing: 0.16em; color: var(--dim); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.proj__meta b { color: #fff; margin-right: 8px; }
.proj h3 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 0.95;
  text-transform: uppercase;
  transition: transform 0.5s var(--ease);
}
.proj:hover h3 { transform: translateX(6px); }
.proj__body > p:not(.proj__meta) { margin: 0 0 18px; max-width: 64ch; font-size: 15px; line-height: 1.65; color: #9d9d9d; }
.proj__body { position: relative; }
.proj__link {
  display: inline-block;
  margin-top: 16px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid var(--line-3);
  padding-bottom: 3px;
  transition: border-color 0.3s;
}
.proj__link:hover { border-color: #fff; }

/* =========================================================
   EXPERIENCE — principles, toolkit, timeline
   ========================================================= */
.principles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
}
.principles article {
  padding: 30px 26px 34px;
  border-left: 1px solid var(--line);
  background: rgba(6, 6, 6, 0.7);
}
.principles article:first-child { border-left: 0; }
.principles span { font-size: 10px; font-weight: 700; }
.principles h3 {
  margin: 22px 0 12px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 25px;
  line-height: 1;
  text-transform: uppercase;
}
.principles p { margin: 0; font-size: 14px; line-height: 1.65; color: #959595; }

.toolkit { margin-top: 44px; border-top: 1px solid var(--line); }
.toolkit__row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.toolkit__row > p { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; }
.toolkit__row small { display: block; margin-bottom: 4px; font-size: 8.5px; font-weight: 400; color: var(--dim); }

.timeline { list-style: none; margin: -30px 0 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 22px 12px;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s;
}
.timeline li:hover { background: rgba(255, 255, 255, 0.03); }
.timeline li > span { font-size: 10.5px; color: var(--fg-2); }
.timeline h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.05;
  text-transform: uppercase;
}
.timeline p { margin: 0; font-size: 9.5px; text-align: right; }

/* =========================================================
   CONTACT
   ========================================================= */
.mono-body { font-family: var(--mono); font-size: 13.5px; font-weight: 400; line-height: 1.75; color: #a0a0a0; max-width: 54ch; }
.form { margin-top: 64px; display: grid; gap: 40px; }
.form__two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.field { display: block; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > span,
.field legend {
  display: block;
  margin-bottom: 12px;
  padding: 0;
  font-size: 9px;
  color: var(--dim);
}
.field b { color: #fff; margin-right: 6px; }
.field input,
.field textarea {
  width: 100%;
  padding: 10px 0 14px;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 15px;
  outline: none;
  resize: vertical;
  transition: border-color 0.3s;
}
.field input::placeholder,
.field textarea::placeholder { color: #444; }
.field input:focus,
.field textarea:focus { border-color: #fff; }
.field.is-invalid input,
.field.is-invalid textarea { border-color: #b45a5a; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-2);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.chips span::before {
  content: "";
  width: 14px;
  height: 4px;
  background: radial-gradient(circle, var(--dimmer) 1.4px, transparent 1.6px) 0 0 / 5px 4px;
}
.chips label:hover span { border-color: var(--line-3); color: #fff; }
.chips input:checked + span { background: #fff; color: #000; border-color: #fff; }
.chips input:checked + span::before { background-image: radial-gradient(circle, #000 1.4px, transparent 1.6px); }
.chips input:focus-visible + span { outline: 1px solid #fff; outline-offset: 3px; }

.form__foot { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 30px;
  border: 1px solid #fff;
  border-radius: 5px;
  background: #fff;
  color: #000;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition: background 0.3s, color 0.3s;
}
.btn:hover { background: transparent; color: #fff; }
.form__status { margin: 0; font-size: 10px; color: var(--dim); }

.contact__details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 88px 0 0;
  border-top: 1px solid var(--line-2);
}
.contact__details div { padding: 20px 0; border-bottom: 1px solid var(--line); }
.contact__details div:nth-child(odd) { padding-right: 20px; }
.contact__details dt { font-size: 8.5px; color: var(--dim); margin-bottom: 6px; }
.contact__details dd { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: none; }
.contact__details a { border-bottom: 1px solid var(--line-2); transition: border-color 0.3s; }
.contact__details a:hover { border-color: #fff; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  margin-top: clamp(120px, 14vw, 200px);
  padding: 0 var(--gutter) 28px;
  overflow: hidden;
}
.footer__big {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(76px, 18.5vw, 330px);
  line-height: 0.8;
  padding-top: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: -0.01em;
  text-align: center;
}
.footer__big .outline { font-weight: 600; }
.footer__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 9.5px;
  color: var(--dim);
}
.footer__row a:hover { color: #fff; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1240px) {
  .work__layout { grid-template-columns: minmax(0, 1fr); max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 48px); }
  .work__index, .work__counter { display: none; }
}

@media (max-width: 1080px) {
  .stats { right: 28px; width: 220px; }
  .archive li { grid-template-columns: 110px 1fr; }
  .archive li > p, .archive li > span:last-child { grid-column: 2; }
  .archive li > span:last-child { text-align: left; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card, .card:nth-child(4), .card:nth-child(5) { grid-column: span 1; min-height: 0; }
  .card:nth-child(5) { grid-column: span 2; }
  .principles { grid-template-columns: repeat(2, 1fr); }
  .principles article:nth-child(3) { border-left: 0; }
  .principles article:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

@media (max-width: 860px) {
  .navpill { width: auto; min-width: 200px; }
  .hero { min-height: 560px; }
  .hero__panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    padding-top: 120px;
    border: 0;
    border-radius: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85) 34%, #000);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: visible;
  }
  .hero__scan { display: none; }
  .hero__copy { margin: 0 0 76px; padding: 0 var(--gutter); }
  .hero__title { font-size: clamp(50px, 15vw, 84px); }
  .hero__tag { margin: 20px 0 14px; }
  .hero__lead { margin-left: 0; font-size: 11.5px; }
  .ticker { position: absolute; }
  .stats, .hero__foot { display: none; }

  .section__head { grid-template-columns: 1fr; gap: 20px; }
  .about__grid { grid-template-columns: 1fr; }
  .portrait { margin: 8px 0 0; max-width: 420px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts div:nth-child(3) { border-left: 0; padding-left: 0; }
  .facts div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .facts div { padding: 18px 14px; }
  .facts div:nth-child(odd) { padding-left: 0; }

  .toolkit__row { grid-template-columns: 1fr; gap: 12px; }
  .archive li { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
  .archive li > p, .archive li > span:last-child { grid-column: auto; }
  .archive li > span:last-child { text-align: left; margin-top: 4px; }
  .timeline li { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
  .timeline p { text-align: left; }
}

@media (max-width: 600px) {
  .cards { grid-template-columns: 1fr; }
  .card, .card:nth-child(5) { grid-column: span 1; }
  .card h3 { font-size: 27px; }
  .principles { grid-template-columns: 1fr; }
  .principles article { border-left: 0; border-top: 1px solid var(--line); }
  .principles article:first-child { border-top: 0; }
  .proj { grid-template-columns: 1fr; gap: 20px; }
  .proj__thumb { width: 120px; }
  .form__two { grid-template-columns: 1fr; }
  .contact__details { grid-template-columns: 1fr; }
  .contact__details div:nth-child(odd) { padding-right: 0; }
  .facts dd { font-size: 10.5px; }
  .loader__count sup { right: -0.2em; }
}

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