/* ==========================================================================
   micahiverson.com — hand-written, no framework.
   Motif: the MI dot mark (a dot grid with diagonal strokes). Dark by default.
   ========================================================================== */

:root {
  --bg: #0a0b0f;
  --bg-2: #0e1015;
  --surface: #13161d;
  --surface-2: #191d26;
  --text: #f3f2ee;
  --text-2: #c3c7d1;
  --muted: #8a90a0;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .16);
  --accent: #ff5a1f;
  --accent-2: #ffb800;
  --accent-ink: #0a0b0f;
  --dot: #2b303b;
  --glass: rgba(10, 11, 15, .62);
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, .7);
  --font-display: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 18px;
  --r-lg: 28px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --nav-h: 72px;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f6f4ef;
  --bg-2: #efece4;
  --surface: #ffffff;
  --surface-2: #f3f0e9;
  --text: #12141a;
  --text-2: #3d424d;
  --muted: #6b7180;
  --line: rgba(18, 20, 26, .09);
  --line-2: rgba(18, 20, 26, .18);
  --accent: #f04e12;
  --accent-2: #d99a00;
  --accent-ink: #ffffff;
  --dot: #d8d4cb;
  --glass: rgba(246, 244, 239, .72);
  --shadow: 0 30px 80px -24px rgba(18, 20, 26, .28);
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
kbd {
  font-family: var(--font-mono); font-size: .72em; padding: .15em .45em; border-radius: 6px;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); line-height: 1;
}
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.mono { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .02em; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: .98;
}
.eyebrow {
  color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-size: .72rem;
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px;
}
.lede { font-size: clamp(1rem, 1.15vw, 1.1rem); line-height: 1.6; color: var(--text-2); max-width: 58ch; }
.h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4.2vw, 3.4rem); letter-spacing: -.025em; line-height: 1.02; }
.h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; letter-spacing: -.015em; line-height: 1.15; }
.section { padding: clamp(72px, 10vw, 140px) 0; }
.section-alt { background: var(--bg-2); }
.section-tight { padding-top: 24px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: clamp(32px, 5vw, 64px); }
.section-head .link-arrow { margin-bottom: 6px; white-space: nowrap; }
.link-arrow { font-weight: 500; color: var(--text); display: inline-flex; align-items: center; gap: 8px; position: relative; }
.link-arrow span { display: inline-block; transition: transform .3s var(--ease-out); }
.link-arrow::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 1px; background: currentColor; transform: scaleX(.3); transform-origin: left; opacity: .4; transition: transform .35s var(--ease-out), opacity .35s; }
.link-arrow:hover::after { transform: scaleX(1); opacity: 1; }
.link-arrow:hover span { transform: translateX(5px); }

/* ---------- buttons ---------- */
.btn {
  --pad: 14px 22px;
  display: inline-flex; align-items: center; gap: 10px; padding: var(--pad); border-radius: 999px;
  font-weight: 600; font-size: .95rem; line-height: 1; letter-spacing: -.005em;
  transition: transform .25s var(--ease-out), background-color .25s, color .25s, border-color .25s, box-shadow .25s;
  will-change: transform; position: relative; isolation: isolate; overflow: hidden;
}
.btn svg { transition: transform .3s var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary::before {
  content: ""; position: absolute; inset: 0; background: var(--accent); z-index: -1;
  transform: translateY(101%); border-radius: inherit; transition: transform .4s var(--ease-out);
}
.btn-primary:hover { color: var(--accent-ink); }
.btn-primary:hover::before { transform: translateY(0); }
.btn-primary[disabled] { opacity: .6; pointer-events: none; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text); }

