/* Local font — no internet required */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/JetBrainsMono.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ========================================
   CSS Variables & Base Setup
   ======================================== */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: rgba(26, 26, 26, 0.8);
  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --accent: #8b5cf6;
  --accent-glow: rgba(139, 92, 246, 0.15);
  --accent-secondary: #06b6d4;
  --border: rgba(255, 255, 255, 0.1);
  --grid-color: rgba(139, 92, 246, 0.08);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ========================================
   Animated Grid Background
   ======================================== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  animation: gridMove 20s linear infinite;
  z-index: 0;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Gradient overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.1), transparent 50%),
              radial-gradient(circle at 0% 100%, rgba(6, 182, 212, 0.08), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
  transition: var(--transition);
  position: relative;
}

a:hover {
  color: var(--accent-secondary);
  border-bottom-color: var(--accent-secondary);
  text-shadow: 0 0 8px var(--accent-glow);
}

/* ========================================
   Boot Screen
   ======================================== */
#boot {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.9s ease, filter 0.9s ease;
  z-index: 100;
  font-family: "JetBrains Mono", monospace;
}

#boot.fade-out {
  opacity: 0;
  filter: blur(12px);
  pointer-events: none;
}

#boot pre {
  font-size: 14px;
  line-height: 1.8;
  text-shadow: 0 0 10px var(--accent-glow);
  animation: bootGlow 2s ease-in-out infinite;
}

@keyframes bootGlow {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; text-shadow: 0 0 20px var(--accent-glow); }
}

/* ========================================
   Main Container
   ======================================== */
#main {
  display: none;
  padding: 80px 8vw 60px;
  margin-left: auto;
  margin-right: auto;
  max-width: 1200px;
  position: relative;
  z-index: 1;
  left: 125px;
}

/* ========================================
   Reveal Animation System
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  animation: reveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.25s; }
.delay-3 { animation-delay: 0.4s; }
.delay-4 { animation-delay: 0.55s; }
.delay-5 { animation-delay: 0.7s; }

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   Navigation
   ======================================== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 250px;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(20px);
  padding: 40px 24px;
  z-index: 40;
  border-right: 2px solid transparent;
  border-image: linear-gradient(180deg, var(--accent), var(--accent-secondary), transparent) 1;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.nav-brand {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  font-family: "JetBrains Mono", monospace;
  text-shadow: 0 0 20px var(--accent-glow);
  position: relative;
}

.nav-brand::before {
  content: "▸ ";
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.3; }
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

nav a {
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  position: relative;
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  overflow: hidden;
  width: 100%;
  text-align: left;
  display: block;
}

nav a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

nav a:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

nav a:hover::before {
  opacity: 0.15;
}

nav a:hover::after {
  transform: scaleX(1);
}

nav a.active {
  color: var(--text-primary);
  border-color: var(--accent);
  box-shadow: 0 4px 12px var(--accent-glow);
}

nav a.active::before {
  opacity: 0.15;
}

nav a.active::after {
  transform: scaleX(1);
}

/* ========================================
   Typography
   ======================================== */
h1 {
  font-size: 56px;
  font-weight: 700;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text-primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1:hover {
  animation: glitch 0.3s ease;
}

@keyframes glitch {
  0%, 100% { transform: translate(0); }
  25% { transform: translate(-2px, 2px); }
  50% { transform: translate(2px, -2px); }
  75% { transform: translate(-2px, -2px); }
}

p {
  max-width: 720px;
  line-height: 1.8;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 16px;
  color: var(--text-secondary);
}

h2 {
  margin-top: 80px;
  margin-bottom: 12px;
  font-size: 32px;
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

.mem-addr {
  font-size: 12px;
  font-family: "JetBrains Mono", monospace;
  color: var(--text-secondary);
  opacity: 0.6;
  font-weight: 400;
  order: 2;
  margin-left: 12px;
}

/* ========================================
   Social Links
   ======================================== */
.social-links {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent-secondary));
  transform: scaleY(0);
  transition: transform 0.3s ease;
  transform-origin: bottom;
}

.social-link:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

.social-link:hover::before {
  transform: scaleY(1);
}

.social-icon {
  font-size: 16px;
  color: var(--accent);
  font-weight: 600;
  transition: var(--transition);
}

.social-link:hover .social-icon {
  transform: scale(1.1);
}

.social-label {
  letter-spacing: 0.5px;
}

