/* ============================================================
   Marija Đurđević — Portfolio
   B&W editorial system. Inter only.
   ============================================================ */

:root {
  --bg: #ffffff;
  --fg: #000000;
  --muted: #767676;       /* AA on white at 14px+ */
  --hairline: #000000;
  --rule: rgba(0, 0, 0, 0.12);
  --rule-strong: rgba(0, 0, 0, 0.5);

  --max: 1440px;
  --gutter: clamp(20px, 4vw, 64px);
  --nav-h: 72px;

  --type-scale: 1;        /* tweakable */
  --density: 1;           /* tweakable line-height + spacing multiplier */

  --f-eyebrow: 11px;
  --f-body: 16px;
  --f-lead: clamp(20px, 1.6vw, 24px);
  --f-h3: clamp(22px, 2vw, 28px);
  --f-h2: clamp(36px, 4vw, 56px);
  --f-h1: calc(clamp(56px, 9vw, 144px) * var(--type-scale));
  --f-hero: calc(clamp(36px, 5vw, 72px) * var(--type-scale));

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: var(--f-body);
  line-height: calc(1.55 * var(--density));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #000;
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: #000; color: #fff; }

img { max-width: 100%; display: block; }

/* ----- Layout ----- */
.shell {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

main { flex: 1 0 auto; }

/* ----- Nav ----- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid transparent;
  transition:
    transform 360ms var(--ease),
    background-color 240ms var(--ease),
    border-color 240ms var(--ease),
    backdrop-filter 240ms var(--ease);
  will-change: transform;
}
.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--rule);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.wordmark {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: opacity 200ms var(--ease);
}
.wordmark:hover { opacity: 0.7; }
.wordmark .wordmark-text { display: inline; }
.wordmark .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: inline-block;
  background: #e9e9e9;
}
.wordmark .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wordmark .logo {
  width: 32px; height: 32px;
  display: inline-block;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.8vw, 40px);
  font-size: 14px;
  font-weight: 500;
}
.nav-links a {
  position: relative;
  padding: 6px 0;
  color: var(--muted);
  transition: color 200ms var(--ease);
}
.nav-links a:hover,
.nav-links a.is-active,
.nav-links a[aria-current="page"] { color: #000; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: #000;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 280ms var(--ease);
}
.nav-links a:hover::after,
.nav-links a.is-active::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-cta {
  color: #000 !important;
  border: 1px solid #000;
  padding: 8px 14px !important;
  border-radius: 999px;
  transition: background 180ms var(--ease), color 180ms var(--ease);
}
.nav-cta:hover { background: #000; color: #fff !important; }
.nav-cta::after,
.nav-cta:hover::after,
.nav-cta[aria-current="page"]::after { display: none !important; }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  width: 40px;
  height: 40px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #000;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  position: absolute;
  left: 11px;
  transition: transform 320ms var(--ease), opacity 200ms var(--ease), top 320ms var(--ease);
}
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { top: 19px; transform: rotate(-45deg); }

/* Mobile overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 45;
  display: flex;
  flex-direction: column;
  padding: 96px var(--gutter) var(--gutter);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 320ms var(--ease), transform 360ms var(--ease), visibility 0s linear 360ms;
}
.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 320ms var(--ease), transform 360ms var(--ease), visibility 0s linear 0s;
}
.nav-overlay nav { display: flex; flex-direction: column; gap: 12px; }
.nav-overlay a {
  font-size: clamp(36px, 9vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #000;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 320ms var(--ease), transform 360ms var(--ease);
}
.nav-overlay a::after {
  content: "↗";
  font-size: 0.5em;
  font-weight: 400;
  color: var(--muted);
}
.nav-overlay.is-open a { opacity: 1; transform: translateY(0); }
.nav-overlay.is-open a:nth-child(1) { transition-delay: 80ms; }
.nav-overlay.is-open a:nth-child(2) { transition-delay: 140ms; }
.nav-overlay.is-open a:nth-child(3) { transition-delay: 200ms; }
.nav-overlay.is-open a:nth-child(4) { transition-delay: 260ms; }

body.has-overlay-open { overflow: hidden; }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-inner { padding-right: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .nav, .nav-overlay, .nav-overlay a, .nav-toggle span { transition: none; }
}

/* ----- Footer ----- */
.foot {
  border-top: 1px solid var(--rule);
  margin-top: clamp(80px, 12vw, 160px);
  padding: 28px 0 32px;
  font-size: 13px;
  color: var(--muted);
}
body[data-screen-label="07 Contact"] .foot {
  margin-top: clamp(40px, 5vw, 72px);
}
.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.foot-socials {
  display: flex;
  align-items: center;
  gap: 6px;
}
.foot-socials a {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #000;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.foot-socials a:hover { background: #000; color: #fff; }
.foot-socials svg { width: 16px; height: 16px; }

/* ----- Type helpers ----- */
.eyebrow {
  font-size: var(--f-eyebrow);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: #000;
}
.eyebrow.muted { color: var(--muted); }

.lead {
  font-size: var(--f-lead);
  line-height: calc(1.45 * var(--density));
  letter-spacing: -0.01em;
  max-width: 64ch;
}

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: var(--f-h2); letter-spacing: -0.025em; line-height: 1.05; }
h3 { font-size: var(--f-h3); letter-spacing: -0.02em; line-height: 1.15; }

.hero-signature {
  font-family: "Caveat", cursive;
  font-weight: 600;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
  color: var(--fg);
  margin: 0 0 clamp(6px, 0.9vw, 12px);
  transform: rotate(-3deg);
  transform-origin: left center;
  width: fit-content;
  white-space: nowrap;
}
.hero-statement {
  font-size: var(--f-hero);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
  max-width: 680px;
}
.hero-sub {
  font-size: var(--f-lead);
  line-height: calc(1.5 * var(--density));
  letter-spacing: -0.01em;
  color: var(--muted);
  max-width: 60ch;
  margin-top: clamp(18px, 2.1vw, 28px);
  text-wrap: pretty;
}
.hero-pillars {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: clamp(20px, 2.3vw, 30px);
}
.hero-pillars .pillar {
  position: relative;
  font-size: clamp(15px, 1.2vw, 19px);
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.01em;
  margin-right: -0.01em;
  text-transform: none;
  color: var(--fg);
  line-height: 1.2;
  white-space: nowrap;
}
.hero-pillars .pillar + .pillar::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 12px;
  background: var(--rule-strong);
}

/* ----- Reusable: buttons / pills ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid #000;
  transition: background 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
  cursor: pointer;
  background: transparent;
  color: #000;
}
.btn:hover { background: #000; color: #fff; }
.btn .arrow { transition: transform 180ms var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn.primary { background: #000; color: #fff; }
.btn.primary:hover { background: #fff; color: #000; }

/* ----- Section rule ----- */
.section {
  padding-block: clamp(64px, 10vw, 128px);
  border-top: 1px solid var(--rule);
}
.section:first-of-type { border-top: 0; }

/* ----- Placeholders ----- */
.ph {
  background:
    repeating-linear-gradient(
      135deg,
      #f4f4f4 0 14px,
      #ffffff 14px 28px
    );
  border: 1px solid #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #000;
  text-align: center;
  padding: 24px;
}
.ph::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(0,0,0,0.3);
  pointer-events: none;
}
.ph .label {
  background: #fff;
  border: 1px solid #000;
  padding: 6px 10px;
  position: relative;
  z-index: 1;
}

