/* ============================================================
   Manuel Brandstetter — Portfolio
   Design system: mono + sans, ink/paper neutrals, single accent
   ============================================================ */

:root {
  /* --- Accents --- */
  --accent-h: 265;
  --accent-c: 0.22;
  --accent-l: 0.58;
  --accent: oklch(var(--accent-l) var(--accent-c) var(--accent-h));
  --accent-soft: oklch(var(--accent-l) var(--accent-c) var(--accent-h) / 0.12);
  --accent-ink: oklch(0.3 0.18 var(--accent-h));

  /* --- Fonts --- */
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --font-display: var(--font-mono);
  --font-body: var(--font-sans);

  /* --- Neutrals: light --- */
  --paper: oklch(0.985 0.003 90);
  --paper-2: oklch(0.965 0.004 90);
  --ink: oklch(0.18 0.01 260);
  --ink-2: oklch(0.38 0.01 260);
  --ink-3: oklch(0.55 0.008 260);
  --rule: oklch(0.9 0.005 260);
  --rule-strong: oklch(0.82 0.006 260);

  /* --- Surfaces --- */
  --bg: var(--paper);
  --fg: var(--ink);
  --muted: var(--ink-2);
  --dim: var(--ink-3);
  --border: var(--rule);

  /* --- Motion --- */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* --- Layout --- */
  --col-gap: 24px;
  --row-gap: 0;
  --gutter: clamp(24px, 4vw, 72px);
  --max: 1320px;
}

:root[data-theme="dark"] {
  --paper: oklch(0.14 0.008 260);
  --paper-2: oklch(0.18 0.01 260);
  --ink: oklch(0.96 0.005 90);
  --ink-2: oklch(0.75 0.008 90);
  --ink-3: oklch(0.58 0.008 90);
  --rule: oklch(0.28 0.01 260);
  --rule-strong: oklch(0.38 0.01 260);
  --accent-soft: oklch(var(--accent-l) var(--accent-c) var(--accent-h) / 0.18);
  --accent-ink: oklch(0.75 0.18 var(--accent-h));
}

/* Auto-dark when system-dark AND user hasn't overridden */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --paper: oklch(0.14 0.008 260);
    --paper-2: oklch(0.18 0.01 260);
    --ink: oklch(0.96 0.005 90);
    --ink-2: oklch(0.75 0.008 90);
    --ink-3: oklch(0.58 0.008 90);
    --rule: oklch(0.28 0.01 260);
    --rule-strong: oklch(0.38 0.01 260);
    --accent-soft: oklch(var(--accent-l) var(--accent-c) var(--accent-h) / 0.18);
  }
}

/* Background treatments */
:root[data-bg="grid"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, var(--rule-strong) 1px, transparent 0);
  background-size: 28px 28px;
  opacity: 0.75;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, black 0%, black 45%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, black 0%, black 45%, transparent 100%);
}
:root[data-bg="grid"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  background-position: 0 0;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
  max-width: var(--max);
  left: 50%;
  transform: translateX(-50%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
}

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

html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

main, header, footer, section, nav { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-ink); }

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

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

/* ---------- Shell ---------- */
.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Top nav ---------- */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  z-index: 50;
}
.topnav .brand {
  color: var(--fg);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}
.topnav .brand::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 6px;
  background: var(--accent);
  border-radius: 2px;
  transform: rotate(45deg);
  display: inline-block;
}
.topnav .brand .at { color: var(--accent-ink); }
.topnav .anchors {
  display: flex;
  gap: 22px;
}
.topnav .anchors a {
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.topnav .anchors a::before { content: "["; color: var(--dim); margin-right: 2px; }
.topnav .anchors a::after { content: "]"; color: var(--dim); margin-left: 2px; }
.topnav .anchors a:hover { color: var(--fg); }
.topnav .anchors a:hover::before,
.topnav .anchors a:hover::after { color: var(--accent-ink); }

.topnav .right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  transition: all 0.2s var(--ease);
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--fg);
}
.theme-toggle .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(56px, 9vw, 120px) var(--gutter) clamp(56px, 9vw, 96px);
  border-bottom: 1px solid var(--border);
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
}
.hero::before,
.hero::after {
  content: "+";
  position: absolute;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--dim);
  opacity: 0.6;
}
.hero::before { top: 12px; left: var(--gutter); }
.hero::after  { top: 12px; right: var(--gutter); }

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--col-gap);
  align-items: end;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.meta-label .num {
  color: var(--accent-ink);
}

