/* Base Variables */
:root {
    /* Light Theme */
    --background: #f8fafc;
    --foreground: #0f172a;
    --card: #ffffff;
    --card-foreground: #0f172a;
    --primary: #030711;
    --primary-foreground: #f8fafc;
    --secondary: #f1f5f9;
    --secondary-foreground: #1e293b;
    --muted: #f1f5f9;
    --muted-foreground: #64748b;
    --accent: #f1f5f9;
    --accent-foreground: #1e293b;
    --border: #e2e8f0;
    --input: #e2e8f0;
    --ring: #0f172a;
    --radius: 0.5rem;
  }
  
  .dark {
    /* Dark Theme - Space/Astronomical */
    --background: #030711;
    --foreground: #f8fafc;
    --card: #0a0f1e;
    --card-foreground: #f8fafc;
    --primary: #0ea5e9;
    --primary-foreground: #030711;
    --secondary: #131c31;
    --secondary-foreground: #f8fafc;
    --muted: #131c31;
    --muted-foreground: #94a3b8;
    --accent: #1e293b;
    --accent-foreground: #f8fafc;
    --border: #1e293b;
    --input: #1e293b;
    --ring: #cbd5e1;
  }
  
  /* Reset & Base Styles */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-color: var(--border);
  }
  
  html {
    scroll-behavior: smooth;
  }
  
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.8;
    font-size: 16px;
    transition: background-color 0.3s, color 0.3s;
  }
  
  .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
  }
  
  .narrow {
    max-width: 768px;
  }
  
  .section {
    padding: 4rem 0;
    scroll-margin-top: 5rem;
  }
  
  .section-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
  }
  
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }
  
  /* Header */
  .header {
    position: sticky;
    top: 0;
    z-index: 40;
    width: 100%;
    border-bottom: 1px solid var(--border);
    background-color: rgba(var(--background-rgb), 0.95);
    backdrop-filter: blur(10px);
  }
  
  .header-container {
    display: flex;
    height: 4rem;
    align-items: center;
    justify-content: space-between;
  }
  
  .logo {
    font-weight: 700;
    font-size: 1.25rem;
  }
  
  .logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--foreground);
  }
  
  .nav-container {
    display: flex;
    align-items: center;
    gap: 1rem;
  }
  
  .main-nav {
    display: none;
  }
  
  @media (min-width: 768px) {
    .main-nav {
      display: flex;
      gap: 1.5rem;
    }
  }
  
  .nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--foreground);
    transition: color 0.2s;
  }
  
  .nav-link:hover {
    color: var(--primary);
  }
  
  /* Theme Toggle */
  .theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--foreground);
    position: relative;
  }
  
  .theme-toggle:hover {
    background-color: var(--secondary);
  }
  
  .sun-icon,
  .moon-icon {
    position: absolute;
    transition: all 0.3s;
  }
  
  .sun-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
  
  .moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
  }
  
  .dark .sun-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
  }
  
  .dark .moon-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
  
  /* Hero Section */
  .hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5rem 1rem;
    position: relative;
    overflow: hidden;
  }
  
  @media (min-width: 768px) {
    .hero {
      padding: 8rem 1rem;
    }
  }
  
  .hero-gradient {
    position: absolute;
    inset: 0;
    z-index: -10;
    background: linear-gradient(to bottom right, rgba(2, 132, 199, 0.2), var(--background), var(--background));
  }
  
  .dark .hero-gradient {
    background: linear-gradient(to bottom right, rgba(14, 165, 233, 0.15), var(--background), var(--background));
  }
  
  .hero-radial {
    position: absolute;
    inset: 0;
    z-index: -20;
    background: radial-gradient(circle 500px at 50% 200px, rgba(2, 132, 199, 0.2), transparent);
  }
  
  .dark .hero-radial {
    background: radial-gradient(circle 500px at 50% 200px, rgba(14, 165, 233, 0.15), transparent);
  }
  
  .hero-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary), rgba(42, 52, 56, 0.7));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  
  @media (min-width: 768px) {
    .hero-title {
      font-size: 3.75rem;
    }
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
    max-width: 48rem;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
  }
  
  @media (min-width: 768px) {
    .hero-subtitle {
      font-size: 1.5rem;
    }
  }
  
  .hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
  }
  
  .social-links {
    display: flex;
    gap: 1rem;
  }
  
  .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    color: var(--foreground);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
  }
  
  .social-link:hover {
    background-color: var(--secondary);
    color: var(--primary);
  }
  
  /* Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    height: 2.5rem;
    padding: 0 1.25rem;
    text-decoration: none;
    transition: all 0.2s;
  }
  
  .btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
  }
  
  .btn-primary:hover {
    background-color: var(--primary);
    opacity: 0.9;
  }
  
  .btn-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--foreground);
  }
  
  .btn-outline:hover {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
  }
  
  .btn-ghost {
    background-color: transparent;
    color: var(--foreground);
    height: 2rem;
    padding: 0 0.75rem;
    font-size: 0.75rem;
  }
  
  .btn-ghost:hover {
    background-color: var(--secondary);
  }
  
  .btn-ghost i {
    margin-right: 0.5rem;
  }
  
  /* About Section */
  .about-content {
    font-size: 1.125rem;
  }
  
  .about-content p {
    margin-bottom: 1rem;
  }
  
  /* Skills Section */
  .skills-grid {
    display: grid;
    gap: 2rem;
  }
  
  @media (min-width: 768px) {
    .skills-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  /* Projects Section */
  .projects-grid {
    display: grid;
    gap: 1.5rem;
  }
  
  @media (min-width: 768px) {
    .projects-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  @media (min-width: 1024px) {
    .projects-grid {
      grid-template-columns: repeat(3, 1fr);
    }
  }
  
  .projects-more {
    text-align: center;
    margin-top: 2rem;
  }
  
  /* Cards */
  .card,
  .project-card {
    border-radius: var(--radius);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    background-color: rgba(var(--card-rgb), 0.8);
    backdrop-filter: blur(4px);
    transition: all 0.3s;
  }
  
  .project-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  
  .card:hover,
  .project-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-color: rgba(var(--primary-rgb), 0.5);
  }
  
  .card-header {
    padding: 1.25rem 1.25rem 0;
  }
  
  .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
  }
  
  .card-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
  }
  
  .card-content {
    padding: 1.25rem;
  }
  
  .card-text {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 0.75rem;
  }
  
  .card-footer {
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    margin-top: auto;
  }
  
  .project-image {
    aspect-ratio: 16 / 9;
    background-color: var(--muted);
    position: relative;
  }
  
  .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  /* Badges */
  .badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    background-color: var(--secondary);
    color: var(--secondary-foreground);
  }
  
  .badge-outline {
    background-color: transparent;
    border: 1px solid var(--border);
  }
  
  /* Footer */
  .footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
  }
  
  .footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
  }
  
  @media (min-width: 768px) {
    .footer-container {
      flex-direction: row;
      justify-content: space-between;
      text-align: left;
    }
  }
  
  .footer-copyright {
    font-size: 0.875rem;
    color: var(--muted-foreground);
  }
  
  .footer-social {
    display: flex;
    gap: 1rem;
  }
  
  /* Helper for RGB values */
  :root {
    --background-rgb: 248, 250, 252;
    --card-rgb: 255, 255, 255;
    --primary-rgb: 2, 132, 199;
  }
  
  .dark {
    --background-rgb: 3, 7, 17;
    --card-rgb: 10, 15, 30;
    --primary-rgb: 14, 165, 233;
  }
  
  /* Space theme elements */
  .dark body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -100;
    background-image: radial-gradient(1px 1px at 25% 15%, rgba(255, 255, 255, 0.5), transparent),
      radial-gradient(1px 1px at 50% 40%, rgba(255, 255, 255, 0.5), transparent),
      radial-gradient(1px 1px at 75% 25%, rgba(255, 255, 255, 0.5), transparent),
      radial-gradient(1px 1px at 30% 65%, rgba(255, 255, 255, 0.5), transparent),
      radial-gradient(1px 1px at 65% 85%, rgba(255, 255, 255, 0.5), transparent),
      radial-gradient(1px 1px at 85% 55%, rgba(255, 255, 255, 0.5), transparent);
    background-size: 200px 200px;
    opacity: 0.2;
  }
  
  .dark .card,
  .dark .project-card {
    background-color: rgba(10, 15, 30, 0.7);
    border-color: rgba(14, 165, 233, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }
  
  .dark .card:hover,
  .dark .project-card:hover {
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 10px rgba(14, 165, 233, 0.2);
  }
  
  .dark .header {
    background-color: rgba(3, 7, 17, 0.8);
    backdrop-filter: blur(12px);
    border-bottom-color: rgba(14, 165, 233, 0.2);
  }
  
  .dark .btn-primary {
    background-color: var(--primary);
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.4);
  }
  
  .dark .btn-outline {
    border-color: rgba(14, 165, 233, 0.3);
  }
  
  .dark .btn-outline:hover {
    border-color: rgba(14, 165, 233, 0.6);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.2);
  }
  
  .dark .badge {
    background-color: rgba(19, 28, 49, 0.8);
  }
  
  .dark .badge-outline {
    border-color: rgba(14, 165, 233, 0.3);
  }
  