/* ----- Scroll reveal ----- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   HOME / HERO
   ============================================================ */
.hero {
  padding-top: clamp(48px, 8vw, 96px);
  padding-bottom: clamp(40px, 6vw, 80px);
  position: relative;
}
.hero-mark--off { display: none !important; }

/* Geometric mark / wireframe */
.hero-mark {
  position: absolute;
  top: clamp(48px, 8vw, 96px);
  right: var(--gutter);
  width: clamp(200px, 24vw, 340px);
  aspect-ratio: 1;
  z-index: 1;
  color: #000;
  cursor: pointer;
  user-select: none;
}
.hero-mark svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* Each card responds to hover */
.hero-mark .wf-c rect { transition: stroke-width 220ms var(--ease), fill 220ms var(--ease); }
.hero-mark .wf-c:hover > rect:first-of-type {
  fill: rgba(0, 0, 0, 0.04);
  stroke-width: 1.5;
}

/* Whole frame responds to mouse-down */
.hero-mark:active svg {
  transform: scale(0.985);
  transition: transform 100ms var(--ease);
}
.hero-mark svg { transition: transform 240ms var(--ease); }

/* Animated lines/bars/dot smoothly transition between states */
[data-wf-chart], [data-wf-bar], [data-wf-toggle] {
  transition:
    points 600ms cubic-bezier(0.4, 0.0, 0.2, 1),
    y1 600ms cubic-bezier(0.4, 0.0, 0.2, 1),
    y2 600ms cubic-bezier(0.4, 0.0, 0.2, 1),
    cx 360ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* "tap to refresh" hint */
.wf-hint {
  position: absolute;
  bottom: -8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid #000;
  border-radius: 999px;
  font: 500 11px/1 "Inter", sans-serif;
  letter-spacing: 0.02em;
  color: #000;
  cursor: pointer;
  pointer-events: none; /* clicks go through to the svg parent */
  animation: wf-hint-float 2.6s ease-in-out infinite;
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}
.wf-hint svg { width: 12px; height: 12px; flex-shrink: 0; }
.wf-hint.is-dismissed {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}
@keyframes wf-hint-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) {
  .wf-hint { animation: none; }
  [data-wf-chart], [data-wf-bar], [data-wf-toggle] { transition: none; }
}