/* ---------- cursor + progress ---------- */
@property --s { syntax: "<number>"; inherits: false; initial-value: .5; }
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor {
    display: block; position: fixed; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%;
    border: 1.5px solid var(--accent); pointer-events: none; z-index: 9999; opacity: 0;
    transform: translate(var(--x, -100px), var(--y, -100px)) translate(-50%, -50%) scale(var(--s));
    transition: opacity .25s, --s .25s var(--ease-out), background-color .25s, border-color .25s;
    mix-blend-mode: difference;
  }
  .cursor.is-on { opacity: .9; --s: 1; }
  .cursor.is-hover { --s: 1.9; background: rgba(255, 90, 31, .18); border-color: transparent; }
  .cursor.is-down { --s: .75; }
}
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); z-index: 1001; pointer-events: none; }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 900; height: var(--nav-h); display: flex; align-items: center; transition: background-color .35s, border-color .35s, backdrop-filter .35s, height .35s var(--ease); }
.nav.is-scrolled { height: 60px; background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: -.02em; }
.brand-name { font-family: var(--font-display); font-size: 1.05rem; }
.brand-dot { color: var(--accent); }
.nav-links { display: flex; gap: 6px; }
.nav-links a { padding: 8px 14px; border-radius: 999px; font-size: .92rem; font-weight: 500; color: var(--text-2); transition: color .2s, background-color .2s; }
.nav-links a:hover, .nav-links a.is-active { color: var(--text); background: var(--surface); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.theme-btn, .menu-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: inline-grid; place-items: center; transition: border-color .2s, transform .3s var(--ease-out); }
.theme-btn:hover, .menu-btn:hover { border-color: var(--line-2); transform: rotate(-12deg); }
.theme-icon { display: grid; }
.theme-icon svg { grid-area: 1 / 1; transition: transform .45s var(--ease-out), opacity .3s; }
.i-moon { opacity: 0; transform: rotate(90deg) scale(.6); }
[data-theme="light"] .i-sun { opacity: 0; transform: rotate(-90deg) scale(.6); }
[data-theme="light"] .i-moon { opacity: 1; transform: none; }
.menu-btn { display: none; position: relative; }
.menu-btn span { position: absolute; width: 16px; height: 1.6px; background: currentColor; transition: transform .35s var(--ease-out); }
.menu-btn span:first-child { transform: translateY(-3px); }
.menu-btn span:last-child { transform: translateY(3px); }
body.menu-open .menu-btn span:first-child { transform: rotate(45deg); }
body.menu-open .menu-btn span:last-child { transform: rotate(-45deg); }

/* the mark */
.mark .d { fill: var(--dot); transition: fill .4s, transform .5s var(--ease-out); transform-origin: center; transform-box: fill-box; }
.mark .d.on { fill: var(--accent); }
.mark .s { stroke: var(--accent); }
.brand:hover .mark .d { fill: var(--accent); }
.brand:hover .mark .d:nth-child(2n) { transform: scale(1.35); }
.brand:hover .mark .d:nth-child(2n+1) { transform: scale(.7); }
[data-theme="light"] .mark .d { fill: #cfcbc2; }
[data-theme="light"] .mark .d.on { fill: var(--accent); }

/* mobile menu */
.menu { position: fixed; inset: 0; z-index: 850; background: var(--bg); clip-path: circle(0 at calc(100% - 44px) 36px); transition: clip-path .7s var(--ease-out); pointer-events: none; }
body.menu-open .menu { clip-path: circle(150% at calc(100% - 44px) 36px); pointer-events: auto; }
.menu-inner { padding-top: 120px; display: flex; flex-direction: column; min-height: 100%; gap: 40px; }
.menu-links a { display: flex; align-items: baseline; gap: 18px; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 11vw, 4.5rem); letter-spacing: -.025em; line-height: 1.05; padding: 10px 0; border-bottom: 1px solid var(--line); transform: translateY(20px); opacity: 0; transition: transform .6s var(--ease-out), opacity .6s; }
.menu-links a .mono { color: var(--accent); font-size: .8rem; }
body.menu-open .menu-links a { transform: none; opacity: 1; }
body.menu-open .menu-links a:nth-child(2) { transition-delay: .06s; }
body.menu-open .menu-links a:nth-child(3) { transition-delay: .12s; }
body.menu-open .menu-links a:nth-child(4) { transition-delay: .18s; }
.menu-foot { display: flex; flex-wrap: wrap; gap: 20px; color: var(--muted); padding-bottom: 40px; }

