/* ==========================================================================
   Phani Kumari Boda — Embedded Systems Portfolio CSS
   Designed with Modern Glassmorphism, Dark/Light Theme System, and Micro-Animations
   ========================================================================== */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  /* Executive Light Theme Default — Precision Carbon & Forest Emerald */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-tertiary: #F1F5F9;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFC;
  --border-color: #E2E8F0;
  --border-glow: rgba(4, 120, 87, 0.2);
  
  --text-main: #0F172A;
  --text-muted: #475569;
  --text-dim: #94A3B8;
  
  /* Primary & Accents (Zero Blue) */
  --accent-primary: #0F172A;
  --accent-blue: #047857; /* Aliased to Forest Emerald to keep all existing var() references green */
  --accent-blue-deep: #065F46;
  --accent-blue-glow: rgba(4, 120, 87, 0.1);
  --accent-cyan: #0D9488;
  --accent-emerald: #047857;
  --accent-emerald-soft: rgba(4, 120, 87, 0.08);
  --accent-amber: #B45309;
  --accent-amber-soft: rgba(180, 83, 9, 0.08);
  --accent-purple: #6D28D9;

  --lcd-bg: #8BAC0F;
  --lcd-bg-dark: #0F380F;
  --lcd-text: #0F380F;
  --lcd-grid: #9BBC0F;
  
  --code-bg: #0F172A;
  --code-border: #1E293B;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 4px 18px rgba(4, 120, 87, 0.08);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', var(--font-sans);
  --font-mono: 'JetBrains Mono', monospace;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Variables (Optionally toggled, matching non-blue palette) */
[data-theme="dark"] {
  --bg-primary: #090D14;
  --bg-secondary: #0F172A;
  --bg-tertiary: #1E293B;
  --bg-card: rgba(15, 23, 42, 0.88);
  --bg-card-hover: rgba(30, 41, 59, 0.95);
  --border-color: rgba(255, 255, 255, 0.09);
  --border-glow: rgba(16, 185, 129, 0.2);
  
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  
  --accent-primary: #F8FAFC;
  --accent-blue: #10B981;
  --accent-blue-deep: #059669;
  --accent-blue-glow: rgba(16, 185, 129, 0.15);
  --accent-cyan: #14B8A6;
  --accent-emerald: #10B981;
  --accent-emerald-soft: rgba(16, 185, 129, 0.12);
  --accent-amber: #F59E0B;
  --accent-amber-soft: rgba(245, 158, 11, 0.12);
  --accent-purple: #A78BFA;

  --lcd-bg: #8BAC0F;
  --lcd-text: #0F380F;
  
  --code-bg: #0D1117;
  --code-border: #1E293B;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 4px 20px rgba(16, 185, 129, 0.1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(4, 120, 87, 0.025) 0%, transparent 45%),
    radial-gradient(circle at 90% 60%, rgba(15, 23, 42, 0.02) 0%, transparent 45%);
  background-attachment: fixed;
}

a {
  color: var(--accent-emerald);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-blue-deep);
}

/* Container */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

[data-theme="dark"] .navbar {
  background: rgba(9, 13, 20, 0.92);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.nav-brand:hover {
  opacity: 0.85;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.brand-name span {
  color: var(--accent-emerald);
}

.brand-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.brand-avatar-mini {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-emerald);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  box-shadow: 0 2px 6px rgba(4, 120, 87, 0.25);
  flex-shrink: 0;
}

/* ==========================================================================
   PERSONAL HERO & RECRUITER PRESENTATION (30-60s SCAN)
   ========================================================================== */
.personal-hero-wrapper {
  padding: 30px 0 20px;
}

.personal-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 40px 44px;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.personal-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0F172A 0%, var(--accent-emerald) 50%, #10B981 100%);
}

.personal-hero-name {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.8vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-main);
  letter-spacing: -0.025em;
  margin-bottom: 6px;
}

.personal-hero-degree {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent-emerald);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.personal-hero-bio {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 24px;
  max-width: 640px;
}

.personal-hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.personal-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.personal-hero-meta a,
.personal-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.personal-hero-meta a {
  color: var(--text-main);
  font-weight: 500;
  transition: var(--transition);
}

.personal-hero-meta a:hover {
  color: var(--accent-emerald);
}

.personal-photo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.personal-photo-frame {
  width: 190px;
  height: 190px;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-md);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition);
}