@media (max-width: 760px) {
  .hero { padding-right: var(--gutter); }
  .hero-mark { width: 140px; top: 12px; right: var(--gutter); opacity: 0.85; }
  .wf-hint { display: none; }
}

/* Wireframe components — fade in, hold, fade out on a 6s loop */
.hero-mark .wf-c,
.hero-mark .wf-cursor,
.hero-mark .wf-toggle-dot { display: none; }

/* Old auto-loop animations removed — wireframe is now interactive */
.hero-mark .wf-c,
.hero-mark .wf-cursor,
.hero-mark .wf-toggle-dot,
.hero-mark .wf-click,
.hero-mark .sticky,
.hero-mark .sticky-conn,
.hero-mark .sticky-pulse,
.hero-mark .strat-node,
.hero-mark .strat-line,
.hero-mark .strat-pulse {
  animation: none;
  opacity: 1;
}

@media (max-width: 760px) {
  .hero { padding-right: var(--gutter); }
  .hero-mark { width: 120px; top: 12px; right: var(--gutter); opacity: 0.7; }
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.hero-eyebrow .pulse {
  width: 8px; height: 8px;
  background: #19c37d;
  border-radius: 50%;
  position: relative;
}
.hero-eyebrow .pulse::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: #19c37d;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(3.6); opacity: 0; }
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(28px, 3.4vw, 44px);
}
.hero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px 0;
  margin-top: clamp(64px, 10vw, 120px);
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
}
.hero-meta > div {
  padding: 0 clamp(28px, 3.4vw, 52px);
  border-left: 1px solid var(--rule);
}
.hero-meta > div:first-child { padding-left: 0; border-left: none; }
.hero-meta-ic {
  display: block;
  color: var(--fg);
  margin-bottom: 16px;
}
.hero-meta-ic svg {
  width: 22px;
  height: 22px;
  display: block;
}
.hero-meta dt {
  color: var(--fg);
  font-size: clamp(15px, 1.3vw, 17px);
  letter-spacing: -0.01em;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 6px;
}
.hero-meta dd {
  margin: 0;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
  font-size: 13px;
}
@media (max-width: 720px) {
  .hero-meta > div { padding: 0; border-left: none; }
}

/* ---- Hero: full-bleed cycling product showcase ---- */
.hero-full {
  display: grid;
  grid-template-columns: 1fr clamp(360px, 44vw, 840px);
  align-items: stretch;
  min-height: clamp(460px, 72vh, 800px);
  padding: 0;
  gap: 0;
  overflow: hidden;
}
.hero-left {
  align-self: center;
  padding-top: clamp(20px, 2.6vw, 44px);
  padding-bottom: clamp(20px, 2.6vw, 44px);
  padding-right: clamp(36px, 5vw, 88px);
  padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
}

