:root {
  --ink: #1a1d1b;
  --muted: #6b7068;
  --soft: #93a58f;
  --soft-2: #e8e5df;
  --accent: #c5ff57;
  --line: rgba(60, 65, 58, 0.1);
  --paper: #fafaf8;
  --paper-2: #e8e5df;
  --panel: rgba(255, 255, 255, 0.65);
  --shadow: 0 18px 60px rgba(20, 24, 18, 0.05);
  --shadow-hover: 0 8px 28px rgba(20, 24, 18, 0.1);
  --radius: 10px;
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.1, 0.64, 1);
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --handwriting: 'Caveat', cursive;
  font-family: 'Inter', 'Noto Sans SC', ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(50, 55, 48, 0.012) 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(rgba(50, 55, 48, 0.009) 1px, transparent 1px) 0 0 / 96px 96px,
    var(--paper);
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

/* ── Header ─────────────────────────────────── */

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  height: 72px;
  padding: 0 52px;
  pointer-events: none;
}

.site-header a,
.site-header .time-place {
  pointer-events: auto;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo {
  font-family: 'Inter', ui-sans-serif, sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-optical-sizing: auto;
}

.brand-mark i,
.time-place b,
.focus-heading i,
.log-folder-item--current small i,
.subpage-tag--current i,
.portal-grid p i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(197, 255, 87, 0.6);
  display: inline-block;
  flex-shrink: 0;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 44px;
  font-size: 13px;
  font-weight: 600;
}

.top-nav a {
  position: relative;
  padding: 10px 0;
  color: var(--muted);
  transition: color 200ms var(--ease-out);
}

.top-nav a.active,
.top-nav a:hover { color: var(--ink); }

.top-nav a.active::after {
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 2px;
  content: "";
  background: var(--soft);
  border-radius: 1px;
}

.time-place {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.time-place b {
  width: 6px;
  height: 6px;
  background: var(--soft);
  box-shadow: 0 0 6px rgba(147, 165, 143, 0.5);
  border-radius: 999px;
  display: inline-block;
  opacity: 1;
}

/* ── Scroll story ─────────────────────────────── */

.scroll-story {
  height: 430vh;
  min-height: 3000px;
}

.story-sticky {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-columns: 52fr 48fr;
  height: 100vh;
  min-height: 720px;
  overflow: hidden;
}

/* ── LEFT: morphs hero → demo ────────────────── */

.story-left {
  position: relative;
  padding: 100px 40px 64px 64px;
}

/* Both blocks overlap and crossfade via JS-set opacity */
.hero-block,
.demo-block {
  position: absolute;
  top: 50%;
  left: 64px;
  right: 40px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  will-change: opacity, transform;
}

.demo-block {
  opacity: 0;
  pointer-events: none;
}

.hero-wordmark {
  margin: 0 0 20px;
  font-size: clamp(72px, 10vw, 148px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.88;
  color: var(--ink);
}

.hero-sub {
  margin: 0 0 26px;
  font-size: clamp(13px, 1.2vw, 16px);
  color: var(--muted);
  line-height: 1.7;
  font-weight: 400;
}

.tablet-project-index {
  display: none;
}

.mobile-projects {
  display: none;
}

/* identity: who / what role / what background — the 30-second answer */
.hero-identity { margin: 0 0 34px; }

.hero-name {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--soft);
  letter-spacing: 0.04em;
}

.hero-status i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(197, 255, 87, 0.7);
}

.hero-cv-link {
  margin-left: 4px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(24, 28, 24, 0.3);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--soft);
  letter-spacing: 0;
  white-space: nowrap;
  transition: color 180ms var(--ease-out), border-color 180ms var(--ease-out);
}

.hero-cv-link:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.hero-role {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.7;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

.hero-cta--ghost {
  border-bottom-color: transparent;
  color: var(--muted);
}

.hero-cta--ghost:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1.5px solid var(--ink);
  transition: color 200ms var(--ease-out), border-color 200ms var(--ease-out);
  align-self: flex-start;
}