.personal-photo-frame:hover {
  border-color: var(--accent-emerald);
  box-shadow: 0 4px 16px rgba(4, 120, 87, 0.2);
}

.personal-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Compact About Section Cards */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.about-card:hover {
  border-color: rgba(4, 120, 87, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.about-card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.about-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Compact Project Cards */
.project-compact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.project-compact-card:hover {
  border-color: rgba(4, 120, 87, 0.35);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.project-card-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.project-compact-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 8px;
}

.project-compact-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 14px;
}

.project-what-i-did {
  font-size: 0.85rem;
  color: var(--text-main);
  background: var(--bg-tertiary);
  border-left: 3px solid var(--accent-emerald);
  padding: 9px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 16px;
  line-height: 1.5;
}

.project-compact-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

/* Modal Tabs */
.modal-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
  padding-bottom: 8px;
}

.modal-tab-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.modal-tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-tertiary);
}

.modal-tab-btn.active {
  color: #FFFFFF;
  background: #0F172A;
  border-color: #0F172A;
}

[data-theme="dark"] .modal-tab-btn.active {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
}

.modal-tab-pane {
  display: none;
}

.modal-tab-pane.active {
  display: block;
}

@media (max-width: 868px) {
  .personal-hero-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 32px 20px;
    gap: 28px;
  }
  .personal-hero-degree,
  .personal-hero-cta,
  .personal-hero-meta {
    justify-content: center;
  }
}


.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  padding: 8px 0;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-emerald);
  font-weight: 600;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2.5px;
  background: var(--accent-emerald);
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  font-family: var(--font-sans);
}

.btn-primary {
  background: #0F172A;
  color: #FFFFFF;
  border: 1px solid #0F172A;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
}

.btn-primary:hover {
  background: #047857;
  border-color: #047857;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.22);
  color: #FFFFFF;
}

[data-theme="dark"] .btn-primary {
  background: #047857;
  border-color: #047857;
}

[data-theme="dark"] .btn-primary:hover {
  background: #059669;
  border-color: #059669;
}

.btn-outline {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: var(--accent-emerald);
}

[data-theme="dark"] .btn-outline {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

[data-theme="dark"] .btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-main);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  border-color: #CBD5E1;
  color: var(--accent-emerald);
  background: #F1F5F9;
}

[data-theme="dark"] .theme-toggle {
  background: var(--bg-secondary);
}

[data-theme="dark"] .theme-toggle:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: #34D399;
}

/* Section Common */
section {
  padding: 80px 0;
  position: relative;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(4, 120, 87, 0.08);
  border: 1px solid rgba(4, 120, 87, 0.22);
  color: #047857;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

[data-theme="dark"] .section-tag {
  color: #34D399;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 680px;
  margin-bottom: 40px;
}

/* HERO SECTION */
.hero-section {
  padding: 60px 0 90px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.hero-content h1 .gradient-text {
  background: linear-gradient(135deg, #0F172A 0%, #047857 60%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .hero-content h1 .gradient-text {
  background: linear-gradient(135deg, #F8FAFC 0%, #34D399 60%, #6EE7B7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  transition: var(--transition);
}

.badge.blue {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #0F172A;
}

.badge.green {
  background: rgba(4, 120, 87, 0.08);
  border-color: rgba(4, 120, 87, 0.22);
  color: #047857;
}

.badge.amber {
  background: rgba(180, 83, 9, 0.08);
  border-color: rgba(180, 83, 9, 0.22);
  color: #B45309;
}

[data-theme="dark"] .badge.blue {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  color: #F8FAFC;
}

[data-theme="dark"] .badge.green {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: #34D399;
}

[data-theme="dark"] .badge.amber {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.25);
  color: #FBBF24;
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: #047857;
}

[data-theme="dark"] .stat-num {
  color: #34D399;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Hero Media / Banner Visual */
.hero-visual {
  position: relative;
}

.hero-banner-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  background: var(--bg-card);
}

[data-theme="dark"] .hero-banner-wrapper {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.hero-banner-img {
  width: 100%;
  height: auto;
  display: block;
  transform: scale(1.02);
  transition: transform 0.5s ease;
}

.hero-banner-wrapper:hover .hero-banner-img {
  transform: scale(1.05);
}

.telemetry-overlay {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .telemetry-overlay {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(255, 255, 255, 0.1);
}

.telemetry-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-main);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
  animation: pulse 2.5s infinite;
}

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

/* SIMULATOR SECTION */
.simulator-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.sim-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 24px;
}

.sim-hardware-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
}

.sim-box-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Character LCD Display */
.lcd-display-case {
  background: #111A11;
  border: 4px solid #1E2E1E;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8);
}

.lcd-screen-inner {
  background: var(--lcd-bg);
  color: var(--lcd-text);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 16px;
  border-radius: 6px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  letter-spacing: 0.05em;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.2);
  line-height: 1.4;
  position: relative;
  user-select: none;
}

