/* === CSS VARIABLES === */
:root {
  --bg: #060809;
  --bg-2: #0b0f0e;
  --surface: #0e1412;
  --border: rgba(78, 205, 170, 0.12);
  --border-hover: rgba(78, 205, 170, 0.3);
  --text: #ddeee8;
  --text-dim: rgba(221, 238, 232, 0.45);
  --text-ghost: rgba(221, 238, 232, 0.18);
  --bio: #4ecda4;
  --bio-2: #7effd4;
  --bio-deep: #1a6b58;
  --bio-glow: rgba(78, 205, 164, 0.15);
  --bio-pulse: rgba(78, 205, 164, 0.05);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Geist Mono', monospace;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  cursor: default;
  overflow-x: hidden;
}

/* GRAIN */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* AMBIENT BG GLOW */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 15% 20%, rgba(78,205,164,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 85% 70%, rgba(78,205,164,0.03) 0%, transparent 70%),
    radial-gradient(ellipse 80% 30% at 50% 100%, rgba(78,205,164,0.05) 0%, transparent 60%);
}
body > * { position: relative; z-index: 1; }

/* TYPOGRAPHY */
.fell-title {
  font-family: 'IM Fell English', serif;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* BLINK DOT */
.blink-dot {
  animation: blink 2.5s ease-in-out infinite;
  box-shadow: 0 0 8px #4ecda4, 0 0 16px #4ecda4;
}
@keyframes blink {
  0%,100% { opacity: 1; box-shadow: 0 0 8px #4ecda4, 0 0 20px #4ecda4; }
  50%      { opacity: 0.3; box-shadow: 0 0 4px #4ecda4; }
}

/* HEADER */
header {
  border-bottom: 1px solid var(--border);
  background: rgba(6,8,9,0.88);
  backdrop-filter: blur(12px);
}
header a { color: var(--text-dim); }
header a:hover { color: var(--bio); }

/* BUTTONS */
.btn-arena {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Geist Mono', monospace; font-size: 0.7rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  border: 1px solid var(--border); padding: 12px 20px;
  background: transparent; color: var(--text-dim); text-decoration: none;
  transition: all 0.25s ease;
}
.btn-arena:hover {
  background: var(--bio-glow); border-color: var(--border-hover);
  color: var(--bio-2); box-shadow: 0 0 20px var(--bio-pulse), inset 0 0 20px var(--bio-pulse);
}

.btn-primary {
  display: inline-flex; align-items: center;
  font-family: 'Geist Mono', monospace; font-size: 0.7rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  background: var(--bio); color: #060809; padding: 14px 24px;
  text-decoration: none; transition: all 0.25s ease; font-weight: 500;
}
.btn-primary:hover { background: var(--bio-2); box-shadow: 0 0 30px rgba(78,205,164,0.4); }

.btn-secondary {
  display: inline-flex; align-items: center;
  font-family: 'Geist Mono', monospace; font-size: 0.7rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  border: 1px solid var(--border); color: var(--text-dim);
  padding: 14px 24px; text-decoration: none; transition: all 0.25s ease;
}
.btn-secondary:hover { border-color: var(--border-hover); color: var(--bio); box-shadow: 0 0 16px var(--bio-pulse); }

/* TAG CELLS */
.tag-cell {
  padding: 20px 24px; display: flex; flex-direction: column; gap: 6px;
  border-color: var(--border) !important; transition: background 0.2s ease;
}
.tag-cell:hover { background: var(--bio-pulse); }
.tag-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-ghost); }
.tag-value { font-family: 'IM Fell English', serif; font-size: 1.05rem; line-height: 1.3; color: var(--text); }

/* SECTION BORDERS */
section { border-color: var(--border) !important; }

/* PROJECT CARDS */
.project-card {
  transition: background-color 0.25s ease;
  border-color: var(--border) !important;
}
.project-card:hover { background-color: var(--bio-pulse); }
.project-card:hover .fell-title { color: var(--bio-2); }

/* CHIPS */
.chip {
  font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--border); padding: 4px 8px; color: var(--text-ghost);
  transition: all 0.2s ease;
}
.project-card:hover .chip { border-color: rgba(78,205,164,0.2); color: var(--bio); }