.hero-cta:hover {
  color: var(--soft);
  border-color: var(--soft);
}

.hero-cta-arrow {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  transition: transform 200ms var(--ease-spring);
}

.hero-cta:hover .hero-cta-arrow {
  transform: translateX(4px);
}

.hero-note {
  margin-top: 56px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  color: var(--soft);
  font-family: var(--handwriting);
  font-size: 19px;
  line-height: 1;
  opacity: 0.75;
  pointer-events: none;
  align-self: flex-start;
}

.hero-note svg {
  flex-shrink: 0;
  margin-bottom: 4px;
}

/* ── Demo panel (browse state) — vertical carousel ─ */

/* window slightly taller than one card; edges soften the sliding cards */
.demo-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 12;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 7%, #000 93%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 7%, #000 93%, transparent 100%);
}

.demo-slide { will-change: opacity; }

.demo-strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 56px;                     /* DEMO_GAP — kept in sync with script.js */
  will-change: transform;
}

.demo-slide {
  flex: 0 0 auto;
  position: relative;
  aspect-ratio: 16 / 10;         /* each card = one window tall */
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #efefe9, #e4e4dd);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.demo-proj-tag {
  position: absolute;
  top: 16px;
  left: 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.demo-cover {
  max-width: 58%;
  max-height: 74%;
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(20, 24, 18, 0.14);
  display: block;
  object-fit: contain;
}

.demo-cover--landscape {
  width: 94%;
  max-width: 94%;
  max-height: 86%;
  border-radius: 8px;
}

.demo-cover--round,
.cf-cover--round {
  border-radius: 50%;
  clip-path: circle(49.6% at 50% 50%);
}

.demo-cta {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  align-self: flex-start;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out), border-color 200ms var(--ease-out);
}

.demo-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(147, 165, 143, 0.4);
}

.demo-cta-ic { color: var(--soft); }
.demo-cta-arrow { transition: transform 200ms var(--ease-spring); }
.demo-cta:hover .demo-cta-arrow { transform: translateX(4px); }

/* ── RIGHT: Disc + track ─────────────────────── */

.story-right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* "in progress" handwritten annotation, top-right of disc */
.annot-inprogress {
  position: absolute;
  top: 18%;
  right: 6%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: var(--soft);
  font-family: var(--handwriting);
  font-size: 16px;
  line-height: 1;
  pointer-events: none;
  opacity: 0.7;
  z-index: 4;
}

.orbit-wrap {
  position: relative;
  width: min(96vh, 118%);
  height: min(96vh, 118%);
  flex-shrink: 0;
  margin-left: 0;
  will-change: transform, opacity;
}

.dial {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.record-disc {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.9;
}

/* Full-size layer; JS positions each item along the ring's left arc */
.project-track {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.track-item {
  position: absolute;
  left: 0;
  top: 0;
  /* (left,top) set by JS = the item's right-middle anchor point on the arc */
  transform: translate(-100%, -50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 3px;
  cursor: pointer;
  pointer-events: auto;
  will-change: left, top, opacity;
}

.track-item.active { opacity: 1 !important; }

.track-num {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1;
  transition: color 320ms var(--ease-out);
}

.track-item.active .track-num { color: var(--soft); }

.track-text {
  position: relative;
}

.track-text strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  white-space: nowrap;
  letter-spacing: -0.01em;
  transition: font-size 320ms var(--ease-out), font-weight 320ms var(--ease-out);
}

.track-item.active .track-text strong {
  font-size: 26px;
  font-weight: 700;
}

/* subtitle overlays below the title (no layout shift), shown only when active */
.track-text span {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 320ms var(--ease-out);
}

.track-item.active .track-text span { opacity: 1; }

.track-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--paper), 0 0 12px rgba(197, 255, 87, 0.7);
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transition: top 420ms var(--ease-spring), left 420ms var(--ease-spring), opacity 240ms var(--ease-out);
}

