/* Modern CSS Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  /* ===============================
     DARK THEME (Default)
  ================================= */
  :root {
    /* Base */
    --background-color: #0B1020;       /* Deep Navy */
    --card-bg-color: #151A32;          /* Floating Navy */
    --navbar-bg-color: rgba(11, 16, 32, 0.9);

    /* Text */
    --text-primary: #F5F5F5;           /* Soft white */
    --text-secondary: #B0B0C2;         /* Gray lavender */

    /* Accents */
    --primary-accent: #36E2B4;         /* Teal (Web3 vibe) */
    --secondary-accent: #82F2D1;       /* Soft Teal */

    /* Buttons & Interactions */
    --button-bg: var(--primary-accent);
    --button-text: #0B1020;
    --button-hover-bg: var(--secondary-accent);
    --button-hover-text: #0B1020;

    /* Focus Ring (Unified) */
    --focus-ring: rgba(54, 226, 180, 0.35); /* Teal glow */

    /* Bubbles */
    --bubble-1: rgba(54, 226, 180, 0.15); /* Teal */
    --bubble-2: rgba(44, 47, 82, 0.4);   /* Muted Navy */
    --bubble-3: rgba(130, 242, 209, 0.2);   /* Soft Teal */

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    
    /* Typography */
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-md: 1.25rem;
    --text-lg: 1.5rem;
    --text-xl: 2rem;
    --text-2xl: 2.5rem;
  }

  /* ===============================
     LIGHT THEME
  ================================= */
  .light-theme {
    /* Base */
    --background-color: #F9F9FA;       /* Off-white */
    --card-bg-color: rgba(255, 255, 255, 0.95);
    --navbar-bg-color: rgba(249, 249, 250, 0.95);

    /* Text */
    --text-primary: #0B1020;           /* Deep Navy */
    --text-secondary: #2C2F52;         /* Softer Navy */

    /* Accents (same branding as dark mode) */
    --primary-accent: #36E2B4;         /* Teal for actions */
    --secondary-accent: #82F2D1;       /* Soft Teal for hover and subtle accents */

    /* Buttons & Interactions */
    --button-bg: var(--primary-accent);
    --button-text: #0B1020;
    --button-hover-bg: var(--secondary-accent);
    --button-hover-text: #0B1020;

    /* Focus Ring (Unified) */
    --focus-ring: rgba(54, 226, 180, 0.35); /* Teal glow */

    /* Bubbles (lighter for cleanliness) */
    --bubble-1: rgba(54, 226, 180, 0.15); /* Teal */
    --bubble-2: rgba(19, 25, 54, 0.15);   /* Softer navy */
    --bubble-3: rgba(130, 242, 209, 0.2);   /* Soft Teal */
  }

  /* ===============================
     Card Depth (Light Mode only)
  ================================= */
  .light-theme .card {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  }

  body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
  }

  /*  light theme body background */
  body.light-theme {
    background-color: var(--background-color);
  }

  /* Watermark */
  .watermark {
    position: fixed;
    bottom: 10%;
    right: 5%;
    width: 300px;
    height: 300px;
    background-image: url('assets/images/ifeolayeni.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
  }

  body.light-theme .watermark {
    opacity: 0.05;
  }
  

  /* Loader */
  #loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
  }

  #loader::after {
    content: "";
    width: 50px;
    height: 50px;
    border: 5px solid var(--card-bg-color);
    border-top-color: var(--primary-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }

  @keyframes spin {
    to { transform: rotate(360deg); }
  }

  /* Navbar */
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--space-md) 0;
    z-index: 1000;
    background: var(--navbar-bg-color);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    transform: translateY(-100%);
    opacity: 0;
  }

  .navbar.visible {
    transform: translateY(0);
    opacity: 1;
  }

  .navbar.scrolled {
    background: var(--navbar-bg-color);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  }

  .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .nav-logo {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: var(--text-md);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .nav-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-accent);
  }

  .nav-logo:hover,
  .nav-logo:focus {
    color: var(--primary-accent);
    outline: none;
  }

  .nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
    position: relative;
  }

  .nav-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    margin: 3px 0;
    background: var(--primary-accent);
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .nav-menu {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
  }

  .nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: var(--space-xs) var(--space-sm);
    position: relative;
    transition: all 0.3s ease;
  }

  .nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-accent);
    transition: width 0.3s ease;
  }

  .nav-menu a:hover::after,
  .nav-menu a:focus::after {
    width: 100%;
  }

  .nav-menu a:hover {
    color: var(--primary-accent);
  }

  @media (max-width: 768px) {
    .nav-toggle {
      display: flex;
    }

    .nav-menu {
      position: fixed;
      top: 0;
      right: 0;
      height: 100vh;
      width: 250px;
      background: var(--card-bg-color);
      box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
      flex-direction: column;
      align-items: flex-start;
      padding: var(--space-xl) var(--space-md);
      gap: var(--space-lg);
      transform: translateX(100%);
      transition: transform 0.3s ease;
      z-index: 1050;
    }

    .nav-menu.active {
      transform: translateX(0);
    }

    .navbar {
      transform: translateY(0);
      opacity: 1;
    }
  }

  /* Theme Switcher */
  .theme-switcher {
    position: fixed;
    top: var(--space-md);
    right: var(--space-md);
    z-index: 100;
  }

  /* Move theme switcher to left on mobile */
  @media (max-width: 768px) {
    .theme-switcher {
      right: auto;
      left: var(--space-md);
      z-index: 1100;
    }
  }

  #theme-toggle {
    background: rgba(11, 16, 32, 0.8);
    backdrop-filter: blur(5px);
    color: var(--text-primary);
    border: 1px solid var(--primary-accent);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
  }

  #theme-toggle:hover, #theme-toggle:focus {
    background: var(--primary-accent);
    color: var(--button-text);
    transform: scale(1.1);
    outline: none;
  }

  /* Header */
  header {
    padding: var(--space-xl) 0;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
  }

  .hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-xl);
    position: relative;
    z-index: 2;
  }

  .profile-container {
    position: relative;
    display: inline-block;
    margin-bottom: var(--space-md);
  }

  .profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
   object-position: 50% 35%; 
    border: 3px solid var(--primary-accent);
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }

  .profile-pic:hover {
    transform: translateY(-5px);
  }

  .decorative-circle {
    position: absolute;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    border: 2px dashed var(--secondary-accent);
    top: -5px;
    left: -5px;
    z-index: 1;
    animation: rotate 20s linear infinite;
  }

  @keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }

  .intro h1 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
    font-weight: 700;
  }

  .tagline {
    font-size: var(--text-lg);
    color: var(--secondary-accent);
    margin-bottom: var(--space-md);
    display: inline-block;
    font-weight: 500;
  }

  .hero-subheading {
    font-size: var(--text-lg);
    color: var(--secondary-accent);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
    font-weight: 400;
  }

  .hero-ctas {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
  }

  .cta-button {
    padding: var(--space-sm) var(--space-lg);
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: var(--text-base);
    border: 2px solid transparent;
  }

  .cta-button.primary {
    background: var(--button-bg);
    color: var(--button-text);
    border-color: var(--button-bg);
  }

  .cta-button.primary:hover,
  .cta-button.primary:focus {
    background: var(--button-hover-bg);
    color: var(--button-hover-text);
    border-color: var(--button-hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(54, 226, 180, 0.4);
  }

  .cta-button.secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--primary-accent);
  }

  .cta-button.secondary:hover,
  .cta-button.secondary:focus {
    background: var(--primary-accent);
    color: var(--button-text);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(54, 226, 180, 0.4);
  }

  .social-links {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
  }

  .social-links a {
    color: var(--text-primary);
    font-size: var(--text-lg);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    justify-content: center;
    background: rgba(11, 16, 32, 0.8);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
  }

  .social-links a:hover, .social-links a:focus {
    color: var(--primary-accent);
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-accent);
  }

  .social-links svg {
    fill: currentColor;
  }

  /* Main Content */
  main {
    padding: var(--space-xl) var(--space-md);
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
    position: relative;
  }

  section {
    margin-bottom: var(--space-xl);
    scroll-margin-top: 100px;
    padding: var(--space-xl) 0;
  }

  section > h2 {
    text-align: center;
    margin-bottom: var(--space-xl);
  }

  .card {
    background: var(--card-bg-color);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px -15px rgba(0, 0, 0, 0.3);
  }

  @keyframes fadeInUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  h2 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    font-weight: 700;
    position: relative;
    display: inline-block;
  }

  h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-accent);
    border-radius: 2px;
  }

  .highlight {
    color: var(--primary-accent);
  }

  .about p {
    font-size: var(--text-base);
    line-height: 1.8;
    color: var(--text-primary);
  }

  /* Skills Section */
  .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
  }

  .skill-card {
    background: var(--card-bg-color);
    backdrop-filter: blur(5px);
    padding: var(--space-lg);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.3);
  }

  .skill-card i {
    font-size: var(--text-xl);
    color: var(--primary-accent);
    margin-bottom: var(--space-sm);
    transition: transform 0.3s ease;
  }

  .skill-card:hover i {
    animation: bounce 0.5s ease;
  }

  @keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
  }

  .skill-card h3 {
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
  }

  .skill-card p {
    color: var(--text-primary);
    opacity: 0.8;
    font-size: var(--text-sm);
  }

  /* Projects Section */
  .project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-md);
  }

  .project-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
  }

  .project-card h3 {
    color: var(--text-primary);
    font-size: var(--text-md);
    margin-bottom: var(--space-xs);
  }

  .project-card p {
    color: var(--text-primary);
    opacity: 0.9;
    line-height: 1.6;
    flex-grow: 1;
  }

  .tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
  }

  .tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: rgba(54, 226, 180, 0.1);
    border: 1px solid rgba(54, 226, 180, 0.3);
    border-radius: 16px;
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 500;
  }

  .project-card .project-link {
    display: inline-block;
    color: var(--button-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    background: var(--button-bg);
    border: none;
    align-self: flex-start;
  }

  .project-card .project-link:hover,
  .project-card .project-link:focus {
    background: var(--button-hover-bg);
    color: var(--button-hover-text);
    transform: translateY(-2px);
    outline: none;
  }

  .project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(54, 226, 180, 0.2);
  }

  /* Old projects grid styles (keeping for backwards compatibility) */
  .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
  }

  .project-item {
    background: var(--card-bg-color);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.3);
  }

  .project-image {
    height: 200px;
    overflow: hidden;
  }

  .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
  }

  .project-item:hover .project-image img {
    transform: scale(1.05);
  }

  .project-content {
    padding: var(--space-md);
  }

  .project-content h3 {
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
  }

  .project-content p {
    color: var(--text-primary);
    opacity: 0.8;
    margin-bottom: var(--space-sm);
    font-size: var(--text-sm);
  }

  .project-link {
    display: inline-block;
    color: var(--button-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--button-bg);
    border: none;
  }

  .project-link:hover, .project-link:focus {
    background: var(--button-hover-bg);
    color: var(--button-hover-text);
    transform: translateY(-2px);
    outline: none;
  }

  .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
  }

  .form-group label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
  }

  .form-group input,
  .form-group textarea {
    padding: 0.625rem 0.875rem;
    border: 1px solid rgba(54, 226, 180, 0.3);
    border-radius: 8px;
    background: rgba(11, 16, 32, 0.5);
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.95rem;
  }

  .form-group input:focus,
  .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 2px var(--focus-ring);
    background: rgba(11, 16, 32, 0.7);
  }

  .submit-btn {
    background: var(--button-bg);
    color: var(--button-text);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }

  .submit-btn:hover, .submit-btn:focus {
    background: var(--button-hover-bg);
    color: var(--button-hover-text);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(54, 226, 180, 0.4);
    outline: none;
  }

  /* Form Status */
  .form-status {
    margin-top: var(--space-md);
    padding: var(--space-md);
    border-radius: 8px;
    text-align: center;
    display: none;
  }

  .form-status.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
  }

  .form-status.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
  }
  

  /* Floating elements - Subtle bubble animations for both themes */
  .floating-element {
    position: absolute;
    border-radius: 50%;
    z-index: -1;
    animation: float 15s infinite ease-in-out;
  }

  /* Default bubbles (dark theme) */
  .floating-element {
    background: var(--bubble-1);
  }

  /* Individual bubble colors */
  .float-1 {
    background: var(--bubble-1);
  }

  .float-2 {
    background: var(--bubble-2);
  }

  .float-3 {
    background: var(--bubble-3);
  }

  .float-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
  }

  .float-2 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    right: 10%;
    animation-delay: 3s;
  }

  .float-3 {
    width: 150px;
    height: 150px;
    top: 40%;
    right: 20%;
    animation-delay: 6s;
  }

  @keyframes float {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); }
    25% { transform: translateY(-20px) translateX(20px) rotate(10deg); }
    50% { transform: translateY(10px) translateX(-20px) rotate(-5deg); }
    75% { transform: translateY(-15px) translateX(15px) rotate(7deg); }
  }

  /* Back to Top Button */
  #back-to-top {
    position: fixed;
    bottom: var(--space-md);
    right: var(--space-md);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--button-bg);
    color: var(--button-text);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  #back-to-top.visible {
    opacity: 1;
    visibility: visible;
  }

  #back-to-top:hover, #back-to-top:focus {
    background: var(--button-hover-bg);
    color: var(--button-hover-text);
    transform: translateY(-3px);
    outline: none;
  }

  /* Footer */
  footer {
    text-align: center;
    padding: var(--space-xl) var(--space-md) var(--space-lg);
    color: var(--text-primary);
    font-size: var(--text-sm);
    background: transparent;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
  }

  .footer-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    background: var(--card-bg-color);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    max-width: 90vw;
    overflow-x: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  @media (min-width: 769px) {
    .footer-pill:hover {
      gap: 1rem;
      padding: 0.75rem 1.5rem;
    }
  }

  .footer-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-accent);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
  }

  .footer-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .footer-icon {
    color: var(--text-primary);
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
  }

  @media (min-width: 769px) {
    .footer-icon:hover,
    .footer-icon:focus {
      color: var(--primary-accent);
      background: rgba(54, 226, 180, 0.15);
      transform: scale(1.2);
    }
    
    .footer-logo:hover {
      transform: scale(1.15);
    }
  }

  @media (max-width: 768px) {
    .footer-icon:hover,
    .footer-icon:focus {
      color: var(--primary-accent);
      background: rgba(54, 226, 180, 0.1);
      transform: translateY(-2px);
    }
  }

  .footer-icon svg {
    fill: currentColor;
    width: 18px;
    height: 18px;
  }

  .footer-icon i {
    font-size: 1rem;
  }

  .footer-copyright {
    opacity: 0.6;
    font-size: 0.875rem;
    margin: 0;
  }

  /* Hide desktop theme switcher on mobile, show footer one */
  @media (max-width: 768px) {
    .theme-switcher {
      display: none;
    }
    
    .footer-pill {
      gap: 0.5rem;
      padding: 0.5rem 1rem;
    }
    
    .footer-icon {
      width: 32px;
      height: 32px;
    }
    
    .footer-logo {
      width: 28px;
      height: 28px;
    }
  }

  /* Hide footer theme toggle on desktop */
  @media (min-width: 769px) {
    #theme-toggle-footer {
      display: none;
    }
    
    .footer-divider:last-of-type {
      display: none;
    }
  }

  /* Responsive Design */
  @media (max-width: 768px) {
    :root {
      --space-xl: 2rem;
      --space-lg: 1.5rem;
      --space-md: 1rem;
    }

    .intro h1 {
      font-size: var(--text-xl);
    }
    
    .tagline {
      font-size: var(--text-base);
    }

    .hero-subheading {
      font-size: var(--text-base);
    }

    .hero-ctas {
      flex-direction: column;
      gap: var(--space-sm);
    }

    .cta-button {
      width: 100%;
      text-align: center;
      padding: var(--space-sm) var(--space-md);
    }
    
    main {
      padding: var(--space-md);
    }
    
    .card {
      padding: var(--space-lg);
    }
    
    .skills-grid,
    .project-grid,
    .writing-grid {
      grid-template-columns: 1fr;
    }

    .profile-pic {
      width: 150px;
      height: 150px;
    }

    .decorative-circle {
      width: 160px;
      height: 160px;
    }
  }

  @media (max-width: 480px) {
    .navbar {
      padding: var(--space-sm);
    }

    .nav-menu a {
      font-size: var(--text-sm);
    }
  }

  @media (min-width: 768px) and (max-width: 1024px) {
    .project-grid,
    .writing-grid {
      grid-template-columns: repeat(2, 1fr);
    }

    .process-grid {
      grid-template-columns: repeat(2, 1fr);
    }

    .skills-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  /* Reduced motion */
  @media (prefers-reduced-motion: reduce) {
    * {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }

  html {
    scroll-behavior: smooth;
  }

  body.light-theme .navbar {
    background: var(--navbar-bg-color);
    backdrop-filter: blur(10px);
  }

  body.light-theme .navbar.scrolled {
    background: var(--navbar-bg-color);
  }

  body.light-theme .nav-links a {
    color: var(--primary-accent);
  }

  body.light-theme .nav-links a:hover,
  body.light-theme .nav-links a:focus {
    color: var(--secondary-accent);
  }

  /* Hamburger styles */
  .hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
    position: relative;
  }
  .hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    margin: 4px 0;
    background: var(--primary-accent);
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  /* Hamburger open state */
  .hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  /* Mobile navbar */
  @media (max-width: 768px) {
    .hamburger {
      display: flex;
    }
    .nav-links {
      position: fixed;
      top: 0;
      right: 0;
      height: 100vh;
      width: 220px;
      background: var(--card-bg-color);
      box-shadow: -2px 0 20px rgba(0,0,0,0.08);
      flex-direction: column;
      align-items: flex-start;
      padding: var(--space-xl) var(--space-md);
      gap: var(--space-lg);
      transform: translateX(100%);
      transition: transform 0.3s ease;
      z-index: 1040;
      opacity: 1;
      pointer-events: auto;
    }
    .nav-links.open {
      transform: translateX(0);
    }
    .navbar {
      justify-content: flex-end;
      transform: translateY(0) !important;
      opacity: 1 !important;
    }
  }
  /* Overlay for mobile menu */
  .mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.3);
    z-index: 1040;
  }

  /* Dark theme overlay */
  body.dark-theme .mobile-overlay {
    background: rgba(0,0,0,0.4);
  }

  /* Light theme overlay */
  body.light-theme .mobile-overlay {
    background: rgba(19, 25, 54, 0.2);
  }
  .mobile-overlay.active {
    display: block;
  }