/* MIND MAP CENTER */
.mindmap-center {
  background: var(--surface) !important;
  border-right: 1px solid var(--border) !important;
  position: relative; overflow: hidden;
}
.mindmap-center::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 80% at 50% 50%, rgba(78,205,164,0.07) 0%, transparent 70%);
  pointer-events: none;
  animation: bioBreath 6s ease-in-out infinite;
}
@keyframes bioBreath {
  0%,100% { opacity: 0.6; }
  50% { opacity: 1.2; }
}
.mindmap-center .fell-title { color: var(--bio-2); text-shadow: 0 0 30px rgba(78,205,164,0.45); }

/* NODE MINI */
.node-mini {
  background: rgba(78,205,164,0.05); border: 1px solid rgba(78,205,164,0.15);
  font-size: 0.6rem; text-align: center; padding: 6px 4px;
  letter-spacing: 0.05em; color: rgba(78,205,164,0.6);
}

/* BRANCH ROW */
.branch-row {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
}
.branch-row:last-child { border-bottom: none; }
.branch-row:hover { background-color: var(--bio-pulse); }
.branch-row:hover h4 { color: var(--bio-2); }
h4 { transition: color 0.2s ease; }

.branch-dot {
  width: 10px; height: 10px; border-radius: 50%;
  margin-top: 4px; flex-shrink: 0;
  filter: brightness(1.2) drop-shadow(0 0 4px currentColor);
}

/* NOW CARDS */
.now-card { transition: background-color 0.2s ease; border-color: var(--border) !important; }
.now-card:hover { background-color: var(--bio-pulse); }

/* BLOCKQUOTE */
blockquote { border-left: 2px solid var(--bio) !important; }
blockquote p { color: var(--text-dim); }

/* DASHED */
.border-dashed { border-color: var(--border) !important; }

/* VISUALS */
.sei-visual {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 8px, rgba(78,205,164,0.05) 8px, rgba(78,205,164,0.05) 9px),
    repeating-linear-gradient(90deg, transparent, transparent 8px, rgba(78,205,164,0.05) 8px, rgba(78,205,164,0.05) 9px);
  animation: gridPulse 4s ease-in-out infinite;
}
@keyframes gridPulse {
  0%,100% { opacity: 0.7; }
  50% { opacity: 1.3; }
}
.sei-visual::after, .github-visual::after, .notion-visual::after {
  position: absolute; bottom: 12px; right: 12px;
  font-family: 'Geist Mono', monospace; font-size: 0.65rem;
  color: var(--bio); opacity: 0.35; letter-spacing: 0.1em;
}
.sei-visual::after { content: 'SEI →'; }
.github-visual {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(-45deg, transparent, transparent 10px, rgba(78,205,164,0.03) 10px, rgba(78,205,164,0.03) 11px);
}
.github-visual::after { content: 'GH →'; }
.notion-visual {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(78,205,164,0.08) 0%, transparent 60%);
  animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe {
  0%,100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
.notion-visual::after { content: 'N →'; }

/* ANIMATIONS */
header, section, footer { animation: fadeUp 0.6s ease both; }
section:nth-child(2) { animation-delay: 0.06s; }
section:nth-child(3) { animation-delay: 0.12s; }
section:nth-child(4) { animation-delay: 0.18s; }
section:nth-child(5) { animation-delay: 0.24s; }
section:nth-child(6) { animation-delay: 0.30s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bio-deep); }
::-webkit-scrollbar-thumb:hover { background: var(--bio); }

/* SELECTION */
::selection { background: var(--bio); color: #060809; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .tag-cell { border-right: none !important; border-bottom: 1px solid var(--border) !important; }
  .tag-cell:last-child { border-bottom: none !important; }
}
