:root {
  --bg-dark: #000000;
  --bg-panel: #0a0a0a;
  --border-light: rgba(255, 255, 255, 0.1);
  --primary: #b14bf4;
  --primary-glow: rgba(177, 75, 244, 0.5);
  --secondary: #f43f5e;
  --secondary-glow: rgba(244, 63, 94, 0.5);
  --yellow: #F59E0B;
  --red: #EF4444;
  --text-main: #FFFFFF;
  --text-gray: #A1A1AA;
  --font-sans: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --nav-height: 70px;
}

/* Light Mode Aesthetics Override */
html.light {
  --bg-dark: #f1f5f9;
  --bg-panel: #ffffff;
  --border-light: rgba(0, 0, 0, 0.15);
  --primary: #2563eb;
  --primary-glow: rgba(37, 99, 235, 0.2);
  --secondary: #ea580c;
  --secondary-glow: rgba(234, 88, 12, 0.2);
  --yellow: #d97706;
  --red: #dc2626;
  --text-main: #0f172a;
  --text-gray: #475569;
}

html.light .bg-vignette {
  background: radial-gradient(circle at center, transparent 30%, rgba(37, 99, 235, 0.05) 90%, rgba(200, 210, 225, 0.6) 100%);
}

html.light .scanlines {
  background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0) 50%, rgba(0,0,0,0.03) 50%, rgba(0,0,0,0.03));
}

