/* ==================== CSS VARIABLES ==================== */
:root {
  /* Colors - Dark Theme */
  --bg-primary: #0a0e17;
  --bg-secondary: #151922;
  --bg-tertiary: #1a1f2e;
  --text-primary: #e6f1ff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-primary: #06f2ff;
  --accent-secondary: #7cff00;
  --accent-gradient: linear-gradient(135deg, #06f2ff 0%, #7cff00 100%);
  --border-color: rgba(255, 255, 255, 0.06);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(6, 242, 255, 0.15);
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;
  --spacing-2xl: 6rem;
  
  /* Typography */
  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Source Code Pro', 'Courier New', monospace;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;
  --font-size-5xl: 3.5rem;
  
  /* Layout */
  --container-max: 1280px;
  --border-radius: 12px;
  --transition-speed: 0.3s;
  --transition-curve: cubic-bezier(0.4, 0, 0.2, 1);

  /* Orbit animation variables */
  --orbit-radius: clamp(200px, 30vw, 320px);
  --orbit-scale-x: 1.4;
  --orbit-scale-y: 0.85;
}
/* Light Theme */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent-primary: #0ea5e9;
  --accent-secondary: #22c55e;
  --accent-gradient: linear-gradient(135deg, #0ea5e9 0%, #22c55e 100%);
  --border-color: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.2);
}
/* ==================== RESET & BASE ==================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition-speed) var(--transition-curve),
              color var(--transition-speed) var(--transition-curve);
}
/* **FIX**: Prevents background scroll when mobile nav is open */
body.nav-open {
  overflow: hidden;
}
/* ==================== ANIMATED BACKGROUND ==================== */
#background-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background: 
    linear-gradient(90deg, transparent 79px, var(--border-color) 79px, var(--border-color) 81px, transparent 81px),
    linear-gradient(transparent 79px, var(--border-color) 79px, var(--border-color) 81px, transparent 81px),
    var(--bg-primary);
  background-size: 80px 80px;
  animation: gridMove 20s linear infinite;
  opacity: 0.4;
}
@keyframes gridMove {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 80px 80px, 80px 80px; }
}
/* ==================== UTILITY CLASSES ==================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}
/* Reveal animation for sections */
.reveal-element {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--transition-curve),
              transform 0.6s var(--transition-curve);
}
.reveal-element.revealed {
  opacity: 1;
  transform: translateY(0);
}
/* ==================== HEADER ==================== */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all var(--transition-speed) var(--transition-curve);
  pointer-events: none; /* Initially ignore pointer events on header area */
}
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-sm) var(--spacing-md);
  max-width: var(--container-max);
  margin: 0 auto;
}
/* Hero Name - Initial State (center of hero) */
.hero-name {
  font-family: var(--font-mono);
  font-size: var(--font-size-4xl);
  font-weight: 700;
  color: var(--accent-primary);
  text-shadow: 0 0 30px rgba(6, 242, 255, 0.3);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -100%); /* Adjusted for new orbital layout */
  z-index: 100;
  transition: all 0.8s var(--transition-curve);
  white-space: nowrap;
  pointer-events: none; /* Only the header name becomes clickable when scrolled */
}
.hero-name-text {
  display: inline-block;
}
.hero-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--accent-primary);
  margin-left: 4px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