.track-dot.is-on { opacity: 1; }

/* ── Disc center thumbnail (browse only) ─────── */

.disc-thumb {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 35%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 34%, rgba(197, 255, 87, 0.35), transparent 55%),
    radial-gradient(circle at 66% 70%, rgba(147, 165, 143, 0.55), transparent 60%),
    linear-gradient(140deg, #cdd8bf, #93a58f);
  filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity 300ms var(--ease-out);
  box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.4);
}

/* ── Selected-project wedge — SVG annular sector ─ */

.project-wedge {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 240ms var(--ease-out);
}

.project-wedge path {
  filter: drop-shadow(0 14px 40px rgba(20, 24, 18, 0.08));
}

.disc-thumb.is-on   { opacity: 0.85; }
.project-wedge.is-on { opacity: 1; }

/* when a real project cover is set, show it sharp instead of the blurred blob */
.disc-thumb.has-cover {
  background-size: 108%;          /* slight zoom to trim the illustration's outer white padding */
  background-position: center;
  filter: none;
  box-shadow: inset 0 0 0 1px rgba(20, 24, 18, 0.05);  /* no white inner glow → no white halo */
}
.disc-thumb.has-cover.is-on { opacity: 1; }

/* ── Sticky note (bottom-right of disc area) ─── */

.sticky-note {
  position: absolute;
  bottom: 52px;
  right: 32px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--shadow);
  pointer-events: none;
  z-index: 4;
  min-width: 110px;
}

.sticky-tags {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sticky-tags li {
  font-family: var(--handwriting);
  font-size: 14px;
  color: var(--ink);
  line-height: 1.4;
}

.sticky-tags li::before {
  content: "•  ";
  color: var(--soft);
}

.sticky-star {
  display: block;
  font-size: 12px;
  color: var(--soft);
  opacity: 0.6;
}

/* ── Scroll hint ─────────────────────────────── */

.scroll-hint {
  position: absolute;
  left: 24px;
  bottom: 44px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
  z-index: 4;
}

.scroll-hint.is-hidden {
  opacity: 0;
  transform: translateY(-16px);
}

.scroll-hint > span { font-size: 18px; }

.scroll-hint p {
  margin: 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.5;
}

/* ── Portal grid ─────────────────────────────── */

.portal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 62vh;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.portal-grid article {
  min-height: 440px;
  padding: 42px 36px;
  border-right: 1px solid var(--line);
  transition: background 240ms var(--ease-out);
  cursor: default;
}

.portal-grid article:last-child { border-right: 0; }

.portal-grid article:hover {
  background: rgba(141, 173, 72, 0.04);
}

.portal-grid p {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
  font-family: var(--mono);
  color: var(--muted);
  font-size: 12px;
}

.portal-grid h2 { margin: 0 0 14px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }

.portal-grid > article > span {
  display: block;
  max-width: 230px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}

/* ── Experiments ── */

.exp-grid {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exp-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out), border-color 200ms var(--ease-out);
}

.exp-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(141, 173, 72, 0.3);
}

.exp-card:active {
  transform: translateY(0) scale(0.98);
}

.exp-card-meta strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.exp-card-meta em {
  font-style: normal;
  font-size: 10px;
  color: var(--muted);
}

.useless-preview {
  width: 34px;
  height: 34px;
  border: 2px solid #1a260f;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15), 2px 2px 0 #1a260f;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
}

.useless-preview b {
  width: 16px;
  height: 16px;
  background: var(--accent);
  border: 3px solid #5a7a1e;
  display: block;
}

.pet-preview {
  font-size: 14px;
  color: var(--muted);
  flex-shrink: 0;
}

.exp-card--more {
  justify-content: center;
  border-style: dashed;
  background: transparent;
  box-shadow: none;
  opacity: 0.55;
  padding: 10px;
}

