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

:root {
  --bg: #080808;
  --bg2: #0f0f0f;
  --bg3: #161616;
  --border: rgba(255,255,255,0.06);
  --border2: rgba(255,255,255,0.11);
  --text: #f0ede6;
  --muted: #555;
  --muted2: #888;
  --accent: #d4ff4a;
  --accent2: rgba(212,255,74,0.07);
  --accent3: rgba(212,255,74,0.14);
  --mono: 'DM Mono', monospace;
  --serif: 'Instrument Serif', serif;
  --sans: 'Geist', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

/* ===== CUSTOM CURSOR ===== */
.cursor {
  position: fixed;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.12s ease, width 0.2s ease, height 0.2s ease;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  position: fixed;
  width: 32px; height: 32px;
  border: 1px solid rgba(212,255,74,0.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.08s ease, opacity 0.2s ease, width 0.25s ease, height 0.25s ease, border-color 0.2s ease;
  transform: translate(-50%, -50%);
}
.cursor.hovered { transform: translate(-50%,-50%) scale(3); }
.cursor-ring.hovered { width: 50px; height: 50px; border-color: rgba(212,255,74,0.6); }
.cursor-ring.clicking { transform: translate(-50%,-50%) scale(0.7); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 2px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

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

/* ===== CANVAS DOT GRID ===== */
#dot-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 3rem;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(24px) saturate(180%);
  background: rgba(8,8,8,0.75);
  transition: padding 0.3s ease, background 0.3s;
}
nav.scrolled { padding: 0.9rem 3rem; background: rgba(8,8,8,0.92); }

.nav-logo {
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.03em;
}
.nav-logo span { color: var(--accent); }

.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 300;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 2.2s infinite;
  box-shadow: 0 0 6px var(--accent);
}
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0.2;} }

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 3rem 5rem;
  position: relative;
  overflow: hidden;
}

.hero-bg-text {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%,-50%);
  font-size: clamp(6rem, 18vw, 17rem);
  font-family: var(--serif);
  font-style: italic;
  color: rgba(255,255,255,0.012);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.02em;
  transition: transform 0.1s ease-out;
}

.hero-glitch-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: glitch-line 4s infinite;
  opacity: 0;
}
@keyframes glitch-line {
  0%,100%{opacity:0;top:0%;}
  10%{opacity:0.6;top:20%;}
  12%{opacity:0;}
  40%{opacity:0;top:60%;}
  42%{opacity:0.4;top:62%;}
  44%{opacity:0;}
}

.hero-tag {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.9s 0.2s cubic-bezier(0.16,1,0.3,1) forwards;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-tag::before {
  content:'';
  display:inline-block;
  width: 32px; height: 1px;
  background: var(--accent);
}

h1.hero-name {
  font-family: var(--serif);
  font-size: clamp(4.5rem, 11vw, 10rem);
  font-weight: 400;
  font-style: italic;
  line-height: 0.88;
  letter-spacing: -0.025em;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.9s 0.4s cubic-bezier(0.16,1,0.3,1) forwards;
}
h1.hero-name em {
  font-style: normal;
  color: var(--accent);
  position: relative;
}
h1.hero-name em::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  animation: underlineIn 0.6s 1.2s ease forwards;
}
@keyframes underlineIn { to { transform: scaleX(1); } }

.hero-desc {
  max-width: 520px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 300;
  color: var(--muted2);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.9s 0.6s cubic-bezier(0.16,1,0.3,1) forwards;
}
.hero-desc em { color: var(--text); font-style: italic; }

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.9s 0.8s cubic-bezier(0.16,1,0.3,1) forwards;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--bg);
  background: var(--accent);
  border: none;
  padding: 0.75rem 1.75rem;
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  transform: translateX(-102%);
  transition: transform 0.3s ease;
}
.btn-primary:hover::before { transform: translateX(0); }
.btn-primary:hover { box-shadow: 0 0 30px rgba(212,255,74,0.3); }
.btn-primary span { position: relative; z-index: 1; }

