/* ═══════════════════════════════════════════
   SIGNAL — Architectural developer portfolio
   Syne · JetBrains Mono · cool ink / signal orange
═══════════════════════════════════════════ */

:root {
  --bg: #f3f2ef;
  --bg-2: #e9e8e3;
  --ink: #0d0d0c;
  --muted: #5e5d58;
  --faint: #9a9890;
  --line: #0d0d0c;
  --line-soft: rgba(13, 13, 12, 0.12);
  --signal: #e23d12;
  --signal-soft: rgba(226, 61, 18, 0.12);
  --panel: #ffffff;
  --invert-bg: #0d0d0c;
  --invert-ink: #f3f2ef;
  --nav-w: 4.5rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Schibsted Grotesk", "Syne", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --theme-t: color 0.4s ease, background-color 0.4s ease, border-color 0.4s ease;
}

html.dark {
  --bg: #0a0a09;
  --bg-2: #141412;
  --ink: #f0efe9;
  --muted: #a8a69c;
  --faint: #6e6c64;
  --line: #f0efe9;
  --line-soft: rgba(240, 239, 233, 0.14);
  --signal: #ff5a2b;
  --signal-soft: rgba(255, 90, 43, 0.16);
  --panel: #161614;
  --invert-bg: #f0efe9;
  --invert-ink: #0a0a09;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: var(--theme-t);
  cursor: none;
}

body.is-touch {
  cursor: auto;
}

::selection {
  background: var(--signal);
  color: #fff;
}

img {
  max-width: 100%;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: none;
}

body.is-touch button,
body.is-touch a {
  cursor: pointer;
}

/* noise */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

html.dark body::before {
  opacity: 0.06;
  mix-blend-mode: soft-light;
}

/* ── Custom cursor ── */
.cur {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  background: var(--signal);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width 0.25s var(--ease), height 0.25s var(--ease), background 0.25s;
}

.cur-x {
  position: fixed;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  pointer-events: none;
  z-index: 10001;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), border-color 0.3s, opacity 0.3s;
  opacity: 0.5;
}

body.cur-active .cur {
  width: 18px;
  height: 18px;
}

body.cur-active .cur-x {
  width: 72px;
  height: 72px;
  border-color: var(--signal);
  opacity: 1;
}

body.is-touch .cur,
body.is-touch .cur-x {
  display: none;
}

/* ── Side index rail ── */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--nav-w);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  border-right: 1px solid var(--line-soft);
  background: var(--bg);
  transition: var(--theme-t);
}

.rail-mark {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  align-items: center;
}

.rail-nav a {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--faint);
  transition: color 0.25s;
}

.rail-nav a:hover,
.rail-nav a.is-active {
  color: var(--signal);
}

.rail-tools {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.theme-btn {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line-soft);
  display: grid;
  place-items: center;
  transition: border-color 0.25s, color 0.25s;
}

.theme-btn:hover {
  border-color: var(--signal);
  color: var(--signal);
}

.theme-btn .i-sun {
  display: none;
}

html.dark .theme-btn .i-moon {
  display: none;
}

html.dark .theme-btn .i-sun {
  display: block;
}

/* ── Shell ── */
.shell {
  margin-left: var(--nav-w);
  min-height: 100vh;
  max-width: 100%;
  overflow-x: clip;
}

.pad {
  padding-inline: clamp(1.25rem, 4vw, 4rem);
}

.band {
  padding-block: clamp(4.5rem, 10vw, 8rem);
  border-bottom: 1px solid var(--line-soft);
}

.band-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  flex-wrap: wrap;
}

.idx {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--signal);
  text-transform: uppercase;
}

.h-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0;
}

.h-xl {
  font-size: clamp(3rem, 9vw, 7.5rem);
}

.h-lg {
  font-size: clamp(2.25rem, 5vw, 4rem);
}