.social-links {
  margin-bottom: 40px;
}

h2::before {
  content: "";
  width: 6px;
  height: 32px;
  background: linear-gradient(180deg, var(--accent), var(--accent-secondary));
  border-radius: 3px;
  box-shadow: 0 0 10px var(--accent-glow);
  animation: barGlow 3s ease-in-out infinite;
}

@keyframes barGlow {
  0%, 100% {
    box-shadow: 0 0 10px var(--accent-glow);
  }
  50% {
    box-shadow: 0 0 20px var(--accent-glow), 0 0 30px var(--accent-glow);
  }
}

h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
  animation: lineExtend 1s ease-out forwards;
  transform-origin: left;
  order: 1;
}

@keyframes lineExtend {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* ========================================
   Focus Blocks
   ======================================== */
.focus {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 32px;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  transform: scaleX(0);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: left;
}

.block:hover::before {
  transform: scaleX(1);
}

.block::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent,
    rgba(139, 92, 246, 0.05),
    transparent
  );
  opacity: 0;
  transition: var(--transition);
}

.block:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow:
    0 0 30px rgba(139, 92, 246, 0.2),
    0 10px 40px rgba(0, 0, 0, 0.4);
}

.block:hover::after {
  opacity: 1;
  animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%); }
  100% { transform: translateX(100%) translateY(100%); }
}

.block h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}

.block h3::before {
  content: "→";
  font-size: 20px;
  transition: var(--transition);
}

.block:hover h3::before {
  transform: translateX(4px);
}

.block p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

/* ========================================
   Tech Stack Section
   ======================================== */
.tech-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

.tech-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.tech-category:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.2);
}

.tech-category h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.skill-bar {
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.skill-fill {
  background: linear-gradient(90deg, var(--skill-color), transparent);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
  animation: skillLoad 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transform-origin: left;
}

@keyframes skillLoad {
  from {
    width: 0;
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.skill-fill::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: skillShine 2s ease-in-out infinite;
}

@keyframes skillShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.skill-fill span:first-child {
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.skill-fill span:last-child {
  font-size: 11px;
  opacity: 0.8;
  position: relative;
  z-index: 1;
}

/* ========================================
   Current Threads Section
   ======================================== */
.threads {
  margin-top: 40px;
}

.threads p {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
}

.threads p::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* ========================================
   Footer
   ======================================== */
footer {
  margin-top: 120px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

#uptime {
  color: var(--accent);
  font-weight: 600;
}

/* ========================================
   Cursor Effect
   ======================================== */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(139, 92, 246, 0.15),
    transparent 70%
  );
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  z-index: 999;
  mix-blend-mode: screen;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
  nav {
    display: none;
  }

  .nav-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .nav-brand {
    font-size: 11px;
  }

  .nav-links {
    display: flex;
    flex-direction: row;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }

  nav a {
    font-size: 8px;
    padding: 4px 6px;
    white-space: nowrap;
  }

  .theme-toggle {
    padding: 4px;
    font-size: 10px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
  }

  #boot pre {
    font-size: 11px;
    padding: 0 20px;
    max-width: 100%;
  }

  #main {
    padding: 40px 20px 60px;
    left: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .system-monitors {
    display: none !important;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 20px;
    margin-top: 60px;
  }

  h2::before {
    width: 4px;
    height: 24px;
  }

  .ascii-art {
    font-size: 8px;
  }

  .header-container {
    text-align: center;
  }

  .ml-badge {
    font-size: 10px;
    padding: 4px 10px;
  }

  .video-gallery {
    grid-template-columns: 1fr;
  }

  .focus {
    grid-template-columns: 1fr;
  }

  .tech-stack {
    grid-template-columns: 1fr;
  }

  .social-links {
    justify-content: center;
  }

  footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .neural-network,
  .gradient-descent {
    display: none;
  }

  .binary-rain {
    width: 100px;
  }

  .code-decoration {
    display: none;
  }

  .ml-metrics {
    display: none;
  }

  p {
    font-size: 14px;
  }

  .block {
    padding: 24px;
  }

  .project-card {
    padding: 20px;
  }

  .projects {
    grid-template-columns: 1fr;
  }

  footer div:last-child {
    text-align: center;
  }
}

/* ========================================
   Extra Small Screens (Phones)
   ======================================== */