.exp-card--more span {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

/* ── Thoughts ── */

.thought-stack {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.thought-loading {
  min-height: 156px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.45);
}
.thought-loading span {
  display: block;
  margin-bottom: 20px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  color: var(--muted);
}
.thought-loading i {
  display: block;
  overflow: hidden;
  position: relative;
  width: 86%;
  height: 11px;
  margin-top: 13px;
  border-radius: 3px;
  background: rgba(26, 29, 27, 0.07);
}
.thought-loading i:last-child { width: 62%; }
.thought-loading i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  transform: translateX(-100%);
  animation: cambium-loading 1.4s ease-in-out infinite;
}
@keyframes cambium-loading {
  to { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .thought-loading i::after { animation: none; }
}
.thought-empty {
  min-height: 100px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 12px;
}

.thought-card {
  padding: 16px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}

.thought-card:hover {
  transform: translateY(-2px) rotate(-0.3deg);
  box-shadow: var(--shadow-hover);
}

.thought-card--accent {
  background: #fdf9ec;
  border-color: rgba(141, 173, 72, 0.25);
}

.thought-card small {
  display: block;
  margin-top: 10px;
  font-size: 10px;
  color: var(--muted);
  font-family: ui-monospace, monospace;
}

.thought-more {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  display: inline-block;
  transition: color 200ms var(--ease-out);
}

.thought-more:hover { color: var(--ink); }

/* ── Logs / Archive folders ── */

.log-folders {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-folder-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 200ms var(--ease-out), border-color 200ms var(--ease-out), transform 200ms var(--ease-out);
}

.log-folder-item:hover {
  background: rgba(255, 255, 255, 0.65);
  border-color: var(--line);
  transform: translateX(3px);
}

.log-folder-icon {
  width: 44px;
  height: 34px;
  border-radius: 4px 8px 4px 4px;
  background: linear-gradient(160deg, #cbdc93, #9fb76a);
  position: relative;
  flex-shrink: 0;
}

.log-folder-icon::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 0;
  width: 18px;
  height: 6px;
  border-radius: 3px 6px 0 0;
  background: inherit;
}

.lf--2 { background: linear-gradient(160deg, #c4d0a8, #8fa078); }
.lf--3 { background: linear-gradient(160deg, #d4c898, #b0a070); }

/* current thesis: same folder form, subtly emphasised */
.lf--current { background: linear-gradient(160deg, #d8ff8f, #a8e34f); }

.log-folder-item--current {
  background: rgba(197, 255, 87, 0.06);
  border-color: rgba(147, 165, 143, 0.18);
}

.log-folder-item--current:hover {
  background: rgba(197, 255, 87, 0.1);
}

.log-folder-item--current .log-folder-info small {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  color: var(--soft);
}

.log-folder-info strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.log-folder-info small {
  font-size: 11px;
  color: var(--muted);
}

/* ── About ── */

.about-section {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 4px;
  background: linear-gradient(135deg, #b7b8ad, #31352e);
}

.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-photo-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.5);
}

.about-note {
  padding: 16px;
  background: #fdf9ec;
  border-radius: 4px;
}

.about-name {
  display: block;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.about-role {
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--soft);
}

.about-bio p {
  margin: 0 0 9px;
  font-size: 12.5px;
  line-height: 1.75;
  color: #3a3f36;
}

.about-sign {
  display: block;
  margin: 12px 0 10px;
  font-family: var(--handwriting);
  font-size: 17px;
  color: var(--soft);
}

.about-note blockquote {
  margin: 0 0 12px;
  padding: 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink);
  font-style: italic;
  border: none;
}

.about-note small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-family: ui-monospace, monospace;
  margin-bottom: 10px;
}

.about-contact {
  font-size: 12px;
  font-weight: 700;
  color: var(--soft);
  transition: opacity 200ms var(--ease-out);
}

.about-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.about-cv-link {
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(24, 28, 24, 0.28);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  transition: opacity 200ms var(--ease-out), border-color 200ms var(--ease-out);
}

.about-cv-link:hover {
  opacity: 0.7;
  border-bottom-color: var(--ink);
}

.about-contact:hover { opacity: 0.7; }

/* ── Contact dialog ─────────────────────────── */

.contact-dialog {
  width: min(520px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(20, 24, 18, 0.28);
}

.contact-dialog[open] {
  animation: contact-dialog-in 180ms var(--ease-out);
}

.contact-dialog::backdrop {
  background: rgba(18, 21, 18, 0.54);
  backdrop-filter: blur(5px);
  animation: contact-backdrop-in 160ms ease-out;
}

.contact-dialog-panel {
  padding: 28px;
}

.contact-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
}

.contact-dialog-head p {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--soft);
}

.contact-dialog-head h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1;
}

.contact-dialog-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: transform 100ms ease-out, background 100ms ease-out;
}

.contact-dialog-close:hover {
  background: rgba(26, 29, 27, 0.06);
  transform: rotate(5deg);
}

.contact-dialog-close:active,
.contact-copy:active {
  transform: scale(0.97);
}

.contact-list {
  border-top: 1px solid var(--line);
}

.contact-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 72px;
  border-bottom: 1px solid var(--line);
}