/* ---------- photo treatment (shared by photos and cards) ---------- */
.photo-grain { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .18; mix-blend-mode: overlay; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E"); }
.sheen { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .4s; mix-blend-mode: soft-light; background: radial-gradient(farthest-corner circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 45%); }
[data-tilt]:hover .sheen { opacity: 1; }
[data-tilt] { transition: transform .35s var(--ease-out), border-color .3s, box-shadow .45s var(--ease-out); will-change: transform; transform-style: preserve-3d; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--nav-h) + 40px) 0 80px; overflow: hidden; }
.dotfield { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.hero-eyebrow .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 31, .6); } 70% { box-shadow: 0 0 0 12px rgba(255, 90, 31, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 31, 0); } }
.hero-title { font-size: clamp(2.8rem, 6.2vw, 5.6rem); margin: 0 0 28px; }
.line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.line-in { display: block; transform: translateY(110%); animation: lineIn 1s var(--ease-out) forwards; }
.line:nth-child(2) .line-in { animation-delay: .1s; }
.line:nth-child(3) .line-in { animation-delay: .2s; }
@keyframes lineIn { to { transform: none; } }
.swap { color: var(--accent); position: relative; display: inline-block; white-space: nowrap; }
.swap::after { content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .06em; background: currentColor; opacity: .35; transform: scaleX(1); transform-origin: left; }
.swap.is-swapping::after { animation: swapLine .55s var(--ease-out); }
@keyframes swapLine { 0% { transform: scaleX(0); } 100% { transform: scaleX(1); } }
.hero-lede { margin-bottom: 36px; opacity: 0; animation: fadeUp .9s var(--ease-out) .5s forwards; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; opacity: 0; animation: fadeUp .9s var(--ease-out) .65s forwards; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 44px; color: var(--muted); opacity: 0; animation: fadeUp .9s var(--ease-out) .8s forwards; }
.facts li { position: relative; padding-left: 14px; }
.facts li::before { content: ""; position: absolute; left: 0; top: .55em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.hero-visual { position: relative; width: 100%; max-width: 580px; justify-self: end; opacity: 0; animation: fadeUp 1.1s var(--ease-out) .35s forwards; }
.photo-card {
  position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 5; background: var(--surface);
  border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.photo-card::before { content: ""; position: absolute; inset: -30%; background: radial-gradient(closest-side, var(--accent), transparent 70%); opacity: .35; filter: blur(50px); z-index: 0; transform: translate(20%, 30%); }
.photo-card img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: center top; filter: saturate(.95) contrast(1.04); }
.photo-tag { position: absolute; z-index: 3; left: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 12px; background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--line); color: var(--text); }
.photo-card-sm { aspect-ratio: 4 / 5; }
/* A monochrome print on a white ground: keep it crisp, soften the white a touch so it sits in the dark UI. */
.photo-card-print { background: #f2f0eb; border-color: color-mix(in srgb, var(--accent) 30%, var(--line-2)); }
.photo-card-print::before { opacity: .5; transform: translate(25%, 35%); }
.photo-card-print img { object-position: center 30%; filter: grayscale(1) contrast(1.06) brightness(.97) sepia(.05); }
.photo-card-print .photo-grain { opacity: .22; }
.photo-card-print .photo-tag { background: rgba(10, 11, 15, .78); color: #f3f2ee; border-color: rgba(255, 255, 255, .12); }
.photo-card-print .photo-tag .muted { color: #b7bcc7; }
[data-theme="light"] .photo-card-print { background: #fff; }
.hero-chip {
  position: absolute; z-index: 4; display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); color: var(--muted);
}
.hero-chip .chip-num { font-family: var(--font-display); font-weight: 700; font-size: 2rem; letter-spacing: -.04em; line-height: 1; color: var(--text); }
.hero-chip-a { left: -28px; top: 14%; animation: float 7s ease-in-out infinite; }
.hero-chip-b { right: -20px; bottom: 16%; animation: float 8s ease-in-out infinite reverse; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .2em; font-size: .62rem; opacity: 0; animation: fadeUp 1s var(--ease-out) 1.4s forwards; }
.scroll-cue span { width: 1px; height: 38px; background: linear-gradient(var(--accent), transparent); animation: cue 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- cards ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.bento .card.is-lg { grid-column: span 8; }
.bento .card.is-md { grid-column: span 6; }
.bento .card.is-sm { grid-column: span 4; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--r); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); isolation: isolate;
}
.card:hover { border-color: color-mix(in srgb, var(--brand) 70%, var(--line-2)); box-shadow: var(--shadow), 0 0 0 1px color-mix(in srgb, var(--brand) 25%, transparent); }
.card.is-hidden { display: none; }
.card-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); flex: 1 1 auto; min-height: 0; }
.card.is-lg .card-cover { aspect-ratio: 16 / 8.2; }
.card-cover img { width: 103%; max-width: none; height: 100%; object-fit: cover; object-position: left top; transition: transform .8s var(--ease-out), filter .5s; filter: saturate(.9); }
.card:hover .card-cover img { transform: scale(1.05); filter: saturate(1.05); }
.card-cover .photo-grain { opacity: .14; }
.tile { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 78%, #000) 0%, var(--brand) 70%, color-mix(in srgb, var(--brand) 70%, #fff) 130%); overflow: hidden; }
.tile-mono { position: relative; z-index: 1; font-family: var(--font-display); font-weight: 800; letter-spacing: -.07em; font-size: clamp(5rem, 14vw, 9rem); line-height: 1; color: #fff; opacity: .16; transform: translateY(6%); transition: transform .7s var(--ease-out), opacity .5s; mix-blend-mode: overlay; }
.card:hover .tile-mono { transform: translateY(0) scale(1.06); opacity: .28; }
.tile-grid { position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(255, 255, 255, .55) 1.4px, transparent 1.6px); background-size: 22px 22px; opacity: .22; -webkit-mask-image: radial-gradient(ellipse at 30% 20%, #000, transparent 70%); mask-image: radial-gradient(ellipse at 30% 20%, #000, transparent 70%); transition: opacity .5s, transform .9s var(--ease-out); }
.card:hover .tile-grid { opacity: .4; transform: scale(1.08); }
.tile-lg .tile-mono { font-size: clamp(7rem, 22vw, 16rem); }
.card-status { position: absolute; z-index: 3; left: 14px; top: 14px; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: var(--glass); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid var(--line); color: var(--text); display: inline-flex; align-items: center; gap: 7px; }
.card-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.status-live::before { background: #2ecc71; box-shadow: 0 0 8px #2ecc71; }
.status-building::before { background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); }
.status-paused::before { background: #8a90a0; }
.status-retired::before { background: #6b7180; }
.card-body { position: relative; z-index: 1; padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 0 0 auto; }
.card-top { display: flex; justify-content: space-between; color: var(--muted); }
.card-title { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; letter-spacing: -.02em; line-height: 1.1; display: flex; align-items: center; gap: 10px; }
.card.is-lg .card-title { font-size: 2rem; }
.card-arrow { display: inline-block; opacity: 0; transform: translateX(-6px); transition: transform .35s var(--ease-out), opacity .3s; color: var(--brand); }
.card:hover .card-arrow { opacity: 1; transform: none; }
.card-tagline { color: var(--text-2); font-size: .9rem; line-height: 1.5; max-width: 52ch; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; }
.card-tags li { padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: .68rem; }

/* ---------- board: one dot per project ---------- */
.board { padding: clamp(72px, 10vw, 140px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.board-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.board-copy .h2 { margin-bottom: 18px; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.ldot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.ldot.status-live { background: #2ecc71; }
.ldot.status-building { background: var(--accent-2); }
.ldot.status-paused { background: #8a90a0; }
.ldot.status-retired { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.pdot { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; transition: background-color .25s; }
.pdot::before { content: ""; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); transition: transform .4s var(--ease-out), box-shadow .3s, opacity .3s; transform: scale(0); opacity: 0; }
html.js .dots.in .pdot::before { transform: scale(1); opacity: 1; transition-delay: calc(var(--i) * 28ms); }
html:not(.js) .pdot::before { transform: scale(1); opacity: 1; }
.pdot.is-building::before { background: color-mix(in srgb, var(--brand) 70%, var(--surface)); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4.5px var(--brand); }
.pdot.is-paused::before { background: color-mix(in srgb, var(--brand) 40%, var(--surface)); }
.pdot.is-retired::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.pdot::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translate(-50%, 6px); white-space: nowrap; padding: 6px 10px; border-radius: 8px; background: var(--text); color: var(--bg); font-family: var(--font-mono); font-size: .68rem; letter-spacing: .02em; opacity: 0; pointer-events: none; transition: opacity .2s, transform .3s var(--ease-out); z-index: 5; }
.pdot:hover { background: var(--surface-2); }
.pdot:hover::before, .pdot:focus-visible::before { transform: scale(1.7) !important; transition-delay: 0s !important; box-shadow: 0 0 22px var(--brand); }
.pdot:hover::after, .pdot:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }

/* ---------- about teaser / now / principles ---------- */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.about-copy .h2 { margin-bottom: 20px; }
.about-copy .lede { margin-bottom: 32px; }
.principles { display: grid; gap: 14px; margin-bottom: 32px; }
.principles li { display: grid; gap: 4px; padding: 16px 0; border-top: 1px solid var(--line); }
.principles strong { font-weight: 600; }
.principles span { color: var(--muted); font-size: .95rem; }
.now-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.now-list { display: grid; }
.now-list li { display: flex; align-items: center; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 1.05rem; font-weight: 500; letter-spacing: -.01em; }
.now-list li:last-child { border-bottom: 1px solid var(--line); }
.now-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.stack-list { display: flex; flex-wrap: wrap; gap: 10px; }
.stack-list li { padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); font-size: .82rem; transition: border-color .2s, color .2s, transform .3s var(--ease-out); }
.stack-list li:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.principle-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.principle { padding: 28px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 12px; }
.principle p { color: var(--text-2); }
.principle-n { color: var(--accent); }
.timeline { display: grid; margin-top: 24px; }
.era { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.era:last-child { border-bottom: 1px solid var(--line); }
.era-when { color: var(--accent); padding-top: 6px; }
.era p { color: var(--text-2); margin-top: 8px; max-width: 62ch; }

/* ---------- contact ---------- */
.contact-portrait { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: center 20%; border: 2px solid var(--line-2); margin-bottom: 22px; filter: grayscale(1) contrast(1.05); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent); }
.contact { padding: clamp(96px, 12vw, 180px) 0; position: relative; overflow: hidden; }
.contact::before { content: ""; position: absolute; inset: auto -20% -60% -20%; height: 120%; background: radial-gradient(ellipse at 30% 100%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%); pointer-events: none; }
.contact-page { min-height: 80svh; display: flex; align-items: center; padding-top: calc(var(--nav-h) + 48px); }
.contact-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.contact-title { font-size: clamp(4rem, 12vw, 9rem); margin-bottom: 20px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 36px; color: var(--muted); }
.contact-links a:hover { color: var(--text); }
.cform { display: grid; gap: 22px; padding: 32px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.cform-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: grid; gap: 8px; }
.field > .mono { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: .66rem; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--line-2);
  padding: 10px 0 12px; outline: 0; border-radius: 0; transition: border-color .25s; resize: vertical; min-height: 0;
}
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field:focus-within > .mono { color: var(--accent); }
.cform-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cform-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cform-status { color: var(--muted); min-height: 1em; }
.cform-status.is-error { color: var(--accent); }
.cform-error { color: var(--accent); margin-bottom: 16px; }
.cform-done { display: grid; gap: 16px; padding: 40px 32px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); justify-items: start; }
.cform-done p { font-size: 1.05rem; color: var(--text-2); }
.cform-check { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); position: relative; }
.cform-check::after { content: ""; position: absolute; left: 15px; top: 11px; width: 10px; height: 18px; border: solid var(--accent-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.cform.is-sent { display: none; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: clamp(56px, 8vw, 96px) 0 28px; background: var(--bg-2); overflow: hidden; }
.footer-top { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; padding-bottom: clamp(40px, 5vw, 64px); }
.footer-cta { display: grid; gap: 10px; color: var(--muted); }
.footer-cta-line { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4.4vw, 3.6rem); letter-spacing: -.025em; line-height: 1; color: var(--text); display: inline-flex; align-items: center; gap: 16px; }
.footer-cta-arrow { display: inline-block; color: var(--accent); transition: transform .4s var(--ease-out); }
.footer-cta:hover .footer-cta-arrow { transform: translateX(12px); }
.footer-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.footer-cols > div { display: grid; gap: 8px; align-content: start; font-size: .92rem; color: var(--text-2); }
.footer-cols a:hover { color: var(--accent); }
.footer-h { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: .66rem; margin-bottom: 6px; }
.footer-kbd { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: .82rem; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 22px; }
.footer-bottom-brand { display: inline-flex; align-items: center; gap: 12px; }
.footer-bottom-brand .mark { width: 32px; height: 21px; }
.totop:hover { color: var(--text); }
.totop span { display: inline-block; transition: transform .3s var(--ease-out); }
.totop:hover span { transform: translateY(-3px); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 1100; padding: 12px 18px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: .9rem; font-weight: 500; opacity: 0; transition: transform .35s var(--ease-out), opacity .3s; pointer-events: none; display: flex; gap: 14px; align-items: center; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

/* ---------- inner pages ---------- */
.page-hero { padding: calc(var(--nav-h) + clamp(40px, 8vw, 96px)) 0 clamp(32px, 6vw, 72px); }
.page-hero-tight { padding-bottom: 8px; }
.page-hero-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(32px, 6vw, 96px); align-items: end; }
.page-title { font-size: clamp(2.6rem, 6.2vw, 5.2rem); margin-bottom: 22px; max-width: 16ch; }
.page-hero .lede { margin-top: 8px; }
.about-hero-photo { max-width: 380px; justify-self: end; width: 100%; }
.prose-grid { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }
.sticky-label { position: sticky; top: 96px; }
.prose { max-width: 68ch; color: var(--text-2); font-size: 1rem; }
.prose-lg { font-size: clamp(1.05rem, 1.3vw, 1.2rem); line-height: 1.6; color: var(--text); }
.prose p { margin-bottom: 1.3em; }
.prose h2, .prose h3 { font-family: var(--font-display); color: var(--text); letter-spacing: -.02em; margin: 2em 0 .6em; line-height: 1.1; }
.prose h2 { font-size: 1.9rem; }
.prose h3 { font-size: 1.35rem; }
.prose ul { list-style: disc; padding-left: 1.2em; margin-bottom: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: var(--r); border: 1px solid var(--line); margin: 1.5em 0; }
.prose blockquote { margin: 1.6em 0; padding-left: 20px; border-left: 3px solid var(--accent); color: var(--text); font-size: 1.15em; }
.prose code { font-family: var(--font-mono); font-size: .85em; background: var(--surface-2); padding: .15em .4em; border-radius: 6px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.filter { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); font-weight: 500; font-size: .9rem; transition: background-color .25s, color .25s, border-color .25s, transform .3s var(--ease-out); }
.filter .mono { color: var(--muted); }
.filter:hover { transform: translateY(-2px); border-color: var(--text); color: var(--text); }
.filter.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.filter.is-active .mono { color: inherit; opacity: .7; }
.grid-empty { text-align: center; color: var(--muted); padding: 48px 0; }

/* project detail */
.project-hero { position: relative; padding: calc(var(--nav-h) + clamp(32px, 6vw, 72px)) 0 clamp(40px, 6vw, 80px); overflow: hidden; }
.project-wash { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(900px 500px at 75% 10%, color-mix(in srgb, var(--brand) 28%, transparent), transparent 70%); }
.back { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); margin-bottom: 40px; position: relative; }
.back:hover { color: var(--text); }
.project-hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.project-hero .eyebrow { gap: 14px; }
.project-hero .eyebrow .card-status { position: static; }
.meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 32px; margin-top: 36px; }
.meta dt { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: .66rem; margin-bottom: 6px; }
.meta dd { color: var(--text); font-size: .98rem; }
.meta dd a { color: var(--accent); }
.project-cover { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line-2); box-shadow: var(--shadow); background: var(--surface); }
.project-cover img { width: 103%; max-width: none; height: 100%; object-fit: cover; object-position: left top; }
.project-next { display: block; border-top: 1px solid var(--line); background: var(--bg-2); padding: clamp(56px, 8vw, 96px) 0; position: relative; overflow: hidden; }
.project-next::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 300px at 50% 120%, color-mix(in srgb, var(--brand) 30%, transparent), transparent 70%); opacity: 0; transition: opacity .5s; }
.project-next:hover::before { opacity: 1; }
.project-next-inner { position: relative; display: grid; gap: 12px; text-align: center; justify-items: center; color: var(--muted); }
.project-next-title { font-size: clamp(2.4rem, 7vw, 5.5rem); color: var(--text); }
.project-next-title span { display: inline-block; transition: transform .4s var(--ease-out); color: var(--brand); }
.project-next:hover .project-next-title span { transform: translateX(12px); }