/* --- Tech Stack Section --- */
.tech-group {
  margin-bottom: var(--space-lg);
}

.tech-group:last-child {
  margin-bottom: 0;
}

.tech-group h3 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  font-weight: 600;
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: rgba(54, 226, 180, 0.1);
  border: 1px solid rgba(54, 226, 180, 0.3);
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.3s ease;
  cursor: default;
}

.tech-pill i {
  font-size: 1.1rem;
  color: var(--primary-accent);
}

.tech-pill:hover {
  transform: scale(1.05);
  background: rgba(54, 226, 180, 0.2);
  border-color: var(--primary-accent);
  box-shadow: 0 4px 12px rgba(54, 226, 180, 0.3);
}

@media (max-width: 600px) {
  .tech-pills {
    gap: 0.5rem;
  }
  
  .tech-pill {
    padding: 0.5rem 0.875rem;
    font-size: 0.85rem;
  }
  
  .tech-pill i {
    font-size: 1rem;
  }
  
  .contact-form {
    max-width: 98vw;
  }
}
/* Force navbar to stay visible when mobile menu is open */
body.menu-open .navbar {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  z-index: 1060; 
}

body.menu-open {
  overflow: hidden;
}


/* Writing Section */
.writing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.writing-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.writing-card h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.writing-card p {
  color: var(--text-primary);
  opacity: 0.9;
  line-height: 1.6;
  flex-grow: 1;
  font-size: var(--text-sm);
}