.contact-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.contact-row strong {
  min-width: 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.contact-copy {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  cursor: pointer;
  transition: transform 100ms ease-out, border-color 120ms ease-out, background 120ms ease-out;
}

.contact-copy:hover {
  border-color: rgba(147, 165, 143, 0.68);
  background: rgba(197, 255, 87, 0.12);
}

.contact-copy svg {
  grid-area: 1 / 1;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 100ms ease-out, transform 140ms var(--ease-out);
}

.contact-check-icon {
  opacity: 0;
  transform: scale(0.72);
}

.contact-copy.is-copied {
  border-color: var(--soft);
  background: rgba(197, 255, 87, 0.24);
}

.contact-copy.is-copied .contact-copy-icon {
  opacity: 0;
  transform: scale(0.72);
}

.contact-copy.is-copied .contact-check-icon {
  opacity: 1;
  transform: scale(1);
}

.contact-status {
  min-height: 18px;
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

@keyframes contact-dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes contact-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 560px) {
  .contact-dialog-panel { padding: 22px 18px 18px; }
  .contact-dialog-head h2 { font-size: 27px; }
  .contact-row {
    grid-template-columns: 44px minmax(0, 1fr) 38px;
    gap: 12px;
    padding: 14px 0;
  }
}

/* ── Scroll reveal ───────────────────────────── */

.reveal-item {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 550ms var(--ease-out), transform 550ms var(--ease-out);
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Footer ──────────────────────────────────── */

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1.35fr 0.7fr auto;
  gap: 52px;
  min-height: 260px;
  padding: 44px 64px 36px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px) 0 0 / 96px 96px,
    #060907;
  color: rgba(251, 250, 246, 0.82);
}

.site-footer > * {
  min-width: 0;
}

.site-footer h3 {
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 14px;
}

.site-footer p,
.site-footer a {
  display: block;
  margin: 0 0 10px;
  font-size: 13px;
}

