/* ============================================
   ANIL GÜL — PORTFOLIO v3
   Dark monochrome / orbital / kinetic
   ============================================ */

:root {
  color-scheme: dark;
  --ink: 255,255,255;
  --surface: 12,12,16;
  --paper: #08080b;
  --vignette: rgba(0,0,0,0.7);
  --bg: #07070a;
  --bg-2: #0d0d12;
  --fg: rgb(var(--ink));
  --fg-60: rgba(var(--ink),0.6);
  --fg-40: rgba(var(--ink),0.4);
  --fg-20: rgba(var(--ink),0.2);
  --fg-08: rgba(var(--ink),0.08);
  --line: rgba(var(--ink),0.08);
  --accent-a: #5b6cf8;
  --accent-b: #a855f7;
  --accent-c: #14b48c;
  --mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --ink: 26,28,38;
  --surface: 255,255,255;
  --paper: #f4f2ee;
  --vignette: rgba(20,24,48,0.05);
  --bg: #ecebe6;
  --bg-2: #e2e0da;
  --accent-a: #4f5fe6;
  --accent-b: #9333ea;
  --accent-c: #0f9d72;
}

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

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  scroll-behavior: smooth;
  forced-color-adjust: none;
  transition: background-color 0.5s ease, color 0.5s ease;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }
a, .node, .channel, .tech-cell, .related-btn { cursor: pointer; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================
   CANVAS BG
   ============================================ */
#constellation {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: 0; pointer-events: none; opacity: 0.55;
  transition: opacity 0.5s ease;
}
html[data-theme="light"] #constellation { opacity: 0.8; }

.bg-grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.06;
  mix-blend-mode: overlay;
  background-image:
    repeating-linear-gradient(0deg, rgba(var(--ink),0.04) 0px, rgba(var(--ink),0.04) 1px, transparent 1px, transparent 3px);
}

.bg-vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 0%, transparent 50%, var(--vignette) 100%);
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
  transform: translate(-50%,-50%);
  mix-blend-mode: difference;
}
.cursor-dot {
  width: 4px; height: 4px; background: rgb(var(--ink)); border-radius: 50%;
  transition: width 0.2s, height 0.2s, opacity 0.2s;
}
.cursor-ring {
  width: 32px; height: 32px; border: 1px solid rgba(var(--ink),0.5); border-radius: 50%;
  transition: width 0.25s cubic-bezier(.4,0,.2,1), height 0.25s cubic-bezier(.4,0,.2,1), border-color 0.2s, transform 0.08s linear;
}
.cursor-ring.hover { width: 56px; height: 56px; border-color: rgb(var(--ink)); }
.cursor-dot.hover { opacity: 0; }
.cursor-label {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
  transform: translate(20px, 20px);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(var(--ink),0.7);
  background: rgba(0,0,0,0.7); padding: 4px 8px; border: 0.5px solid rgba(var(--ink),0.15);
  border-radius: 2px; opacity: 0;
  transition: opacity 0.2s;
}
.cursor-label.show { opacity: 1; }

@media (max-width: 768px) {
  html, body { cursor: auto; }
  .cursor-dot, .cursor-ring, .cursor-label { display: none; }
  a, button { cursor: pointer; }
}

/* ============================================
   PRELOADER
   ============================================ */
#preloader {
  position: fixed; inset: 0; z-index: 10000; background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
#preloader.gone { opacity: 0; visibility: hidden; }
.preloader-inner { width: min(560px, 90vw); padding: 24px; }
.pre-line { font-family: var(--mono); font-size: 11px; color: rgba(var(--ink),0.5); line-height: 1.8; min-height: 1.8em; }
.pre-line .tag { color: rgba(91,108,248,0.9); }
.pre-line .ok { color: rgba(20,180,140,0.95); }
.pre-line .err { color: rgba(255,90,90,0.9); }
.pre-cursor { display: inline-block; width: 7px; height: 12px; background: rgb(var(--ink)); vertical-align: -1px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.pre-bar { margin-top: 14px; height: 2px; background: rgba(var(--ink),0.06); overflow: hidden; position: relative; }
.pre-bar-fill { position: absolute; left: 0; top: 0; height: 100%; width: 0; background: linear-gradient(90deg, #5b6cf8, #a855f7); transition: width 0.3s ease; }
.pre-meta { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--mono); font-size: 9px; color: rgba(var(--ink),0.3); letter-spacing: 0.15em; }

/* ============================================
   TOP CHROME — NAV + STATUS
   ============================================ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 178px 18px 28px;
  pointer-events: none;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-60);
  mix-blend-mode: difference;
}
.topbar > * { pointer-events: auto; }
.brand-mark { display: flex; align-items: center; gap: 10px; }
.brand-dot { width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #c4b5fd, #5b6cf8 60%, #14b48c); box-shadow: 0 0 12px rgba(91,108,248,0.6); animation: pulse-dot 3s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.3); opacity: 0.85; } }
.brand-text { color: var(--fg); font-weight: 500; letter-spacing: 0.22em; }
.brand-suffix { color: var(--fg-40); }

.nav-links { display: flex; gap: 18px; align-items: center; }
.nav-link { position: relative; color: var(--fg-40); transition: color 0.25s; }
.nav-link:hover, .nav-link.active { color: var(--fg); }
.nav-link::before { content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--fg); opacity: 0; transition: opacity 0.25s; }
.nav-link.active::before { opacity: 1; }
.nav-num { color: var(--fg-20); margin-right: 4px; font-size: 9px; }

/* LANG TOGGLE — fixed top-right, outside topbar */
.lang-toggle {
  position: fixed; top: 14px; right: 28px; z-index: 110;
  display: inline-flex; align-items: center; gap: 2px;
  border: 0.5px solid rgba(var(--ink),0.22);
  border-radius: 100px; padding: 3px;
  background: rgba(var(--surface),0.7); backdrop-filter: blur(12px);
  forced-color-adjust: none;
}
.lang-opt {
  padding: 5px 12px; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-40);
  transition: color 0.25s, background 0.25s; line-height: 1;
  border-radius: 100px;
  forced-color-adjust: none;
}
.lang-opt.active {
  color: oklch(0.99 0 0);
  background: linear-gradient(135deg, #5b6cf8, #a855f7);
  box-shadow: 0 4px 14px rgba(91,108,248,0.35);
}
.lang-opt:hover:not(.active) { color: var(--fg); }
@media (max-width: 900px) {
  .lang-toggle { right: 16px; top: 12px; }
}

/* SIDE RAILS */
.rail {
  position: fixed; z-index: 50; font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-40);
  pointer-events: none;
}
.rail-l { left: 16px; top: 50%; transform: translateY(-50%) rotate(-90deg); transform-origin: left center; }
.rail-r { right: 16px; top: 50%; transform: translateY(-50%) rotate(90deg); transform-origin: right center; }

/* SCROLL PROGRESS */
.scroll-progress { position: fixed; top: 0; left: 0; height: 1.5px; background: linear-gradient(90deg, #5b6cf8, #a855f7, #14b48c); z-index: 200; width: 0%; transition: width 0.06s linear; }

/* SCROLL HINT */
.scroll-hint { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 50; font-family: var(--mono); font-size: 9px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--fg-40); display: flex; flex-direction: column; align-items: center; gap: 8px; transition: opacity 0.4s; pointer-events: none; }
.scroll-hint.hide { opacity: 0; }
.scroll-hint .bar { width: 1px; height: 28px; background: linear-gradient(180deg, transparent, rgba(var(--ink),0.6), transparent); background-size: 100% 200%; animation: trickle 2.2s ease-in-out infinite; }
@keyframes trickle { 0% { background-position: 0 -100%; } 100% { background-position: 0 200%; } }

/* ============================================
   SECTIONS — base
   ============================================ */
section {
  position: relative;
  min-height: 100vh;
  z-index: 2;
  padding: 100px 32px 60px;
}
.section-head {
  display: flex; align-items: baseline; gap: 16px; margin-bottom: 36px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--fg-40);
}
.section-head .num { color: var(--fg); }
.section-head .line { flex: 1; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.section-head .line::after { content: ""; position: absolute; left: 0; top: 0; width: 30%; height: 100%; background: linear-gradient(90deg, transparent, rgb(var(--ink)), transparent); animation: railslide 4s linear infinite; }
@keyframes railslide { 0% { left: -30%; } 100% { left: 100%; } }

.eyebrow {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--fg-40);
}

/* ============================================
   HERO
   ============================================ */
#hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 80px 32px; position: relative;
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.18;
  background-image:
    linear-gradient(to right, rgba(var(--ink),0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(var(--ink),0.06) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, var(--paper) 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, var(--paper) 30%, transparent 75%);
}

/* HERO ORBITAL BACKDROP — borrowed from the orbit section */
.hero-orbit-backdrop {
  position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%);
  width: min(1100px, 110vw); aspect-ratio: 1; pointer-events: none;
  z-index: 1;
}
.hero-orbit-backdrop svg { width: 100%; height: 100%; overflow: visible; }
.hero-orbit-backdrop .ring { fill: none; stroke: rgba(var(--ink),0.05); stroke-width: 0.5; }
.hero-orbit-backdrop .ring-dashed { stroke-dasharray: 1 8; stroke: rgba(var(--ink),0.08); }
.hero-orbit-backdrop .trace { fill: none; stroke: rgba(91,108,248,0.22); stroke-width: 0.8; stroke-linecap: square; }
.hero-orbit-backdrop .pad { fill: rgba(91,108,248,0.5); }
.hero-orbit-backdrop .marker { fill: rgba(var(--ink),0.45); }