@media (max-width: 480px) {
  nav {
    display: none;
  }

  .nav-brand {
    font-size: 10px;
  }

  nav a {
    font-size: 7px;
    padding: 3px 5px;
  }

  .theme-toggle {
    font-size: 9px;
    padding: 3px;
    width: 20px;
    height: 20px;
  }

  #boot pre {
    font-size: 9px;
    padding: 0 16px;
  }

  #main {
    padding: 40px 16px 40px;
  }

  .system-monitors {
    display: none !important;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 18px;
    margin-top: 50px;
  }

  .ascii-art {
    font-size: 6px;
  }

  .ml-badge {
    font-size: 9px;
    padding: 4px 8px;
  }

  .social-link {
    font-size: 12px;
    padding: 8px 14px;
  }

  .block,
  .project-card {
    padding: 16px;
  }

  .research-item {
    padding-left: 24px;
  }

  .courses-cols {
    flex-direction: column;
    gap: 0;
  }

  .edu-grid {
    display: flex;
    flex-direction: column;
  }

  p {
    font-size: 13px;
  }
}

/* ========================================
   Scrollbar Styling
   ======================================== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

/* ========================================
   Loading Animation
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   Video Gallery Section
   ======================================== */
.video-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 40px;
  align-items: start;
}

.video-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  position: relative;
}

.video-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.2);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-info {
  padding: 24px 28px;
}

.video-info .project-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 0;
}

.video-info h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.video-info .project-tag {
  font-size: 11px;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  letter-spacing: 0.5px;
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.video-info .project-tag::before {
  content: "◆";
  color: var(--accent-secondary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.video-info p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.video-info .project-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ========================================
   Video Placeholder (no video yet)
   ======================================== */
.video-placeholder {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #050505;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.12) 3px,
    rgba(0, 0, 0, 0.12) 4px
  );
  pointer-events: none;
  z-index: 1;
}

.video-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.vp-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: "JetBrains Mono", monospace;
  text-align: center;
  padding: 16px;
}

.vp-rec {
  font-size: 10px;
  font-weight: 700;
  color: #ef4444;
  letter-spacing: 3px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: recBlink 1.8s ease-in-out infinite;
}

.vp-rec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

@keyframes recBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.vp-label {
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 1px;
  opacity: 0.9;
}

.vp-sub {
  font-size: 10px;
  color: var(--text-secondary);
  opacity: 0.4;
  letter-spacing: 0.3px;
}

.vp-cursor {
  width: 8px;
  height: 14px;
  background: var(--accent);
  animation: vpCursorBlink 1s step-end infinite;
}

@keyframes vpCursorBlink {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0; }
}

/* NEW badge */
.badge-new {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 2px 7px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 4px;
  color: #10b981;
  vertical-align: middle;
  margin-left: 6px;
  animation: newBadgePulse 2.5s ease-in-out infinite;
  font-family: "JetBrains Mono", monospace;
}

@keyframes newBadgePulse {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 10px 2px rgba(16, 185, 129, 0.15); }
}

/* ========================================
   Projects Section
   ======================================== */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  margin-top: 40px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.project-card-logo {
  float: right;
  margin: 0 0 10px 14px;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card-logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.research-logo {
  float: right;
  margin: 0 0 12px 20px;
  width: 140px;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.research-logo img {
  width: 128px;
  height: 128px;
  object-fit: contain;
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  transform: scaleX(0);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: left;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.25);
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.project-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.project-tag {
  font-size: 12px;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.project-card p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.project-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.project-link {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 6px 14px;
  transition: var(--transition);
  font-weight: 500;
}

.project-link:hover {
  background: var(--accent);
  color: var(--bg-primary);
  transform: translateX(4px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* ========================================
   Research Section
   ======================================== */
.research-list {
  position: relative;
  padding-left: 28px;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.research-list::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-secondary), transparent);
}

.research-item {
  position: relative;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: var(--transition);
  margin-bottom: 0;
  overflow: visible;
}

.research-item::before,
.research-item::after {
  display: none;
}

@keyframes dotPulse {
  0%, 100% {
    box-shadow: 0 0 0 4px var(--bg-primary), 0 0 10px var(--accent-glow);
  }
  50% {
    box-shadow: 0 0 0 4px var(--bg-primary), 0 0 25px var(--accent-glow);
  }
}

.research-item:hover::before {
  transform: scaleY(1);
}

.research-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.12);
  transform: translateX(4px);
}

.research-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.research-status {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: "JetBrains Mono", monospace;
}

.research-status.active {
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent);
  border: 1px solid var(--accent);
  position: relative;
  overflow: hidden;
}

