/* ============================================================
   PORTFOLIO — Monochrome / less-is-more
   Body: Aptos (with humanist fallbacks)
   Display: imposing bold grotesque (tweakable)
   ============================================================ */

:root {
  /* monochrome tokens — DARK is the default (white on black) */
  --paper:      #0b0b0a;
  --paper-2:    #141413;
  --ink:        #f4f3ef;
  --ink-2:      #e6e5e0;
  --muted:      #908f89;
  --muted-2:    #66655f;
  --line:       rgba(244,243,239,0.16);
  --line-2:     rgba(244,243,239,0.08);
  --hair:       rgba(244,243,239,0.26);

  --display: "Archivo", system-ui, sans-serif;
  --body: "Aptos", "Aptos Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --display-wght: 840;
  --maxw: 1500px;
  --pad: clamp(20px, 4.4vw, 72px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --paper:      #f6f5f2;
  --paper-2:    #efeeea;
  --ink:        #0b0b0a;
  --ink-2:      #1a1a18;
  --muted:      #6f6e69;
  --muted-2:    #9a9994;
  --line:       rgba(11,11,10,0.14);
  --line-2:     rgba(11,11,10,0.08);
  --hair:       rgba(11,11,10,0.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
body { overflow-x: hidden; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  overflow-x: hidden;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}

/* hide native cursor only when custom cursor is on (added on body) */
body.cursor-custom,
body.cursor-custom a,
body.cursor-custom button,
body.cursor-custom .row,
body.cursor-custom .card { cursor: none; }

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

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

/* film grain overlay */
.grain {
  position: fixed; inset: 0; z-index: 9990; pointer-events: none;
  opacity: 0; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxNjAnIGhlaWdodD0nMTYwJz48ZmlsdGVyIGlkPSduJz48ZmVUdXJidWxlbmNlIHR5cGU9J2ZyYWN0YWxOb2lzZScgYmFzZUZyZXF1ZW5jeT0nMC45JyBudW1PY3RhdmVzPScyJyBzdGl0Y2hUaWxlcz0nc3RpdGNoJy8+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9JzEwMCUnIGhlaWdodD0nMTAwJScgZmlsdGVyPSd1cmwoI24pJyBvcGFjaXR5PScwLjUnLz48L3N2Zz4=");
  transition: opacity 0.4s var(--ease);
}
.grain.on { opacity: 0.05; }
.grain { mix-blend-mode: screen; }
[data-theme="light"] .grain { mix-blend-mode: multiply; }

/* ===================== shell / layout ===================== */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.eyebrow {
  font-family: var(--body);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}

/* ===================== top bar ===================== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 18px var(--pad);
  mix-blend-mode: difference; color: #fff;
}
@media (max-width: 560px) {
  .topbar nav { gap: 16px; }
  .topbar nav a { font-size: 12px; }
  .topbar-right { gap: 16px; }
}
.topbar .brand { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
.topbar-right { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; justify-content: flex-end; max-width: 100%; }
.topbar nav { display: flex; gap: 26px; flex-wrap: wrap; }
.topbar nav a {
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  position: relative; padding-bottom: 2px;
}
.topbar nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: currentColor; transition: width 0.4s var(--ease);
}
.topbar nav a:hover::after { width: 100%; }

/* language switch */
.lang-switch { display: inline-flex; align-items: center; gap: 6px; }
.lang-switch button {
  background: none; border: 0; color: inherit; font: inherit;
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  padding: 2px 2px; opacity: 0.45; transition: opacity 0.3s var(--ease);
  display: inline-flex; align-items: center; gap: 5px;
}
.lang-switch button.on { opacity: 1; }
.lang-switch button.on span { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.lang-switch button:hover { opacity: 0.85; }
.lang-switch .sep { opacity: 0.4; font-size: 12px; }
.emblem { width: 15px; height: 15px; display: block; flex: none; }
.flag { width: 17px; height: 12px; display: block; flex: none; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,0.15); }
@media (max-width: 720px) { .topbar nav { display: none; } }

/* ===================== hero ===================== */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: clamp(40px, 7vh, 90px); padding-top: 120px;
  container-type: inline-size;
  position: relative;
}
/* drifting OSM backdrop behind the name */
.hero-map {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.34;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 90%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 90%, transparent 100%);
}
.hero-map .leaflet-container { background: transparent !important; }
.hero-map .leaflet-tile-pane { will-change: transform; }
[data-theme="light"] .hero-map { opacity: 0.2; }
.hero > *:not(.hero-map) { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .hero-map { opacity: 0.24; } }
.hero-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex: 1; gap: 30px; flex-wrap: wrap;
}
.hero-meta { max-width: 360px; }
.hero-meta p { color: var(--muted); font-size: 15px; line-height: 1.55; margin-top: 14px; }
.hero-status {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--muted);
  text-transform: uppercase;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
  position: relative;
}
.dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--hair); animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }

.hero-title {
  font-family: var(--display); font-weight: var(--display-wght);
  font-size: clamp(44px, 13.5cqi, 200px);
  line-height: 0.84; letter-spacing: -0.035em;
  text-transform: uppercase;
  margin-top: 40px;
  max-width: 100%; overflow-wrap: break-word;
}
.hero-title .line { display: block; }
.hero-title .line span { display: block; }

.hero-foot {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: clamp(28px, 4vh, 54px); gap: 24px; flex-wrap: wrap;
}
.hero-tagline { font-size: clamp(17px, 2vw, 22px); max-width: 30ch; line-height: 1.35; letter-spacing: -0.01em; text-align: justify; }

/* ===================== scroll progress (right edge) ===================== */
.scroll-progress {
  position: fixed; top: 0; right: 0; width: 3px; height: 100vh; z-index: 150;
  background: var(--hair); pointer-events: none;
}
.scroll-progress-fill { width: 100%; height: 0%; background: var(--ink); mix-blend-mode: difference; }
@media (max-width: 720px) { .scroll-progress { display: none; } }
.scroll-cue { display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.scroll-cue .bar { width: 38px; height: 1px; background: var(--hair); position: relative; overflow: hidden; }
.scroll-cue .bar::after { content:""; position:absolute; inset:0; background: var(--ink); transform: translateX(-100%); animation: slide 2s var(--ease) infinite; }
@keyframes slide { 0%{transform:translateX(-100%)} 50%{transform:translateX(0)} 100%{transform:translateX(100%)} }

/* ===================== section header ===================== */
.section { padding-block: clamp(60px, 11vh, 150px); }
.sec-head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--ink); padding-top: 18px; margin-bottom: clamp(30px, 5vh, 60px);
  gap: 20px;
}
.sec-head h2 {
  font-family: var(--display); font-weight: var(--display-wght);
  font-size: clamp(26px, 4vw, 52px); letter-spacing: -0.02em; line-height: 0.95;
  text-transform: uppercase;
}
.sec-head .count { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; }

/* ===================== WORK — index list layout ===================== */
.index-list { border-bottom: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: center;
  gap: 24px; padding: clamp(18px, 2.6vw, 34px) 6px;
  border-top: 1px solid var(--line);
  position: relative; transition: padding 0.5s var(--ease);
}
.row .num { font-size: 13px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.row .title {
  font-family: var(--display); font-weight: var(--display-wght);
  font-size: clamp(26px, 5vw, 76px); letter-spacing: -0.025em; line-height: 0.92;
  text-transform: uppercase; color: var(--ink);
  transition: transform 0.55s var(--ease), opacity 0.4s var(--ease);
  position: relative; z-index: 2; will-change: transform;
}
.row .right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 2; }
.row .tags { display: flex; gap: 7px; flex-wrap: nowrap; justify-content: flex-end; }
.row .tag {
  font-size: 11px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); padding: 4px 9px; border-radius: 100px;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.row .yr { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row .arrow {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%) translateX(-14px); opacity: 0;
  font-size: 22px; transition: all 0.5s var(--ease); z-index: 3;
}
/* hover state — desktop */
@media (hover: hover) {
  .index-list:hover .row .title { opacity: 0.32; }
  .row:hover .title { opacity: 1; transform: translateX(22px); }
  .row:hover .tag { color: var(--ink); border-color: var(--hair); }
  .row:hover { padding-left: 0; }
}
.index-list.muted .row .title { opacity: 0.32; }