.terminal-card {
  position: relative;
  min-height: 160px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.terminal-card pre {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.85;
  color: rgba(251, 250, 246, 0.75);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.terminal-orbit {
  position: absolute;
  right: 36px;
  top: 30px;
  width: 130px;
  height: 110px;
  border-radius: 50%;
  border: 1px solid rgba(197, 255, 87, 0.25);
}

.terminal-orbit i {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(197, 255, 87, 0.7);
}

.terminal-orbit i:nth-child(1) { left: 38%; top: 8%; }
.terminal-orbit i:nth-child(2) { left: 18%; top: 58%; }
.terminal-orbit i:nth-child(3) { right: 16%; bottom: 18%; }

.footer-quote {
  align-self: start;
  padding: 24px 28px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  min-width: 150px;
}

.footer-quote p {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(251, 250, 246, 0.9);
  display: block;
}

.footer-smile {
  display: block;
  font-size: 18px;
  margin-bottom: 16px;
  color: rgba(251, 250, 246, 0.5);
}

.footer-quote small {
  font-size: 11px;
  color: rgba(251, 250, 246, 0.35);
}

/* ── Case File overlay ───────────────────────── */

.casefile {
  position: fixed;
  inset: 0;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms var(--ease-out);
}

.casefile.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cf-scrim {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(248, 248, 245, 0.86);
  backdrop-filter: blur(8px);
}

.cf-panel {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 34% 66%;
  padding: 92px 64px 56px;
  gap: 0;
}

/* demo column: the frame itself FLIPs in from the browse view (JS-driven) */
.cf-demo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
  padding-right: 40px;
}

/* tag + back button fade in; the frame animates via FLIP */
.cf-tag,
.cf-back {
  opacity: 0;
  transition: opacity 300ms var(--ease-out) 220ms;
}

.casefile.is-open .cf-tag,
.casefile.is-open .cf-back { opacity: 1; }

.cf-demo-frame {
  transform-origin: top left;
  will-change: transform;
}

.cf-tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.cf-demo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;   /* match the browse demo so the FLIP scales uniformly */
  border-radius: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #efefe9, #e3e3dc);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.cf-cover {
  max-width: 62%;
  max-height: 78%;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(20, 24, 18, 0.14);
  display: block;
  object-fit: contain;
}

.cf-video--landscape {
  width: 94%;
  max-width: 94%;
  max-height: 88%;
  border-radius: 8px;
}

.cf-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: transform 200ms var(--ease-out), border-color 200ms var(--ease-out);
}

.cf-back:hover {
  transform: translateX(-3px);
  border-color: rgba(147, 165, 143, 0.5);
}

.cf-back--fixed {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 4;
  background: rgba(248, 248, 245, 0.96);
  box-shadow: 0 8px 24px rgba(26, 29, 27, 0.12);
  backdrop-filter: blur(10px);
}

.cf-back--fixed:active {
  transform: translateX(-1px) scale(0.98);
}

.cf-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cf-gh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out), border-color 200ms var(--ease-out);
}

.cf-gh:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(147, 165, 143, 0.5);
}

.cf-gh svg { display: block; }
.cf-gh-arrow { color: var(--muted); }

/* primary CTA: open the full case-study page */
.cf-full {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: 12px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid rgba(147, 165, 143, 0.5);
  background: rgba(197, 255, 87, 0.1);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out), background 200ms var(--ease-out);
}
.cf-full span { transition: transform 200ms var(--ease-spring); }
.cf-full:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  background: rgba(197, 255, 87, 0.18);
}
.cf-full:hover span { transform: translateX(4px); }

/* connecting lines layer sits above the columns */
.cf-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
  opacity: 0;
  transition: opacity 240ms var(--ease-out);
}

.casefile.cf-connected .cf-lines { opacity: 1; }

.cf-line {
  fill: none;
  stroke: var(--soft);
  stroke-width: 1.2;
  opacity: 0.5;
}

.cf-line-hub {
  fill: var(--accent);
  stroke: var(--paper);
  stroke-width: 3;
}

/* right column: the case-file sections */
.cf-sections {
  overflow-y: auto;
  padding: 4px 8px 4px 48px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
}

.cf-sec {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  padding: 20px 24px;
  transform: translateX(22px);
  opacity: 0;
  transition: transform 460ms var(--ease-spring), opacity 380ms var(--ease-out);
}

/* revealed only once the demo has finished shrinking and the lines start growing */
.casefile.cf-connected .cf-sec {
  transform: translateX(0);
  opacity: 1;
}