/* FLOATING TERMINAL */
.hero-term {
  position: absolute; left: 24px; top: 90px;
  width: 260px; z-index: 2;
  background: rgba(var(--surface),0.78);
  border: 0.5px solid rgba(var(--ink),0.12);
  backdrop-filter: blur(10px);
  font-family: var(--mono); font-size: 11px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  animation: floatY 8s ease-in-out infinite;
  pointer-events: none;
}
.hero-term-tb { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 0.5px solid rgba(var(--ink),0.08); }
.hero-term-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(var(--ink),0.18); }
.hero-term-title { margin-left: 6px; color: var(--fg-40); font-size: 10px; letter-spacing: 0.06em; }
.hero-term-body { padding: 12px 14px; line-height: 1.7; color: rgba(var(--ink),0.85); }
.ht-line { white-space: nowrap; overflow: hidden; }
.ht-out { color: rgba(var(--ink),0.55); }
.ht-prompt { color: oklch(0.75 0.16 165); }
.ht-path { color: oklch(0.78 0.13 250); }
.ht-sep { color: rgba(var(--ink),0.35); margin: 0 2px; }
.ht-key { color: oklch(0.85 0.15 90); }
.ht-str { color: oklch(0.78 0.13 250); }
.ht-cursor { display: inline-block; width: 7px; height: 11px; background: rgb(var(--ink)); vertical-align: -1px; animation: blink 1s steps(2) infinite; }

/* FLOATING SPEC */
.hero-spec {
  position: absolute; right: 24px; bottom: 90px;
  width: 260px; z-index: 2;
  background: rgba(var(--surface),0.78);
  border: 0.5px solid rgba(var(--ink),0.12);
  backdrop-filter: blur(10px);
  font-family: var(--mono); font-size: 11px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  animation: floatY 9s ease-in-out infinite -2s;
  pointer-events: none;
}
.hero-spec-head {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-bottom: 0.5px solid rgba(var(--ink),0.08);
  font-size: 10px; color: var(--fg-40); letter-spacing: 0.08em;
}
.hero-spec-lang {
  padding: 2px 6px; border-radius: 2px;
  background: linear-gradient(135deg, oklch(0.55 0.16 250), oklch(0.55 0.16 305));
  color: oklch(0.99 0 0); font-size: 9px; letter-spacing: 0.15em;
}
.hero-spec-name { color: var(--fg-60); flex: 1; }
.hero-spec-tag { font-size: 9px; color: var(--fg-40); }
.hero-spec-code {
  padding: 12px 0 14px; margin: 0;
  font-family: var(--mono); font-size: 11px; line-height: 1.7;
  white-space: pre;
}
.hero-spec-code .ln {
  display: inline-block; width: 28px; text-align: right;
  color: rgba(var(--ink),0.18); padding-right: 12px;
  border-right: 0.5px solid rgba(var(--ink),0.06); margin-right: 12px;
  user-select: none;
}
.hero-spec-code .cd { color: rgba(var(--ink),0.75); }
.hero-spec-code .kw { color: oklch(0.7 0.18 305); }
.hero-spec-code .cls { color: oklch(0.78 0.13 250); }
.hero-spec-code .fn { color: oklch(0.85 0.15 90); }
.hero-spec-code .str { color: oklch(0.75 0.16 165); }
.hero-spec-code .num { color: oklch(0.78 0.16 35); }

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 1500px) {
  .hero-term, .hero-spec { display: none; }
}