.read-link {
  display: inline-block;
  color: var(--primary-accent);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  align-self: flex-start;
  position: relative;
}

.read-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-accent);
  transition: width 0.3s ease;
}

.read-link:hover::after,
.read-link:focus::after {
  width: 100%;
}

.read-link:hover,
.read-link:focus {
  color: var(--secondary-accent);
  outline: none;
}

/* Process Section */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.step-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.step-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-accent);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.step-card h3 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: var(--space-xs);
}

.step-card p {
  color: var(--text-primary);
  opacity: 0.9;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Contact Section */
#contact {
  max-width: 1100px;
  margin: 0 auto;
}

.contact-wrapper {
  display: flex;
  gap: 3rem;
  align-items: start;
}

.contact-form-container {
  flex: 1;
  max-width: 500px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-top: 0.5rem;
}

.contact-blurb p {
  color: var(--text-primary);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0;
}

.contact-direct h3 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
}

.contact-socials {
  display: flex;
  gap: 1rem;
}

.contact-socials a {
  color: var(--text-primary);
  font-size: 1.5rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(54, 226, 180, 0.1);
  border: 1px solid rgba(54, 226, 180, 0.3);
}

.contact-socials a:hover,
.contact-socials a:focus {
  color: var(--primary-accent);
  background: rgba(54, 226, 180, 0.2);
  border-color: var(--primary-accent);
  transform: translateY(-2px);
}

.contact-socials svg {
  fill: currentColor;
}

.contact-proof {
  padding: 1rem 1.25rem;
  background: rgba(54, 226, 180, 0.05);
  border-left: 3px solid var(--primary-accent);
  border-radius: 4px;
}

.contact-proof p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
  display: flex;
  align-items: start;
  gap: 0.75rem;
}

.contact-proof i {
  color: var(--primary-accent);
  margin-top: 2px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .process-grid {
    grid-template-columns: 1fr;
  }

  .step-number {
    font-size: 2.5rem;
  }

  .contact-wrapper {
    flex-direction: column;
    gap: 2rem;
  }

  .contact-form-container {
    max-width: 100%;
  }

  .contact-info {
    padding-top: 0;
    gap: 1.5rem;
  }
}