html.light .navbar { background: rgba(255, 255, 255, 0.85); }
html.light .btn-solid { background: var(--text-main); color: #fff; border-color: var(--text-main); }
html.light .btn-solid:hover { background: transparent; color: var(--text-main); box-shadow: 0 0 10px rgba(0,0,0,0.2); }

html.light .terminal-body, html.light .sandbox-body, html.light .agent-runner {
  background: #f8fafc; color: #334155; border-top: 1px solid var(--border-light);
}

html.light .code-block { color: #334155; }
html.light .code-block .keyword { color: #8b5cf6; }
html.light .code-block .function { color: #0284c7; }
html.light .code-block .string { color: #16a34a; }
html.light .code-block .number { color: #d97706; }
html.light .code-block .comment { color: #94a3b8; }
html.light .card-top h4 { color: #0f172a; }
html.light .project-overlay { background: rgba(255,255,255,0.9); }
html.light .project-img-wrapper img { opacity: 1; }

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  margin-left: 1.5rem;
}

.theme-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Language Toggle */
.lang-toggle {
  display: inline-flex; align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 6px 12px;
  margin-left: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

html.light .lang-toggle {
  background: rgba(0, 0, 0, 0.05);
}

.lang-toggle .lang {
  cursor: pointer;
  color: var(--text-gray);
  transition: color 0.3s;
}

.lang-toggle .lang:hover { color: var(--text-main); }
.lang-toggle .lang.active { color: #3b82f6; } /* Mac OS Active Blue */
.lang-toggle .pipe {
  color: var(--text-main);
  margin: 0 6px;
  font-weight: normal;
  opacity: 0.5;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 20px);
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Backgrounds & Scanlines */
.bg-vignette {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at center, transparent 30%, rgba(177, 75, 244, 0.05) 90%, rgba(0,0,0,1) 100%);
  pointer-events: none;
  z-index: -1;
}

.scanlines {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.1));
  background-size: 100% 4px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.3;
}

/* Glitch Effect */
.glitch-text {
  position: relative;
  display: inline-block;
}

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

.glitch-text::before {
  left: 2px;
  text-shadow: -2px 0 var(--secondary);
  clip: rect(24px, 550px, 90px, 0);
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch-text::after {
  left: -2px;
  text-shadow: -2px 0 var(--primary);
  clip: rect(85px, 550px, 140px, 0);
  animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { clip: rect(4px, 9999px, 83px, 0); }
  20% { clip: rect(54px, 9999px, 18px, 0); }
  40% { clip: rect(22px, 9999px, 91px, 0); }
  60% { clip: rect(78px, 9999px, 49px, 0); }
  80% { clip: rect(11px, 9999px, 34px, 0); }
  100% { clip: rect(90px, 9999px, 2px, 0); }
}

@keyframes glitch-anim-2 {
  0% { clip: rect(65px, 9999px, 100px, 0); }
  20% { clip: rect(10px, 9999px, 84px, 0); }
  40% { clip: rect(49px, 9999px, 32px, 0); }
  60% { clip: rect(88px, 9999px, 5px, 0); }
  80% { clip: rect(3px, 9999px, 78px, 0); }
  100% { clip: rect(56px, 9999px, 43px, 0); }
}

/* Typography & Utilities */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-gray { color: var(--text-gray); }
.text-white { color: var(--text-main); }
.text-center { text-align: center; }
.mt-4 { margin-top: 1.5rem; }

/* Navigation */
.navbar {
  position: fixed;
  top: 0; left: 0; width: 100%;
  height: var(--nav-height);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
  display: flex;
  justify-content: center;
}

.nav-content {
  width: 100%; max-width: 1200px;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -1px;
}

.nav-links a {
  color: var(--text-gray);
  text-decoration: none;
  margin-left: 2rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: 0.2s;
}

.nav-links a:hover {
  color: var(--text-main);
  text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 4rem) 2rem 4rem 2rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn:active {
  transform: scale(0.95);
}

.btn-solid {
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
}

.btn-solid:hover {
  background: transparent;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(255,255,255,0.3);
}

.btn-gradient {
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
}

.btn-gradient:hover {
  background: transparent;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(255,255,255,0.3);
}

html.light .btn-gradient {
  background: var(--text-main);
  color: #ffffff;
  border: 1px solid var(--text-main);
}

html.light .btn-gradient:hover {
  background: transparent;
  color: var(--text-main);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  border-color: var(--text-main);
}

.portfolio-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 0.75rem;
}

.bottom-nav {
  display: none;
}

.bottom-nav-hidden {
  transform: translateY(100%) !important;
  opacity: 0;
  pointer-events: none;
}

.terminal-nav-btn {
  display: none;
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-light);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

/* Cards & Windows Base */
.tech-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.card-header {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background: rgba(255,255,255,0.03);
  position: relative;
}
.card-header.border-bottom {
  border-bottom: 1px solid var(--border-light);
}
.padding-0 { padding: 0; }

.window-controls {
  display: flex;
  gap: 8px;
}

.window-controls span {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #3f3f46;
}

.window-controls span:nth-child(1) { background: #ff5f56; } /* Mac OS Red */
.window-controls span:nth-child(2) { background: #ffbd2e; } /* Mac OS Yellow */
.window-controls span:nth-child(3) { background: #27c93f; } /* Mac OS Green */

.header-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-gray);
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  min-height: 70vh;
}

.hero-identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.avatar-container {
  width: 150px;
  height: 150px;
  position: relative;
  border-radius: 16px;
  border: 2px solid var(--primary);
  overflow: hidden;
  box-shadow: 0 0 20px var(--primary-glow);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.3s;
}

.avatar-scanner {
  position: absolute;
  top: -100%; left: 0; width: 100%; height: 5px;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  animation: scan 3s linear infinite;
  opacity: 0.5;
}

@keyframes scan {
  0% { top: -10px; }
  50% { top: 100%; }
  100% { top: 100%; }
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border: 1px solid var(--border-light);
  border-radius: 50px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  background: rgba(177, 75, 244, 0.05); /* --primary but 0.05 opacity */
}

.border-primary { border-color: var(--primary); }

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--secondary);
}

.animate-pulse {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

.hero-title {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero-bio {
  color: var(--text-gray);
  max-width: 450px;
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

.hero-action {
  display: flex;
  gap: 1rem;
}

/* Metrics Card */
.metrics-card {
  width: 100%;
}
.metrics-grid {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.metric-item { display: flex; flex-direction: column; }
.metric-label { font-size: 0.8rem; color: var(--text-gray); text-transform: uppercase; margin-bottom: 5px; }
.metric-value { font-size: 1.5rem; font-weight: 700; font-family: var(--font-mono); }
.progress-bar {
  width: 100%; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; margin-top: 8px; overflow: hidden;
}
.progress-fill { height: 100%; border-radius: 2px; }
.fill-primary { background: var(--primary); box-shadow: 0 0 10px var(--primary); }
.fill-secondary { background: var(--secondary); box-shadow: 0 0 10px var(--secondary); }

/* --- System Boot Animations --- */
@keyframes flickerIn {
  0% { opacity: 0; }
  10% { opacity: 1; }
  20% { opacity: 0; }
  30% { opacity: 1; }
  40% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 1; }
}

@keyframes slideRightIn {
  0% { opacity: 0; transform: translateX(60px) skewX(-10deg); filter: blur(5px); }
  100% { opacity: 1; transform: translateX(0) skewX(0); filter: blur(0); }
}

@keyframes digitalZoomIn {
  0% { opacity: 0; transform: scale(1.1); filter: brightness(2) contrast(1.5); }
  100% { opacity: 1; transform: scale(1); filter: brightness(1) contrast(1); }
}

@keyframes textReveal {
  0% { opacity: 0; transform: translateY(20px); letter-spacing: 5px; filter: blur(4px); }
  100% { opacity: 1; transform: translateY(0); letter-spacing: -1px; filter: blur(0); } 
}

/* Apply Boot Animations */
.hero-identity {
  animation: digitalZoomIn 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero-title {
  animation: textReveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

.hero-subtitle, .hero-bio, .hero-action {
  animation: flickerIn 1s ease-out forwards;
  animation-delay: 0.4s;
  opacity: 0;
}

.metrics-card {
  animation: slideRightIn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: 0.35s;
  opacity: 0;
}

.navbar {
  animation: flickerIn 1.5s ease-out forwards;
}
/* -------------------------------- */

/* Auto Click Animation on Load */
.hand-animation-container {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transform: translate(50px, 50px) scale(1.2);
}

.hand-animation-container.run-anim {
  animation: handClickAnim 3.5s cubic-bezier(0.2, 0.8, 0.2, 1) 1s 3 forwards;
}

html.light .hand-cursor-icon {
  fill: var(--text-main);
  stroke: #fff;
}

@keyframes handClickAnim {
  0% { opacity: 0; transform: translate(50px, 50px) scale(1.2); }
  25% { opacity: 1; transform: translate(-5px, -5px) scale(1); }
  32% { opacity: 1; transform: translate(-5px, -5px) scale(1); }
  40% { opacity: 1; transform: translate(-5px, -5px) scale(0.85); }
  50% { opacity: 1; transform: translate(-5px, -5px) scale(1); }
  75% { opacity: 0; transform: translate(40px, 40px) scale(1.2); }
  100% { opacity: 0; transform: translate(40px, 40px) scale(1.2); visibility: hidden; }
}

.click-target.run-anim {
  animation: buttonClickAnim 3.5s 1s 3 forwards;
}

@keyframes buttonClickAnim {
  0%, 32% { transform: scale(1); border-color: var(--border-light); color: var(--text-main); box-shadow: none; }
  40% { transform: scale(0.95); border-color: var(--primary); color: var(--primary); box-shadow: 0 0 15px var(--primary-glow); }
  50% { transform: scale(1); border-color: var(--primary); color: var(--primary); box-shadow: 0 0 15px var(--primary-glow); }
  75%, 100% { transform: scale(1); border-color: var(--border-light); color: var(--text-main); box-shadow: none; }
}

/* Terminal Section */
.terminal-section { margin-top: 10rem; margin-bottom: 6rem;}
.terminal-window { width: 100%; max-width: 800px; margin: 0 auto; }
.terminal-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  background: #000;
  color: #fff;
  min-height: 200px;
}
.term-line { margin-bottom: 8px; }
.prompt { color: var(--secondary); margin-right: 10px; }
.term-input-line { display: flex; align-items: center; margin-top: 10px;}
#term-input {
  background: transparent; border: none; color: var(--primary); font-family: inherit; font-size: inherit; outline: none; width: 100%;
  font-weight: bold;
  caret-color: var(--primary);
}

.agent-runner {
  background: rgba(0, 0, 0, 0.6);
  padding: 1.5rem;
}

.agent-output {
  min-height: 150px;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.agent-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

#agent-input-field {
  flex: 1;
  min-width: 0; /* allow flex shrinking without overflow */
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  font-family: var(--font-mono);
  outline: none;
  padding: 8px;
  font-size: 0.95rem;
}

#agent-run-btn {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0.5rem 1.25rem;
}

html.light #agent-input-field {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

.quick-reply-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
}

.quick-reply-wrapper.visible {
  opacity: 1;
  transform: translateY(0);
}

.reply-chip {
  padding: 4px 12px;
  background: rgba(var(--primary-rgb), 0.1);
  border: 1px solid var(--primary);
  border-radius: 20px;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.reply-chip:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 10px var(--primary-glow);
}

.agent-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--primary);
  margin-left: 4px;
  vertical-align: middle;
  animation: agent-blink 0.8s step-end infinite;
}

@keyframes agent-blink {
  from, to { opacity: 1; }
  50% { opacity: 0; }
}

/* Section Shared */
.section-title {
  margin-bottom: 3rem;
  text-align: center;
}
.section-title h2 { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.5rem; letter-spacing:-0.5px;}
.section-title p { color: var(--text-gray); font-family: var(--font-mono); font-size: 0.9rem; }

/* Sandbox Section */
.sandbox-section { margin-bottom: 6rem; }
.sandbox-grid {
  display: grid;
  grid-template-columns: 3fr 1.5fr;
  gap: 2rem;
}

.sandbox-tabs {
  display: flex; border-bottom: 1px solid var(--border-light); width: 100%;
}
.tab {
  padding: 12px 20px; font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-gray); cursor: pointer; border-right: 1px solid var(--border-light);
  border-bottom: 2px solid transparent; transition: 0.2s;
}
.tab.active { color: var(--primary); background: rgba(255,255,255,0.02); border-bottom-color: var(--primary); }
.tab:hover { background: rgba(255,255,255,0.05); }

.sandbox-body { padding: 1.5rem; background: #0c0c0c; overflow-x: auto; }
.code-block { display: none; font-family: var(--font-mono); font-size: 0.9rem; line-height: 1.5; color: #d4d4d8; }
.code-block.active { display: block; }
.code-block .keyword { color: #c678dd; }
.code-block .function { color: #61afef; }
.code-block .string { color: #98c379; }
.code-block .comment { color: #5c6370; font-style: italic;}
.code-block .number { color: #d19a66; }
.code-block .tag { color: #e06c75; }

/* API Status Grid */
.api-status-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.status-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-light);
  border-radius: 8px; padding: 1rem;
  display: flex; flex-direction: column; justify-content: space-between;
}
.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.card-top h4 { font-size: 0.85rem; font-weight: 600; color: #e4e4e7; }
.status-dot.green { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; }
.status-dot.yellow { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
.card-bottom { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.8rem; }

/* Expertise Section */
.expertise-section { margin-bottom: 6rem; }
.expertise-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
}
.expertise-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.3s, border-color 0.3s;
}
.expertise-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.expertise-header {
  font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 10px;
}
.expertise-list {
  list-style: none; padding: 0;
}
.expertise-list li {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; color: var(--text-main); font-size: 0.95rem;
}
.expertise-list.dotted li {
  justify-content: flex-start; gap: 10px; color: var(--text-gray);
}
.expertise-list.dotted li::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
}
.expertise-list.dotted.green li::before { background: var(--secondary); }
.expertise-list.dotted.gray li::before { background: #6b7280; }

.bar-container {
  width: 90px; height: 4px; background: rgba(255,255,255,0.1); border-radius: 4px;
}
.bar-fill {
  height: 100%; background: #ffffff; border-radius: 4px;
}

/* Projects Grid */
.projects-section { margin-bottom: 6rem; }
.projects-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
}
.project-card {
  background: var(--bg-panel); border: 1px solid var(--border-light); border-radius: 12px; overflow: hidden; transition: 0.3s;
}
.project-card:hover { border-color: var(--primary); transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.project-img-wrapper { position: relative; height: 200px; overflow: hidden; background: #000; }
.project-img-wrapper img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; transition: 0.5s; }
.project-card:hover .project-img-wrapper img { opacity: 1; transform: scale(1.05); }
.project-overlay {
  position: absolute; top:0; left:0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: flex; justify-content: center; align-items: center; opacity: 0; transition: 0.3s; z-index: 2;
}
.project-card:hover .project-overlay { opacity: 1; }
.text-sm { font-size: 0.8rem; padding: 0.5rem 1rem; }
.project-info { padding: 1.5rem; }
.project-info h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.project-info p { font-size: 0.9rem; line-height: 1.5; margin-bottom: 1.25rem; min-height: 60px; }
.tech-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-family: var(--font-mono); font-size: 0.7rem; padding: 4px 10px; border-radius: 50px; background: rgba(255,255,255,0.05); }
.tag.blue { color: #60a5fa; background: rgba(96, 165, 250, 0.1); }
.tag.green { color: #34d399; background: rgba(52, 211, 153, 0.1); }
.tag.purple { color: #c084fc; background: rgba(192, 132, 252, 0.1); }
.tag.red { color: #f87171; background: rgba(248, 113, 113, 0.1); }
.tag.yellow { color: #fbbf24; background: rgba(251, 191, 36, 0.1); }

/* Contact Section */
.contact-section { margin-bottom: 4rem; }
.contact-card { padding: 4rem 2rem; text-align: center; }
.contact-card h2 { font-size: 2rem; margin-bottom: 1rem; }
.contact-card p { max-width: 600px; margin: 0 auto; }
.contact-buttons { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

footer { text-align: center; padding: 2rem; border-top: 1px solid var(--border-light); font-family: var(--font-mono); font-size: 0.85rem; }

/* Contact Form Page Styles */
.form-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - var(--nav-height) - 4rem);
}

.contact-form-wrapper {
  width: 100%;
  max-width: 500px;
  background: transparent;
}

.form-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 2rem;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  color: #d1d5db;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: #09090b;
  border: 1px solid #27272a;
  border-radius: 8px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #52525b;
}

/* Light Mode Overrides for Contact Form */
html.light .form-group label {
  color: #334155;
  font-weight: 600;
}

html.light .form-group input,
html.light .form-group textarea {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

html.light .form-group input:focus,
html.light .form-group textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  background: #ffffff;
}

.w-full {
  width: 100%;
}

.submit-btn {
  margin-top: 1rem;
  padding: 14px;
}

.feedback-msg {
  min-height: 24px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  color: var(--secondary);
}

/* Experience / Timeline Section */
.experience-section { margin-bottom: 6rem; }
.timeline-container { position: relative; padding-left: 3rem; margin-top: 2rem; }
.timeline-item { position: relative; margin-bottom: 3rem; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -3rem;
  top: 1.5rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-panel);
  border: 3px solid #34d399; /* Green accent */
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.5);
  z-index: 2;
}

.timeline-line {
  position: absolute;
  left: calc(-3rem + 7px); /* center line under 16px dot */
  top: 1.5rem;
  width: 2px;
  height: calc(100% + 3rem);
  background: rgba(52, 211, 153, 0.15); /* Faint green line */
  z-index: 1;
}

.experience-card {
  padding: 1.5rem 2rem;
}

.experience-header-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.company-icon { font-size: 1.2rem; }
.company-name { font-size: 0.85rem; font-family: var(--font-mono); font-weight: 500; }

.role-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.date-pill {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #34d399;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.experience-bullets {
  list-style: none;
  padding: 0;
}

.experience-bullets li {
  position: relative;
  margin-bottom: 0.8rem;
  padding-left: 1.5rem;
  color: var(--text-gray);
  font-size: 0.95rem;
  line-height: 1.6;
}

.experience-bullets li strong {
  color: var(--text-main);
  font-weight: 600;
}

.bullet-arrow {
  position: absolute;
  left: 0;
  color: #34d399;
  font-family: var(--font-mono);
  font-weight: bold;
}

/* Light Mode Overrides for Experience */
html.light .timeline-dot {
  background: #ffffff;
  border-color: #059669;
}
html.light .timeline-line {
  background: rgba(5, 150, 105, 0.2);
}
html.light .date-pill {
  color: #059669;
  background: rgba(5, 150, 105, 0.1);
  border-color: rgba(5, 150, 105, 0.3);
}
html.light .experience-bullets li { color: #334155; }
html.light .experience-bullets li strong { color: #0f172a; }
html.light .bullet-arrow { color: #059669; }

/* Scroll Reveal Animation Styles */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Hamburger Button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 200;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Responsive */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .hero-identity { align-items: center; }
  .hero-bio { margin: 0 auto 2rem auto; }
  .hero-action { justify-content: center; }
  .sandbox-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root {
    --nav-height: 55px;
  }

  body {
    padding-bottom: 80px !important;
  }

  .container {
    padding: calc(var(--nav-height) + 1.5rem) 1.5rem 3rem 1.5rem !important;
  }

  /* Hide hamburger and standard menu lists */
  .hamburger { display: none !important; }
  .nav-links { display: none !important; }
  
  /* Show mobile header terminal shortcut */
  .terminal-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-main);
    transition: all 0.3s ease;
    cursor: pointer;
  }

  html.light .terminal-nav-btn {
    background: rgba(0, 0, 0, 0.03);
  }
  
  /* Bottom Navigation Bar for Mobile */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: rgba(10, 10, 12, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
    align-items: center;
    justify-content: space-around;
    padding: 0 1rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  }

  html.light .bottom-nav {
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
  }

  .bottom-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--text-gray);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
  }

  .bottom-nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    box-shadow: 0 0 15px rgba(177, 75, 244, 0.4);
    transform: translateY(-4px);
  }
  
  /* Sideways Scroll Layout for Cards */
  .projects-grid, .expertise-grid {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    gap: 1.25rem !important;
    padding: 0.5rem 1.5rem 1.5rem 1.5rem !important;
    margin-left: -1.5rem !important;
    margin-right: -1.5rem !important;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
  }
  
  .projects-grid::-webkit-scrollbar, 
  .expertise-grid::-webkit-scrollbar {
    display: none;
  }
  
  .project-card, .expertise-card {
    flex: 0 0 82vw !important;
    max-width: 320px !important;
    scroll-snap-align: start !important;
    margin-bottom: 0 !important;
  }
  
  /* Hero & Avatar circular optimizations */
  .hero-right {
    display: none !important; /* Hide desktop metrics inside hero */
  }
  
  .avatar-container {
    width: 130px;
    height: 130px;
    border-radius: 50% !important;
    border: 3px solid var(--primary);
    box-shadow: 0 0 25px var(--primary-glow);
    margin: 0 auto 1.5rem auto;
  }
  
  .profile-avatar {
    border-radius: 50% !important;
  }
  
  .hero-title { font-size: 2.2rem; }
  .section-title h2 { font-size: 1.8rem; }
  .api-status-grid { grid-template-columns: 1fr 1fr; }

  /* Hero action — uppercase text & custom flex centering */
  .hero-action { 
    flex-direction: column; 
    align-items: center; 
    gap: 1rem; 
    width: 100%;
  }
  .hero-action .btn { 
    width: 100%; 
    max-width: 320px; 
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
  }

  .btn-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(177, 75, 244, 0.3) !important;
  }
  
  .btn-gradient:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(177, 75, 244, 0.5) !important;
    color: #ffffff !important;
  }
  .hand-animation-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  /* Timeline narrower on mobile */
  .timeline-container { padding-left: 2rem; }
  .timeline-dot { left: -2rem; }
  .timeline-line { left: calc(-2rem + 7px); }
  .experience-card { padding: 1.25rem 1rem; }

  /* Sandbox code tabs scroll horizontally */
  .sandbox-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .tab { flex-shrink: 0; }

  .agent-standalone-section { margin-bottom: 4rem; }
  .agent-runner { padding: 1rem; }
}

/* Helper classes */
.expertise-grid, .awards-section, .agent-standalone-section { margin-bottom: 6rem; }
.text-accent { color: #eab308; }
.agent-msg { color: var(--secondary); margin-bottom: 8px; }
.hand-animation-wrapper { position: relative; display: inline-flex; align-items: center; }

@media (max-width: 480px) {
  #agent-run-btn { padding: 0.5rem 0.85rem; font-size: 0.85rem; }
  .hand-animation-container { display: none; }
  .api-status-grid { grid-template-columns: 1fr; }
  .container { padding-left: 1rem; padding-right: 1rem; }
  .experience-card { padding: 1rem 0.75rem; }
  .contact-card { padding: 2.5rem 1rem; }
}