/* orbiting micro-nodes around the hero */
.hero-orbital-mini { position: absolute; inset: 0; pointer-events: none; }
.hero-mini-node {
  position: absolute; left: 50%; top: 50%;
  width: 36px; height: 36px; margin: -18px 0 0 -18px;
  border-radius: 50%; border: 0.5px solid rgba(var(--ink),0.22);
  background: rgba(var(--surface),0.85); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  color: rgba(var(--ink),0.7);
  animation: mini-orbit var(--dur, 60s) linear infinite;
  animation-delay: var(--delay, 0s);
  transform-origin: center;
}
.hero-mini-node svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.hero-mini-node::before {
  content: ""; position: absolute; inset: -1px; border-radius: 50%;
  border: 0.5px solid transparent; background: conic-gradient(from 0deg, transparent, rgba(91,108,248,0.5), transparent 30%);
  -webkit-mask: linear-gradient(var(--paper) 0 0) content-box, linear-gradient(var(--paper) 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  padding: 0.5px; opacity: 0.5;
  animation: spin 4s linear infinite;
}
@keyframes mini-orbit {
  0%   { transform: rotate(var(--start, 0deg)) translateX(var(--rad, 320px)) rotate(calc(var(--start, 0deg) * -1)); }
  100% { transform: rotate(calc(var(--start, 0deg) + 360deg)) translateX(var(--rad, 320px)) rotate(calc((var(--start, 0deg) + 360deg) * -1)); }
}
@media (max-width: 900px) { .hero-orbital-mini { display: none; } }

.hero-content { text-align: center; max-width: 900px; position: relative; z-index: 3; }
.hero-meta-row {
  display: flex; justify-content: center; gap: 32px; margin-bottom: 36px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg-40);
}
.hero-meta-row span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta-row .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-c); box-shadow: 0 0 8px var(--accent-c); }
.hero-name-wrap { position: relative; }
.hero-name {
  font-family: var(--display);
  font-style: normal;
  font-weight: 500;
  font-size: clamp(64px, 13vw, 200px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: rgb(var(--ink));
  position: relative;
  overflow: hidden;
  display: inline-block;
  padding: 0 0.04em;
  forced-color-adjust: none;
}
.hero-name .char {
  display: inline-block;
  transform: translateY(120%);
  opacity: 0;
  color: rgb(var(--ink));
  forced-color-adjust: none;
}
.hero-name .char.in { animation: charIn 1s cubic-bezier(0.22,1,0.36,1) forwards; }
@keyframes charIn { to { transform: translateY(0); opacity: 1; } }

.hero-sub {
  margin-top: 22px;
  display: flex; justify-content: center; align-items: center; gap: 14px;
  font-size: 13px; letter-spacing: 0.04em; color: var(--fg-60);
}
.hero-sub .pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border: 0.5px solid rgba(var(--ink),0.18);
  border-radius: 100px; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg);
  background: rgba(var(--ink),0.03); backdrop-filter: blur(8px);
}
.hero-sub .pill .micro-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-a); animation: pulse-dot 2s ease-in-out infinite; }
.hero-sub .sep { color: var(--fg-20); }

.hero-tagline {
  margin-top: 48px;
  max-width: 660px; margin-left: auto; margin-right: auto;
  font-size: 15.5px; line-height: 1.7; color: var(--fg-60); text-wrap: pretty;
}
.hero-tagline em { color: rgb(var(--ink)); font-family: var(--display); font-style: normal; font-weight: 600; letter-spacing: 0.01em; }

.hero-cta-row {
  margin-top: 40px;
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
}
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 100px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.btn-primary {
  background: rgb(var(--ink)); color: var(--paper);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(var(--ink),0.18); }
.btn-ghost {
  border: 0.5px solid rgba(var(--ink),0.22); color: rgb(var(--ink));
  background: rgba(var(--ink),0.02); backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: rgb(var(--ink)); background: rgba(var(--ink),0.08); }
.btn .arr { width: 12px; height: 12px; transition: transform 0.3s; }
.btn:hover .arr { transform: translate(2px, -2px); }

/* INFO LEDGER below hero */
.hero-ledger {
  position: absolute;
  left: 32px; right: 32px; bottom: 80px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; z-index: 3;
  border-top: 0.5px solid var(--line);
  padding-top: 16px;
}
.ledger-cell { padding: 0 20px; border-right: 0.5px solid var(--line); }
.ledger-cell:last-child { border-right: none; }
.ledger-label { font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-40); margin-bottom: 8px; }
.ledger-value { font-size: 13px; color: var(--fg); font-family: var(--mono); }
.ledger-value.italic { font-family: var(--display); font-style: normal; font-size: 18px; }

/* ============================================
   CAPABILITIES MATRIX
   ============================================ */
#cap-section {
  padding-top: 140px; padding-bottom: 100px;
  position: relative;
}
.cap-head-row {
  max-width: 1200px; margin: 0 auto 50px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: end;
}
.cap-head-row h2 {
  font-family: var(--display); font-style: normal; font-weight: 400;
  font-size: clamp(40px, 6vw, 80px); line-height: 0.95; letter-spacing: -0.03em;
}
.cap-head-row h2 em { font-style: normal; color: rgba(var(--ink),0.55); }
.cap-head-row p { color: var(--fg-60); font-size: 15px; line-height: 1.7; }

.cap-legend {
  max-width: 1200px; margin: 0 auto 24px;
  display: flex; gap: 22px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--fg-40);
  padding-bottom: 12px; border-bottom: 0.5px solid var(--line);
}
.cap-legend-item { display: inline-flex; align-items: center; gap: 8px; }
.cap-legend-swatch { width: 10px; height: 10px; border-radius: 2px; }
.cap-legend-swatch.s-primary { background: rgb(var(--ink)); }
.cap-legend-swatch.s-working { background: transparent; border: 0.5px solid rgba(var(--ink),0.4); }
.cap-legend-swatch.s-cert { background: linear-gradient(135deg, #5b6cf8, #a855f7); }

.cap-matrix { max-width: 1200px; margin: 0 auto; position: relative; }
.cap-matrix::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 0.5px; background: var(--line);
}
.cap-row {
  display: grid; grid-template-columns: 220px 1fr; gap: 32px;
  padding: 26px 0 26px 20px;
  border-bottom: 0.5px solid var(--line);
  position: relative;
}
.cap-row::before {
  content: ""; position: absolute; left: -4px; top: 36px;
  width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--ink));
  box-shadow: 0 0 12px rgba(var(--ink),0.6);
}
.cap-row:nth-child(even)::before { background: linear-gradient(135deg, #5b6cf8, #a855f7); box-shadow: 0 0 12px rgba(168,85,247,0.5); }
.cap-row-head {
  display: flex; flex-direction: column; gap: 8px;
  font-family: var(--mono);
}
.cap-row-head .cap-idx {
  font-size: 10px; color: var(--fg-40); letter-spacing: 0.2em;
}
.cap-row-head .cap-cat {
  font-family: var(--display); font-style: normal; font-weight: 400;
  font-size: 28px; letter-spacing: -0.02em; color: rgb(var(--ink)); line-height: 1;
  text-transform: none;
}
.cap-row-head .cap-line { display: none; }
.cap-row-head .cap-count {
  font-size: 10px; color: var(--fg-40); letter-spacing: 0.2em;
  margin-top: 4px;
}
.cap-row-head .cap-count::before { content: "/ "; }
.cap-row-body { display: flex; flex-wrap: wrap; gap: 6px; align-content: center; }
.cap-chip {
  font-family: var(--mono); font-size: 11px;
  padding: 7px 12px; border-radius: 2px;
  letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(var(--ink),0.045);
  color: rgba(var(--ink),0.72);
  border: 0.5px solid rgba(var(--ink),0.16);
  transition: transform 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
}
.cap-chip:hover {
  transform: translateY(-1px);
  background: rgba(var(--ink),0.09);
  border-color: rgba(var(--ink),0.42);
  color: rgb(var(--ink));
}

@media (max-width: 900px) {
  .cap-head-row { grid-template-columns: 1fr; gap: 24px; align-items: start; }
  .cap-row { grid-template-columns: 1fr; gap: 12px; padding-left: 18px; }
  .cap-row-head .cap-cat { font-size: 22px; }
  .cap-row::before { top: 30px; }
}

/* ============================================
   CERTIFICATIONS
   ============================================ */
#cert-section { padding-top: 140px; padding-bottom: 120px; position: relative; }
.cert-head-row {
  max-width: 1200px; margin: 0 auto 50px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: end;
}
.cert-head-row h2 {
  font-family: var(--display); font-style: normal; font-weight: 400;
  font-size: clamp(40px, 6vw, 80px); line-height: 0.95; letter-spacing: -0.03em;
}
.cert-head-row h2 em { font-style: normal; color: rgba(var(--ink),0.55); }
.cert-head-row p { color: var(--fg-60); font-size: 15px; line-height: 1.7; }

.cert-legend {
  max-width: 1200px; margin: 0 auto 24px;
  display: flex; gap: 22px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--fg-40);
  padding-bottom: 12px; border-bottom: 0.5px solid var(--line);
}
.cert-legend-item { display: inline-flex; align-items: center; gap: 8px; }
.cert-legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.cert-legend-dot.verified { background: oklch(0.65 0.18 155); box-shadow: 0 0 8px oklch(0.65 0.18 155 / 0.6); }
.cert-legend-dot.archived { background: rgba(var(--ink),0.3); }

.cert-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.cert-card {
  position: relative;
  background: linear-gradient(180deg, rgba(var(--surface),0.95), rgba(var(--surface),0.95));
  border: 0.5px solid rgba(var(--ink),0.1);
  padding: 24px 24px 20px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  overflow: hidden;
}
.cert-card::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-stop, rgba(91,108,248,0.7)), transparent);
  opacity: 0.6; transition: opacity 0.3s;
}
.cert-card:hover {
  border-color: rgba(var(--ink),0.22);
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 0.5px var(--accent-stop, rgba(91,108,248,0.3));
}
.cert-card:hover::before { opacity: 1; }
.cert-card::after {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-stop, rgba(91,108,248,0.15)) 0%, transparent 70%);
  opacity: 0.5; pointer-events: none; transition: opacity 0.3s;
}
.cert-card:hover::after { opacity: 0.9; }