/* Hero Name - Scrolled State (top-left) */
body.scrolled .hero-name {
  font-size: var(--font-size-xl);
  top: 1.5rem;
  left: var(--spacing-md);
  transform: translate(0, 0);
  text-shadow: 0 0 15px rgba(6, 242, 255, 0.2);
  pointer-events: auto; /* Enable pointer events when scrolled to the top */
}
/* Main Navigation - Initial State (orbital) */
.main-nav {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 90;
  transition: all 0.8s var(--transition-curve);
  pointer-events: none;
  opacity: 0;
}
.nav-list {
  list-style: none;
  display: flex;
  gap: var(--spacing-sm);
}
.nav-link {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.6rem 1rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  transition: all var(--transition-speed) var(--transition-curve);
  display: inline-block;
  white-space: nowrap;
  pointer-events: auto;
}
.nav-link:hover,
.nav-link:focus {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
  outline: none;
}
.nav-link.active {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  background: rgba(6, 242, 255, 0.05);
}
/* Navigation - Scrolled State (top-center) */
body.scrolled .main-nav {
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 1;
  pointer-events: auto;
}
body.scrolled .main-header {
  background: rgba(10, 14, 23, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  pointer-events: auto; /* Enable pointer events on header background when scrolled */
}
[data-theme="light"] body.scrolled .main-header {
  background: rgba(248, 250, 252, 0.95);
}
/* Header Controls */
.header-controls {
  position: fixed;
  top: 1.5rem;
  right: var(--spacing-md);
  z-index: 1001;
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
  pointer-events: auto; /* FIX: Allow clicks on buttons */
}
/* Theme Toggle */
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed) var(--transition-curve);
  box-shadow: var(--shadow-sm);
}
.theme-toggle:hover,
.theme-toggle:focus {
  transform: translateY(-2px) rotate(15deg);
  box-shadow: var(--shadow-glow);
  outline: none;
}
.theme-icon {
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.sun-icon { display: none; }
.moon-icon { display: block; }
[data-theme="light"] .sun-icon { display: block; }
[data-theme="light"] .moon-icon { display: none; }
/* Hamburger Menu */
.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all var(--transition-speed) var(--transition-curve);
  box-shadow: var(--shadow-sm);
}
.hamburger:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}
.hamburger-line {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.hamburger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translateY(7px);
}
.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translateY(-7px);
}
/* ==================== HERO SECTION ==================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--spacing-2xl) var(--spacing-md);
}
.hero-content {
  text-align: center;
  position: relative;
  z-index: 10;
  max-width: 900px;
  margin: 0 auto;
}
/* Hero Subtitle (Typewriter) */
.hero-subtitle {
  font-family: var(--font-mono);
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  /* Adjusted margin-top for new orbital layout below name */
  margin-top: 2rem; 
  min-height: 2em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2em;
}
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--accent-secondary);
  animation: blink 1s step-end infinite;
}
/* ==================== REVOLVING ORBITAL NAV ==================== */
/* This updated code creates a dynamic, revolving animation for the navigation buttons. */

.orbital-nav.new-design {
  position: absolute;
  top: 50%;
  left: 50%;
  /* The container is now just a central anchor point for the orbiting buttons */
  width: 1px;
  height: 1px;
  pointer-events: none; /* Container itself is not interactive */
  transition: opacity 0.8s var(--transition-curve);
  /* FIX: Center the anchor point and apply the oval shape */
  transform: translate(-50%, -50%) scale(var(--orbit-scale-x), var(--orbit-scale-y));
}

/* Fade out on scroll */
body.scrolled .orbital-nav.new-design {
  opacity: 0;
  pointer-events: none;
}