/* floating preview that follows cursor */
.floater {
  position: fixed; top: 0; left: 0; z-index: 80; pointer-events: none;
  width: clamp(220px, 24vw, 360px); aspect-ratio: 4 / 3;
  border-radius: 4px; overflow: hidden;
  opacity: 0; transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.35s var(--ease), transform 0.5s var(--ease);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.5);
  border: 1px solid var(--line);
}
.floater.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
@media (max-width: 860px) { .floater { display: none; } }

/* ===================== WORK — grid layout ===================== */
.grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(16px, 2vw, 30px);
}
.card {
  grid-column: span 6; display: flex; flex-direction: column; gap: 16px;
  position: relative;
}
.card.feat { grid-column: span 12; }
@media (max-width: 720px) { .card, .card.feat { grid-column: span 12; } }
@media (max-width: 560px) {
  .row { grid-template-columns: 40px 1fr; grid-template-rows: auto auto; gap: 8px 12px; }
  .row .arrow { display: none; }
  .row .right { grid-column: 2; align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .row .tags { flex-wrap: wrap; justify-content: flex-start; }
  .dist-form { flex-direction: column; }
  .dist-form button { width: 100%; }
  .foot { flex-direction: column; align-items: flex-start; }
}
.card .thumb {
  position: relative; aspect-ratio: 16/10; overflow: hidden; border-radius: 4px;
  border: 1px solid var(--line); background: var(--paper-2);
  transition: transform 0.6s var(--ease);
}
.card.feat .thumb { aspect-ratio: 21/9; }
.card .thumb .ph { position: absolute; inset: 0; }
.card .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.card .meta h3 {
  font-family: var(--display); font-weight: var(--display-wght);
  font-size: clamp(22px, 2.4vw, 34px); letter-spacing: -0.02em; line-height: 0.98;
  text-transform: uppercase;
}
.card .meta .yr { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.card .desc { font-size: 14px; color: var(--muted); max-width: 46ch; line-height: 1.5; text-align: justify; }
.card .tags { display: flex; gap: 7px; flex-wrap: wrap; }
.card .tag {
  font-size: 11px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); padding: 4px 9px; border-radius: 100px;
}
.card .open {
  position: absolute; top: 14px; right: 14px; z-index: 4;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line);
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 7px 11px; border-radius: 100px;
  opacity: 0; transform: translateY(-6px); transition: all 0.45s var(--ease);
}
/* hover variants on grid */
.card:hover .open { opacity: 1; transform: translateY(0); }
[data-hover="zoom"] .card:hover .thumb .ph { transform: scale(1.06); }
[data-hover="zoom"] .card .thumb .ph { transition: transform 0.8s var(--ease); }
[data-hover="lift"] .card:hover .thumb { transform: translateY(-8px); box-shadow: 0 30px 60px -34px rgba(0,0,0,0.45); }
[data-hover="invert"] .card:hover .thumb { filter: invert(1); }

/* video preview: shown smaller/contained so heavy compression is less visible,
   instead of full-bleed cover */
