/* ============================================
   RYAN AMIR · PORTFOLIO 2026
   high-tech ops console · mint accent
   type: JetBrains Mono · Instrument Serif
   ============================================ */

:root {
  /* Surface */
  --bg:           #06070a;
  --bg-2:         #0a0c12;
  --bg-3:         #0f1219;
  --surface:      rgba(255, 255, 255, 0.025);
  --surface-2:    rgba(255, 255, 255, 0.045);
  --border:       rgba(255, 255, 255, 0.08);
  --border-2:     rgba(255, 255, 255, 0.14);
  --border-3:     rgba(255, 255, 255, 0.22);

  /* Ink */
  --text:         #e6e7ec;
  --text-2:       #b8bac4;
  --text-mute:    #7c7f8a;
  --text-dim:     #4a4d57;

  /* Accent (tweakable) */
  --accent:       oklch(0.86 0.19 150);
  --accent-2:     oklch(0.72 0.16 150);
  --accent-glow:  oklch(0.86 0.19 150 / 0.35);
  --accent-soft:  oklch(0.86 0.19 150 / 0.10);
  --accent-line:  oklch(0.86 0.19 150 / 0.45);
  --accent-ink:   #07120c;

  /* Signal colors */
  --warn:         oklch(0.82 0.16 80);
  --danger:       oklch(0.72 0.20 25);

  /* Type */
  --mono:         'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --serif:        'Instrument Serif', 'Times New Roman', Georgia, serif;
  --display:      'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --max:          1400px;
  --gutter:       clamp(1rem, 3vw, 2.25rem);
  --rail-w:       clamp(110px, 9vw, 160px);
  --topbar-h:     52px;

  /* Motion */
  --ease:         cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-back:    cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Tweakable bg intensity */
  --bg-intensity: 1;
}

/* ============================================
   RESET
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "kern", "calt";
  min-height: 100vh;
}

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

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

img { max-width: 100%; display: block; }

/* ============================================
   BACKGROUND LAYERS
   ============================================ */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -3;
  opacity: calc(0.7 * var(--bg-intensity));
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 90%);
  opacity: calc(0.55 * var(--bg-intensity));
}

.bg-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(900px 600px at 80% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, oklch(0.4 0.18 270 / 0.10), transparent 60%);
  opacity: calc(1 * var(--bg-intensity));
}

.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--border);
  z-index: 9999;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), oklch(0.78 0.15 200));
  box-shadow: 0 0 12px var(--accent-glow);
  transition: width 80ms linear;
}

/* ============================================
   TOPBAR
   ============================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  background: oklch(0.13 0.01 250 / 0.65);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border);
  height: var(--topbar-h);
}

.topbar-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.brand-glyph {
  color: var(--accent);
  text-shadow: 0 0 16px var(--accent-glow);
  letter-spacing: -0.08em;
}
.brand-name { font-weight: 600; }
.brand-sep { color: var(--text-dim); }
.brand-role { color: var(--text-mute); font-weight: 400; }

.status-cluster {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  color: var(--text-mute);
}

.stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.stat-key { color: var(--text-dim); }
.stat-val { color: var(--text-2); }

.stat-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse-dot 2.2s ease-in-out infinite;
}
.stat-dot.ok { background: var(--accent); }
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow), 0 0 10px var(--accent-glow); }
  50%      { box-shadow: 0 0 0 5px transparent, 0 0 4px var(--accent-glow); }
}

.cta-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  transition: all 0.25s var(--ease);
}
.cta-mini:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.cta-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* Collapse status on smaller widths */
@media (max-width: 1100px) {
  .status-cluster .stat:nth-child(n+3) { display: none; }
}
@media (max-width: 720px) {
  .status-cluster { gap: 12px; }
  .status-cluster .stat:nth-child(n+2) { display: none; }
  .brand-role, .brand-sep { display: none; }
  .cta-mini .cta-dot + span { display: inline; }
}

/* ============================================
   RAIL NAV
   ============================================ */
.rail-nav {
  position: fixed;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  z-index: 60;
}
.rail-nav ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rail-nav a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 6px 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
  transition: color 0.25s var(--ease);
  position: relative;
}
.rail-nav a::before {
  content: attr(data-num);
  font-size: 9.5px;
  color: var(--text-dim);
  transition: color 0.25s var(--ease);
}
.rail-line {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--border-2);
  transition: width 0.3s var(--ease), background 0.3s var(--ease);
}
.rail-label { opacity: 0; transform: translateX(-6px); transition: all 0.3s var(--ease); }