.casefile.cf-connected .cf-sec:nth-child(1) { transition-delay: 40ms; }
.casefile.cf-connected .cf-sec:nth-child(2) { transition-delay: 100ms; }
.casefile.cf-connected .cf-sec:nth-child(3) { transition-delay: 160ms; }
.casefile.cf-connected .cf-sec:nth-child(4) { transition-delay: 220ms; }
.casefile.cf-connected .cf-sec:nth-child(5) { transition-delay: 280ms; }
.casefile.cf-connected .cf-sec:nth-child(6) { transition-delay: 340ms; }
.casefile.cf-connected .cf-sec:nth-child(7) { transition-delay: 400ms; }
.casefile.cf-connected .cf-sec:nth-child(8) { transition-delay: 460ms; }
.casefile.cf-connected .cf-sec:nth-child(9) { transition-delay: 520ms; }

.cf-sec-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.cf-sec-n {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--soft);
}

.cf-sec-en {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.cf-sec-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cf-sec-body {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}

/* ── Sub-page (experiment detail, etc.) ──────── */

.subpage {
  max-width: 880px;
  margin: 0 auto;
  padding: 132px 32px 104px;
}

.subpage-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 200ms var(--ease-out), transform 200ms var(--ease-out);
}

.subpage-back:hover { color: var(--ink); transform: translateX(-3px); }
.subpage-back--bottom { margin-top: 24px; }

.subpage-hero {
  position: relative;
  margin: 36px 0 56px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

/* GitHub entry on the side of the hero */
.subpage-gh {
  position: absolute;
  top: 2px;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out), border-color 200ms var(--ease-out);
}

.subpage-gh:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(147, 165, 143, 0.4);
}

.subpage-gh--private {
  cursor: default;
  color: var(--muted);
}

.subpage-gh--private:hover {
  transform: none;
  box-shadow: var(--shadow);
  border-color: var(--line);
}

.subpage-gh svg { display: block; }
.subpage-gh-arrow { color: var(--muted); }

@media (max-width: 640px) {
  .subpage-gh { position: static; margin-bottom: 24px; }
}

.subpage-tag {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--soft);
}

.subpage-tag--current {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.subpage-hero h1 {
  margin: 0 0 20px;
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.subpage-lead {
  margin: 0;
  max-width: 640px;
  font-size: 16px;
  line-height: 1.85;
  color: #2a2f26;
}

.subpage-lead em {
  font-style: normal;
  color: var(--muted);
}

.subpage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.subpage-section { margin-bottom: 52px; }

.subpage-section h2 {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.subpage-section p {
  margin: 0;
  font-size: 15px;
  line-height: 1.85;
  color: #3a3f36;
}

.subpage-shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.subpage-shot {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #efefe9, #e4e4dd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.subpage-list {
  margin: 16px 0 0;
  padding-left: 20px;
}

.subpage-list li {
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
}

/* ── Responsive ──────────────────────────────── */

@media (max-width: 1100px) {
  .site-header {
    grid-template-columns: auto 1fr;
    height: auto;
    padding: 18px 24px;
    background: rgba(246, 244, 237, 0.88);
    backdrop-filter: blur(12px);
  }

  .time-place { display: none; }

  .top-nav {
    gap: 22px;
    justify-content: flex-end;
  }

  .story-sticky {
    grid-template-columns: 1fr;
  }

  .story-right {
    display: none;
  }

  .hero-wordmark { font-size: clamp(56px, 12vw, 90px); }
  .hero-note { bottom: 24px; left: 24px; }

  .story-left {
    padding: 110px 28px 40px;
    justify-content: flex-start;
  }

  .hero-block,
  .demo-block {
    left: 28px;
    right: 28px;
  }

  .pd-body {
    grid-template-columns: 1fr;
  }

  .portal-grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .portal-grid article {
    border-bottom: 1px solid var(--line);
  }

  .portal-grid article:nth-child(odd) {
    border-right: 1px solid var(--line);
  }

  .portal-grid article:nth-child(even) {
    border-right: 0;
  }

  .project-detail {
    padding: 48px 28px;
  }

  .site-footer {
    gap: 36px;
  }
}

@media (min-width: 641px) and (max-width: 1100px) {
  .tablet-project-index {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 28px;
  }

  .tablet-project-index button {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.42);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    transition: border-color 180ms var(--ease-out), background 180ms var(--ease-out);
  }

  .tablet-project-index button:hover,
  .tablet-project-index button:focus-visible {
    border-color: var(--soft);
    background: rgba(255, 255, 255, 0.72);
    outline: none;
  }

  .tablet-project-index span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10px;
  }

  .tablet-project-index strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: 12px;
    line-height: 1.45;
  }
}