.ph-video-wrap {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 10%; background: var(--paper-2);
}
.ph-video-wrap video {
  max-width: 78%; max-height: 78%; width: auto; height: auto;
  object-fit: contain; border-radius: 3px; box-shadow: 0 12px 40px -18px rgba(0,0,0,0.5);
  background: #000;
}
.ph { position: absolute; inset: 0; background: var(--paper-2); overflow: hidden; }
.ph-art svg { color: var(--ink); }
.ph-tag {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  font-family: ui-monospace, "SF Mono", "Roboto Mono", Menlo, monospace;
  font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  background: var(--paper); padding: 5px 9px; border: 1px solid var(--line); border-radius: 100px;
  display: inline-flex; align-items: center; gap: 7px;
}
.ph-tag::before { content:""; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); animation: blink 1.8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* motif word overlay (evokes the title) */
.ph-word {
  position: absolute; right: 14px; top: 12px; z-index: 2;
  font-family: var(--display); font-weight: var(--display-wght);
  font-size: clamp(20px, 3.4vw, 42px); letter-spacing: -0.02em; line-height: 0.9;
  text-transform: uppercase; color: var(--ink); opacity: 0.92;
  max-width: 70%; text-align: right; text-wrap: balance;
  mix-blend-mode: difference;
}

/* status / live tag */
.tag-live {
  color: var(--paper) !important; background: var(--ink); border-color: var(--ink) !important;
  display: inline-flex; align-items: center; gap: 6px;
}
.tag-live::before { content:""; width: 6px; height: 6px; border-radius: 50%; background: var(--paper); animation: blink 1.6s steps(1) infinite; }

/* ===================== lightbox ===================== */
.lb { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: clamp(16px,5vw,60px); }
.lb-bg { position: absolute; inset: 0; background: color-mix(in oklab, var(--paper) 78%, transparent); backdrop-filter: blur(7px); opacity: 0; transition: opacity 0.4s var(--ease); }
.lb.in .lb-bg { opacity: 1; }
.lb-card {
  position: relative; z-index: 2; width: min(1080px, 100%); max-height: 90vh; overflow: hidden;
  background: var(--paper); border: 1px solid var(--ink); border-radius: 6px;
  display: grid; grid-template-rows: auto 1fr;
  transform: translateY(18px) scale(0.99); opacity: 0; transition: all 0.5s var(--ease);
}
.lb.in .lb-card { transform: none; opacity: 1; }
.lb-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.lb-head h3 { font-family: var(--display); font-weight: var(--display-wght); font-size: clamp(22px,3vw,40px); text-transform: uppercase; letter-spacing: -0.02em; line-height: 1; }
.lb-head .x { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; font-size: 17px; transition: all 0.3s var(--ease); }
.lb-head .x:hover { background: var(--ink); color: var(--paper); }
.lb-preview { position: relative; aspect-ratio: 16/9; }
.lb-card { max-width: 100%; }
@media (max-width: 560px) {
  .lb { padding: 10px; }
  .lb-head h3 { font-size: clamp(18px, 5vw, 28px); }
  .lb-foot { flex-direction: column; align-items: flex-start; }
  .lb-foot .desc { max-width: 100%; }
}
.lb-foot { padding: 18px 22px; display: flex; justify-content: space-between; gap: 16px; align-items: center; border-top: 1px solid var(--line); flex-wrap: wrap; }
.lb-foot .desc { font-size: 14px; color: var(--muted); max-width: 60ch; text-align: justify; }
.lb-foot .tags { display: flex; gap: 7px; flex-wrap: wrap; }
.lb-foot .tag { font-size: 11px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); padding: 4px 9px; border-radius: 100px; }