.rail-nav a:hover, .rail-nav a.active {
  color: var(--accent);
}
.rail-nav a:hover::before, .rail-nav a.active::before {
  color: var(--accent);
}
.rail-nav a:hover .rail-line, .rail-nav a.active .rail-line {
  width: 38px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}
.rail-nav a:hover .rail-label, .rail-nav a.active .rail-label {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 880px) {
  .rail-nav { display: none; }
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  padding: clamp(48px, 8vw, 96px) 0 clamp(36px, 5vw, 64px);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 1; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 3vw, 36px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-mute);
  margin-bottom: clamp(36px, 5vw, 56px);
}
.meta-line { display: inline-flex; gap: 8px; }
.meta-key { color: var(--text-dim); }
.meta-val { color: var(--text-2); }

.hero-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.8rem, 11vw, 9.5rem);
  line-height: 0.93;
  letter-spacing: -0.06em;
  margin-bottom: clamp(28px, 4vw, 48px);
  color: var(--text);
}
.hero-title .line { display: block; }
.hero-title .line-2 { margin-left: clamp(40px, 8vw, 140px); }
.hero-title .line-3 { margin-left: clamp(80px, 16vw, 280px); }
.hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  animation: word-rise 0.85s var(--ease) forwards;
  margin-right: 0.18em;
}
.hero-title .line-1 .hero-word:nth-child(1) { animation-delay: 0.06s; }
.hero-title .line-1 .hero-word:nth-child(2) { animation-delay: 0.18s; }
.hero-title .line-2 .hero-word { animation-delay: 0.30s; }
.hero-title .line-3 .hero-word { animation-delay: 0.42s; }

.hero-word.italic {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.02em;
}

@keyframes word-rise {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-lede {
  max-width: 56ch;
  font-family: var(--mono);
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  line-height: 1.65;
  color: var(--text-2);
  margin-bottom: clamp(28px, 4vw, 40px);
  opacity: 0;
  animation: word-rise 1s var(--ease) 0.6s forwards;
}
.hero-lede strong {
  color: var(--text);
  font-weight: 600;
}
.hero-lede em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
  font-size: 1.08em;
}

/* TERMINAL */
.terminal {
  margin: clamp(28px, 4vw, 40px) 0;
  border: 1px solid var(--border-2);
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(180deg, oklch(0.13 0.02 250 / 0.45), oklch(0.10 0.02 250 / 0.7));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    0 30px 60px -30px rgba(0,0,0,0.5),
    inset 0 1px 0 0 rgba(255,255,255,0.06);
  max-width: 720px;
  opacity: 0;
  animation: word-rise 1s var(--ease) 0.8s forwards;
}
.term-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: oklch(0.10 0.01 250 / 0.6);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.term-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--text-dim);
}
.term-dot.r { background: oklch(0.7 0.18 25); }
.term-dot.y { background: oklch(0.82 0.16 80); }
.term-dot.g { background: var(--accent); }
.term-path {
  margin-left: 8px;
  color: var(--text-mute);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: none;
}
.term-status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 10px;
}

.term-body {
  padding: 18px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
  max-height: 240px;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
}
.term-line {
  white-space: nowrap;
  display: block;
}
.term-prompt { color: var(--accent); margin-right: 6px; }
.term-time   { color: var(--text-dim); margin-right: 10px; }
.term-tag    { color: var(--accent); }
.term-tag.warn { color: var(--warn); }
.term-tag.info { color: oklch(0.78 0.13 220); }
.term-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 4px;
  animation: blink 1.1s steps(2) infinite;
  box-shadow: 0 0 8px var(--accent-glow);
}
@keyframes blink { 50% { opacity: 0; } }

