﻿:root {
  --bg: #0b0b0e;
  --bg-raised: #16161c;
  --line: #2b2b34;
  --ink: #f2f0ea;
  --ink-dim: #b5b3a8;
  --ink-faint: #807e74;
  --accent: #d8ff4f;
  --accent-dim: rgba(216, 255, 79, 0.12);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Space Grotesk", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  background-image: radial-gradient(circle at 15% -10%, rgba(216, 255, 79, 0.05), transparent 40%);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.65;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--bg);
  padding: 0.5rem 1rem;
  z-index: 10;
}

.skip-link:focus {
  left: 0;
}

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #9dff6a 50%, var(--accent));
  background-size: 200% 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 20;
  box-shadow: 0 0 12px rgba(216, 255, 79, 0.45);
  animation: progress-shimmer 3s linear infinite;
}

@keyframes progress-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  background: radial-gradient(
    620px circle at var(--mx, 50%) var(--my, -10%),
    rgba(216, 255, 79, 0.07),
    transparent 65%
  );
  transition: opacity 0.5s ease;
  will-change: background;
}

body.has-pointer .spotlight {
  opacity: 1;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.2;
  will-change: transform;
}

.orb-a {
  width: min(42vw, 480px);
  height: min(42vw, 480px);
  top: -8%;
  left: 8%;
  background: radial-gradient(circle, rgba(216, 255, 79, 0.22), transparent 70%);
  animation: float-a 18s ease-in-out infinite;
}

.orb-b {
  width: min(36vw, 400px);
  height: min(36vw, 400px);
  top: 42%;
  right: -6%;
  background: radial-gradient(circle, rgba(120, 180, 255, 0.12), transparent 70%);
  animation: float-b 22s ease-in-out infinite;
}

.orb-c {
  width: min(30vw, 320px);
  height: min(30vw, 320px);
  bottom: 4%;
  left: 28%;
  background: radial-gradient(circle, rgba(216, 255, 79, 0.1), transparent 70%);
  animation: float-c 16s ease-in-out infinite;
}

@keyframes float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40% { transform: translate(8%, 12%) scale(1.08); }
  70% { transform: translate(-4%, 6%) scale(0.96); }
}

@keyframes float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  35% { transform: translate(-10%, -8%) scale(1.05); }
  65% { transform: translate(4%, 10%) scale(0.94); }
}

@keyframes float-c {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12%, -14%) scale(1.1); }
}

.grain {
  display: none;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' 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");
  background-size: 180px 180px;
  animation: grain-shift 0.8s steps(2) infinite;
}

@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-1%, 1%); }
  50% { transform: translate(1%, -1%); }
  75% { transform: translate(-1%, -1%); }
  100% { transform: translate(0, 0); }
}

.frame {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 220px 1fr;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
}

.rail {
  border-right: 1px solid var(--line);
  padding: 2.5rem 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.rail-mark {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--accent);
  letter-spacing: 0.05em;
  position: relative;
  display: inline-block;
  transition: text-shadow 0.35s ease, letter-spacing 0.35s ease;
}

.rail-mark:hover {
  text-shadow: 0 0 18px rgba(216, 255, 79, 0.45);
  letter-spacing: 0.12em;
}

.rail-nav {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.nav-indicator {
  position: absolute;
  left: -1.5rem;
  top: 0;
  width: 2px;
  height: 1.1rem;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(216, 255, 79, 0.55);
  opacity: 0;
  transform: translateY(0);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.35s ease,
    opacity 0.3s ease;
  pointer-events: none;
}

.nav-indicator.is-ready {
  opacity: 1;
}

.rail-nav a {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--ink-dim);
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  transition: color 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.rail-nav a span {
  color: var(--ink-faint);
  font-size: 0.7rem;
  transition: color 0.25s ease, transform 0.3s ease;
}

.rail-nav a:hover {
  color: var(--ink);
  transform: translateX(4px);
}

.rail-nav a:hover,
.rail-nav a.active {
  color: var(--accent);
}

.rail-nav a.active {
  transform: translateX(6px);
}

.rail-nav a.active span {
  color: var(--accent);
}

.rail-meta {
  margin-top: auto;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
  line-height: 1.9;
}

main {
  padding: 0 clamp(1.5rem, 5vw, 4.5rem);
}

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  padding: 4rem 0 6rem;
}