@media (max-width: 640px) {
  .site-header {
    grid-template-columns: 1fr;
    gap: 11px;
    padding: 13px 20px 12px;
  }

  .top-nav {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .top-nav a {
    font-size: 11px;
  }

  .scroll-story {
    height: auto;
    min-height: 0;
  }

  .story-sticky {
    position: relative;
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .story-left {
    padding: 116px 16px 72px;
  }

  .hero-block {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    min-height: calc(100svh - 116px);
    padding: 42px 6px 72px;
    opacity: 1 !important;
    transform: none !important;
    will-change: auto;
  }

  .demo-block {
    display: none;
  }

  .mobile-projects {
    display: grid;
    gap: 18px;
    padding-top: 8px;
    scroll-margin-top: 104px;
  }

  .mobile-projects-head {
    margin-bottom: 8px;
    padding: 0 6px 16px;
    border-bottom: 1px solid var(--line);
  }

  .mobile-projects-head span,
  .mobile-project-copy > span {
    display: block;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .mobile-projects-head h2 {
    margin: 8px 0 0;
    font-size: 26px;
    line-height: 1.15;
  }

  .mobile-project-card {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    color: var(--ink);
    text-decoration: none;
  }

  .mobile-project-card:active {
    background: rgba(255, 255, 255, 0.82);
  }

  .mobile-project-media {
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #efefe9, #e4e4dd);
  }

  .mobile-project-media img {
    width: min(54%, 180px);
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 12px 28px rgba(20, 24, 18, 0.12);
  }

  .mobile-project-copy {
    padding: 18px 18px 20px;
  }

  .mobile-project-copy h3 {
    margin: 8px 0 5px;
    font-size: 20px;
    line-height: 1.25;
  }

  .mobile-project-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
  }

  .mobile-project-copy strong {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 12px;
  }

  .mobile-project-copy i {
    font-style: normal;
    font-size: 16px;
  }

  .hero-name {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .hero-cv-link {
    margin-left: 0;
  }

  .cf-back--fixed {
    top: 14px;
    left: 14px;
    padding: 10px 16px;
  }

  .portal-grid { grid-template-columns: 1fr; }
  .portal-grid article { border-right: 0 !important; }
  .site-footer {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 36px 22px 28px;
  }

  .footer-quote {
    min-width: 0;
  }

  .terminal-orbit {
    display: none;
  }
}

@media (max-width: 360px) {
  .site-header {
    padding-inline: 16px;
  }

  .top-nav {
    gap: 0;
  }

  .top-nav a {
    padding-inline: 2px;
    font-size: 10px;
  }

  .hero-cta-row {
    gap: 14px;
  }
}

/* ── Accessibility ───────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .contact-dialog[open],
  .contact-dialog::backdrop {
    animation: none;
  }

  .track-item,
  .track-dot,
  .scroll-hint,
  .orbit-wrap,
  .pd-inner,
  .reveal-item,
  .exp-card,
  .thought-card,
  .log-folder-item {
    transition: none !important;
  }
}