/* CTA */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: clamp(40px, 5vw, 56px);
  opacity: 0;
  animation: word-rise 1s var(--ease) 0.95s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border-2);
  border-radius: 4px;
  color: var(--text);
  transition: all 0.25s var(--ease);
  position: relative;
  background: var(--surface);
}
.btn-glyph { color: var(--accent); transition: transform 0.25s var(--ease); }
.btn:hover .btn-glyph { transform: translate(2px, -2px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 1px var(--accent), 0 12px 30px -10px var(--accent-glow);
}
.btn-primary .btn-glyph { color: var(--accent-ink); }
.btn-primary:hover {
  background: oklch(from var(--accent) calc(l + 0.04) c h);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--accent), 0 18px 40px -10px var(--accent-glow);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.btn-mini {
  padding: 8px 12px;
  font-size: 10.5px;
}
.btn-full {
  width: 100%;
  justify-content: center;
  padding: 14px 18px;
}

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: clamp(20px, 3vw, 32px);
  opacity: 0;
  animation: word-rise 1s var(--ease) 1.1s forwards;
}
.stat-card {
  background: oklch(0.10 0.01 250 / 0.5);
  padding: 18px 20px;
  display: grid;
  grid-template-areas: "num unit" "label label";
  align-items: baseline;
  gap: 0 6px;
  transition: background 0.25s var(--ease);
}
.stat-card:hover { background: var(--accent-soft); }
.stat-card-num {
  grid-area: num;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
}
.stat-card-unit {
  grid-area: unit;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
}
.stat-card-label {
  grid-area: label;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--text-mute);
  text-transform: lowercase;
  margin-top: 8px;
}

@media (max-width: 720px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}

/* Hero marquee */
.hero-marquee {
  margin-top: clamp(40px, 5vw, 56px);
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  background: oklch(0.08 0.01 250 / 0.4);
}
.marquee-track {
  display: inline-flex;
  gap: 28px;
  white-space: nowrap;
  width: max-content;
  animation: marquee 50s linear infinite;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--text-mute);
}
.marquee-track i { color: var(--accent); font-style: normal; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  position: relative;
  padding: clamp(72px, 10vw, 140px) 0;
  border-bottom: 1px solid var(--border);
}
.section-alt {
  background: oklch(0.085 0.01 250 / 0.35);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: lowercase;
}
.section-title {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 3vw, 32px);
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.4rem, 6.5vw, 5.8rem);
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--text);
}
.section-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
  align-self: center;
  position: relative;
}
.section-rule::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 30%;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.4s var(--ease) 0.2s;
}
.section.in-view .section-rule::before {
  transform: scaleX(1);
}
.section-mark {
  font-family: var(--mono);
  font-style: normal;
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  color: var(--accent);
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* ============================================
   PROFILE
   ============================================ */
.profile-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) 1.6fr;
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}

.portrait-card {
  position: sticky;
  top: calc(var(--topbar-h) + 24px);
}

.portrait-frame {
  position: relative;
  border: 1px solid var(--border-2);
  background: var(--surface);
  padding: 10px;
  overflow: hidden;
  box-shadow:
    0 30px 60px -30px rgba(0,0,0,0.6),
    inset 0 1px 0 0 rgba(255,255,255,0.04);
}
.portrait-frame img {
  width: 100%;
  filter: grayscale(0.4) contrast(1.05) brightness(0.95);
  transition: filter 0.6s var(--ease);
}
.portrait-frame:hover img { filter: grayscale(0) contrast(1.05) brightness(1); }
.portrait-scan {
  position: absolute;
  inset: 10px;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, transparent 0, transparent 3px, rgba(0,0,0,0.18) 3px, rgba(0,0,0,0.18) 4px);
  mix-blend-mode: overlay;
  opacity: 0.6;
}
.portrait-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding: 6px 4px 2px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  text-transform: uppercase;
  border-top: 1px solid var(--border);
}
.portrait-id { color: var(--accent); }

.spec-list {
  margin-top: 22px;
  border-top: 1px solid var(--border);
}
.spec-list div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}
.spec-list dt {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.spec-list dd {
  color: var(--text-2);
  font-family: var(--mono);
}

/* Profile body */
.bio-lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 2.1vw, 1.8rem);
  line-height: 1.4;
  color: var(--text);
  letter-spacing: -0.005em;
  margin-bottom: 1.2em;
  max-width: 32em;
}
.bio-lead em {
  font-style: italic;
  color: var(--accent);
}
.bio-body {
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-2);
  max-width: 60ch;
  margin-bottom: 2em;
}

/* Tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.tab {
  padding: 12px 16px 12px 0;
  margin-right: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
  position: relative;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-shadow: 0 0 16px var(--accent-glow);
}

.tab-panel { display: none; animation: panel-in 0.4s var(--ease); }
.tab-panel.active { display: block; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Timeline */
.timeline { list-style: none; }
.tl-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 16px;
  padding: 14px 0 22px;
}
.tl-bar { display: flex; flex-direction: column; align-items: center; padding-top: 6px; }
.tl-node {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border-2);
}
.tl-item.current .tl-node {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 14px var(--accent-glow);
}
.tl-line {
  flex: 1;
  width: 1px;
  background: var(--border);
  margin-top: 8px;
}
.tl-item:last-child .tl-line { display: none; }

.tl-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.tl-head h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  color: var(--text);
  letter-spacing: -0.005em;
}
.tl-at {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.7em;
  color: var(--text-mute);
  letter-spacing: 0.04em;
  margin-left: 6px;
}
.tl-date {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.tl-list { list-style: none; padding-left: 0; }
.tl-list li {
  position: relative;
  padding: 4px 0 4px 22px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.6;
}
.tl-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 11px;
  top: 6px;
}
.tl-list strong { color: var(--accent); font-weight: 500; }

/* Gauges */
.gauges {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 36px;
}
@media (max-width: 720px) { .gauges { grid-template-columns: 1fr; } }

.gauge { }
.gauge-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.gauge-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--text);
}
.gauge-val {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.gauge-track {
  height: 6px;
  background: var(--border);
  position: relative;
  overflow: hidden;
  border-radius: 1px;
}
.gauge-fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, var(--accent) 0%, oklch(0.78 0.13 200) 100%);
  box-shadow: 0 0 12px var(--accent-glow);
  transition: width 1.6s var(--ease);
}
.gauge-fill::after {
  content: '';
  position: absolute;
  right: 0; top: -2px; bottom: -2px;
  width: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow), 0 0 20px var(--accent-glow);
}
.gauge-ticks {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, transparent 0%, transparent 9%, rgba(255,255,255,0.04) 10%);
  background-size: 10% 100%;
  pointer-events: none;
}
.gauge-tag {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* Cert list */
.cert-list { list-style: none; border-top: 1px solid var(--border); }
.cert-list li {
  display: grid;
  grid-template-columns: 80px 1fr auto 10px;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.3s var(--ease), background 0.3s var(--ease);
}
.cert-list li:hover { padding-left: 12px; background: var(--accent-soft); }
.cert-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.cert-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--text);
}
.cert-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.08em;
}
.cert-light {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* Education */
.edu-card {
  padding: 24px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  border-radius: 4px;
}
.edu-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.edu-head h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--text);
}
.edu-date {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.edu-card p {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 14px;
}
.edu-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.edu-tags span {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 4px 9px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  color: var(--text-mute);
}

/* ============================================
   PRACTICE
   ============================================ */
.practice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
@media (max-width: 900px) { .practice-grid { grid-template-columns: 1fr; } }

.module {
  background: var(--bg-2);
  padding: clamp(24px, 3.5vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: background 0.35s var(--ease);
  overflow: hidden;
}
.module::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(400px 250px at 70% 0%, var(--accent-soft), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.module:hover::before { opacity: 1; }
.module:hover { background: var(--bg-3); }

.module-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.module-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.module-light {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

.module-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  margin: 16px 0 8px;
}
.module-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.module p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.65;
  max-width: 38ch;
}
.module-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin-top: 8px;
}
.module-tags li {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 4px 10px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  color: var(--text-mute);
}
.module-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--text-mute);
  text-transform: uppercase;
}
.mini-bar {
  flex: 1;
  height: 2px;
  background: var(--border);
  position: relative;
}
.mini-bar div {
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
}

/* ============================================
   FOLIO
   ============================================ */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: clamp(28px, 4vw, 48px);
  font-family: var(--mono);
  font-size: 11px;
}
.filter-key {
  color: var(--text-dim);
  letter-spacing: 0.12em;
  margin-right: 6px;
}
.filter-btn {
  padding: 6px 12px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  color: var(--text-mute);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  transition: all 0.25s var(--ease);
}
.filter-btn:hover { color: var(--text); border-color: var(--border-3); }
.filter-btn.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  box-shadow: 0 0 18px var(--accent-glow);
}
.filter-count {
  margin-left: auto;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

/* Featured */
.feature-project {
  margin-bottom: clamp(40px, 5vw, 60px);
  border: 1px solid var(--border-2);
  background: linear-gradient(180deg, oklch(0.10 0.02 250 / 0.55), oklch(0.08 0.01 250 / 0.7));
  border-radius: 6px;
  overflow: hidden;
}
.feat-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: stretch;
}
@media (max-width: 900px) { .feat-grid { grid-template-columns: 1fr; } }