.hero > *:not(.hero-scroll):not(.hero-title) {
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero > *:nth-child(1) {
  animation-delay: 0.1s;
}

.hero > *:nth-child(3) {
  animation-delay: 0.38s;
}

.hero > *:nth-child(4) {
  animation-delay: 0.52s;
}

.hero-title:not(:has(.char)) {
  animation: rise 0.9s 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-title .word,
.article-title .word {
  display: inline-block;
  white-space: nowrap;
}

.hero-title .char,
.article-title .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(1.1em) rotateX(-70deg);
  transform-origin: bottom center;
  animation: char-in 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(0.28s + var(--i, 0) * 0.038s);
}

.hero-title .char.is-space,
.article-title .char.is-space {
  width: 0.28em;
  white-space: normal;
}

@keyframes char-in {
  0% {
    opacity: 0;
    transform: translateY(1.1em) rotateX(-70deg) scale(0.9);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0) scale(1);
  }
}

.hero-scroll {
  position: absolute;
  bottom: 1.8rem;
  left: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  animation: rise 1s 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-scroll-line {
  display: block;
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  transform-origin: top;
  animation: scroll-line 2s ease-in-out infinite;
}

.hero-scroll-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

@keyframes scroll-line {
  0%, 100% { transform: scaleY(0.35); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

.kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.6rem;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-dim);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(216, 255, 79, 0.35); }
  70% { box-shadow: 0 0 0 12px rgba(216, 255, 79, 0); }
  100% { box-shadow: 0 0 0 0 rgba(216, 255, 79, 0); }
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.35rem, 8.5vw, 6.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  overflow-wrap: normal;
  word-break: keep-all;
  max-width: 100%;
}

.hero-role {
  margin-top: 1.4rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--ink-dim);
  max-width: 34em;
}

.hero-links {
  margin-top: 2.6rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.hero-links a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 20%,
    rgba(216, 255, 79, 0.12) 45%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.hero-links a:hover::before {
  transform: translateX(120%);
}

.hero-links a:hover {
  box-shadow: 0 8px 28px rgba(216, 255, 79, 0.08);
}

.hero-links .icon {
  width: 15px;
  height: 15px;
  color: var(--ink-dim);
}

.hero-links a:hover .icon {
  color: var(--accent);
}

.hero-links a:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.section {
  padding: 5.5rem 0;
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  margin-bottom: 3rem;
  position: relative;
}

.section-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.9rem;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

.section.visible .section-head::after,
.section:not(.reveal) .section-head::after {
  width: min(12rem, 40%);
}

.index {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  position: relative;
}

.section.visible .index,
.section:not(.reveal) .index {
  animation: index-glow 1.2s ease both;
}

@keyframes index-glow {
  0% { text-shadow: 0 0 0 transparent; transform: translateY(6px); opacity: 0; }
  40% { opacity: 1; }
  100% { text-shadow: 0 0 16px rgba(216, 255, 79, 0.35); transform: none; }
}

.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.01em;
  transition: letter-spacing 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    text-shadow 0.6s ease;
}

.section.visible .section-head h2,
.section:not(.reveal) .section-head h2 {
  letter-spacing: -0.01em;
  text-shadow: 0 0 40px rgba(216, 255, 79, 0.06);
}

.about-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3rem;
  align-items: start;
}

.portrait {
  position: relative;
  perspective: 900px;
  transform-style: preserve-3d;
}

.portrait-glow {
  position: absolute;
  inset: -12%;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 40%, rgba(216, 255, 79, 0.18), transparent 65%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 0;
}

.portrait:hover .portrait-glow,
.portrait.is-tilting .portrait-glow {
  opacity: 1;
}

.portrait img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--line);
  filter: grayscale(35%);
  transition: filter 0.5s ease, box-shadow 0.4s ease;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--scale, 1));
  will-change: transform;
}

.portrait:hover img,
.portrait.is-tilting img {
  filter: grayscale(0%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(216, 255, 79, 0.12);
}

.portrait figcaption {
  position: relative;
  z-index: 1;
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
  transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.portrait:hover figcaption {
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}

.about-text p + p {
  margin-top: 1.2rem;
}

.about-text p {
  max-width: 58ch;
  color: var(--ink-dim);
}

.about-text p:first-child {
  color: var(--ink);
  font-size: 1.1rem;
}

.skills {
  display: flex;
  flex-direction: column;
}

.skill-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
}

.skill-row:last-child {
  border-bottom: 1px solid var(--line);
}

.skill-row dt {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  padding-top: 0.35rem;
}

.skill-row ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-row li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  color: var(--ink);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.3s ease, box-shadow 0.3s ease;
}