.cert-accent-blue   { --accent-stop: rgba(91,108,248,0.55); }
.cert-accent-purple { --accent-stop: rgba(168,85,247,0.55); }
.cert-accent-yellow { --accent-stop: rgba(245,200,90,0.55); }
.cert-accent-green  { --accent-stop: rgba(20,180,140,0.55); }

.cert-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  position: relative; z-index: 1;
}
.cert-head-left {
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
}
.cert-code {
  font-family: var(--mono); font-size: 9px;
  color: var(--fg-40); letter-spacing: 0.22em;
}
.cert-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 2px;
}
.cert-status-verified {
  color: oklch(0.85 0.15 155);
  background: oklch(0.45 0.12 155 / 0.18);
  border: 0.5px solid oklch(0.7 0.15 155 / 0.45);
}
.cert-status-verified svg { color: oklch(0.85 0.15 155); }
.cert-status-archived {
  color: var(--fg-40);
  background: rgba(var(--ink),0.04);
  border: 0.5px solid rgba(var(--ink),0.1);
}
.cert-icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(var(--ink),0.04);
  border: 0.5px solid rgba(var(--ink),0.12);
  color: rgba(var(--ink),0.7);
  flex-shrink: 0;
}
.cert-accent-blue   .cert-icon { color: oklch(0.78 0.13 260); border-color: oklch(0.78 0.13 260 / 0.4); }
.cert-accent-purple .cert-icon { color: oklch(0.75 0.18 305); border-color: oklch(0.75 0.18 305 / 0.4); }
.cert-accent-yellow .cert-icon { color: oklch(0.85 0.15 90); border-color: oklch(0.85 0.15 90 / 0.4); }
.cert-accent-green  .cert-icon { color: oklch(0.72 0.13 165); border-color: oklch(0.72 0.13 165 / 0.4); }
.cert-icon svg { width: 16px; height: 16px; }

.cert-body { flex: 1; display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }
.cert-issuer {
  font-family: var(--mono); font-size: 10px;
  color: var(--fg-40); letter-spacing: 0.12em;
}
.cert-title {
  font-family: var(--display); font-style: normal; font-weight: 400;
  font-size: 28px; line-height: 1.05; letter-spacing: -0.02em;
  color: rgb(var(--ink));
}
.cert-desc {
  font-size: 13px; line-height: 1.65; color: var(--fg-60);
  margin-top: 4px;
}
.cert-skills {
  display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px;
}
.cert-skill {
  font-family: var(--mono); font-size: 9px;
  padding: 3px 8px; border-radius: 2px;
  background: rgba(var(--ink),0.04);
  border: 0.5px solid rgba(var(--ink),0.1);
  color: rgba(var(--ink),0.7);
  letter-spacing: 0.05em;
}

.cert-foot {
  display: flex; gap: 8px; margin-top: 4px;
  padding-top: 14px;
  border-top: 0.5px solid rgba(var(--ink),0.07);
  position: relative; z-index: 1;
}
.cert-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 2px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: all 0.25s cubic-bezier(.4,0,.2,1);
}
.cert-btn-verify {
  background: linear-gradient(135deg, oklch(0.55 0.16 155), oklch(0.45 0.14 165));
  color: oklch(0.99 0 0);
  box-shadow: 0 4px 14px oklch(0.55 0.16 155 / 0.25);
}
.cert-btn-verify:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px oklch(0.55 0.16 155 / 0.4);
}
.cert-btn-pdf {
  background: transparent;
  border: 0.5px solid rgba(var(--ink),0.18);
  color: var(--fg-60);
}
.cert-btn-pdf:hover {
  border-color: rgba(var(--ink),0.5);
  color: rgb(var(--ink));
  background: rgba(var(--ink),0.03);
}

@media (max-width: 900px) {
  .cert-head-row.cert-section-head { grid-template-columns: 1fr; gap: 24px; align-items: start; }
  .cert-grid { grid-template-columns: 1fr; }
  .cert-title { font-size: 24px; }
}

/* ============================================
   ORBITAL TIMELINE
   ============================================ */
#orbital-section { padding-top: 120px; padding-bottom: 120px; }
.orbital-intro {
  max-width: 900px; margin: 0 auto 40px;
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 60px; align-items: end;
}
.orbital-intro h2 {
  font-family: var(--display); font-style: normal; font-weight: 400;
  font-size: clamp(40px, 6vw, 80px); line-height: 0.95; letter-spacing: -0.03em;
}
.orbital-intro p { color: var(--fg-60); font-size: 15px; line-height: 1.7; }