.hero-showcase {
  position: relative;
  align-self: center;
  height: clamp(340px, 57vh, 660px);
  overflow: hidden;
  background: #0e0e0e;
  isolation: isolate;
}
.show-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 1600ms var(--ease);
  will-change: opacity;
}
.show-slide.is-active { opacity: 1; }
.show-slide[data-pos="left"]  { object-position: left center; }
.show-slide[data-pos="right"] { object-position: right center; }
.show-slide[data-pos="top"]   { object-position: center top; }
.show-slide[data-pos="lefttop"] { object-position: left top; }
.show-slide[data-pos="center"] { object-position: center center; }

/* Editorial museum-label — solid plate, no glass/shadow */
.show-label {
  position: absolute;
  right: clamp(16px, 1.8vw, 28px);
  bottom: clamp(16px, 1.8vw, 28px);
  margin: 0;
  z-index: 3;
  background: #111;
  border-radius: 8px;
  padding: 12px 16px;
  opacity: 1;
  transition: opacity 500ms var(--ease);
}
.show-label figcaption { display: grid; gap: 3px; }
.show-label span { white-space: nowrap; }
.sl-project { color: #fff; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.sl-type { color: rgba(255, 255, 255, 0.66); font-size: 12px; }
.sl-year { color: rgba(255, 255, 255, 0.5); font-size: 11px; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }

/* Stats band below hero */
.hero-meta-band {
  padding-top: clamp(16px, 2vw, 32px);
  padding-bottom: clamp(4px, 2vw, 16px);
}
.hero-meta-band .hero-meta { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .show-slide { transition: none; }
}

@media (max-width: 920px) {
  .hero-full {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .hero-left {
    padding-right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
    padding-bottom: clamp(32px, 6vw, 56px);
  }
  .hero-showcase {
    align-self: auto;
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 280px;
  }
}

/* ============================================================
   TESTIMONIALS (home)
   ============================================================ */
.testimonials {
  padding-top: clamp(64px, 8vw, 120px);
  padding-bottom: clamp(64px, 8vw, 120px);
  border-top: 1px solid var(--rule);
}
.testimonials-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.testimonials-head h2 {
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1;
}

.t-card {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.t-quote {
  width: 28px;
  height: auto;
  color: #000;
  display: block;
  margin-bottom: 24px;
}
.t-text {
  margin: 0 0 40px;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  letter-spacing: -0.005em;
  font-weight: 500;
  text-wrap: pretty;
  flex: 1 1 auto;
}
.t-attr {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
}
.t-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f4f4f4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.t-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.t-initials {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.t-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.t-role {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.3;
  margin-top: 2px;
}

/* Three equal-weight quotes in a row */
.t-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 4vw, 56px);
  align-items: stretch;
}
@media (min-width: 900px) {
  .t-row {
    grid-template-columns: repeat(3, 1fr);
  }
}
.home-work {
  padding-top: clamp(48px, 8vw, 96px);
  padding-bottom: clamp(64px, 10vw, 128px);
  border-top: 1px solid var(--rule);
  scroll-margin-top: var(--nav-h);
}
.home-work-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 60ch;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.home-work-head h2 {
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1;
}

/* ============================================================
   WORK INDEX (hover-reveal list)
   ============================================================ */
.work-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid #000;
}
.work-row {
  border-bottom: 1px solid #000;
  position: relative;
}
.work-row a {
  display: grid;
  grid-template-columns: 60px minmax(0, auto) 1fr auto;
  align-items: center;
  column-gap: clamp(32px, 5vw, 64px);
  row-gap: 12px;
  padding: clamp(28px, 4vw, 44px) 0;
  transition: padding-left 320ms var(--ease), color 200ms var(--ease);
}
.work-row a:hover { padding-left: 24px; }
.work-row .num {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  align-self: center;
}
.work-row .title {
  font-size: clamp(28px, 4.4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.work-row .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.work-row .chip {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 5px 10px;
  border: 1px solid #000;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1;
  transition: background 180ms var(--ease), color 180ms var(--ease);
}
.work-row a:hover .chip {
  background: #000;
  color: #fff;
}
.work-row .yr {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  align-self: center;
}

/* Cursor-follow preview */
.preview {
  position: fixed;
  top: 0; left: 0;
  width: 420px;
  height: 280px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 200ms var(--ease), transform 240ms var(--ease);
  z-index: 100;
  background: #fff;
  border: 1px solid #000;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.25);
}
.preview.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.preview .preview-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(135deg, #f4f4f4 0 14px, #ffffff 14px 28px);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
}
.preview .preview-fallback .label {
  background: #fff;
  border: 1px solid #000;
  padding: 6px 10px;
}

@media (hover: none) {
  .preview { display: none; }
}

/* ============================================================
   CASE STUDY pages
   ============================================================ */
.cs-hero {
  padding-top: clamp(40px, 6vw, 80px);
  padding-bottom: clamp(40px, 5vw, 64px);
}
.cs-hero .eyebrow-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  margin-bottom: 32px;
}
.cs-hero h1 {
  font-size: clamp(44px, 6.6vw, 112px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin-bottom: 24px;
}
.cs-hero .tagline {
  font-size: var(--f-lead);
  max-width: 60ch;
  margin: 0;
}
.cs-cover {
  margin-top: clamp(48px, 6vw, 80px);
  aspect-ratio: 16 / 9;
}
.cs-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  padding-top: 32px;
  margin-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid #000;
}
.cs-meta dt {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.cs-meta dd { margin: 0; font-weight: 500; line-height: 1.45; }

.cs-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: clamp(24px, 5vw, 80px);
  padding-block: clamp(56px, 8vw, 112px);
  border-top: 1px solid var(--rule);
}
.cs-block .label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  align-self: start;
}
.cs-block h2 {
  margin-bottom: 24px;
  text-wrap: balance;
}
.cs-block .lead { margin-bottom: 24px; }
.cs-block p {
  font-size: 17px;
  line-height: 1.65;
  margin: 0 0 16px;
  max-width: 64ch;
}
.cs-block ul {
  font-size: 17px;
  line-height: 1.65;
  padding-left: 1.2em;
  margin: 0 0 16px;
}
.cs-block li { margin-bottom: 8px; }
.cs-block h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 32px 0 12px;
}
.cs-block h3:first-of-type { margin-top: 4px; }
.cs-block h3 + p { margin-top: 0; }