.lcd-line {
  display: flex;
  justify-content: space-between;
  white-space: pre;
}

.lcd-cursor {
  display: inline-block;
  width: 9px;
  height: 1.1em;
  background: var(--lcd-text);
  margin-left: 2px;
  animation: blink 1s infinite;
  vertical-align: bottom;
}

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

/* Keypad Grid */
.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.key-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 14px 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.key-btn:hover {
  background: var(--accent-blue-glow);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  transform: translateY(-2px);
}

.key-btn:active {
  transform: translateY(0);
}

.key-btn.btn-start {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.5);
  color: var(--accent-emerald);
}
.key-btn.btn-start:hover {
  background: rgba(16, 185, 129, 0.35);
}

.key-btn.btn-stop {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #EF4444;
}
.key-btn.btn-stop:hover {
  background: rgba(239, 68, 68, 0.35);
}

/* Oscilloscope & FSM Telemetry */
.sim-telemetry-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.scope-container {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.scope-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.scope-canvas {
  width: 100%;
  height: 120px;
  background: #080C14;
  border-radius: 4px;
  display: block;
}

/* FSM State Pills */
.fsm-states-tracker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fsm-state-pill {
  flex: 1;
  min-width: 70px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  transition: var(--transition);
}

.fsm-state-pill.active {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: white;
  box-shadow: 0 2px 8px rgba(4, 120, 87, 0.25);
}

.fsm-state-pill.paused {
  background: var(--accent-amber);
  border-color: var(--accent-amber);
  color: white;
}

.fsm-state-pill.done {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: white;
}

/* ARCHITECTURE SECTION */
.arch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.arch-layer-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.arch-layer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.arch-layer-card:hover,
.arch-layer-card.active {
  border-color: var(--accent-emerald);
  transform: translateX(6px);
  background: var(--bg-card-hover);
}

.arch-layer-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.arch-layer-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Code Snippet Box */
.code-viewer {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.code-header {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--code-border);
}

.code-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #34D399;
}

.code-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  color: #C9D1D9;
  overflow-x: auto;
}