.research-status.active::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  margin-right: 6px;
  vertical-align: middle;
  animation: greenDotPulse 2s ease-in-out infinite;
}

@keyframes greenDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.research-status.completed {
  background: rgba(6, 182, 212, 0.2);
  color: var(--accent-secondary);
  border: 1px solid var(--accent-secondary);
}

.research-status.completed::before {
  content: "✓";
  margin-right: 6px;
}

.research-date {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
}

.research-item h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.research-advisor {
  font-size: 13px;
  color: var(--accent-secondary);
  margin: 0 0 12px 0;
  font-style: italic;
}

.research-item p:last-child {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

/* ========================================
   Teaching Section
   ======================================== */
/* Teaching Timeline */
.teaching-timeline {
  position: relative;
  padding-left: 28px;
  margin-top: 32px;
}

.teaching-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-secondary), transparent);
}

.tl-item {
  position: relative;
  padding: 16px 20px;
  margin-bottom: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: var(--transition);
}

.tl-item:last-child { margin-bottom: 0; }

.tl-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.12);
  transform: translateX(4px);
}

.tl-dot {
  position: absolute;
  left: -26px;
  top: 20px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 0 2px var(--border);
  z-index: 2;
}

.tl-dot.active {
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 0 8px rgba(139, 92, 246, 0.5);
}

.research-item .tl-dot {
  top: 72px;
}

.tl-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.tl-code {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.tl-status {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 7px;
  border-radius: 20px;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
}

.tl-status.active {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

.tl-name {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.tl-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--text-secondary);
}

.tl-sep { opacity: 0.4; }
.tl-role { color: var(--text-secondary); }
.tl-terms { color: var(--accent-secondary); }

/* ========================================
   Enhanced Footer
   ======================================== */
footer {
  margin-top: 120px;
  padding: 40px 0;
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--accent), var(--accent-secondary), transparent) 1;
  font-size: 13px;
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  position: relative;
}

footer::before {
  content: "[EOF]";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-primary);
  padding: 0 12px;
  font-size: 10px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 2px;
}

footer div {
  position: relative;
}

footer div::before {
  content: ">";
  margin-right: 8px;
  color: var(--accent);
  opacity: 0.6;
}

footer div:last-child {
  text-align: right;
}

footer div:last-child::before {
  content: "<";
  margin-left: 8px;
  margin-right: 0;
}


/* ========================================
   System Monitors (Top Bar)
   ======================================== */
.system-monitors {
  position: fixed;
  top: 0;
  left: 250px;
  right: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 12px 8vw;
  display: flex;
  gap: 24px;
  z-index: 30;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  opacity: 0;
  animation: slideDown 0.5s ease 2s forwards;
}

@keyframes slideDown {
  to { opacity: 1; }
}

.monitor {
  display: flex;
  align-items: center;
  gap: 8px;
}

.monitor-label {
  color: var(--accent);
  font-weight: 600;
  min-width: 35px;
}

.monitor-bar {
  width: 80px;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
}

.monitor-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  transition: width 0.3s ease;
  box-shadow: 0 0 8px var(--accent-glow);
  position: relative;
}

.monitor-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: barShine 2s linear infinite;
}

@keyframes barShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.monitor-fill.thermal {
  background: linear-gradient(90deg, #06b6d4, #f59e0b, #ef4444);
}

.monitor-value {
  color: var(--text-secondary);
  min-width: 45px;
  text-align: right;
}

/* ========================================
   Header Container with Neural Network
   ======================================== */
.header-container {
  position: relative;
  margin-bottom: 20px;
}

.neural-network {
  position: absolute;
  right: -100px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.3;
  pointer-events: none;
  filter: blur(0.3px);
}

.ml-badge {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(6, 182, 212, 0.15));
  border: 1px solid var(--accent);
  border-radius: 20px;
  font-size: 12px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: badgeFloat 3s ease-in-out infinite;
}

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

.ml-badge::before {
  content: "⚡";
  margin-right: 6px;
}

.gradient-descent {
  position: absolute;
  left: -150px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.35;
  pointer-events: none;
}

/* ========================================
   Binary Rain Effect
   ======================================== */