.hero-left {
  grid-column: 1 / span 8;
}
.hero-right {
  grid-column: 9 / span 4;
  border-left: 1px solid var(--border);
  padding-left: 24px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 18px;
}

h1.hero-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 7.6vw, 104px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  margin: 20px 0 32px;
  color: var(--fg);
}
h1.hero-name .slash {
  color: var(--accent);
  display: inline-block;
  transform: skewX(-8deg);
  padding: 0 0.05em;
}
h1.hero-name .cursor {
  display: inline-block;
  width: 0.45ch;
  height: 0.82em;
  background: var(--accent);
  vertical-align: -0.04em;
  margin-left: 0.12em;
  animation: blink 1.1s steps(1, end) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.45;
  max-width: 58ch;
  color: var(--ink-2);
  margin: 0;
}
.hero-tagline b { color: var(--fg); font-weight: 600; }

.hero-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.hero-facts dt,
.hero-facts dd {
  padding: 7px 12px 7px 0;
  border-bottom: 1px solid var(--border);
  margin: 0;
}
.hero-facts dt {
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10.5px;
  padding-right: 16px;
}
.hero-facts dd {
  color: var(--fg);
  text-align: right;
}

/* Now ticker */
.now-ticker {
  margin-top: 4px;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: color-mix(in oklab, var(--paper-2) 70%, transparent);
}
.now-ticker-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.now-ticker-head .pulse {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 1.8s var(--ease) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 60%, transparent); }
  100% { box-shadow: 0 0 0 10px transparent; }
}
.now-ticker-viewport {
  overflow: hidden;
  height: 32px;
  position: relative;
}
.now-ticker-track {
  display: flex;
  flex-direction: column;
  transition: transform 0.5s var(--ease-out);
}
.now-ticker-row {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.now-ticker-row .k { color: var(--accent-ink); }
.now-ticker-row .v { color: var(--fg); }

/* ---------- Sections ---------- */
.section {
  padding: clamp(48px, 7vw, 96px) var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--col-gap);
  align-items: baseline;
  margin-bottom: 48px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--border);
}
.section-head .num-col {
  grid-column: 1 / span 2;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  position: sticky;
  top: 80px;
  align-self: start;
}
.section-head .num-col .n {
  color: var(--accent-ink);
  font-weight: 600;
}
.section-head h2 {
  grid-column: 3 / span 7;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  color: var(--fg);
}
.section-head .aside {
  grid-column: 10 / span 3;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

/* ---------- Experience (subgrid row) ---------- */
.experience-list {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0 var(--col-gap);
}
.experience-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  align-items: start;
  position: relative;
  cursor: pointer;
  transition: background 0.3s var(--ease);
}
.experience-row:first-child { border-top: 1px solid var(--rule-strong); }
.experience-row:last-child { border-bottom: 1px solid var(--border); }

.experience-row:hover { background: color-mix(in oklab, var(--accent) 3%, transparent); }

.experience-row .year {
  grid-column: 1 / span 2;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  padding-top: 4px;
  letter-spacing: 0.02em;
}
.experience-row .year .present {
  color: var(--accent-ink);
  position: relative;
  padding-left: 12px;
}
.experience-row .year .present::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.experience-row .org-col {
  grid-column: 3 / span 3;
}
.experience-row .org {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 0 0 2px;
}
.experience-row .loc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dim);
}

.experience-row .role-col {
  grid-column: 6 / span 4;
}
.experience-row .role {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--fg);
  margin: 0;
  font-weight: 500;
}
.experience-row .summary {
  font-size: 14px;
  color: var(--muted);
  margin: 6px 0 0;
  line-height: 1.5;
}

.experience-row .expand-col {
  grid-column: 10 / span 3;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding-top: 4px;
}
.expand-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.experience-row:hover .expand-chip {
  border-color: var(--accent);
  color: var(--accent-ink);
}
.experience-row[data-open="true"] .expand-chip {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}