/* ===================== about ===================== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 90px); align-items: start; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }
.about-grid .big {
  font-family: var(--display); font-weight: var(--display-wght);
  font-size: clamp(28px, 3.6vw, 48px); letter-spacing: -0.02em; line-height: 1.02;
  text-wrap: balance;
}
.about-grid .body p { color: var(--ink-2); font-size: 16px; line-height: 1.6; margin-bottom: 16px; max-width: 52ch; text-align: justify; }
.about-grid .body p .m { color: var(--muted); }
.facts { margin-top: 30px; border-top: 1px solid var(--line); }
.fact { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.fact .k { color: var(--muted); }
.fact .v { font-weight: 600; }

/* ===================== CV timeline ===================== */
.timeline { list-style: none; border-top: 1px solid var(--line); }
.tl-item {
  display: grid; grid-template-columns: 160px 24px 1fr; align-items: start;
  gap: 8px; padding: clamp(22px, 3vw, 40px) 0; border-bottom: 1px solid var(--line);
  position: relative;
}
@media (max-width: 720px) { .tl-item { grid-template-columns: 88px 18px 1fr; } }
.tl-period { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 4px; font-weight: 600; }
.tl-dot { position: relative; height: 100%; }
.tl-dot::before { content:""; position: absolute; left: 50%; top: 9px; transform: translateX(-50%); width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.tl-dot::after { content:""; position: absolute; left: 50%; top: 20px; bottom: -42px; transform: translateX(-50%); width: 1px; background: var(--line); }
.tl-item:last-child .tl-dot::after { display: none; }
.tl-body h3 { font-family: var(--display); font-weight: var(--display-wght); font-size: clamp(22px, 3vw, 38px); letter-spacing: -0.02em; line-height: 1; text-transform: uppercase; }
.tl-org { display: inline-block; margin-top: 7px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.tl-logo {
  display: block; height: 38px; width: auto; max-width: 240px; margin-top: 14px;
  object-fit: contain; object-position: left center; opacity: 0.92;
}
[data-theme="light"] .tl-logo { filter: invert(1); opacity: 0.85; }
.tl-body p { margin-top: 10px; font-size: 15px; color: var(--muted); max-width: 56ch; line-height: 1.5; text-align: justify; }

/* ===================== DISTANCE — OSM dark map ===================== */
.dist-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(24px, 4vw, 60px); align-items: stretch; }
@media (max-width: 880px) { .dist-grid { grid-template-columns: 1fr; } }
.dist-panel { display: flex; flex-direction: column; }
.dist-lead { font-size: clamp(16px, 1.7vw, 19px); color: var(--ink-2); line-height: 1.5; max-width: 40ch; }
.dist-form { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.dist-form input {
  flex: 1 1 220px; min-width: 0; background: var(--paper-2); color: var(--ink);
  border: 1px solid var(--line); border-radius: 100px; padding: 14px 20px;
  font-family: var(--body); font-size: 15px; outline: none; transition: border-color 0.3s var(--ease);
}
.dist-form input::placeholder { color: var(--muted-2); }
.dist-form input:focus { border-color: var(--hair); }
.dist-form button {
  flex: none; background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
  border-radius: 100px; padding: 14px 22px; font-family: var(--body);
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  transition: opacity 0.3s var(--ease);
}
.dist-form button:disabled { opacity: 0.5; }
.dist-msg { margin-top: 16px; font-size: 13px; color: var(--muted); font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.02em; }
.dist-msg.err { color: var(--ink-2); }
.dist-result { margin-top: auto; padding-top: 30px; }
.dist-readout { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--ink); padding-top: 20px; }
.dist-num { font-family: var(--display); font-weight: var(--display-wght); font-size: clamp(40px, 6vw, 78px); line-height: 0.9; letter-spacing: -0.03em; }
.dist-unit { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.dist-route { display: flex; align-items: center; gap: 12px; margin-top: 20px; font-size: 13px; color: var(--ink-2); }
.dist-route .dr-line { flex: 1; height: 1px; background: var(--line); position: relative; }
.dist-route .dr-a { font-weight: 700; white-space: nowrap; }
.dist-route .dr-b { color: var(--muted); max-width: 30ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dist-map-wrap { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #000; min-height: 380px; }
.dist-map { width: 100%; height: 100%; min-height: 380px; background: #000; }
.leaflet-container { background: #000 !important; font-family: var(--body); }
.leaflet-control-attribution { background: rgba(0,0,0,0.6) !important; color: #777 !important; }
.leaflet-control-attribution a { color: #999 !important; }
.leaflet-bar a { background: #141413; color: #f4f3ef; border-color: #2a2a28; }
.leaflet-bar a:hover { background: #222220; }
.pin span { display: block; width: 14px; height: 14px; border-radius: 50%; box-sizing: border-box; }
.pin-start span { background: #f4f3ef; border: 3px solid #000; box-shadow: 0 0 0 1px #f4f3ef; }
.pin-end span { background: #000; border: 3px solid #f4f3ef; box-shadow: 0 0 0 1px #f4f3ef; }

/* ===================== CO2 footprint card ===================== */
#footprint { padding-top: 0; }
.co2-card { border: 1px solid var(--line); border-radius: 8px; background: var(--paper-2); padding: clamp(28px, 4vw, 52px); }
.co2-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.co2-kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.ficon { width: 26px; height: 26px; color: var(--ink); flex: none; }
.co2-lead { margin-top: 22px; font-size: clamp(17px, 2vw, 22px); color: var(--ink-2); }
.co2-big { display: flex; align-items: baseline; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.co2-num { font-family: var(--display); font-weight: var(--display-wght); font-size: clamp(46px, 9vw, 120px); line-height: 0.9; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.co2-of { font-size: clamp(16px, 2vw, 22px); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.co2-equiv { margin-top: 26px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.co2-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 26px); margin-top: 16px; }
@media (max-width: 680px) { .co2-grid { grid-template-columns: 1fr; } }
.co2-item { display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.co2-item .ficon { width: 30px; height: 30px; }
.co2-item-val { margin-top: 6px; font-family: var(--display); font-weight: var(--display-wght); font-size: clamp(24px, 3vw, 38px); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.co2-item-label { font-size: 13px; color: var(--muted); }
.co2-note { margin-top: 26px; font-size: 12.5px; color: var(--muted-2); max-width: 60ch; line-height: 1.5; }

/* ===================== contact / footer ===================== */
.contact { padding-block: clamp(70px, 13vh, 170px); }
.contact .big {
  font-family: var(--display); font-weight: var(--display-wght);
  font-size: clamp(40px, 9vw, 150px); line-height: 0.9; letter-spacing: -0.03em; text-transform: uppercase;
  overflow-wrap: break-word;
}
.contact a.mail { text-decoration: none; position: relative; display: inline-block; }
.contact a.mail::after { content:""; position:absolute; left:0; bottom: 0.06em; height: 0.06em; width: 100%; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease); }
.contact a.mail:hover::after { transform: scaleX(1); }
.foot {
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  border-top: 1px solid var(--ink); padding-top: 22px; margin-top: clamp(40px, 7vh, 80px); flex-wrap: wrap;
}
.foot .links { display: flex; gap: 22px; }
.foot .links a { font-size: 13px; font-weight: 600; position: relative; }
.foot .links a::after { content:""; position:absolute; left:0; bottom:-2px; height:1px; width:0; background: currentColor; transition: width 0.4s var(--ease); }
.foot .links a:hover::after { width: 100%; }
.foot .copy { font-size: 12px; color: var(--muted); }

/* ===================== custom cursor ===================== */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none;
  width: 10px; height: 10px; border-radius: 50%;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference; background: #fff;
  transition: width 0.3s var(--ease), height 0.3s var(--ease), background 0.3s var(--ease), border 0.3s var(--ease);
}
.cursor.ring { background: transparent; border: 1.5px solid #fff; width: 26px; height: 26px; }
.cursor.hover { width: 64px; height: 64px; }
.cursor .clabel {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--body); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: #000; mix-blend-mode: normal; opacity: 0; transition: opacity 0.25s var(--ease);
}
.cursor.hover.solid { background: #fff; }
.cursor.hover .clabel { opacity: 1; }
@media (hover: none) { .cursor { display: none !important; } }

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

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: 0.01ms !important; }
  .hero-title .line span { transform: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