.feat-media { position: relative; overflow: hidden; background: var(--bg-2); border-right: 1px solid var(--border); }
.feat-media-link { display: block; position: relative; }
.feat-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 320px;
  filter: contrast(1.05) saturate(0.95);
  transition: transform 0.7s var(--ease);
}
.feat-media:hover img { transform: scale(1.03); }
.feat-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.7));
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  letter-spacing: 0.06em;
}
.feat-overlay-chip {
  padding: 4px 10px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.1em;
}
.feat-overlay-link { color: var(--accent); }

.feat-body {
  padding: clamp(24px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.feat-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--accent);
  width: fit-content;
}
.feat-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text);
}
.feat-title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.feat-desc {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.65;
  max-width: 50ch;
}

.feat-mini-dash {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.mini-stat {
  background: oklch(0.07 0.01 250 / 0.6);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mini-key {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.mini-val {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Telemetry rows with spark */
.feat-telemetry {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 12px;
  background: oklch(0.07 0.01 250 / 0.6);
}
.tele-row {
  display: grid;
  grid-template-columns: 60px 1fr 50px;
  gap: 12px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
}
.tele-row:last-child { border-bottom: none; }
.tele-label { color: var(--text-dim); letter-spacing: 0.1em; }
.tele-num { color: var(--accent); text-align: right; font-weight: 500; }
.spark { width: 100%; height: 32px; }

/* Folio grid */
.folio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
@media (max-width: 1000px) { .folio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .folio-grid { grid-template-columns: 1fr; } }

.folio-card {
  background: var(--bg-2);
  transition: background 0.3s var(--ease);
  position: relative;
}
.folio-card a { display: block; height: 100%; }
.folio-card:hover { background: var(--bg-3); }

.folio-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.folio-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) saturate(0.9) brightness(0.95);
  transition: transform 0.7s var(--ease), filter 0.4s var(--ease);
}
.folio-card:hover .folio-media img {
  transform: scale(1.04);
  filter: contrast(1.05) saturate(1) brightness(1);
}

.folio-meta {
  padding: clamp(18px, 2.5vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.folio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
}
.folio-num { color: var(--accent); }
.folio-year { color: var(--text-dim); }
.folio-light {
  margin-left: auto;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}
.folio-meta h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.15;
}
.folio-meta p {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.6;
}
.folio-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.folio-tags span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  color: var(--text-mute);
}
.folio-arrow {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
  transition: transform 0.25s var(--ease);
}
.folio-card:hover .folio-arrow { transform: translateX(3px); }

.folio-foot {
  margin-top: clamp(40px, 5vw, 60px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.folio-foot-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.06em;
}

/* ============================================
   CONTACT
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(28px, 4vw, 56px);
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 28px;
  max-width: 28em;
}
.contact-lead em { color: var(--accent); }

.contact-list {
  list-style: none;
  border-top: 1px solid var(--border);
  margin-bottom: 28px;
}
.contact-list li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12.5px;
}
.contact-list .ck {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}
.contact-list a, .contact-list span:not(.ck) {
  color: var(--text-2);
  transition: color 0.25s var(--ease);
}
.contact-list a:hover { color: var(--accent); }

.response-card {
  padding: 16px 18px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  border-radius: 4px;
}
.response-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.response-key {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.response-light {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
.response-card p {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
}
.response-card strong { color: var(--accent); font-weight: 500; }

/* Contact form */
.contact-form {
  border: 1px solid var(--border-2);
  border-radius: 6px;
  overflow: hidden;
  background: oklch(0.08 0.01 250 / 0.5);
}
.form-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: oklch(0.10 0.01 250 / 0.6);
}
.form-chrome .term-path { margin-left: 8px; }
.form-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-body label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-key {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
.form-body input,
.form-body textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: 3px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  resize: vertical;
}
.form-body input::placeholder,
.form-body textarea::placeholder { color: var(--text-dim); }
.form-body input:focus,
.form-body textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 18px var(--accent-glow);
}
.form-message {
  font-family: var(--mono);
  font-size: 11.5px;
  min-height: 1.3em;
}
.form-message.is-success { color: var(--accent); }
.form-message.is-error { color: var(--danger); }