.orbital-container {
  position: relative; width: 100%; height: 600px;
  display: flex; align-items: center; justify-content: center;
  overflow: visible;
  margin-top: 20px;
}
.orbit-svg { position: absolute; inset: 0; pointer-events: none; }
.orbit-svg circle { fill: none; stroke: rgba(var(--ink),0.08); stroke-width: 0.5; }
.orbit-svg .dashed { stroke-dasharray: 2 6; stroke: rgba(var(--ink),0.12); }
.orbit-svg .marker { fill: rgba(var(--ink),0.3); }

.center-orb {
  position: absolute; width: 80px; height: 80px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(196,181,253,0.95), rgba(91,108,248,0.7) 50%, rgba(20,180,140,0.5));
  display: flex; align-items: center; justify-content: center; z-index: 10;
  box-shadow: 0 0 40px rgba(91,108,248,0.45), 0 0 90px rgba(168,85,247,0.25);
}
.center-orb::before {
  content: ""; position: absolute; inset: 4px; border-radius: 50%;
  background: radial-gradient(circle at 70% 70%, rgba(0,0,0,0.4), transparent 50%);
}
.center-inner { width: 36px; height: 36px; border-radius: 50%; background: rgba(var(--ink),0.92); box-shadow: 0 0 24px rgba(var(--ink),0.5); z-index: 2; }
.center-ping { position: absolute; width: 100px; height: 100px; border-radius: 50%; border: 1px solid rgba(var(--ink),0.15); animation: ping 2.4s cubic-bezier(0,0,.2,1) infinite; }
.center-ping-2 { width: 120px; height: 120px; border-color: rgba(var(--ink),0.08); animation-delay: 1.1s; }
@keyframes ping { 0% { transform: scale(0.85); opacity: 0.7; } 100% { transform: scale(1.6); opacity: 0; } }

.node { position: absolute; cursor: pointer; display: flex; flex-direction: column; align-items: center; transition: opacity 0.6s cubic-bezier(0.4,0,0.2,1); }
.node-icon { width: 52px; height: 52px; border-radius: 50%; border: 0.5px solid rgba(var(--ink),0.3); background: rgba(var(--surface),0.92); display: flex; align-items: center; justify-content: center; transition: all 0.35s cubic-bezier(.4,0,.2,1); position: relative; backdrop-filter: blur(8px); }
.node-icon::before { content: ""; position: absolute; inset: -1px; border-radius: 50%; background: conic-gradient(from 0deg, transparent, rgba(91,108,248,0.4), transparent 30%); opacity: 0; transition: opacity 0.3s; animation: spin 3s linear infinite; }
.node:hover .node-icon::before { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.node-icon svg { width: 20px; height: 20px; stroke: rgba(var(--ink),0.85); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.3s; z-index: 1; }
.node.active .node-icon { background: rgb(var(--ink)); border-color: rgb(var(--ink)); transform: scale(1.6); box-shadow: 0 0 30px rgba(var(--ink),0.35), 0 0 80px rgba(91,108,248,0.4); }
.node.active .node-icon svg { stroke: var(--paper); stroke-width: 1.8; }
.node-label { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.18em; color: rgba(var(--ink),0.55); margin-top: 14px; white-space: nowrap; transition: all 0.3s; text-transform: uppercase; }
.node.active .node-label { color: rgb(var(--ink)); transform: scale(1.1); letter-spacing: 0.22em; }
.node-id { font-family: var(--mono); font-size: 8px; color: var(--fg-20); margin-top: 3px; letter-spacing: 0.2em; }

.node-card {
  position: absolute; top: 70px; left: 50%; transform: translateX(-50%);
  width: 300px; background: rgba(var(--surface),0.97); border: 0.5px solid rgba(var(--ink),0.2);
  border-radius: 4px; padding: 0; box-shadow: 0 30px 80px rgba(0,0,0,0.9), 0 0 0 1px rgba(91,108,248,0.08);
  z-index: 300; overflow: hidden;
  animation: cardIn 0.5s cubic-bezier(.22,1,.36,1);
}
@keyframes cardIn { from { transform: translateX(-50%) translateY(-8px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
.card-corner { position: absolute; width: 10px; height: 10px; border-color: rgba(var(--ink),0.5); }
.card-corner.tl { top: 0; left: 0; border-top: 1px solid; border-left: 1px solid; }
.card-corner.tr { top: 0; right: 0; border-top: 1px solid; border-right: 1px solid; }
.card-corner.bl { bottom: 0; left: 0; border-bottom: 1px solid; border-left: 1px solid; }
.card-corner.br { bottom: 0; right: 0; border-bottom: 1px solid; border-right: 1px solid; }
.card-connector { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 0.5px; height: 14px; background: rgba(var(--ink),0.4); }
.card-header { padding: 14px 16px 10px; border-bottom: 0.5px solid rgba(var(--ink),0.07); }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-family: var(--mono); }
.card-badge { font-size: 9px; letter-spacing: 0.15em; padding: 4px 9px; border-radius: 2px; font-weight: 500; text-transform: uppercase; }
.badge-completed { background: rgb(var(--ink)); color: var(--paper); }
.badge-progress { background: rgba(91,108,248,0.15); color: #c4b5fd; border: 0.5px solid rgba(91,108,248,0.4); }
.card-date { font-size: 10px; color: rgba(var(--ink),0.4); letter-spacing: 0.1em; }
.card-title { font-size: 16px; font-weight: 500; color: rgb(var(--ink)); letter-spacing: -0.01em; }
.card-id { font-family: var(--mono); font-size: 8px; color: var(--fg-20); margin-top: 4px; letter-spacing: 0.2em; }
.card-body { padding: 12px 16px 14px; font-size: 12px; color: rgba(var(--ink),0.65); line-height: 1.65; }
.skills-list { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 5px; }
.skill-tag { font-family: var(--mono); font-size: 9px; padding: 3px 8px; border-radius: 2px; background: rgba(var(--ink),0.05); border: 0.5px solid rgba(var(--ink),0.12); color: rgba(var(--ink),0.75); letter-spacing: 0.05em; }
.energy-section { margin-top: 12px; padding-top: 12px; border-top: 0.5px solid rgba(var(--ink),0.07); }
.energy-label { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 9px; color: rgba(var(--ink),0.4); margin-bottom: 6px; letter-spacing: 0.1em; text-transform: uppercase; }
.energy-bar { height: 2px; background: rgba(var(--ink),0.07); border-radius: 1px; overflow: hidden; }
.energy-fill { height: 100%; background: linear-gradient(90deg, #5b6cf8, #a855f7); border-radius: 1px; transition: width 0.8s cubic-bezier(.4,0,.2,1); }
.related-section { margin-top: 12px; padding-top: 12px; border-top: 0.5px solid rgba(var(--ink),0.07); }
.related-label { font-family: var(--mono); font-size: 9px; color: rgba(var(--ink),0.4); letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 8px; }
.related-btn { font-family: var(--mono); font-size: 9px; color: rgba(var(--ink),0.6); border: 0.5px solid rgba(var(--ink),0.14); background: transparent; padding: 4px 9px; border-radius: 2px; margin: 0 4px 4px 0; display: inline-flex; align-items: center; gap: 5px; transition: all 0.2s; letter-spacing: 0.1em; text-transform: uppercase; }
.related-btn:hover { background: rgba(var(--ink),0.08); color: rgb(var(--ink)); border-color: rgba(var(--ink),0.3); }

.orbit-controls {
  display: flex; justify-content: center; gap: 24px; margin-top: 40px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
}
.orbit-ctrl { color: var(--fg-40); display: flex; align-items: center; gap: 8px; transition: color 0.2s; }
.orbit-ctrl:hover { color: var(--fg); }
.orbit-ctrl .kbd { font-family: var(--mono); font-size: 9px; padding: 3px 6px; border: 0.5px solid var(--fg-20); border-radius: 2px; }
.orbit-ctrl .live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-c); box-shadow: 0 0 6px var(--accent-c); animation: pulse-dot 1.5s ease-in-out infinite; }

/* ============================================
   TECH STACK
   ============================================ */
#tech-section { padding-top: 140px; padding-bottom: 140px; }
.tech-head { max-width: 1200px; margin: 0 auto 60px; }
.tech-head h2 {
  font-family: var(--display); font-style: normal; font-weight: 400;
  font-size: clamp(40px, 6vw, 80px); line-height: 0.95; letter-spacing: -0.03em;
  max-width: 700px;
}
.tech-head p { color: var(--fg-60); margin-top: 20px; max-width: 540px; font-size: 15px; line-height: 1.7; }

.tech-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line); border: 0.5px solid var(--line);
}
.tech-cell {
  background: var(--bg); padding: 28px 22px;
  position: relative; min-height: 180px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: background 0.4s;
  overflow: hidden;
}
.tech-cell:hover { background: rgba(91,108,248,0.04); }
.tech-cell::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(var(--ink),0.04), transparent 40%);
  opacity: 0; transition: opacity 0.4s;
}
.tech-cell:hover::after { opacity: 1; }
.tech-cell-top { display: flex; justify-content: space-between; align-items: flex-start; }
.tech-idx { font-family: var(--mono); font-size: 9px; color: var(--fg-20); letter-spacing: 0.2em; }
.tech-cat { font-family: var(--mono); font-size: 9px; color: var(--fg-40); letter-spacing: 0.2em; text-transform: uppercase; }
.tech-name {
  font-family: var(--display); font-style: normal; font-weight: 400;
  font-size: 30px; letter-spacing: -0.02em; line-height: 1; margin-top: auto;
  color: rgb(var(--ink));
}
.tech-level {
  font-family: var(--mono); font-size: 9px; color: var(--fg-40); letter-spacing: 0.15em;
  text-transform: uppercase; margin-top: 8px;
  display: flex; align-items: center; gap: 8px;
}
.tech-level .bar { flex: 1; height: 1px; background: rgba(var(--ink),0.1); position: relative; max-width: 80px; }
.tech-level .bar::after { content: ""; position: absolute; left: 0; top: 0; height: 100%; width: var(--lv, 50%); background: linear-gradient(90deg, var(--accent-a), var(--accent-b)); }