/* General button styling */
.orbital-nav.new-design .orbital-btn {
  position: absolute;
  /* Positioned relative to the 1x1 anchor container */
  top: 0;
  left: 0;
  width: 110px;
  height: 45px;
  border-radius: 50px;
  border: 1px solid var(--accent-secondary);
  background: rgba(124, 255, 0, 0.05); /* Using accent secondary for consistency */
  color: var(--accent-secondary);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  transform-origin: center center;
  transition: transform 0.2s ease, background 0.3s ease, box-shadow 0.3s ease;

  /* Shared animation properties */
  animation-duration: 30s; /* Controls the speed of one full revolution */
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

/* Keyframes for each button's unique starting position and 360-degree path.
   The pattern is: rotate(angle) -> move out by radius -> counter-rotate(-angle) to keep text upright. */

/* FIX: Added inverse scale to un-distort buttons */
@keyframes orbit-1 { /* Starts at 180deg (Left) */
  from { transform: rotate(180deg) translateX(var(--orbit-radius)) rotate(-180deg) scale(calc(1 / var(--orbit-scale-x)), calc(1 / var(--orbit-scale-y))); }
  to   { transform: rotate(540deg) translateX(var(--orbit-radius)) rotate(-540deg) scale(calc(1 / var(--orbit-scale-x)), calc(1 / var(--orbit-scale-y))); }
}
.orbital-btn-1 { animation-name: orbit-1; }

@keyframes orbit-2 { /* Starts at 240deg */
  from { transform: rotate(240deg) translateX(var(--orbit-radius)) rotate(-240deg) scale(calc(1 / var(--orbit-scale-x)), calc(1 / var(--orbit-scale-y))); }
  to   { transform: rotate(600deg) translateX(var(--orbit-radius)) rotate(-600deg) scale(calc(1 / var(--orbit-scale-x)), calc(1 / var(--orbit-scale-y))); }
}
.orbital-btn-2 { animation-name: orbit-2; }

@keyframes orbit-3 { /* Starts at 300deg */
  from { transform: rotate(300deg) translateX(var(--orbit-radius)) rotate(-300deg) scale(calc(1 / var(--orbit-scale-x)), calc(1 / var(--orbit-scale-y))); }
  to   { transform: rotate(660deg) translateX(var(--orbit-radius)) rotate(-660deg) scale(calc(1 / var(--orbit-scale-x)), calc(1 / var(--orbit-scale-y))); }
}
.orbital-btn-3 { animation-name: orbit-3; }

@keyframes orbit-4 { /* Starts at 0deg (Right) */
  from { transform: rotate(0deg) translateX(var(--orbit-radius)) rotate(0deg) scale(calc(1 / var(--orbit-scale-x)), calc(1 / var(--orbit-scale-y))); }
  to   { transform: rotate(360deg) translateX(var(--orbit-radius)) rotate(-360deg) scale(calc(1 / var(--orbit-scale-x)), calc(1 / var(--orbit-scale-y))); }
}
.orbital-btn-4 { animation-name: orbit-4; }

@keyframes orbit-5 { /* Starts at 60deg */
  from { transform: rotate(60deg) translateX(var(--orbit-radius)) rotate(-60deg) scale(calc(1 / var(--orbit-scale-x)), calc(1 / var(--orbit-scale-y))); }
  to   { transform: rotate(420deg) translateX(var(--orbit-radius)) rotate(-420deg) scale(calc(1 / var(--orbit-scale-x)), calc(1 / var(--orbit-scale-y))); }
}
.orbital-btn-5 { animation-name: orbit-5; }

@keyframes orbit-6 { /* Starts at 120deg */
  from { transform: rotate(120deg) translateX(var(--orbit-radius)) rotate(-120deg) scale(calc(1 / var(--orbit-scale-x)), calc(1 / var(--orbit-scale-y))); }
  to   { transform: rotate(480deg) translateX(var(--orbit-radius)) rotate(-480deg) scale(calc(1 / var(--orbit-scale-x)), calc(1 / var(--orbit-scale-y))); }
}
.orbital-btn-6 { animation-name: orbit-6; }


/* Pause animation and scale up on hover/focus to make it easier to click */
.orbital-nav.new-design .orbital-btn:hover,
.orbital-nav.new-design .orbital-btn:focus {
  animation-play-state: paused;
  transform: scale(1.15); /* This overrides the transform from the animation */
  background: rgba(124, 255, 0, 0.15);
  box-shadow: 0 0 25px rgba(124, 255, 0, 0.5);
  z-index: 10;
  outline: none;
}

/* Hide old icons and ensure labels are styled correctly */
.orbital-nav.new-design .orbital-icon {
  display: none;
}
.orbital-nav.new-design .orbital-label {
  font-size: inherit;
  letter-spacing: 0;
}
/* ==================== SECTIONS ==================== */
.section {
  padding: var(--spacing-2xl) 0;
  position: relative;
}
.section-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}
.section-title {
  font-family: var(--font-mono);
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: var(--spacing-sm);
  text-shadow: 0 0 20px rgba(6, 242, 255, 0.2);
}
[data-theme="light"] .section-title {
  text-shadow: none;
}
.section-divider {
  width: 60px;
  height: 4px;
  background: var(--accent-gradient);
  margin: 0 auto var(--spacing-md);
  border-radius: 2px;
}
.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}
/* ==================== ABOUT SECTION ==================== */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}
.about-text {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
}
.about-intro {
  font-size: var(--font-size-lg);
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
  line-height: 1.8;
}
.about-text p {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
}
.about-highlights {
  list-style: none;
  margin-top: var(--spacing-md);
}
.about-highlights li {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 0.5rem 0; /* Adjusted for tighter spacing */
  color: var(--text-secondary);
  font-size: var(--font-size-base);
}
.highlight-icon {
  font-size: var(--font-size-xl);
  flex-shrink: 0;
}
/* ==================== SKILLS SECTION ==================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}
.skill-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-speed) var(--transition-curve);
}
.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--accent-primary);
}
.skill-icon {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--spacing-sm);
  filter: drop-shadow(0 0 10px rgba(6, 242, 255, 0.2));
}
.skill-title {
  font-family: var(--font-mono);
  font-size: var(--font-size-xl);
  color: var(--accent-secondary);
  margin-bottom: var(--spacing-md);
}
.skill-list {
  list-style: none;
}
.skill-list li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}
.skill-list li:last-child {
  border-bottom: none;
}
.skills-note {
  text-align: right;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  font-style: italic;
}
/* ==================== PROJECTS SECTION ==================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--spacing-lg);
}
.project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-speed) var(--transition-curve);
}
.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.project-image {
  position: relative;
  overflow: hidden;
  height: 200px;
}
.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-speed) var(--transition-curve);
}
.project-card:hover .project-image img {
  transform: scale(1.05);
}
.project-overlay {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
}
.project-category {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: var(--bg-primary);
  border: 1px solid var(--accent-primary);
  border-radius: 20px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--accent-primary);
}
.project-content {
  padding: var(--spacing-md);
}
.project-title {
  font-size: var(--font-size-xl);
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}
.project-description {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
}
.project-footer {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-color);
}
.project-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-speed) ease;
}
.project-link:hover {
  gap: 0.8rem;
  text-shadow: 0 0 10px rgba(6, 242, 255, 0.5);
}
/* ==================== TIMELINE (Experience & Certifications) ==================== */
.timeline {
  position: relative;
  padding-left: 3rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}