/* ============================================
   COLOPHON
   ============================================ */
.colophon {
  padding: clamp(48px, 6vw, 72px) 0 clamp(24px, 3vw, 36px);
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}
.colo-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: clamp(20px, 3vw, 40px);
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 720px) { .colo-grid { grid-template-columns: 1fr 1fr; } }

.colo-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.colo-block p {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-mute);
  line-height: 1.6;
  max-width: 36ch;
}
.colo-block p em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent);
}
.colo-key {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.colo-block ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.colo-block ul li a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  transition: color 0.25s var(--ease);
}
.colo-block ul li a:hover { color: var(--accent); }

.sys-list li {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-mute);
  padding: 3px 0;
}
.sys-list li span:last-child { color: var(--accent); }

.colo-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-mute);
  letter-spacing: 0.06em;
}
.to-top { color: var(--accent); }
.to-top:hover { text-decoration: underline; }

/* ============================================
   AGENT
   ============================================ */
html.agent-open .agent-launcher {
  pointer-events: none;
}

.agent-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  transition: all 0.3s var(--ease);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.6);
  overflow: hidden;
}
.agent-launcher:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 22px 60px -20px var(--accent-glow);
}
.agent-glyph {
  display: inline-block;
  color: var(--accent);
  font-size: 14px;
  animation: agent-rot 6s linear infinite;
}
.agent-glyph.small { font-size: 12px; }
@keyframes agent-rot { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.agent-ring {
  position: absolute;
  inset: -1px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  opacity: 0;
  animation: agent-ring 2.6s ease-out infinite;
}
@keyframes agent-ring {
  0%   { opacity: 0.5; transform: scale(1); }
  100% { opacity: 0;   transform: scale(1.4); }
}
.agent-pulse {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 50%, var(--accent-soft), transparent 60%);
  pointer-events: none;
}

.agent-panel[hidden] { display: none; }

.agent-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10050;
  width: min(380px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 80px));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  background: oklch(0.10 0.01 250 / 0.92);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.7);
  overflow: hidden;
  animation: agent-in 0.35s var(--ease);
}
@keyframes agent-in {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.agent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
}
.agent-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); flex: 1; min-width: 0; }
.agent-name { color: var(--accent); letter-spacing: 0.08em; }
.agent-meta { color: var(--text-mute); font-size: 10.5px; }
.agent-close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin: -10px -6px -10px 0;
  touch-action: manipulation;
  border-radius: 999px;
  color: var(--text-mute);
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s var(--ease);
}
.agent-close:hover { color: var(--accent); background: var(--accent-soft); }

.agent-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}
.agent-body::-webkit-scrollbar { width: 6px; }
.agent-body::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 999px; }

.agent-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
}
.agent-msg-role {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.agent-msg-text {
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.agent-msg-bot .agent-msg-role { color: var(--accent); }
.agent-msg-bot .agent-msg-text {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.agent-msg-user { align-items: flex-end; }
.agent-msg-user .agent-msg-text { background: var(--bg-3); }

.agent-typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.agent-typing .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: agent-bounce 1s infinite;
}
.agent-typing .dot:nth-child(2) { animation-delay: 0.15s; }
.agent-typing .dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes agent-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-4px); opacity: 1; }
}

.agent-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 12px;
  border-bottom: 1px solid var(--border);
}
.agent-chip {
  padding: 5px 10px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-2);
  transition: all 0.2s var(--ease);
}
.agent-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.agent-input {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  gap: 8px;
  background: oklch(0.08 0.01 250 / 0.6);
}
.agent-input input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.agent-input input::placeholder { color: var(--text-dim); }
.agent-input input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.agent-input button {
  width: 38px; height: 38px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease);
}
.agent-input button:hover {
  background: oklch(from var(--accent) calc(l + 0.04) c h);
  box-shadow: 0 0 18px var(--accent-glow);
}

/* ============================================
   BOOT OVERLAY
   ============================================ */