.btn-ghost {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--muted2);
  text-decoration: none;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border2);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text); }

.hero-meta {
  position: absolute;
  right: 3rem;
  bottom: 5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  opacity: 0;
  animation: fadeUp 0.9s 1s cubic-bezier(0.16,1,0.3,1) forwards;
}
.hero-meta-item {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-meta-item span { color: var(--muted2); }

.scroll-hint {
  position: absolute;
  bottom: 2rem; left: 50%; transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeUp 0.9s 1.2s cubic-bezier(0.16,1,0.3,1) forwards;
}
.scroll-arrow {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollDown 1.8s ease infinite;
}
@keyframes scrollDown { 0%{transform:scaleY(0);transform-origin:top;} 50%{transform:scaleY(1);transform-origin:top;} 51%{transform-origin:bottom;} 100%{transform:scaleY(0);transform-origin:bottom;} }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity:0; transform: translateY(24px); }
  to { opacity:1; transform: translateY(0); }
}

/* ===== SECTION SHARED ===== */
section {
  position: relative;
  z-index: 2;
  padding: 8rem 3rem;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.section-label::after {
  content: '';
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--border2);
}
.num { color: var(--accent); margin-right: 0.3rem; }

.section-divider {
  position: relative;
  z-index: 2;
  height: 1px;
  background: var(--border);
  margin: 0 3rem;
}

/* ===== REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ===== ABOUT / ABOUT GRID ===== */
#about { padding-bottom: 6rem; }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.about-heading {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-style: italic;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}
.about-heading em { font-style: normal; color: var(--accent); }
.about-body {
  font-size: 0.93rem;
  color: var(--muted2);
  line-height: 1.9;
  margin-bottom: 1.5rem;
}
.about-body strong { color: var(--text); font-weight: 400; }

.about-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}
.pill {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted2);
  border: 1px solid var(--border2);
  padding: 0.3rem 0.8rem;
  letter-spacing: 0.06em;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.pill:hover { color: var(--accent); border-color: var(--accent); background: var(--accent2); }

.about-right { display: flex; flex-direction: column; gap: 1.5rem; }
.stat-card {
  border: 1px solid var(--border);
  padding: 1.5rem;
  background: var(--bg2);
  transition: border-color 0.3s, background 0.3s;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.4s ease;
}
.stat-card:hover::before { width: 100%; }
.stat-card:hover { border-color: var(--border2); background: var(--bg3); }
.stat-big {
  font-family: var(--serif);
  font-size: 3rem;
  font-style: italic;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-label { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); letter-spacing: 0.08em; }
.stat-sub { font-size: 0.8rem; color: var(--muted2); margin-top: 0.5rem; }

/* ===== TIMELINE ===== */
#timeline { min-height: 100vh; overflow: hidden; }
.timeline-intro {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 4rem);
  font-style: italic;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 5rem;
  max-width: 700px;
}
.timeline-intro em { font-style: normal; color: var(--accent); }