.binary-rain {
  position: fixed;
  top: 0;
  right: 0;
  width: 200px;
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.08;
  z-index: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--accent);
  line-height: 1.4;
}

.binary-char {
  position: absolute;
  animation: binaryFall linear infinite;
  text-shadow: 0 0 5px var(--accent-glow);
}

@keyframes binaryFall {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

/* ========================================
   Enhanced Boot Screen
   ======================================== */
#boot {
  background: #000;
}

#boot pre {
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
  max-width: 800px;
  color: var(--accent);
}

.boot-line {
  opacity: 0;
  animation: bootLine 0.05s ease forwards;
}

@keyframes bootLine {
  to { opacity: 1; }
}

.boot-ok {
  color: #10b981;
}

.boot-loading {
  color: #f59e0b;
}

.boot-progress {
  color: var(--accent-secondary);
}

.boot-bar {
  display: inline-block;
  background: var(--accent);
  height: 12px;
  margin: 0 2px;
  animation: bootBarPulse 0.8s ease infinite;
}

@keyframes bootBarPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ========================================
   Code Snippet Decorations
   ======================================== */
.code-decoration {
  position: fixed;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--accent);
  opacity: 0.05;
  pointer-events: none;
  line-height: 1.4;
  z-index: 0;
}

.code-decoration.top-left {
  top: 120px;
  left: 20px;
}

.code-decoration.bottom-right {
  bottom: 80px;
  right: 20px;
  text-align: right;
}

/* ========================================
   Floating Hex Numbers
   ======================================== */
.hex-float {
  position: fixed;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--accent);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  animation: hexFloat 20s linear infinite;
}

@keyframes hexFloat {
  0% {
    opacity: 0;
    transform: translateY(100vh) translateX(0);
  }
  10% {
    opacity: 0.1;
  }
  90% {
    opacity: 0.1;
  }
  100% {
    opacity: 0;
    transform: translateY(-100px) translateX(50px);
  }
}

/* ========================================
   Pulse Animation for Active Elements
   ======================================== */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 var(--accent-glow);
  }
  50% {
    box-shadow: 0 0 20px 5px var(--accent-glow);
  }
}


/* ========================================
   Theme Toggle Button (in Nav)
   ======================================== */
.theme-toggle {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.theme-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  opacity: 0;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: rgba(139, 92, 246, 0.25);
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 4px 12px var(--accent-glow);
  border-color: var(--accent-secondary);
}

.theme-toggle:hover::before {
  opacity: 0.2;
}

.theme-icon {
  filter: drop-shadow(0 0 6px var(--accent-glow));
  position: relative;
  z-index: 1;
  transition: var(--transition);
}

.theme-toggle:active {
  transform: scale(0.95) rotate(0deg);
}

/* ========================================
   ASCII Art Header
   ======================================== */
.ascii-art {
  font-size: 10px;
  line-height: 1.2;
  color: var(--accent);
  text-align: center;
  margin: 0 0 20px 0;
  font-family: monospace;
  text-shadow: 0 0 10px var(--accent-glow);
  animation: asciiGlow 3s ease-in-out infinite;
  transition: transform 0.1s ease;
}

.ascii-art.wiggle-animation {
  animation: wiggle 0.5s ease-in-out, asciiGlow 3s ease-in-out infinite;
}

.ascii-art.fall-animation {
  animation: fallOff 1.5s ease-in forwards !important;
}

.ascii-art.float-back-animation {
  animation: floatBack 1s ease-out forwards, asciiGlow 3s ease-in-out infinite;
}

@keyframes asciiGlow {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; text-shadow: 0 0 20px var(--accent-glow), 0 0 30px var(--accent-glow); }
}

/* ========================================
   Glitch Effect
   ======================================== */