.skill-row li::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(216, 255, 79, 0.14) 50%,
    transparent 70%
  );
  transform: translateX(-140%);
  transition: transform 0.55s ease;
}

.skill-row li:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px) scale(1.04);
  background: var(--accent-dim);
  box-shadow: 0 6px 18px rgba(216, 255, 79, 0.08);
}

.skill-row li:hover::after {
  transform: translateX(140%);
}

.skill-row.reveal-item.visible li {
  animation: chip-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: calc(var(--chip-i, 0) * 0.04s);
}

@keyframes chip-pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.88);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.projects {
  list-style: none;
}

.project {
  border-top: 1px solid var(--line);
}

.project:last-child {
  border-bottom: 1px solid var(--line);
}

.section-hint {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin: -2rem 0 2rem;
}

.section-note {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  line-height: 1.7;
}

.project {
  transition: background 0.3s ease;
}

.project-inner {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: 1.5rem;
  padding: 2rem 1rem;
  margin: 0 -1rem;
  cursor: pointer;
  list-style: none;
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: background 0.35s ease;
}

.project-inner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.project-inner:hover {
  background: var(--bg-raised);
}

.project-inner:hover::before {
  transform: scaleY(1);
  box-shadow: 0 0 12px rgba(216, 255, 79, 0.4);
}

.project-inner:hover h3 {
  color: var(--accent);
}

.project-inner:hover .project-no {
  color: var(--accent);
  transform: translateY(-2px);
}

.chevron {
  display: inline-block;
  margin-left: 0.6rem;
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--ink-faint);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.25s ease;
}

.project-inner:hover .chevron {
  transform: translateX(6px);
  color: var(--accent);
}

@keyframes unfold {
  from {
    opacity: 0;
    transform: translateY(-10px) scaleY(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.project-link {
  display: inline-block;
  margin-top: 1.6rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid rgba(216, 255, 79, 0.35);
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.project-link:hover {
  background: var(--accent-dim);
  transform: translateY(-2px);
}

.project-link.is-muted {
  color: var(--ink-faint);
  border-color: var(--line);
  pointer-events: none;
}

.project-no {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-faint);
  padding-top: 0.4rem;
  transition: color 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-body h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  transition: color 0.3s ease, letter-spacing 0.35s ease;
}

.project-inner:hover h3 {
  letter-spacing: 0.01em;
}

.project-body p {
  margin-top: 0.6rem;
  color: var(--ink-dim);
  max-width: 56ch;
}

.stack {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin-top: 1rem;
}

.stack li {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
}

.stack li::before {
  content: "· ";
  color: var(--accent);
}

.project-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
  padding-top: 0.4rem;
}

.year {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-dim);
}

.status {
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-dim);
}

.status-live,
.status-still-used {
  border-color: rgba(216, 255, 79, 0.4);
  color: var(--accent);
}

.icon {
  flex-shrink: 0;
  display: inline-block;
  vertical-align: -0.22em;
}

.timeline-fold {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.timeline-toggle {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.3rem 1.5rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink-dim);
  transition: background 0.2s ease, color 0.2s ease;
}

.timeline-toggle::-webkit-details-marker {
  display: none;
}

.timeline-toggle:hover {
  background: var(--bg-raised);
  color: var(--accent);
}

.timeline-toggle .chevron {
  margin-left: 0;
}

.timeline-toggle-meta {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--ink-faint);
}