/* ============================================
   PROJECT SECTION
   ============================================ */
#project-section { padding-top: 140px; padding-bottom: 140px; }
.project-wrap {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: start;
}
.project-art {
  position: relative;
  background: linear-gradient(135deg, var(--bg-2), var(--bg));
  border: 0.5px solid var(--line);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.project-art-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(var(--ink),0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(var(--ink),0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, var(--paper) 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, var(--paper) 30%, transparent 80%);
}
.project-art-window {
  position: absolute; inset: 32px;
  background: rgba(var(--surface),0.92);
  border: 0.5px solid rgba(var(--ink),0.16);
  border-radius: 6px;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}
.win-titlebar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 0.5px solid rgba(var(--ink),0.08); }
.win-titlebar .tb-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(var(--ink),0.2); }
.win-title { font-family: var(--mono); font-size: 10px; color: var(--fg-40); margin-left: 8px; letter-spacing: 0.1em; }
.win-body { flex: 1; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }

.opti-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opti-stat {
  border: 0.5px solid rgba(var(--ink),0.1); padding: 10px 12px; border-radius: 3px;
  background: rgba(var(--ink),0.02);
}
.opti-stat-label { font-family: var(--mono); font-size: 8px; color: var(--fg-40); letter-spacing: 0.18em; text-transform: uppercase; }
.opti-stat-val { font-family: var(--display); font-style: normal; font-size: 22px; color: rgb(var(--ink)); margin-top: 4px; }
.opti-stat-trend { font-family: var(--mono); font-size: 9px; color: var(--accent-c); margin-top: 2px; }

.opti-chart { flex: 1; min-height: 80px; position: relative; border-top: 0.5px solid rgba(var(--ink),0.06); padding-top: 10px; }
.opti-chart svg { width: 100%; height: 100%; }
.opti-chart-label { font-family: var(--mono); font-size: 9px; color: var(--fg-40); letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 6px; }

/* OBLIVION uninstaller mock */
.obl-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.obl-brand { display: flex; align-items: center; gap: 10px; }
.obl-logo { width: 26px; height: 26px; display: grid; place-items: center; border: 0.5px solid rgba(var(--ink),0.14); border-radius: 6px; color: var(--accent-b); background: rgba(168,85,247,0.06); }
.obl-logo svg { width: 16px; height: 16px; }
.obl-brand-name { font-family: var(--display); font-style: normal; font-size: 15px; color: rgb(var(--ink)); letter-spacing: -0.01em; line-height: 1; }
.obl-brand-sub { font-family: var(--mono); font-size: 8px; color: var(--fg-40); letter-spacing: 0.16em; text-transform: uppercase; margin-top: 4px; }
.obl-mode { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-b); border: 0.5px solid rgba(168,85,247,0.35); border-radius: 100px; padding: 4px 9px; white-space: nowrap; }
.obl-trend-warn { color: var(--accent-b) !important; }
.obl-scan { flex: 1; min-height: 96px; display: flex; flex-direction: column; gap: 10px; border-top: 0.5px solid rgba(var(--ink),0.06); padding-top: 12px; }
.obl-scan-rows { display: flex; flex-direction: column; gap: 7px; }
.obl-scan-row { display: flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 10px; color: var(--fg-60); }
.obl-scan-row.scanning { color: var(--fg-40); }
.obl-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; border: 1px solid rgba(var(--ink),0.3); }
.obl-dot.ok { background: var(--accent-c); border-color: var(--accent-c); box-shadow: 0 0 8px rgba(20,180,140,0.5); }
.obl-scan-row.scanning .obl-dot { animation: obl-pulse 1.1s ease-in-out infinite; }
@keyframes obl-pulse { 0%,100% { opacity: 0.3; } 50% { opacity: 1; } }
.obl-scan-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.obl-scan-meta { color: var(--fg-40); font-size: 9px; flex-shrink: 0; }
.obl-progress { height: 3px; border-radius: 100px; background: rgba(var(--ink),0.08); overflow: hidden; }
.obl-progress span { display: block; height: 100%; width: 72%; border-radius: 100px; background: linear-gradient(90deg, var(--accent-a), var(--accent-b)); }