.glitch {
  position: relative;
  animation: glitch-skew 5s infinite;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.glitch::before {
  animation: glitch-anim-1 3s infinite;
  color: var(--accent);
  z-index: -1;
}

.glitch::after {
  animation: glitch-anim-2 3s infinite;
  color: var(--accent-secondary);
  z-index: -2;
}

@keyframes glitch-anim-1 {
  0%, 95% { opacity: 0; transform: translate(0); }
  96% { opacity: 0.8; transform: translate(-2px, 2px); }
  97% { opacity: 0; transform: translate(2px, -2px); }
  98% { opacity: 0.8; transform: translate(-1px, 1px); }
  100% { opacity: 0; transform: translate(0); }
}

@keyframes glitch-anim-2 {
  0%, 93% { opacity: 0; transform: translate(0); }
  94% { opacity: 0.8; transform: translate(2px, -2px); }
  95% { opacity: 0; transform: translate(-2px, 2px); }
  96% { opacity: 0.8; transform: translate(1px, -1px); }
  100% { opacity: 0; transform: translate(0); }
}

@keyframes glitch-skew {
  0%, 97% { transform: skew(0deg); }
  98% { transform: skew(2deg); }
  99% { transform: skew(-2deg); }
  100% { transform: skew(0deg); }
}

/* ========================================
   Floating Code Snippets
   ======================================== */
.code-snippets {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.code-snippet {
  position: absolute;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--accent);
  opacity: 0.15;
  white-space: nowrap;
  animation: floatCode 15s linear infinite;
}

@keyframes floatCode {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.15;
  }
  90% {
    opacity: 0.15;
  }
  100% {
    transform: translateY(-100px) rotate(5deg);
    opacity: 0;
  }
}

/* ========================================
   Interactive Terminal
   ======================================== */
.terminal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.terminal-overlay.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.terminal-window {
  width: 90%;
  max-width: 800px;
  max-height: 600px;
  background: rgba(10, 10, 10, 0.95);
  border: 2px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 0 50px var(--accent-glow);
  overflow: hidden;
  animation: terminalSlide 0.3s ease;
}

@keyframes terminalSlide {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.terminal-header {
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.terminal-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.terminal-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: var(--transition);
}

.terminal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.terminal-body {
  padding: 20px;
  height: 400px;
  overflow-y: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  line-height: 1.6;
}

.terminal-line {
  color: #f4f4f5;
  margin-bottom: 4px;
}

.terminal-line.error {
  color: #ef4444;
}

.terminal-line.success {
  color: #10b981;
}

.terminal-input-line {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid var(--border);
}

.terminal-prompt {
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  margin-right: 8px;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #f4f4f5;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  outline: none;
}

.terminal-input::placeholder {
  color: rgba(244, 244, 245, 0.3);
}

/* ========================================
   CRT Scanlines Effect
   ======================================== */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 50%,
    rgba(0, 0, 0, 0.05) 50%
  );
  background-size: 100% 4px;
  animation: scanline 8s linear infinite;
  opacity: 0.3;
}

@keyframes scanline {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

/* ========================================
   ML Training Metrics Display
   ======================================== */
.ml-metrics {
  position: fixed;
  top: 80px;
  right: 40px;
  z-index: 45;
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 16px 20px;
  backdrop-filter: blur(10px);
  font-family: "JetBrains Mono", monospace;
  animation: fadeInMetrics 1s ease 2.5s forwards;
  opacity: 0;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.1);
}

@keyframes fadeInMetrics {
  to { opacity: 1; }
}

.ml-metrics::before {
  content: "MODEL TRAINING";
  position: absolute;
  top: -10px;
  left: 12px;
  background: var(--bg-primary);
  padding: 0 8px;
  font-size: 9px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 1.5px;
}

.metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
}

.metric-item:last-child {
  margin-bottom: 0;
}

.metric-label {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 1px;
}

.metric-value {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 60px;
  text-align: right;
}

.metric-value::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 8px;
  animation: metricPulse 2s ease-in-out infinite;
}

@keyframes metricPulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 8px var(--accent);
  }
}

/* ========================================
   Light Mode Theme
   ======================================== */
html[data-theme="light"] {
  --bg-primary: #f5f5f5;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --accent: #7c3aed;
  --accent-glow: rgba(124, 58, 237, 0.3);
  --accent-secondary: #0891b2;
  --border: rgba(0, 0, 0, 0.1);
  --grid-color: rgba(124, 58, 237, 0.05);
}

html[data-theme="light"] body::before {
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
}

html[data-theme="light"] body::after {
  background: radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.05), transparent 50%),
              radial-gradient(circle at 0% 100%, rgba(8, 145, 178, 0.05), transparent 50%);
}

html[data-theme="light"] #boot {
  background: #ffffff;
}

html[data-theme="light"] .system-monitors {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border);
}