.timeline-track {
  display: flex;
  gap: 0;
  position: relative;
}
.timeline-track::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: var(--border2);
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 3rem;
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: background 0.3s;
}
.timeline-item:last-child { border-bottom: none; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -4px; top: 3.5rem;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--border2);
  border: 1px solid var(--bg);
  transition: background 0.3s, box-shadow 0.3s;
}
.timeline-item:hover::before {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(212,255,74,0.5);
}
.timeline-year {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  padding-top: 0.2rem;
  padding-left: 1.5rem;
}
.timeline-age {
  display: block;
  color: var(--accent);
  font-size: 0.65rem;
  margin-top: 0.25rem;
}
.timeline-content h3 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-style: italic;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}
.timeline-item:hover .timeline-content h3 { color: var(--accent); }
.timeline-content p { font-size: 0.88rem; color: var(--muted2); line-height: 1.85; max-width: 540px; }
.timeline-diff {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  display: inline-block;
  position: relative;
}
.timeline-diff::before { content: 'diff'; position: absolute; top: -8px; left: 8px; font-size: 0.58rem; color: var(--muted); background: var(--bg); padding: 0 4px; }
.diff-add { color: #7ec891; display: block; }
.diff-add::before { content: '+ '; }
.diff-rem { color: #e06c75; display: block; }
.diff-rem::before { content: '- '; }

/* ===== MARQUEE ===== */
#manifesto { padding: 7rem 0; overflow: hidden; }
.manifesto-head {
  padding: 0 3rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 4rem);
  font-style: italic;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 4rem;
  max-width: 700px;
}
.manifesto-head em { font-style: normal; color: var(--accent); }

.marquee-wrapper {
  position: relative;
  overflow: hidden;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4rem;
}
.marquee-track {
  display: flex;
  white-space: nowrap;
  animation: marqueeScroll 18s linear infinite;
  will-change: transform;
}
.marquee-track:hover { animation-play-state: paused; }
@keyframes marqueeScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-item {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-style: italic;
  color: var(--muted2);
  padding: 0 2rem;
  display: inline-flex;
  align-items: center;
  gap: 2rem;
  transition: color 0.3s;
}
.marquee-item:hover { color: var(--text); }
.marquee-sep { color: var(--accent); font-style: normal; font-size: 1rem; opacity: 0.4; }

.manifesto-rules {
  padding: 0 3rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.manifesto-rule {
  border: 1px solid var(--border);
  padding: 2rem;
  position: relative;
  background: var(--bg2);
  transition: border-color 0.3s, transform 0.3s;
}
.manifesto-rule:hover { border-color: var(--accent); transform: translateY(-4px); }
.rule-num {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}
.rule-title { font-family: var(--serif); font-size: 1.3rem; font-style: italic; margin-bottom: 0.5rem; }
.rule-body { font-size: 0.83rem; color: var(--muted2); line-height: 1.7; }

/* ===== PROJECTS ===== */
#projects { }
.projects-heading {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-style: italic;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 4rem;
  max-width: 700px;
}
.projects-heading em { font-style: normal; color: var(--accent); }

.projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.project-card {
  border: 1px solid var(--border);
  padding: 2.5rem;
  background: var(--bg2);
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s, background 0.35s, transform 0.35s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(212,255,74,0.04) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}
.project-card:hover::after { opacity: 1; }
.project-card:hover { border-color: var(--border2); background: var(--bg3); transform: translateY(-2px); }
.project-card.featured { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.project-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.project-status {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.project-status::before { content:''; display:inline-block; width:5px; height:5px; border-radius:50%; background:var(--accent); animation: blink 2s infinite; }
.project-type {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.project-name {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-style: italic;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}
.project-card:hover .project-name { color: var(--accent); }
.project-desc { font-size: 0.84rem; color: var(--muted2); line-height: 1.75; margin-bottom: 1.5rem; }
.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.stack-tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  letter-spacing: 0.05em;
}
.project-arrow {
  position: absolute;
  top: 2rem; right: 2rem;
  font-size: 1.2rem;
  color: var(--muted);
  transition: transform 0.3s, color 0.3s;
}
.project-card:hover .project-arrow { transform: translate(3px, -3px); color: var(--accent); }

/* ===== TERMINAL ===== */
#terminal { }
.terminal-intro {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 4rem);
  font-style: italic;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  max-width: 600px;
}
.terminal-intro em { font-style: normal; color: var(--accent); }
.terminal-hint { font-size: 0.83rem; color: var(--muted2); margin-bottom: 3rem; }
.terminal-hint strong { color: var(--accent); font-weight: 400; }

.term-window {
  border: 1px solid var(--border2);
  background: var(--bg2);
  max-width: 760px;
}
.term-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
}
.term-dot { width: 10px; height: 10px; border-radius: 50%; }
.term-dot-r { background: #ff5f57; }
.term-dot-y { background: #ffbd2e; }
.term-dot-g { background: #28c941; }
.term-title {
  margin-left: auto;
  margin-right: auto;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}
#term-body {
  padding: 1.25rem;
  min-height: 260px;
  max-height: 380px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.8;
}
#term-body::-webkit-scrollbar { width: 2px; }
#term-body::-webkit-scrollbar-thumb { background: var(--border2); }

.terminal-line { margin: 0; }
.t-prompt { color: var(--accent); }
.t-cmd { color: var(--text); }
.t-out { color: var(--muted2); }
.t-err { color: #e06c75; }
.t-val { color: #7ec891; }
.t-key { color: var(--accent); }
.t-link { color: #61afef; text-decoration: underline; cursor: pointer; }
.t-link:hover { color: var(--accent); }
.t-ai { color: #c678dd; }

.term-input-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg3);
}
.term-input-row span {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  white-space: nowrap;
}
#term-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text);
  caret-color: var(--accent);
}
.term-typing {
  display: inline-block;
  width: 6px; height: 12px;
  background: var(--accent);
  vertical-align: middle;
  animation: blink 0.9s step-end infinite;
}

/* ===== STATS / NUMBERS ===== */
#stats { }
.stats-heading {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 4rem);
  font-style: italic;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 4rem;
}
.stats-heading em { font-style: normal; color: var(--accent); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--border);
}
.stat-item {
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}
.stat-item:last-child { border-right: none; }
.stat-item:hover { background: var(--bg2); }
.stat-num-big {
  font-family: var(--serif);
  font-size: 3.5rem;
  font-style: italic;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}
.stat-item:hover .stat-num-big { color: var(--accent); }
.stat-suffix { color: var(--accent); }
.stat-desc { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.stat-detail { font-size: 0.78rem; color: var(--muted2); margin-top: 0.75rem; line-height: 1.6; }

/* ===== CONTACT ===== */
#contact { }
.contact-big {
  font-family: var(--serif);
  font-size: clamp(4rem, 10vw, 9rem);
  font-style: italic;
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin-bottom: 2.5rem;
}
.contact-big em { font-style: normal; color: var(--accent); }
.contact-sub {
  max-width: 520px;
  font-size: 0.93rem;
  color: var(--muted2);
  line-height: 1.85;
  margin-bottom: 3rem;
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted2);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 0.65rem 1.1rem;
  letter-spacing: 0.05em;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.contact-link:hover {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.contact-link svg { transition: transform 0.2s; }
.contact-link:hover svg { transform: scale(1.1); }

/* ===== FOOTER ===== */
footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 3rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
}
footer a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--accent); }
.footer-right { display: flex; gap: 1.5rem; }

/* ===== AI BADGE ===== */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: #c678dd;
  border: 1px solid rgba(198,120,221,0.25);
  padding: 0.25rem 0.65rem;
  margin-top: 0.75rem;
  letter-spacing: 0.06em;
}
.ai-dot { width: 5px; height: 5px; border-radius: 50%; background: #c678dd; animation: blink 1.5s infinite; }

/* ===== LOADING INDICATOR ===== */
.t-loading {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 2px 0;
}
.t-loading span {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #c678dd;
  animation: loadingDot 1s ease infinite;
}
.t-loading span:nth-child(2) { animation-delay: 0.15s; }
.t-loading span:nth-child(3) { animation-delay: 0.3s; }
@keyframes loadingDot { 0%,100%{opacity:0.3;transform:translateY(0);} 50%{opacity:1;transform:translateY(-3px);} }

/* ===== SPOTLIGHT ===== */
.spotlight {
  position: fixed;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,255,74,0.025) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%,-50%);
  transition: opacity 0.3s;
  opacity: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  section { padding: 5rem 1.5rem; }
  #hero { padding: 0 1.5rem 4rem; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card.featured { grid-column: 1; grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3) { border-right: 1px solid var(--border); }
  .manifesto-rules { grid-template-columns: 1fr; padding: 0 1.5rem; }
  .section-divider { margin: 0 1.5rem; }
  .hero-meta { display: none; }
  footer { padding: 1.5rem; }
}
/* Custom styles for education specific elements */
.edu-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; max-width: 800px; }
.edu-card { border: 1px solid var(--border); padding: 3rem; background: var(--bg2); position: relative; transition: border-color 0.3s, background 0.3s; }
.edu-card:hover { border-color: var(--border2); background: var(--bg3); }
.edu-date { font-family: var(--mono); font-size: 0.72rem; color: var(--accent); letter-spacing: 0.1em; margin-bottom: 1rem; display: block; }
.edu-school { font-family: var(--serif); font-size: 2.2rem; font-style: italic; line-height: 1.1; margin-bottom: 0.5rem; }
.edu-grade { font-size: 1.1rem; color: var(--text); margin-bottom: 1.5rem; }
.edu-desc { font-size: 0.9rem; color: var(--muted2); line-height: 1.8; }