.code-kw { color: #FF7B72; font-weight: 600; }
.code-fn { color: #D2A8FF; }
.code-num { color: #79C0FF; }
.code-str { color: #A5D6FF; }
.code-cmt { color: #8B949E; font-style: italic; }
.code-var { color: #FFA657; }

/* PROJECTS SECTION */
.project-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: #0F172A;
  border-color: #0F172A;
  color: white;
}

[data-theme="dark"] .filter-btn:hover,
[data-theme="dark"] .filter-btn.active {
  background: #047857;
  border-color: #047857;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: #CBD5E1;
  box-shadow: var(--shadow-md);
}

.project-card.featured::before {
  content: 'FEATURED';
  position: absolute;
  top: 18px;
  right: -32px;
  background: #0F172A;
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 36px;
  transform: rotate(45deg);
  letter-spacing: 0.1em;
}

[data-theme="dark"] .project-card.featured::before {
  background: #047857;
}

.project-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(4, 120, 87, 0.08);
  color: #047857;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
  border: 1px solid rgba(4, 120, 87, 0.18);
}

[data-theme="dark"] .project-icon {
  background: rgba(16, 185, 129, 0.1);
  color: #34D399;
  border-color: rgba(16, 185, 129, 0.25);
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  margin-top: auto;
}

.project-link {
  font-weight: 600;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* TESTING MATRIX TABLE */
.table-wrapper {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
}

.test-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
}

.test-table th {
  background: rgba(255, 255, 255, 0.04);
  padding: 14px 18px;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.test-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.test-table tr:last-child td {
  border-bottom: none;
}

.status-badge-pass {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  font-weight: 700;
  font-size: 0.78rem;
}

/* RECRUITER / HAVI CALLOUT */
.recruiter-banner {
  background: linear-gradient(135deg, rgba(4, 120, 87, 0.04), rgba(15, 23, 42, 0.02));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin: 40px 0;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .recruiter-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(255, 255, 255, 0.02));
  border-color: rgba(255, 255, 255, 0.08);
}

.recruiter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.recruiter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.recruiter-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.recruiter-card-title {
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 6px;
}

.recruiter-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* SKILLS MATRIX — EFFECTIVE 2-BOX SPLIT VIEW */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.skill-category:hover {
  border-color: rgba(4, 120, 87, 0.35);
  box-shadow: var(--shadow-md);
}

.skill-cat-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.skill-tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-pill {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-main);
  transition: var(--transition);
  white-space: nowrap;
}

.skill-pill:hover {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  background: var(--bg-primary);
}

/* EXPERIENCE & EDUCATION TIMELINE — COMPACT SIMPLE RECORD */
.timeline {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 8px;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  padding-left: 28px;
  margin-bottom: 14px;
}

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

.timeline-dot {
  position: absolute;
  left: 3px;
  top: 14px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #047857;
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 0 2px rgba(4, 120, 87, 0.2);
}

[data-theme="dark"] .timeline-dot {
  background: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.timeline-card:hover {
  border-color: rgba(4, 120, 87, 0.35);
  box-shadow: var(--shadow-md);
}

.timeline-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.timeline-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.timeline-date-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  white-space: nowrap;
}

.timeline-subtitle {
  color: var(--accent-emerald);
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.timeline-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* FOOTER & CONTACT */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input, .form-textarea {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  transition: var(--transition);
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.15);
}

footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* MODAL RESUME & PROJECT DEEP DIVE */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--bg-tertiary);
  color: var(--accent-emerald);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #047857;
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition);
  z-index: 3000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* In-Page Project Deep Dive Showcase Panels */
.project-deepdive-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 36px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.project-deepdive-panel:hover {
  border-color: #CBD5E1;
  box-shadow: var(--shadow-md);
}

.project-deepdive-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.project-deepdive-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* MOBILE HAMBURGER BUTTON & DRAWER */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
  transition: var(--transition);
  color: var(--text-main);
  z-index: 1001;
}

.mobile-menu-btn .hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav-drawer {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  padding: 20px 24px 28px;
  z-index: 999;
}

.mobile-nav-drawer.open {
  display: block;
  animation: slideDownMenu 0.25s ease forwards;
}

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

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}

.mobile-nav-links a {
  display: block;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
  background: var(--bg-tertiary);
  color: var(--accent-emerald);
}

.mobile-nav-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* RESPONSIVE DESIGN BREAKPOINTS */
@media (max-width: 992px) {
  .nav-links, .nav-desktop-action {
    display: none !important;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .hero-visual {
    order: -1;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
  }
  
  .sim-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .arch-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  section {
    padding: 50px 0;
  }
  
  .container {
    padding: 0 16px;
  }
  
  .nav-container {
    height: 64px;
  }
  
  .brand-name {
    font-size: 1rem;
  }
  
  .brand-title {
    display: none;
  }
  
  .hero-section {
    padding: 24px 0 50px;
  }
  
  .hero-content h1 {
    font-size: clamp(1.8rem, 6.5vw, 2.4rem);
  }
  
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 14px;
  }
  
  .stat-num {
    font-size: 1.25rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .project-deepdive-panel {
    padding: 20px 16px;
  }
  
  .project-deepdive-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .modal-content {
    padding: 24px 16px;
    max-height: 90vh;
  }
  
  .recruiter-banner {
    padding: 24px 16px;
  }
  
  .timeline-item {
    padding-left: 45px;
  }
  
  .timeline::before {
    left: 10px;
  }
  
  .timeline-dot {
    left: 1px;
  }
  
  .telemetry-overlay {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 14px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-badges {
    gap: 6px;
  }
  
  .badge {
    font-size: 0.75rem;
    padding: 5px 10px;
  }
  
  .keypad-grid {
    gap: 8px;
  }
  
  .key-btn {
    padding: 10px 6px;
    font-size: 0.85rem;
  }
  
  .lcd-screen-inner {
    font-size: 0.9rem;
    padding: 12px;
    min-height: 80px;
  }
  
  .form-input, .form-textarea {
    font-size: 16px; /* Prevents auto-zoom in mobile Safari */
  }
  
  .project-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  
  .filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