html[data-theme="light"] nav {
  background: rgba(255, 255, 255, 0.98);
  border-image: linear-gradient(90deg, var(--accent), var(--accent-secondary), transparent) 1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .monitor-bar {
  background: rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .binary-rain {
  opacity: 0.04;
}

html[data-theme="light"] .code-decoration {
  opacity: 0.03;
}

html[data-theme="light"] .hex-float {
  opacity: 0;
}

html[data-theme="light"] ::-webkit-scrollbar-track {
  background: #f0f0f0;
}

html[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: var(--accent);
}

/* ========================================
   ASCII Art Easter Egg Animations
   ======================================== */
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg) scale(1.05); }
  50% { transform: rotate(5deg) scale(1.1); }
  75% { transform: rotate(-3deg) scale(1.05); }
}

@keyframes fallOff {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  20% {
    transform: translateY(50px) scale(0.95);
    opacity: 0.9;
  }
  100% {
    transform: translateY(1200px) scale(0.8);
    opacity: 0;
  }
}

@keyframes floatBack {
  0% {
    transform: translateY(-100px) scale(0.8);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes glitchText {
  0% {
    transform: translate(-50%, -50%);
    text-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000;
  }
  25% {
    transform: translate(-48%, -52%);
    text-shadow: -2px 0 #00ffff, 2px 0 #ff0000;
  }
  50% {
    transform: translate(-52%, -48%);
    text-shadow: 2px 0 #00ffff, -2px 0 #ff0000;
  }
  75% {
    transform: translate(-51%, -51%);
    text-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000;
  }
  100% {
    transform: translate(-50%, -50%);
    text-shadow: -2px 0 #00ffff, 2px 0 #ff0000;
  }
}

/* ========================================
   Active Processes Section
   ======================================== */
.active-processes {
  margin-top: 32px;
  max-width: 720px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.active-processes-header {
  background: rgba(139, 92, 246, 0.08);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.active-processes-header::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: dotPulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 8px var(--accent);
}

.active-processes-list {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.active-process-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  opacity: 0;
  transform: translateX(-8px);
  animation: processAppear 0.4s ease forwards;
  border-left: 2px solid rgba(139,92,246,0.3);
  padding-left: 10px;
  margin-left: 4px;
}

@keyframes processAppear {
  to { opacity: 1; transform: translateX(0); }
}

.active-process-item::before {
  content: "▸";
  color: var(--accent-secondary);
  font-weight: bold;
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 11px;
}

/* ========================================
   Nav Footer (Terminal Hint)
   ======================================== */
.nav-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resume-download-btn {
  width: 100%;
  background: rgba(139, 92, 246, 0.06);
  border: 1px dashed rgba(139, 92, 246, 0.3);
  border-radius: 6px;
  padding: 10px 16px;
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  box-sizing: border-box;
}

.resume-download-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.tl-logo {
  float: right;
  margin: 0 0 8px 12px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tl-logo img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.terminal-hint-btn {
  width: 100%;
  background: rgba(139, 92, 246, 0.06);
  border: 1px dashed rgba(139, 92, 246, 0.3);
  border-radius: 6px;
  padding: 10px 16px;
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}

.terminal-hint-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.terminal-hint-key {
  display: inline-block;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
}

/* ========================================
   Hamburger & Mobile Nav
   ======================================== */
.hamburger-btn {
  display: none;
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 60;
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid var(--accent);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
  transition: var(--transition);
  box-shadow: 0 0 12px var(--accent-glow);
}

.hamburger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger-btn:hover {
  box-shadow: 0 0 20px var(--accent-glow);
  transform: scale(1.05);
}

.hamburger-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.open span:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  z-index: 50;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.mobile-nav-overlay.open {
  display: flex;
}

.mobile-nav-content {
  width: 90%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.mobile-nav-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-nav-brand {
  font-family: "JetBrains Mono", monospace;
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mobile-nav-close {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 24px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.mobile-nav-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-nav-links a {
  font-family: "JetBrains Mono", monospace;
  font-size: 18px;
  color: var(--text-secondary);
  text-decoration: none;
  border: none;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: var(--transition);
  display: block;
}

.mobile-nav-links a:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.08);
  transform: translateX(8px);
}

/* ========================================
   Typewriter cursor for bio
   ======================================== */
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursorBlink 1s step-end infinite;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@media (max-width: 768px) {
  .hamburger-btn {
    display: none;
  }

  .theme-toggle {
    display: flex;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 60;
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
}

/* ========================================
   Three.js Background Container
   ======================================== */
#three-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#three-bg canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}


/* ========================================
   VanillaTilt overrides
   ======================================== */
[data-tilt] {
  transform-style: preserve-3d;
  will-change: transform;
}

[data-tilt]:hover {
  /* Let VanillaTilt manage transform - disable CSS hover transform */
  box-shadow: 0 20px 60px rgba(139, 92, 246, 0.3) !important;
}

.js-tilt-glare {
  border-radius: inherit !important;
}

.js-tilt-glare-inner {
  background: linear-gradient(
    0deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(139, 92, 246, 0.07) 100%
  ) !important;
}

/* Performance hints */
.project-card,
.block,
.tech-category,
.research-item,
.video-card {
  will-change: transform, opacity;
}

/* ========================================
   Project Video Dropdown
   ======================================== */
.proj-details-collapsed {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.25s ease;
}

.proj-details-open {
  max-height: 600px;
  opacity: 1;
  transition: max-height 0.4s ease, opacity 0.25s ease;
  margin-top: 10px;
}

.proj-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 5px 0;
  background: transparent;
  border: none;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s;
}

.proj-bar:hover { border-color: var(--accent); }

.proj-bar-arrow {
  display: inline-block;
  color: var(--text-secondary);
  font-size: 13px;
  transition: transform 0.25s ease, color 0.2s;
}

.proj-bar:hover .proj-bar-arrow { color: var(--accent); }

.proj-bar-arrow.open { transform: rotate(180deg); }

/* ========================================
   Education Section
   ======================================== */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 16px;
  position: relative;
  padding-left: 28px;
  margin-top: 32px;
}

.edu-grid::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-secondary), transparent);
}

.edu-card .tl-dot {
  top: 26px;
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 20px 8px;
  position: relative;
  overflow: visible;
  transition: var(--transition);
}

.edu-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  animation: shimmerLine 3s ease-in-out infinite;
}