.h-md {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.mono {
  font-family: var(--font-mono);
}

.muted {
  color: var(--muted);
}

.faint {
  color: var(--faint);
}

.signal {
  color: var(--signal);
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding-top: 2rem;
  padding-bottom: 2rem;
  position: relative;
  overflow: hidden;
  max-width: 100%;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal);
  border: 1px solid var(--signal);
  padding: 0.45rem 0.85rem;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: var(--signal);
  border-radius: 50%;
  animation: blink 1.6s ease-in-out infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

.hero-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--faint);
  text-align: right;
}

.hero-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 2rem;
  min-width: 0;
  max-width: 100%;
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 800;
  /* Fit longest line ("KANCHAN") inside shell width — rail + padding */
  font-size: clamp(2.4rem, calc((100vw - var(--nav-w) - 4rem) / 6.15), 8rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
  margin: 0;
  text-transform: uppercase;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: keep-all;
}

.hero-name .line {
  display: block;
  overflow: hidden;
  max-width: 100%;
}

.hero-name .line span {
  display: inline-block;
  transform: translateY(110%);
  max-width: 100%;
}

.hero-tag {
  margin-top: 1.75rem;
  max-width: 34rem;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  line-height: 1.35;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.hero-tag em {
  font-style: normal;
  color: var(--signal);
}

.hero-bottom {
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 2rem;
  align-items: end;
}

.hero-bio {
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: flex-end;
}

.cta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.cta::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background: var(--ink);
  transform: scaleX(1);
  transform-origin: left;
  transition: transform 0.4s var(--ease), background 0.25s;
}

.cta:hover {
  color: var(--signal);
}

.cta:hover::after {
  background: var(--signal);
  transform: scaleX(0.35);
}

.cta-fill {
  background: var(--ink);
  color: var(--bg);
  padding: 0.85rem 1.35rem;
  border: 1px solid var(--ink);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.cta-fill::after {
  display: none;
}

.cta-fill:hover {
  background: var(--signal);
  border-color: var(--signal);
  color: #fff;
}

/* ── Stats ── */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: 2.5rem 1.25rem;
  border-right: 1px solid var(--line-soft);
  transition: background 0.35s;
}

.stat:last-child {
  border-right: none;
}

.stat:hover {
  background: var(--signal-soft);
}

.stat-n {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.stat-l {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: clamp(2rem, 5vw, 5rem);
}

.about-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 1rem;
}

.about-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0;
}

.about-body {
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 38rem;
  margin: 0;
}

/* ── Tech matrix ── */
.tech-matrix {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line);
}

.tech-col {
  padding: 1.75rem 1.35rem;
  border-right: 1px solid var(--line-soft);
  min-height: 280px;
}

.tech-col:last-child {
  border-right: none;
}

.tech-col h3 {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line-soft);
}

.tech-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tech-col li {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  padding: 0.55rem 0;
  border-bottom: 1px dashed var(--line-soft);
  transition: color 0.25s, padding-left 0.3s var(--ease);
}

.tech-col li:hover {
  color: var(--signal);
  padding-left: 0.4rem;
}

/* ── Marquee ── */
.ticker {
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-2);
  transition: var(--theme-t);
}

.ticker-track {
  display: flex;
  gap: 3.5rem;
  width: max-content;
  align-items: center;
  padding: 1.25rem 0;
  will-change: transform;
}

.ticker-track img {
  width: 40px;
  height: 40px;
  opacity: 0.65;
  filter: grayscale(1);
  transition: opacity 0.3s, filter 0.3s;
}

.ticker-track img:hover {
  opacity: 1;
  filter: none;
}

html.dark .ticker-track img {
  filter: grayscale(1) brightness(1.3);
}

html.dark .ticker-track img:hover {
  filter: none;
}

/* ── Projects ── */
.work-list {
  display: flex;
  flex-direction: column;
}

.work-item {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 0;
  border: 1px solid var(--line);
  margin-top: -1px;
  background: var(--panel);
  transition: background 0.4s;
  overflow: hidden;
}

.work-item:hover {
  background: var(--bg-2);
}