.timeline-fold[open] .timeline-toggle {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.timeline-fold[open] .chevron {
  transform: rotate(45deg);
  color: var(--accent);
}

.timeline-fold[open] .timeline {
  animation: unfold 0.35s ease;
}

.timeline {
  list-style: none;
  position: relative;
  padding: 2.2rem 1.5rem 2.2rem 2.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 1.5rem;
  top: 2.5rem;
  bottom: 2.5rem;
  width: 1px;
  background: var(--line);
}

.timeline::after {
  content: "";
  position: absolute;
  left: 1.5rem;
  top: 2.5rem;
  width: 1px;
  height: 0;
  background: linear-gradient(to bottom, var(--accent), rgba(216, 255, 79, 0.15));
  box-shadow: 0 0 8px rgba(216, 255, 79, 0.3);
  transition: height 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.timeline-fold[open] .timeline.is-drawn::after {
  height: calc(100% - 5rem);
}

.timeline-entry {
  position: relative;
  padding: 0 0 2.8rem 0;
}

.timeline-entry:last-child {
  padding-bottom: 0;
}

.timeline-link {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 2rem;
  padding-left: 1.8rem;
  text-decoration: none;
  color: inherit;
}

.timeline-link:hover h3 {
  color: var(--accent);
}

.timeline-read {
  display: inline-block;
  margin-top: 0.7rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease;
}

.timeline-link:hover .timeline-read,
.timeline-link:focus-visible .timeline-read {
  opacity: 1;
  transform: none;
  color: var(--accent);
}

.timeline-dot {
  position: absolute;
  left: -1.27rem;
  top: 0.45rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.35s ease, background 0.3s ease;
}

.timeline-entry:hover .timeline-dot,
.timeline-entry.is-active .timeline-dot {
  transform: scale(1.35);
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(216, 255, 79, 0.12);
}

.timeline-entry.reveal-item.visible .timeline-dot {
  animation: dot-ping 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes dot-ping {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(1); }
}

.timeline-when {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink-dim);
  padding-top: 0.15rem;
}

.timeline-type {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  margin-bottom: 0.7rem;
}

.type-project {
  border-color: rgba(216, 255, 79, 0.4);
  color: var(--accent);
}

.type-milestone {
  border-color: rgba(242, 240, 234, 0.35);
  color: var(--ink);
}

.type-learning {
  border-color: rgba(120, 180, 255, 0.4);
  color: #9cc2ff;
}

.timeline-body h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.3rem;
}

.timeline-body p {
  margin-top: 0.5rem;
  color: var(--ink-dim);
  max-width: 56ch;
}

.contact-lede {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 300;
  max-width: 24em;
  margin-bottom: 2.5rem;
}

.contact-list {
  list-style: none;
}

.contact-list li {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.contact-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.contact-label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}

.contact-label .icon {
  width: 16px;
  height: 16px;
  color: var(--ink-dim);
}

.contact-list a {
  text-decoration: none;
  color: var(--ink);
  width: fit-content;
  position: relative;
  transition: color 0.3s ease;
}

.contact-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.contact-list a:hover {
  color: var(--accent);
}

.contact-list a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.contact-list li:hover {
  background: linear-gradient(90deg, rgba(216, 255, 79, 0.04), transparent 70%);
}

.socials {
  margin-top: 3.5rem;
}

.socials-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  margin-bottom: 1.2rem;
}

.social-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.6rem 1.15rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.social-pill:hover {
  box-shadow: 0 8px 24px rgba(216, 255, 79, 0.08);
}

.social-pill .icon {
  width: 16px;
  height: 16px;
  color: var(--ink-dim);
  transition: color 0.2s ease;
}

.social-pill:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.social-pill:hover .icon {
  color: var(--accent);
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2.5rem 0 3rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
}

.footer a {
  position: relative;
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--accent);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-item {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-item.visible {
  opacity: 1;
  transform: none;
}

.magnetic {
  display: inline-flex;
  transition: transform 0.15s ease-out;
}

.footer a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.footer a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.article-hero {
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid var(--line);
}

.article-back {
  display: inline-block;
  margin-bottom: 2.2rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  text-decoration: none;
  color: var(--ink-dim);
  transition: color 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.article-back:hover {
  color: var(--accent);
  transform: translateX(-4px);
}

.article-hero .kicker {
  margin-bottom: 1.2rem;
}

.article-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.1rem, 6.5vw, 4.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  overflow-wrap: normal;
  word-break: keep-all;
}

.article-title .char {
  animation-delay: calc(0.18s + var(--i, 0) * 0.03s);
}

.article-lede {
  margin-top: 1.4rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--ink-dim);
  max-width: 46em;
}

.article-hero .stack {
  margin-top: 1.4rem;
}

.article-hero .project-link {
  margin-top: 1.8rem;
}

.article-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  padding: 2.5rem 0 0;
}

.article-stat {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.3rem 1.2rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.article-stat:hover {
  border-color: rgba(216, 255, 79, 0.4);
  background: var(--accent-dim);
  transform: translateY(-3px);
}

.article-stat-value {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--accent);
  line-height: 1.1;
}

.article-stat-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}

.article-section {
  padding: 3.4rem 0;
}

.article-section .section-head {
  margin-bottom: 2rem;
}

.article-section .section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.article-p {
  color: var(--ink-dim);
  max-width: 64ch;
}

.article-p + .article-p {
  margin-top: 1.1rem;
}