.project-info .eyebrow { margin-bottom: 14px; }
.project-info h3 {
  font-family: var(--display); font-style: normal; font-weight: 400;
  font-size: clamp(48px, 5.5vw, 80px); line-height: 0.95; letter-spacing: -0.03em;
  color: rgb(var(--ink));
}
.project-info .tagline {
  font-size: 18px; color: rgb(var(--ink)); margin-top: 14px; line-height: 1.5;
}
.project-info .desc {
  font-size: 14px; color: var(--fg-60); margin-top: 22px; line-height: 1.75; max-width: 480px;
}
.project-meta {
  margin-top: 30px;
  border-top: 0.5px solid var(--line);
  border-bottom: 0.5px solid var(--line);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
}
.pm-cell { padding: 14px 0; border-right: 0.5px solid var(--line); padding-right: 16px; padding-left: 0; }
.pm-cell:nth-child(3n) { border-right: none; }
.pm-cell:nth-child(n+4) { padding-left: 16px; padding-right: 16px; border-top: 0.5px solid var(--line); }
.pm-label { font-family: var(--mono); font-size: 9px; color: var(--fg-40); letter-spacing: 0.2em; text-transform: uppercase; }
.pm-val { color: rgb(var(--ink)); font-size: 13px; margin-top: 4px; font-family: var(--mono); }
.project-tags { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 6px; }

/* ============================================
   CONTACT
   ============================================ */
#contact-section { padding-top: 160px; padding-bottom: 100px; }
.contact-wrap { max-width: 1100px; margin: 0 auto; text-align: center; position: relative; }
.contact-marquee-row {
  font-family: var(--display); font-style: normal; font-weight: 400;
  font-size: clamp(60px, 12vw, 200px); line-height: 1; letter-spacing: -0.04em;
  white-space: nowrap; overflow: hidden; margin: 0 -50px;
  mask-image: linear-gradient(90deg, transparent, var(--paper) 12%, var(--paper) 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, var(--paper) 12%, var(--paper) 88%, transparent);
}
.marquee-track { display: inline-flex; gap: 60px; animation: marquee 28s linear infinite; }
.marquee-track .word { color: rgb(var(--ink)); }
.marquee-track .word.outline { color: transparent; -webkit-text-stroke: 1px rgba(var(--ink),0.5); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.contact-card {
  margin-top: 60px; max-width: 720px; margin-left: auto; margin-right: auto;
  border: 0.5px solid var(--line);
  background: rgba(var(--ink),0.015); backdrop-filter: blur(10px);
  padding: 48px 42px;
  position: relative;
}
.contact-card .corner { position: absolute; width: 14px; height: 14px; }
.contact-card .corner.tl { top: -1px; left: -1px; border-top: 1px solid rgb(var(--ink)); border-left: 1px solid rgb(var(--ink)); }
.contact-card .corner.tr { top: -1px; right: -1px; border-top: 1px solid rgb(var(--ink)); border-right: 1px solid rgb(var(--ink)); }
.contact-card .corner.bl { bottom: -1px; left: -1px; border-bottom: 1px solid rgb(var(--ink)); border-left: 1px solid rgb(var(--ink)); }
.contact-card .corner.br { bottom: -1px; right: -1px; border-bottom: 1px solid rgb(var(--ink)); border-right: 1px solid rgb(var(--ink)); }

.contact-title {
  font-family: var(--display); font-style: normal; font-weight: 400;
  font-size: clamp(28px, 4vw, 48px); line-height: 1.1; letter-spacing: -0.02em;
}
.contact-desc { color: var(--fg-60); margin-top: 16px; font-size: 15px; line-height: 1.6; }
.contact-channels {
  margin-top: 32px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 0.5px solid var(--line);
}
.channel-cv { grid-column: 1 / -1; }
.channel {
  padding: 22px 20px; background: var(--bg);
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start; text-align: left;
  transition: background 0.3s; position: relative; overflow: hidden;
}
.channel:hover { background: rgba(91,108,248,0.06); }
.channel .ch-label { font-family: var(--mono); font-size: 9px; color: var(--fg-40); letter-spacing: 0.2em; text-transform: uppercase; }
.channel .ch-value { font-family: var(--mono); font-size: 13px; color: rgb(var(--ink)); }
.contact-channels .channel .ch-value { font-size: 12px; word-break: break-word; padding-right: 16px; }
.channel .ch-arrow { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); transition: transform 0.3s; opacity: 0.5; }
.channel:hover .ch-arrow { transform: translateY(-50%) translate(4px, -4px); opacity: 1; }

/* FOOTER */
footer.foot {
  padding: 40px 32px 32px;
  border-top: 0.5px solid var(--line);
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg-40); position: relative; z-index: 2;
}
.foot-left { text-align: left; }
.foot-right { text-align: right; }
.foot-right span { color: var(--fg-60); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-height: 820px) {
  .hero-ledger { display: none; }
  #hero { padding-bottom: 60px; }
}

@media (max-width: 900px) {
  .topbar { padding: 14px 18px; }
  .nav-links { display: none; }
  .rail { display: none; }
  .hero-meta-row { flex-direction: column; gap: 8px; }
  .hero-ledger { display: none; }
  .orbital-intro { grid-template-columns: 1fr; gap: 28px; }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .project-wrap { grid-template-columns: 1fr; gap: 36px; }
  .contact-channels { grid-template-columns: 1fr; }
  section { padding: 80px 20px 60px; }
  .scroll-hint { display: none; }
}
@media (max-width: 600px) {
  .tech-grid { grid-template-columns: 1fr; }
  .pm-cell:nth-child(n+4) { padding-left: 0; }
  footer.foot { grid-template-columns: 1fr; text-align: center; }
  .foot-left, .foot-right { text-align: center; }
}

/* ============================================
   BLEND-LAYER + THEME OVERRIDES
   ============================================ */
/* Cursor & top chrome use mix-blend-mode: difference — keep their source
   color pure white so they invert correctly on BOTH light and dark. */