.work-copy {
  padding: clamp(1.75rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
}

.work-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  border: 1px solid var(--signal);
  padding: 0.3rem 0.55rem;
  width: fit-content;
}

.work-copy h3 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0.75rem 0 0.85rem;
  line-height: 1.1;
}

.work-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.work-metrics {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.metric {
  border: 1px solid var(--line-soft);
  padding: 0.55rem 0.75rem;
}

.metric strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9rem;
}

.metric span {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.work-media {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border-left: 1px solid var(--line-soft);
}

.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.8s var(--ease);
}

.work-item:hover .work-media img {
  transform: scale(1.06);
}

.work-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(226, 61, 18, 0.18));
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.work-item:hover .work-media::after {
  opacity: 1;
}

.work-more {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.work-more p {
  margin: 0;
  color: var(--muted);
  max-width: 28rem;
}

.work-more h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

/* ── Journey ── */
.journey {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(2rem, 5vw, 4rem);
}

.journey-track {
  position: relative;
  padding-left: 1.75rem;
}

.journey-track::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  bottom: 0;
  width: 1px;
  background: var(--line-soft);
}

.journey-bar {
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 1px;
  height: 0;
  background: var(--signal);
  transform-origin: top;
}

.journey-node {
  position: relative;
  padding-bottom: 0.5rem;
}

.journey-node::before {
  content: "";
  position: absolute;
  left: -1.75rem;
  top: 0.45rem;
  width: 9px;
  height: 9px;
  background: var(--signal);
  border: 2px solid var(--bg);
  margin-left: -4px;
  box-sizing: content-box;
}

.journey-role {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.journey-co {
  color: var(--muted);
  margin: 0.25rem 0 0.75rem;
}

.journey-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal);
  display: inline-block;
  margin-bottom: 0.85rem;
}

/* ── Milestones ── */
.mile-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
}

.mile {
  padding: 2rem 1.75rem;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background 0.35s;
  position: relative;
  overflow: hidden;
}

.mile:nth-child(2n) {
  border-right: none;
}

.mile:nth-child(n + 3) {
  border-bottom: none;
}

.mile:hover {
  background: var(--invert-bg);
  color: var(--invert-ink);
}

.mile:hover .muted {
  color: color-mix(in srgb, var(--invert-ink) 65%, transparent);
}

.mile-n {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--signal);
  letter-spacing: 0.12em;
}

.mile h4 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
}

.mile p {
  margin: 0;
  font-size: 0.92rem;
}

/* ── Education + Graph ── */
.split-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
}

.split-panel {
  padding: clamp(1.75rem, 4vw, 2.75rem);
}

.split-panel + .split-panel {
  border-left: 1px solid var(--line-soft);
}

.edu-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 0;
  border-bottom: 1px dashed var(--line-soft);
}

.edu-row:last-child {
  border-bottom: none;
}

.edu-ico {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line-soft);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--signal);
  flex-shrink: 0;
}

.edu-row h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
}

.graph-panel {
  background: var(--invert-bg);
  color: var(--invert-ink);
}

.graph-panel .muted {
  color: color-mix(in srgb, var(--invert-ink) 55%, transparent);
}

.graph-frame {
  margin-top: 1.5rem;
  border: 1px solid color-mix(in srgb, var(--invert-ink) 20%, transparent);
  overflow: hidden;
  aspect-ratio: 1.54;
}

.graph-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.graph-panel:hover .graph-frame img {
  transform: scale(1.04);
}

/* ── Mastering ── */
.master-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
}

.master {
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--line-soft);
}

.master:last-child {
  border-right: none;
}

.master h4 {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
  color: var(--faint);
}

.bar {
  height: 2px;
  background: var(--line-soft);
  margin-bottom: 1.25rem;
  position: relative;
}

.bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--signal);
}

.master p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.master-pct {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.5rem;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 1rem;
}

/* ── Contact ── */
.contact {
  background: var(--invert-bg);
  color: var(--invert-ink);
  border-bottom: none;
}

.contact .idx {
  color: var(--signal);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
}