.experience-row .detail {
  grid-column: 3 / span 10;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}
.experience-row .detail-inner {
  overflow: hidden;
  min-height: 0;
}
.experience-row[data-open="true"] .detail {
  grid-template-rows: 1fr;
}
.detail-body {
  padding: 24px 0 8px;
  border-top: 1px dashed var(--border);
  margin-top: 4px;
}
.detail-body ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.detail-body li {
  position: relative;
  padding-left: 22px;
  font-size: 14.5px;
  color: var(--ink-2);
  margin-bottom: 10px;
  line-height: 1.55;
}
.detail-body li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-ink);
  font-family: var(--font-mono);
}
.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-self: start;
}
.stack-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  background: var(--paper-2);
  white-space: nowrap;
}

.assignments {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
}
.assignments-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 10px;
}
.assignments ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: asg;
}
.assignments li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 6px 16px;
  align-items: baseline;
  padding: 8px 0 8px 22px;
  border-left: 1px solid var(--border);
  margin-left: 6px;
  position: relative;
  counter-increment: asg;
}
.assignments li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 13px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.assignments li:first-child::before {
  background: var(--accent);
}
.assignments .when {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.02em;
}
.assignments .what {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}
.assignments .note {
  grid-column: 2;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.stack-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: start;
}
.stack-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stack-group-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 6px;
}
.stack-group-label::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 1px;
  display: inline-block;
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--col-gap);
}
.project-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--paper-2);
  overflow: hidden;
  transition: all 0.35s var(--ease);
  position: relative;
  min-height: 340px;
}
.project-card::before,
.project-card::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid var(--rule-strong);
  background: var(--bg);
  z-index: 2;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.project-card::before { top: -4px; left: -4px; }
.project-card::after { bottom: -4px; right: -4px; }
.project-card:hover::before,
.project-card:hover::after {
  border-color: var(--accent);
  background: var(--accent);
}
.project-card.featured {
  grid-column: span 6;
  min-height: 380px;
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 24px 48px -24px color-mix(in oklab, var(--accent) 40%, transparent);
}
.project-thumb {
  aspect-ratio: 4 / 3;
  position: relative;
  background:
    linear-gradient(to right, var(--border) 1px, transparent 1px) 0 0 / 32px 100%,
    linear-gradient(to bottom, var(--border) 1px, transparent 1px) 0 0 / 100% 32px,
    color-mix(in oklab, var(--accent) 4%, var(--paper));
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  overflow: hidden;
}
.project-thumb::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}
.project-thumb::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 10px;
  height: 10px;
  border-bottom: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
}
.project-card.featured .project-thumb { aspect-ratio: 16 / 9; }
.project-thumb-caption {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  background: color-mix(in oklab, var(--paper) 85%, transparent);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 6px 10px;
  backdrop-filter: blur(4px);
  position: relative;
  z-index: 1;
}
.project-meta {
  padding: 18px 20px 20px;
}
.project-meta .top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.project-meta .top h3 { flex: 1 1 auto; min-width: 0; }
.project-meta h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--fg);
}
.project-meta .year {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dim);
  white-space: nowrap;
}
.project-meta .client {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-ink);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.project-meta .summary {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 14px;
}
/* Project card expand */
.project-card[data-expandable] { cursor: pointer; }

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.project-visit-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-ink);
  letter-spacing: 0.04em;
}
.project-visit-link:hover {
  color: var(--accent-ink);
  text-decoration: underline;
}

.project-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}
.project-detail-inner {
  overflow: hidden;
  min-height: 0;
}
.project-card[data-open="true"] .project-detail {
  grid-template-rows: 1fr;
}
.project-detail-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px dashed var(--border);
}