.timeline-item {
  position: relative;
  margin-bottom: var(--spacing-xl);
}
.timeline-marker {
  position: absolute;
  left: -3rem;
  top: 0;
}
.timeline-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xl);
  box-shadow: var(--shadow-glow);
}
.timeline-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-speed) var(--transition-curve);
}
.timeline-item:hover .timeline-content {
  transform: translateX(8px);
  box-shadow: var(--shadow-lg);
}
.timeline-title {
  font-size: var(--font-size-xl);
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}
.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: var(--spacing-md);
}
.timeline-date,
.timeline-company {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}
.timeline-company {
  color: var(--accent-secondary);
  font-weight: 600;
}
.timeline-description {
  list-style: none;
  padding-left: var(--spacing-md);
}
.timeline-description li {
  position: relative;
  padding-left: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
}
.timeline-description li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: bold;
}
/* ==================== CONTACT SECTION ==================== */
.contact-content {
  max-width: 700px;
  margin: 0 auto;
}
.contact-form {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
}
.form-group {
  margin-bottom: var(--spacing-md);
}
.form-label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: var(--font-size-sm);
}
.form-input,
.form-textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: calc(var(--border-radius) - 4px);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  transition: all var(--transition-speed) var(--transition-curve);
}
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(6, 242, 255, 0.1);
}
.form-textarea {
  resize: vertical;
  min-height: 120px;
}
.form-error {
  display: block;
  color: #ef4444;
  font-size: var(--font-size-sm);
  margin-top: 0.25rem;
  min-height: 1.25rem;
}
.form-submit {
  width: 100%;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--border-radius);
  background: var(--accent-gradient);
  color: var(--bg-primary);
  font-family: var(--font-mono);
  font-size: var(--font-size-base);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-speed) var(--transition-curve);
  box-shadow: var(--shadow-md);
}
.form-submit:hover,
.form-submit:focus {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  outline: none;
}
.form-submit:active {
  transform: translateY(-1px);
}
.submit-icon {
  transition: transform var(--transition-speed) ease;
}
.form-submit:hover .submit-icon {
  transform: translateX(5px);
}
.form-status {
  margin-top: var(--spacing-md);
  padding: var(--spacing-sm);
  border-radius: calc(var(--border-radius) - 4px);
  text-align: center;
  font-weight: 600;
  display: none;
}
.form-status.success {
  display: block;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid #22c55e;
  color: #22c55e;
}
.form-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid #ef4444;
  color: #ef4444;
}
/* ==================== FOOTER ==================== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: var(--spacing-xl) 0;
  margin-top: var(--spacing-2xl);
}
.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}
.footer-text {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.footer-social {
  display: flex;
  gap: var(--spacing-md);
}
.social-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-speed) ease;
  position: relative;
}
.social-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: width var(--transition-speed) ease;
}
.social-link:hover {
  color: var(--accent-primary);
}
.social-link:hover::after {
  width: 100%;
}
.footer-update {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}
/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1024px) {
  :root {
    --font-size-5xl: 3rem;
    --font-size-4xl: 2.25rem;
    --font-size-3xl: 1.75rem;
  }
}

@media (max-width: 768px) {
  html {
    /* Increase base font size slightly on mobile for better legibility */
    font-size: 17px; 
  }
  
  :root {
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --font-size-4xl: 2rem; /* Adjusted for new base size */
    --font-size-3xl: 1.6rem;
  }

  body.scrolled .hero-name {
    /* Give the scrolled name a bit more vertical space */
    top: 1.25rem; 
    font-size: var(--font-size-lg);
    left: var(--spacing-sm);
  }
  
  .header-controls {
    /* Align controls with the scrolled name */
    top: 1.25rem;
    right: var(--spacing-sm);
  }

  .hamburger {
    display: flex;
  }
  
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px; /* Slightly wider for better text fit */
    height: 100vh;
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: right 0.4s var(--transition-curve);
    opacity: 1;
    padding: var(--spacing-2xl) var(--spacing-md);
    transform: none;
  }
  
  .main-nav.mobile-open {
    right: 0;
  }
  
  .nav-list {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .nav-link {
    display: block; /* Ensure full width is clickable */
    text-align: center;
    padding: 0.8rem 1rem;
    font-size: var(--font-size-lg); /* Make nav links easier to read and tap */
  }
  
  body.scrolled .main-nav {
    top: 0;
    left: auto;
    right: -100%;
    transform: none;
  }
  
  body.scrolled .main-nav.mobile-open {
    right: 0;
  }
  
  .hero-name {
    font-size: var(--font-size-3xl);
  }
  
  .hero-section {
    padding-top: var(--spacing-xl); /* Add more top padding on mobile */
  }
  
  /* Modernized Orbital Nav for mobile */
  .orbital-nav.new-design {
    position: static;
    width: 100%;
    height: auto;
    display: none; /* Use grid for a cleaner, more robust layout */
    grid-template-columns: repeat(2, 1fr); /* Two columns */
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xl); /* More space from the subtitle */
    transform: none;
  }

  .orbital-nav.new-design .orbital-btn {
    position: static;
    animation: none;
    transform: none !important; /* Override animation transform */
    width: 100%; /* Make buttons fill the grid cell */
    padding: 0.8rem 1rem;
    font-size: var(--font-size-base); /* Standardize font size */
    height: 50px; /* Uniform height */
  }

   .orbital-nav.new-design .orbital-btn:hover,
   .orbital-nav.new-design .orbital-btn:focus {
     transform: scale(1.05) !important;
  }
  
  .timeline {
    padding-left: 2rem; /* Adjust padding */
  }
  
  .timeline::before {
    left: 12px; /* Center the line better with the icon */
  }
  
  .timeline-marker {
    left: -2rem; /* Align marker correctly */
  }
  
  .timeline-icon {
    width: 32px;
    height: 32px;
    font-size: var(--font-size-base);
    left: -4px; /* Nudge icon to center it on the line */
    position: relative;
  }
}

@media (max-width: 480px) {
  :root {
    --spacing-md: 1.25rem;
    --spacing-lg: 1.75rem;
    --spacing-xl: 2.5rem;
    --font-size-5xl: 2.25rem;
    --font-size-4xl: 1.75rem;
    --font-size-3xl: 1.5rem;
  }

  .container {
    padding: 0 var(--spacing-md);
  }
  
  .projects-grid,
  .skills-grid,
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  /* Ensure orbital buttons have enough space on very small screens */
  .orbital-nav.new-design {
    gap: 0.75rem;
  }
}