/* Custom styles for achievements */
.ach-section-title { font-family: var(--serif); font-size: 2.2rem; font-style: italic; margin-top: 3rem; margin-bottom: 1.5rem; color: var(--text); }
.ach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 3rem; }
.ach-card { border: 1px solid var(--border); padding: 2rem; background: var(--bg2); transition: border-color 0.3s, background 0.3s, transform 0.3s; text-decoration: none; display: block; color: inherit; }
.ach-card:hover { border-color: var(--border2); background: var(--bg3); transform: translateY(-2px); }
.ach-card-title { font-family: var(--sans); font-size: 1.1rem; font-weight: 400; margin-bottom: 0.5rem; color: var(--text); }
.ach-card-issuer { font-family: var(--mono); font-size: 0.65rem; color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; }
.ach-group { border: 1px solid var(--border); background: var(--bg2); margin-bottom: 1rem; transition: border-color 0.3s; }
.ach-group:hover { border-color: var(--border2); }
.ach-summary { padding: 1.5rem; font-family: var(--mono); font-size: 0.8rem; color: var(--accent); cursor: pointer; letter-spacing: 0.05em; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.ach-summary::-webkit-details-marker { display: none; }
.ach-summary::after { content: '+'; font-size: 1.2rem; font-weight: 300; }
.ach-group[open] .ach-summary::after { content: '-'; }
.ach-list { padding: 0 1.5rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.ach-item { font-size: 0.85rem; color: var(--muted2); padding: 1rem; border-left: 2px solid var(--border2); background: var(--bg); transition: color 0.3s, border-color 0.3s; }
.ach-item:hover { color: var(--text); border-color: var(--accent); }

/* Blog toggle logic */
#blog .projects-grid .project-card:nth-child(n+5) { display: none; }
#blog .projects-grid.expanded .project-card:nth-child(n+5) { display: block; }

/* Animated Accordions */
details.ach-group[open] summary ~ * {
  animation: sweep .3s ease-in-out;
}
@keyframes sweep {
  0%    {opacity: 0; transform: translateY(-10px)}
  100%  {opacity: 1; transform: translateY(0)}
}

/* LIGHT THEME VARIABLES */
[data-theme="light"] {
  --bg: #fafafa;
  --bg2: #ffffff;
  --bg3: #f0f0f0;
  --text: #111111;
  --muted: #555555;
  --muted2: #777777;
  --border: #e0e0e0;
  --border2: #d1d1d1;
  --accent: #4c6600; /* Darker neon green for light mode */
  --accent-dim: rgba(76, 102, 0, 0.1);
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: background 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.theme-toggle:hover {
  background: var(--bg3);
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}
.theme-toggle svg {
  width: 22px;
  height: 22px;
}
.moon-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }
[data-theme="light"] .sun-icon { display: none; }