.article-list {
  list-style: none;
  margin-top: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 64ch;
}

.article-list li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--ink-dim);
}

.article-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
}

.article-cta {
  padding: 2.5rem 0 1rem;
}

.timeline-body h3 {
  transition: color 0.3s ease;
}

@media (max-width: 860px) {
  .article-hero {
    padding: 2.8rem 0 2.5rem;
  }

  .article-section {
    padding: 2.6rem 0;
  }

  .timeline-link {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .timeline-read {
    opacity: 1;
    transform: none;
  }
}

.error-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 2rem;
}

.error-box {
  text-align: center;
  max-width: 30em;
}

.error-box .index {
  font-size: 1rem;
}

.error-box h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 3.2rem);
  margin: 1rem 0;
}

.error-box p {
  color: var(--ink-dim);
}

.error-box a {
  display: inline-block;
  margin-top: 2rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}

@media (max-width: 860px) {
  .frame {
    grid-template-columns: 1fr;
  }

  .rail {
    position: sticky;
    top: 0;
    z-index: 40;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.85rem;
    background: rgba(11, 11, 14, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .rail-mark {
    flex-shrink: 0;
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    min-width: 2.2rem;
  }

  .rail-mark:hover {
    letter-spacing: 0.06em;
  }

  .rail-nav {
    flex: 1;
    min-width: 0;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.2rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    mask-image: linear-gradient(to right, #000 88%, transparent);
    -webkit-mask-image: linear-gradient(to right, #000 88%, transparent);
    padding: 0.1rem 0;
  }

  .rail-nav::-webkit-scrollbar {
    display: none;
  }

  .rail-nav a {
    flex-shrink: 0;
    gap: 0;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    line-height: 1;
    transform: none;
  }

  .rail-nav a span {
    display: none;
  }

  .rail-nav a:hover,
  .rail-nav a.active {
    transform: none;
    background: var(--accent-dim);
  }

  .rail-meta {
    display: none;
  }

  main {
    padding: 0 clamp(1.1rem, 4.5vw, 2rem);
  }

  .hero {
    min-height: min(70vh, 560px);
    padding: 2.4rem 0 3.5rem;
  }

  .hero h1 {
    font-size: clamp(2.15rem, 11vw, 3.4rem);
    line-height: 1.12;
  }

  .hero-role {
    margin-top: 1rem;
    font-size: 0.98rem;
  }

  .hero-links {
    margin-top: 1.6rem;
    gap: 0.65rem;
  }

  .hero-links a {
    padding: 0.6rem 1rem;
    font-size: 0.75rem;
  }

  .kicker {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    margin-bottom: 1.1rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .portrait {
    max-width: 240px;
  }

  .skill-row,
  .contact-list li {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .project-inner {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .project-no {
    display: none;
  }

  .project-meta {
    flex-direction: row;
    align-items: center;
  }

  .timeline-entry {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .footer {
    padding: 2rem 0 2.4rem;
    gap: 0.75rem;
  }

  .hero-scroll {
    display: none;
  }

  .nav-indicator {
    display: none;
  }
}

@media (max-width: 420px) {
  .rail {
    padding: 0.6rem 0.65rem;
    gap: 0.45rem;
  }

  .rail-nav a {
    padding: 0.42rem 0.58rem;
    font-size: 0.68rem;
  }

  .hero h1 {
    font-size: clamp(1.95rem, 10.5vw, 2.6rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal-item {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }

  .hero > *,
  .hero-title .char,
  .article-title .char,
  .hero-scroll,
  .skill-row.reveal-item.visible li,
  .timeline-entry.reveal-item.visible .timeline-dot {
    animation: none;
  }

  .hero-title .char,
  .article-title .char {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .pulse,
  .orb,
  .grain,
  .progress-bar,
  .hero-scroll-line {
    animation: none;
  }

  .timeline-fold[open] .timeline {
    animation: none;
  }

  .section.visible .index,
  .section:not(.reveal) .index {
    animation: none;
  }

  .chevron,
  .portrait img,
  .skill-row li,
  .social-pill,
  .hero-links a,
  .project-link,
  .rail-nav a,
  .nav-indicator {
    transition: none;
  }

  .spotlight,
  .ambient,
  .grain {
    display: none;
  }

  .portrait img {
    transform: none !important;
  }

  .magnetic {
    transform: none !important;
  }

  .section-head::after {
    width: min(12rem, 40%);
    transition: none;
  }
}