.contact h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: -0.05em;
  line-height: 0.92;
  margin: 0 0 1.5rem;
}

.contact h2 span {
  color: var(--signal);
}

.mail-row {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 600;
  border-bottom: 1px solid color-mix(in srgb, var(--invert-ink) 30%, transparent);
  padding-bottom: 0.35rem;
  transition: color 0.25s, border-color 0.25s;
}

.mail-row:hover {
  color: var(--signal);
  border-color: var(--signal);
}

.contact-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.tile {
  border: 1px solid color-mix(in srgb, var(--invert-ink) 22%, transparent);
  padding: 1.35rem;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.tile:hover {
  background: var(--signal);
  border-color: var(--signal);
  color: #fff;
}

.tile span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tile strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

/* ── Footer ── */
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 2rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--faint);
  border-top: 1px solid var(--line-soft);
}

/* ── Projects page ── */
.page-hero {
  padding-top: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line-soft);
}

.crumb {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--faint);
  margin-bottom: 1.5rem;
}

.crumb a:hover {
  color: var(--signal);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0 2.5rem;
}

.filter {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line-soft);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.filter.is-on,
.filter:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  border: 1px solid var(--line);
  margin-top: -1px;
  background: var(--panel);
  overflow: hidden;
  transition: background 0.35s;
}

.card:hover {
  background: var(--bg-2);
}

.card-body {
  padding: clamp(1.5rem, 3vw, 2.75rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1rem;
}

.card-meta .dot {
  color: var(--faint);
}

.card-meta .role {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
}

.card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 0.85rem;
}

.card p {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--line-soft);
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
}

.card-media {
  position: relative;
  min-height: 260px;
  border-left: 1px solid var(--line-soft);
  overflow: hidden;
}

.card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.card:hover .card-media img {
  transform: scale(1.05);
}

.foot-links {
  display: flex;
  gap: 1.25rem;
}

.foot-links a:hover {
  color: var(--signal);
}

/* ── Reveal ── */
.split-char {
  display: inline-block;
  will-change: transform, opacity;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  :root {
    --nav-w: 0px;
  }

  .rail {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 3.5rem;
    flex-direction: row;
    padding: 0 1rem;
    border-right: none;
    border-top: 1px solid var(--line-soft);
  }

  .rail-mark {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .rail-nav {
    flex-direction: row;
    gap: 0.85rem;
  }

  .rail-tools {
    flex-direction: row;
  }

  .shell {
    margin-left: 0;
    padding-bottom: 4rem;
  }

  .hero-bottom,
  .about-grid,
  .journey,
  .contact-grid,
  .split-2,
  .work-item,
  .card {
    grid-template-columns: 1fr;
  }

  .work-media,
  .card-media,
  .split-panel + .split-panel {
    border-left: none;
    border-top: 1px solid var(--line-soft);
  }

  .work-media,
  .card-media {
    min-height: 220px;
    aspect-ratio: 16/10;
  }

  .tech-matrix,
  .master-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tech-col:nth-child(2n),
  .master:nth-child(2n) {
    border-right: none;
  }

  .tech-col:nth-child(-n + 2),
  .master:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line-soft);
  }

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

  .stat {
    border-right: none;
    border-bottom: 1px solid var(--line-soft);
  }

  .stat:last-child {
    border-bottom: none;
  }

  .mile-list {
    grid-template-columns: 1fr;
  }

  .mile {
    border-right: none !important;
    border-bottom: 1px solid var(--line-soft) !important;
  }

  .mile:last-child {
    border-bottom: none !important;
  }

  .hero-cta {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .tech-matrix,
  .master-grid {
    grid-template-columns: 1fr;
  }

  .tech-col,
  .master {
    border-right: none !important;
    border-bottom: 1px solid var(--line-soft);
  }

  .tech-col:last-child,
  .master:last-child {
    border-bottom: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .hero-name .line span {
    transform: none;
  }

  body {
    cursor: auto;
  }

  .cur,
  .cur-x {
    display: none !important;
  }
}