.error-hero { min-height: 70svh; display: flex; align-items: center; }

/* ---------- reveal ---------- */
html.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); }
html.js [data-reveal].in { opacity: 1; transform: none; }
html.js .card[data-reveal] { transition: opacity .8s var(--ease-out), transform .9s var(--ease-out), border-color .3s, box-shadow .45s var(--ease-out); }
html.js .card[data-reveal].in { transition: transform .35s var(--ease-out), border-color .3s, box-shadow .45s var(--ease-out), opacity .35s; }
html.js .bento [data-reveal]:nth-child(2), html.js .grid [data-reveal]:nth-child(3n+2) { transition-delay: .08s; }
html.js .bento [data-reveal]:nth-child(3), html.js .grid [data-reveal]:nth-child(3n+3) { transition-delay: .16s; }
html.js .card[data-reveal].in { transition-delay: 0s; }

/* ---------- view transitions ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 220ms var(--ease) both vtOut; }
::view-transition-new(root) { animation: 320ms var(--ease-out) both vtIn; }
@keyframes vtOut { to { opacity: 0; } }
@keyframes vtIn { from { opacity: 0; transform: translateY(8px); } }
html.theming::view-transition-old(root), html.theming::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.theming::view-transition-old(root) { z-index: 1; }
html.theming::view-transition-new(root) { z-index: 2; }
.nav, .cursor, .progress { view-transition-name: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .bento .card.is-lg, .bento .card.is-md, .bento .card.is-sm { grid-column: span 6; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero-chip-a { left: -8px; }
  .hero-chip-b { right: -8px; }
  .board-grid { grid-template-columns: 1fr; }
  .dots { grid-template-columns: repeat(10, 1fr); }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-grid; }
  .hero { min-height: auto; padding-top: calc(var(--nav-h) + 24px); }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; max-width: 340px; }
  .hero-title { font-size: clamp(2.6rem, 11.5vw, 4.4rem); }
  .hero-chip-a { left: auto; right: -12px; top: 8%; }
  .hero-chip-b { right: -12px; left: auto; bottom: 26%; }
  .scroll-cue { display: none; }
  .about-grid, .now-grid, .page-hero-grid, .project-hero-grid, .prose-grid, .contact-grid, .footer-top { grid-template-columns: 1fr; }
  .about-photo { max-width: 320px; }
  .about-hero-photo { max-width: 300px; justify-self: start; }
  .sticky-label { position: static; }
  .principle-grid { grid-template-columns: 1fr; }
  .era { grid-template-columns: 1fr; gap: 8px; }
  .section-head { flex-direction: column; align-items: start; gap: 16px; }
  .dots { grid-template-columns: repeat(7, 1fr); padding: 18px; }
  .contact-page { min-height: auto; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .bento .card.is-lg, .bento .card.is-md, .bento .card.is-sm { grid-column: span 12; }
  .grid { grid-template-columns: 1fr; }
  .card.is-lg .card-cover { aspect-ratio: 16 / 10; }
  .card.is-lg .card-title { font-size: 1.45rem; }
  .meta { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .hero-chip { padding: 10px 14px; }
  .hero-chip .chip-num { font-size: 1.5rem; }
  .cform { padding: 22px; }
  .cform-row { grid-template-columns: 1fr; }
  .dots { grid-template-columns: repeat(6, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  html.js [data-reveal] { opacity: 1; transform: none; }
  .line-in, .hero-lede, .cta-row, .facts, .hero-visual, .scroll-cue { opacity: 1; transform: none; }
  .pdot::before { transform: scale(1); opacity: 1; }
}