.edu-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.18);
}

.edu-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.edu-initial {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
}

.edu-initial img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.ucsd-initial { background: rgba(0, 98, 155, 0.12); }
.harvard-initial { background: rgba(165, 28, 48, 0.12); }

.edu-card-meta {
  flex: 1;
  min-width: 0;
}

.edu-card-meta h3 {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.edu-degree {
  font-size: 11px;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  margin: 0 0 2px 0;
}

.edu-dates {
  font-size: 10px;
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  margin: 0;
}

.edu-badge {
  flex-shrink: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent);
  border: 1px solid rgba(139, 92, 246, 0.25);
  white-space: nowrap;
}

.edu-badge.incoming {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-secondary);
  border-color: rgba(6, 182, 212, 0.25);
}

.edu-drawer-section-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  margin-top: 18px;
  margin-bottom: 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.edu-capstone {
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.edu-capstone-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  white-space: nowrap;
  padding-top: 2px;
}

.edu-capstone-text {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.edu-capstone-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(139, 92, 246, 0.3);
  transition: border-color 0.2s;
}
.edu-capstone-link:hover { border-color: var(--accent); }

/* Coursework Toggle (arrow only) */
.edu-courses-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 12px;
  padding: 4px 0;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}
.edu-courses-toggle:hover { color: var(--accent); }
.toggle-arrow {
  font-size: 13px;
  transition: transform 0.25s ease;
  display: inline-block;
}
.edu-courses-toggle[aria-expanded="true"] .toggle-arrow {
  transform: rotate(180deg);
}

/* Coursework Drawer */
.edu-courses-drawer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
}
.edu-courses-drawer.open {
  max-height: 1200px;
  opacity: 1;
}

/* Course list layout */
.courses-cols {
  display: flex;
  gap: 32px;
}

.courses-col {
  flex: 1;
  min-width: 0;
}

.course-section {
  margin-top: 14px;
}
.course-section-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.ml-label   { color: #a78bfa; }
.algo-label { color: #fb923c; }
.sys-label  { color: #6ee7b7; }
.circ-label { color: #fcd34d; }
.ds-label   { color: #3b82f6; }
.swe-label  { color: #f9a8d4; }
.math-label { color: #7dd3fc; }

.course-row {
  display: flex;
  gap: 10px;
  padding: 3px 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  line-height: 1.4;
}
.course-code {
  flex-shrink: 0;
  width: 58px;
  color: var(--text-secondary);
  font-weight: 600;
}
.course-name {
  color: var(--text-primary);
  opacity: 0.75;
}