.cursor-dot { background: #fff; }
.cursor-ring { border-color: rgba(255,255,255,0.5); }
.cursor-ring.hover { border-color: #fff; }
.cursor-label { color: rgba(255,255,255,0.75); }

.topbar { color: rgba(255,255,255,0.6); }
.topbar .brand-text { color: #fff; }
.topbar .brand-suffix { color: rgba(255,255,255,0.4); }
.topbar .nav-link { color: rgba(255,255,255,0.4); }
.topbar .nav-link:hover,
.topbar .nav-link.active { color: #fff; }
.topbar .nav-num { color: rgba(255,255,255,0.22); }
.topbar .nav-link::before { background: #fff; }

/* THEME TOGGLE */
.theme-toggle {
  position: fixed; top: 14px; right: 124px; z-index: 110;
  width: 34px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0.5px solid rgba(var(--ink),0.22);
  border-radius: 100px;
  background: rgba(var(--surface),0.7); backdrop-filter: blur(12px);
  color: var(--fg-60);
  transition: color .25s, border-color .25s, background .25s, transform .25s;
  forced-color-adjust: none;
}
.theme-toggle:hover { color: var(--fg); border-color: rgba(var(--ink),0.45); transform: translateY(-1px); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .t-sun { display: none; }
.theme-toggle .t-moon { display: block; }
html[data-theme="light"] .theme-toggle .t-sun { display: block; }
html[data-theme="light"] .theme-toggle .t-moon { display: none; }
@media (max-width: 900px) {
  .theme-toggle { right: 104px; top: 12px; }
}

/* CERT ACCENT — RED (security / red-team) */
.cert-accent-red { --accent-stop: rgba(229,72,77,0.6); }
.cert-accent-red .cert-icon { color: oklch(0.66 0.21 22); border-color: oklch(0.66 0.21 22 / 0.45); }

/* No italics in this type system (Space Grotesk has no true italic). */
em { font-style: normal; }
.tech-head h2 em, .contact-title em { color: rgba(var(--ink),0.5); }

/* ============================================
   SMOOTH THEME TRANSITIONS
   ============================================ */
.cert-card, .proj-card, .tech-cell, .channel, .contact-card,
.node-icon, .hero-term, .hero-spec, .hero-mini-node, .cap-chip,
.cert-skill, .skill-tag, .cert-btn, .lang-toggle, .theme-toggle,
.project-art, .project-art-window, footer.foot, section {
  transition: background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease, box-shadow 0.5s ease;
}
.cert-foot { flex-wrap: wrap; }

/* ============================================
   PROJECT ARCHIVE (multi-project)
   ============================================ */
.proj-featured-tag {
  max-width: 1200px; margin: 0 auto 18px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--fg-40);
}
.project-archive-head {
  max-width: 1200px; margin: 110px auto 36px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: end;
  padding-bottom: 18px; border-bottom: 0.5px solid var(--line);
}
.project-archive-head h3 {
  font-family: var(--display); font-style: normal; font-weight: 400;
  font-size: clamp(34px, 5vw, 64px); line-height: 0.95; letter-spacing: -0.03em;
  color: rgb(var(--ink));
}
.project-archive-head h3 em { color: rgba(var(--ink),0.55); }
.project-archive-head p { color: var(--fg-60); font-size: 15px; line-height: 1.7; }

.project-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
}
.proj-card {
  position: relative;
  background: linear-gradient(180deg, rgba(var(--surface),0.95), rgba(var(--surface),0.95));
  border: 0.5px solid rgba(var(--ink),0.1);
  padding: 24px 24px 20px;
  display: flex; flex-direction: column; gap: 14px;
  overflow: hidden;
}
.proj-card::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-stop, rgba(91,108,248,0.7)), transparent);
  opacity: 0.6; transition: opacity 0.3s;
}
.proj-card:hover {
  border-color: rgba(var(--ink),0.22);
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 0.5px var(--accent-stop, rgba(91,108,248,0.3));
}
.proj-card:hover::before { opacity: 1; }
.proj-card::after {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-stop, rgba(91,108,248,0.15)) 0%, transparent 70%);
  opacity: 0.5; pointer-events: none; transition: opacity 0.3s;
}
.proj-card:hover::after { opacity: 0.9; }

.proj-card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  position: relative; z-index: 1;
}
.proj-card-head-left { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.proj-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 2px;
}
.proj-status-active {
  color: oklch(0.85 0.15 155); background: oklch(0.45 0.12 155 / 0.18);
  border: 0.5px solid oklch(0.7 0.15 155 / 0.45);
}
.proj-status-progress {
  color: #c4b5fd; background: rgba(91,108,248,0.15);
  border: 0.5px solid rgba(91,108,248,0.4);
}
html[data-theme="light"] .proj-status-progress { color: oklch(0.5 0.18 285); }
.proj-status-done { color: var(--fg-40); background: rgba(var(--ink),0.04); border: 0.5px solid rgba(var(--ink),0.1); }

.proj-card-body { flex: 1; display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }
.proj-card-title {
  font-family: var(--display); font-style: normal; font-weight: 400;
  font-size: 26px; line-height: 1.05; letter-spacing: -0.02em;
  color: rgb(var(--ink));
}
.proj-card-foot {
  display: flex; gap: 8px; margin-top: 4px;
  padding-top: 14px; border-top: 0.5px solid rgba(var(--ink),0.07);
  position: relative; z-index: 1;
}

@media (max-width: 900px) {
  .project-archive-head { grid-template-columns: 1fr; gap: 20px; align-items: start; margin-top: 70px; }
  .project-grid { grid-template-columns: 1fr; }
  .proj-card-title { font-size: 23px; }
}

/* ============================================
   PDF VIEWER MODAL
   ============================================ */
.pdf-modal {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.pdf-modal.open { opacity: 1; visibility: visible; }
.pdf-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(2,3,8,0.78); backdrop-filter: blur(10px);
}
html[data-theme="light"] .pdf-modal-backdrop { background: rgba(20,24,48,0.45); }
.pdf-modal-panel {
  position: relative; z-index: 1;
  width: min(900px, 100%); height: min(88vh, 1000px);
  display: flex; flex-direction: column;
  background: rgb(var(--surface));
  border: 0.5px solid rgba(var(--ink),0.2);
  border-radius: 6px; overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,0.6), 0 0 0 1px rgba(91,108,248,0.08);
  transform: translateY(12px) scale(0.99);
  transition: transform 0.4s cubic-bezier(.22,1,.36,1);
}
.pdf-modal.open .pdf-modal-panel { transform: translateY(0) scale(1); }
.pdf-modal-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 14px; border-bottom: 0.5px solid rgba(var(--ink),0.1);
  background: rgba(var(--ink),0.02);
}
.pdf-modal-meta { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pdf-modal-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #5b6cf8, #a855f7);
  box-shadow: 0 0 10px rgba(91,108,248,0.5);
}
.pdf-modal-title {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pdf-modal-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pdf-modal-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: 3px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  border: 0.5px solid rgba(var(--ink),0.18); color: var(--fg-60);
  background: transparent; transition: all 0.25s cubic-bezier(.4,0,.2,1);
}
.pdf-modal-btn:hover { border-color: rgba(var(--ink),0.5); color: rgb(var(--ink)); background: rgba(var(--ink),0.04); }
.pdf-modal-close { padding: 8px; }
.pdf-modal-frame-wrap { flex: 1; background: rgba(var(--ink),0.03); min-height: 0; }
.pdf-modal-frame { width: 100%; height: 100%; border: 0; display: block; background: #fff; }

@media (max-width: 700px) {
  .pdf-modal { padding: 12px; }
  .pdf-modal-panel { height: 92vh; }
  .pdf-modal-btn span { display: none; }
  .pdf-modal-btn { padding: 8px; }
}