/* ---------- Education ---------- */
.education-list {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--col-gap);
}
.education-row {
  grid-column: span 6;
  display: flex;
  gap: 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
  align-items: flex-start;
}
.education-row .years {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
  min-width: 90px;
  padding-top: 2px;
}
.education-row .degree {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 2px;
}
.education-row .school {
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--col-gap);
  grid-template-rows: auto;
}
.skills-col {
  grid-column: span 4;
  position: relative;
}
.skills-col::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  opacity: 0.5;
}
.skills-col.solid::before { opacity: 0.3; }
.skills-col.curious::before {
  opacity: 0.5;
  background: repeating-linear-gradient(to bottom, var(--accent) 0 4px, transparent 4px 8px);
}
.skills-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0 0 14px;
  padding-left: 14px;
}
.skills-col h4 .n { color: var(--accent-ink); }
.skills-col ul { list-style: none; padding: 0 0 0 14px; margin: 0; }
.skills-col li {
  font-family: var(--font-display);
  font-size: 15px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 12px;
  align-items: center;
}
.skills-col li::after {
  content: "";
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--accent) var(--conf, 60%), var(--border) var(--conf, 60%));
  justify-self: stretch;
}

/* ---------- Writing ---------- */
.writing-list {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0 var(--col-gap);
}
.writing-item {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  align-items: baseline;
  transition: color 0.2s var(--ease);
}
.writing-item:last-child { border-bottom: 1px solid var(--border); }
.writing-item:hover { color: var(--accent-ink); }
.writing-item .date {
  grid-column: 1 / span 2;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
}
.writing-item .title {
  grid-column: 3 / span 7;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.writing-item .read {
  grid-column: 10 / span 3;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dim);
  text-align: right;
}

/* ---------- Timeline scrubber ---------- */
.timeline {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  padding-top: 40px;
}
.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.timeline-rail {
  position: relative;
  height: 70px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(to right, var(--border) 1px, transparent 1px) 0 0 / 12.5% 100%;
}
.timeline-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--rule-strong);
}
.timeline-tick .y {
  position: absolute;
  top: -18px;
  left: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.timeline-bar {
  position: absolute;
  height: 16px;
  border-radius: 3px;
  background: var(--accent);
  opacity: 0.25;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
}
.timeline-bar:hover {
  opacity: 0.6;
  transform: scaleY(1.15);
  z-index: 2;
  border-color: var(--accent);
}
.timeline-bar[data-featured="true"] {
  opacity: 1;
  background: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 25%, transparent);
}
.timeline-bar[data-active="true"] {
  opacity: 1;
  background: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 25%, transparent);
}
.timeline-bar .label {
  position: absolute;
  left: 0;
  top: -18px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg);
  white-space: nowrap;
  padding: 0 4px;
  background: var(--bg);
  border-radius: 2px;
}

/* ---------- Footer / contact ---------- */
.footer {
  padding: clamp(64px, 9vw, 112px) var(--gutter) 48px;
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px solid var(--rule-strong);
  position: relative;
}
.footer::before {
  content: "//";
  position: absolute;
  top: 20px;
  left: var(--gutter);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-ink);
  letter-spacing: 0.1em;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--col-gap);
  align-items: end;
}
.footer h2 {
  grid-column: 1 / span 8;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 6.5vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0;
}
.footer h2 .blink {
  color: var(--accent);
  position: relative;
}
.footer h2 .blink::after {
  content: "_";
  animation: blink 1.1s steps(1, end) infinite;
  margin-left: 0.05em;
}
.footer-links {
  grid-column: 9 / span 4;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
.footer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  transition: all 0.2s var(--ease);
  color: var(--fg);
}
.footer-link:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
  transform: translateX(2px);
}
.footer-link .arrow { color: var(--dim); transition: transform 0.2s var(--ease); }
.footer-link:hover .arrow { color: var(--accent-ink); transform: translateX(2px); }

.footer-meta {
  grid-column: 1 / -1;
  margin-top: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dim);
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-left, .hero-right,
  .section-head .num-col, .section-head h2, .section-head .aside,
  .project-card, .project-card.featured,
  .education-row, .skills-col,
  .footer h2, .footer-links,
  .experience-row .year, .experience-row .org-col, .experience-row .role-col, .experience-row .expand-col, .experience-row .detail {
    grid-column: 1 / -1 !important;
  }
  .hero-right { border-left: 0; padding-left: 0; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
  .section-head .aside { text-align: left; }
  .writing-item { grid-template-columns: 90px 1fr; }
  .writing-item .read { display: none; }
  .topnav .anchors { display: none; }
}

/* ---------- Utility ---------- */
.mono { font-family: var(--font-mono); }
.dim { color: var(--dim); }
.kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--paper-2);
  color: var(--muted);
}