.boot {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: #04050a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  color: var(--text);
  transition: opacity 0.6s var(--ease), visibility 0s linear 0.6s;
}
.boot.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.boot-inner {
  width: min(520px, 90vw);
  padding: 24px;
  border: 1px solid var(--border-2);
  border-radius: 6px;
  background:
    radial-gradient(400px 200px at 50% -20%, var(--accent-soft), transparent 70%),
    oklch(0.08 0.01 250 / 0.8);
  position: relative;
  overflow: hidden;
}
.boot-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 0%, transparent 50%, rgba(255,255,255,0.025) 50%, transparent 51%);
  background-size: 100% 3px;
  pointer-events: none;
  opacity: 0.5;
}
.boot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.12em;
  margin-bottom: 18px;
}
.boot-brand .brand-glyph { color: var(--accent); text-shadow: 0 0 14px var(--accent-glow); }
.boot-meta { color: var(--text-mute); }
.boot-lines {
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--text-2);
  min-height: 140px;
  margin-bottom: 18px;
}
.boot-line { display: block; opacity: 0; animation: boot-in 0.3s var(--ease) forwards; }
.boot-line .ok   { color: var(--accent); }
.boot-line .warn { color: var(--warn); }
.boot-line .info { color: oklch(0.78 0.13 220); }
.boot-line .dim  { color: var(--text-dim); margin-right: 8px; }
@keyframes boot-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.boot-bar {
  height: 2px;
  background: var(--border);
  margin-bottom: 8px;
  overflow: hidden;
  position: relative;
}
.boot-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), oklch(0.78 0.15 200));
  box-shadow: 0 0 12px var(--accent-glow);
  transition: width 0.2s linear;
}
.boot-pct {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-align: right;
}

/* ============================================
   MOUSE SPOTLIGHT
   ============================================ */
.spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(
    600px circle at var(--mx, 50%) var(--my, 30%),
    var(--accent-soft),
    transparent 50%
  );
  opacity: calc(0.5 * var(--bg-intensity));
  transition: opacity 0.4s var(--ease);
  mix-blend-mode: screen;
}

@media (hover: none) {
  .spotlight { display: none; }
}

/* ============================================
   VIEWING NOW
   ============================================ */
.viewing-now {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: var(--surface);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--text-2);
}
.viewing-now .vn-key { color: var(--text-dim); }
.viewing-now .vn-val {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  min-width: 12px;
  text-align: right;
}
.viewing-now .vn-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse-dot 1.6s ease-in-out infinite;
}

/* ============================================
   AGENT KBD HINT
   ============================================ */
.agent-kbd {
  margin-left: 4px;
  padding: 2px 6px;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 0;
}
.agent-launcher:hover .agent-kbd {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================
   NOW FEED (colophon)
   ============================================ */
.colo-now .colo-brand {
  margin-bottom: 14px;
}
.now-light {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: pulse-dot 1.8s ease-in-out infinite;
  margin-left: auto;
}
.now-feed {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.now-feed li {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 10px;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.now-feed li:last-child { border-bottom: none; }
.now-time { color: var(--text-dim); font-size: 10px; }
.now-tag {
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border-2);
  color: var(--text-mute);
}
.now-tag.ok   { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.now-tag.info { color: oklch(0.78 0.13 220); border-color: oklch(0.78 0.13 220 / 0.4); }

/* ============================================
   3D TILT
   ============================================ */
.folio-card, .module, .feature-project {
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease);
  will-change: transform;
}
.folio-card.tilting, .module.tilting, .feature-project.tilting {
  transition: transform 0.05s linear;
}

/* Magnetic button glyph */
.btn .btn-glyph {
  display: inline-block;
  will-change: transform;
}

/* Scramble */
[data-scramble] {
  font-variant-ligatures: none;
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-d-1 { transition-delay: 0.05s; }
.reveal-d-2 { transition-delay: 0.15s; }
.reveal-d-3 { transition-delay: 0.25s; }
.reveal-d-4 { transition-delay: 0.35s; }

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .term-cursor { animation: none; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .profile-grid { grid-template-columns: 1fr; }
  .portrait-card { position: static; max-width: 360px; }
}
@media (max-width: 720px) {
  .hero-title .line-2 { margin-left: 0; }
  .hero-title .line-3 { margin-left: 0; }
  .stat-card-num { font-size: 1.8rem; }
  .agent-launcher { padding: 10px 14px; }
  .agent-launcher .agent-text { display: none; }
}