.cs-figure {
  margin: 32px 0;
}
.cs-figure + p,
.cs-figure + h2,
.cs-figure + h3 { margin-top: 0; }
.cs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.cs-chip {
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border: 1px solid #000;
  border-radius: 999px;
  line-height: 1;
  white-space: nowrap;
}
.cs-figure.full {
  grid-column: 1 / -1;
}
.cs-figure .ph { aspect-ratio: 16 / 9; }
.cs-figure figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.04em;
}

/* 3-up photo row inside a figure */
.cs-photo-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}
.cs-photo-row img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border: 1px solid var(--rule);
}
@media (max-width: 600px) {
  .cs-photo-row { grid-template-columns: 1fr; }
}

.cs-figures-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.cs-figures-grid .cs-figure { margin: 0; }
.cs-figures-grid + p { margin-top: clamp(24px, 3vw, 40px); }
.cs-figures-grid .ph { aspect-ratio: 4 / 3; }

.cs-outcomes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px 56px;
  margin-top: 32px;
}
.cs-outcomes .stat {
  border-top: 1px solid #000;
  padding-top: 16px;
}
.cs-outcomes .stat .num {
  font-size: clamp(26px, 2.3vw, 40px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  white-space: nowrap;
  margin-bottom: 8px;
}
.cs-outcomes .stat .lbl {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* About highlights — mixed text/number values, sized as an editorial band */
.about-stats {
  grid-template-columns: repeat(4, 1fr);
}
.about-stats .stat .num {
  font-size: clamp(20px, 1.8vw, 26px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 6px;
}
.about-stats .stat .lbl {
  font-size: clamp(13px, 1.1vw, 15px);
  color: var(--fg);
  font-weight: 500;
}
@media (max-width: 900px) {
  .about-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .about-stats { grid-template-columns: 1fr; }
}

.cs-next {
  border-top: 1px solid #000;
  padding-top: clamp(48px, 6vw, 96px);
  margin-top: clamp(48px, 6vw, 96px);
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-end;
  justify-content: space-between;
}
.cs-next .next-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 12px;
}
.cs-next .next-title {
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.cs-next a { display: block; }
.cs-next a:hover .next-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

@media (max-width: 760px) {
  .cs-block { grid-template-columns: 1fr; }
  .cs-block .label { position: static; margin-bottom: 12px; }
  .cs-figures-grid { grid-template-columns: 1fr; }
  .work-row a { grid-template-columns: 40px 1fr; row-gap: 10px; }
  .work-row .chips, .work-row .yr { grid-column: 2; }
}

/* ============================================================
   ABOUT / RESUME
   ============================================================ */
.about-hero h1 {
  font-size: clamp(48px, 7vw, 120px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin-bottom: clamp(56px, 8vw, 96px);
  text-wrap: balance;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.about-grid .portrait {
  aspect-ratio: 20 / 21;
  margin: 0;
}
.about-grid .bio p {
  font-size: 18px;
  line-height: 1.65;
  margin: 0 0 20px;
}
.about-grid .bio p:first-child {
  font-size: 22px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.resume {
  border-top: 1px solid #000;
  padding-top: clamp(40px, 5vw, 64px);
  margin-top: clamp(64px, 8vw, 128px);
}
.resume-head {
  margin: 0 0 40px;
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.resume-toggle {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.resume-toggle:hover { opacity: 0.7; }
.resume-toggle:focus-visible {
  outline: 2px solid #000;
  outline-offset: 6px;
  border-radius: 4px;
}
.resume-meta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.resume-toggle .chev {
  width: 22px;
  height: 22px;
  transition: transform 320ms var(--ease);
  flex-shrink: 0;
}
.resume-toggle[aria-expanded="false"] .chev {
  transform: rotate(180deg);
}

.exp-collapse {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 520ms var(--ease), opacity 320ms var(--ease);
}
.exp-collapse.is-collapsed {
  grid-template-rows: 0fr;
  opacity: 0;
}
.exp-collapse-inner {
  overflow: hidden;
  min-height: 0;
}

.exp-list {
  display: flex;
  flex-direction: column;
}
.exp-row {
  display: grid;
  grid-template-columns: 56px 1fr 160px;
  gap: 24px;
  padding: 28px 20px;
  border-top: 1px solid var(--rule);
  align-items: start;
}

/* Clickable rows */
.exp-row.exp-toggle {
  cursor: pointer;
  outline: none;
  transition: background-color 180ms var(--ease);
  border-radius: 4px;
}
.exp-row.exp-toggle:hover { background: rgba(0, 0, 0, 0.035); }
/* Grouped roles (same company) highlight as one unit, not split mid-group */
.exp-group {
  border-radius: 4px;
  overflow: hidden;
  transition: background-color 180ms var(--ease);
}
.exp-group:hover { background: rgba(0, 0, 0, 0.035); }
.exp-group .exp-row.exp-toggle:hover { background: transparent; }
.exp-group .exp-row.exp-toggle { border-radius: 0; }
.exp-row.exp-toggle:focus-visible {
  outline: 2px solid #000;
  outline-offset: 4px;
  border-radius: 4px;
}

/* Collapsible description — click-driven accordion */
.exp-desc-collapse {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  opacity: 0;
  transition: grid-template-rows 380ms var(--ease), opacity 240ms var(--ease), margin-top 380ms var(--ease);
}
.exp-desc-collapse-inner {
  overflow: hidden;
  min-height: 0;
}
.exp-row.exp-toggle.is-expanded .exp-desc-collapse {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 12px;
}

/* Date column + chevron */
.exp-dates {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.exp-chev {
  width: 22px;
  height: 22px;
  transition: transform 280ms var(--ease), color 200ms var(--ease);
  flex-shrink: 0;
  color: var(--muted);
}
.exp-row.exp-toggle.is-expanded .exp-chev {
  transform: rotate(180deg);
  color: #000;
}
.exp-row.exp-earlier .exp-chev { display: none; }

/* Group wrapper: same-company roles share one continuous card (no extra top air
   that would paint a gray strip above the first row's divider) */

/* Inline "selected clients" chip strip (Namics row) */
.exp-clients {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 24px;
}
.exp-clients-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  margin-right: 4px;
}
.exp-client {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 999px;
  color: #000;
  line-height: 1;
  white-space: nowrap;
}
.exp-row:last-child { border-bottom: 1px solid var(--rule); }

/* Speaking gallery */
.speaking-gallery {
  margin-top: clamp(40px, 5vw, 60px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(8px, 1vw, 12px);
  width: 100%;
}
.speaking-gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}
@media (max-width: 760px) {
  .speaking-gallery {
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: 70vw;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
  }
  .speaking-gallery::-webkit-scrollbar { display: none; }
  .speaking-gallery img { scroll-snap-align: start; }
}

/* Same-company continuation row (e.g. promoted within Celsius) */
.exp-row.exp-continuation {
  border-top: 0;
  padding-top: 4px;
  margin-top: 0;
}
.exp-row.exp-continuation .exp-mark {
  background: transparent;
}

/* Quieter "earlier work" row */
.exp-row.exp-earlier {
  padding: 18px 0;
  align-items: center;
  color: var(--muted);
}
.exp-earlier-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.exp-earlier-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0 0 4px;
  color: #000;
}
.exp-earlier-desc {
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
}
.exp-earlier-dates {
  font-size: 12px;
}
.exp-mark {
  width: 40px; height: 40px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}
.exp-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.exp-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.exp-company {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 12px;
}
.exp-desc {
  font-size: 15px;
  line-height: 1.55;
  max-width: 62ch;
  margin: 0;
}
.exp-desc ul { padding-left: 1.2em; margin: 0; }
.exp-desc li { margin-bottom: 4px; }

@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
  .exp-row { grid-template-columns: 40px 1fr; }
  .exp-dates { grid-column: 2; text-align: left; margin-top: 8px; }
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-hero h1 {
  font-size: clamp(48px, 8vw, 104px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0 0 24px;
  text-wrap: balance;
}

/* Word rotator (contact hero) */
.rot {
  display: inline-block;
  vertical-align: baseline;
  position: relative;
  line-height: inherit;
  /* clip vertically without breaking baseline alignment */
  clip-path: inset(-20% -5% -25% -5%);
}
.rot-word {
  display: inline-block;
  font-style: normal;
  transition:
    opacity 480ms cubic-bezier(0.32, 0.72, 0.18, 1),
    transform 560ms cubic-bezier(0.32, 0.72, 0.18, 1),
    color 480ms cubic-bezier(0.32, 0.72, 0.18, 1);
  will-change: opacity, transform;
}
.rot-word.is-out {
  opacity: 0;
  transform: translateY(-42%);
}
.rot-word.is-in-init {
  opacity: 0;
  transform: translateY(42%);
}
@media (prefers-reduced-motion: reduce) {
  .rot-word { transition: none; }
}
.contact-hero p { font-size: var(--f-lead); max-width: 56ch; }

.contact-grid {
  margin-top: clamp(56px, 8vw, 112px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: baseline;
}
.contact-block h3 {
  font-size: clamp(28px, 3.4vw, 40px);
  margin-bottom: 16px;
}
.contact-block p { font-size: 16px; line-height: 1.6; max-width: 48ch; color: #000; }

.contact-mail {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  padding: 12px 0;
  border-bottom: 2px solid #000;
  margin-top: 0;
}
.contact-mail:hover { color: #000; }
.contact-mail:hover .arrow { transform: translateX(4px); }
.contact-mail .arrow { transition: transform 200ms var(--ease); }

.contact-links {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #000;
  margin-top: 16px;
}
.contact-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: padding-left 200ms var(--ease);
}
.contact-links a:hover { padding-left: 16px; }
.contact-links a .handle { color: var(--muted); font-weight: 400; font-size: 14px; }
.contact-links .left {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}
.contact-ico {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Back-to-top floating button
   ============================================================ */
.to-top {
  position: fixed;
  right: clamp(20px, 4vw, 48px);
  bottom: clamp(20px, 4vw, 48px);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 60;
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
  transition: opacity 240ms var(--ease), transform 240ms var(--ease), background-color 200ms var(--ease);
}
.to-top.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.to-top svg {
  width: 18px;
  height: 18px;
  display: block;
}
@media (hover: hover) {
  .to-top:hover { transform: translateY(-2px) scale(1.04); }
}
.to-top:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .to-top { transition: opacity 200ms linear; transform: none; }
  .to-top.is-visible { transform: none; }
}

/* ============================================================
   Tweaks panel mounted by tweaks-panel.jsx
   ============================================================ */
