* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* This is the most important line */
}

html,
body {
    width: 100%;
    overflow-x: hidden;
    /* Prevents horizontal scrolling */
    position: relative;
    scroll-behavior: smooth;
    transition: background-color 0.4s ease;
}

/* =========================================
   CSS VARIABLES & THEME SETUP
   ========================================= */
:root {
    /* Light Mode Default */
    --bg-base: #e2e8f0;
    /* slate-200 */
    --text-main: #0f172a;
    /* slate-900 */
    --text-muted: #475569;
    /* slate-600 */

    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.4);
    --nav-bg: rgba(255, 255, 255, 0.8);

    --grid-color-1: rgba(20, 69, 231, 0.1);
    --grid-color-2: rgba(20, 69, 231, 0.1);
    --orb-1: rgba(20, 184, 166, 0.15);
    /* Teal */
    --orb-2: rgba(59, 130, 246, 0.15);
    /* Blue */

    --pulse-glow: rgba(20, 184, 166, 0.2);
    --pulse-border: rgba(20, 184, 166, 0.3);
}

[data-theme="dark"] {
    /* Dark Mode */
    --bg-base: #0f172a;
    /* slate-900 */
    --text-main: #e2e8f0;
    /* slate-200 */
    --text-muted: #cbd5e1;
    /* slate-300 */

    --glass-bg: rgba(15, 23, 42, 0.8);
    --glass-border: rgba(51, 65, 85, 0.5);
    /* slate-700 */
    --nav-bg: rgba(15, 23, 42, 0.8);

    --grid-color-1: rgba(20, 184, 166, 0.15);
    --grid-color-2: rgba(20, 184, 166, 0.15);
    --orb-1: rgba(20, 184, 166, 0.25);
    --orb-2: rgba(59, 130, 246, 0.25);
}

/* Nav Spotlight Colors */
.active-cyan {
    --spot-color: #22d3ee;
    --spot-glow: rgba(34, 211, 238, 0.5);
}

.active-fuchsia {
    --spot-color: #e879f9;
    --spot-glow: rgba(232, 121, 249, 0.5);
}

.active-purple {
    --spot-color: #c084fc;
    --spot-glow: rgba(192, 132, 252, 0.5);
}

.active-orange {
    --spot-color: #fb923c;
    --spot-glow: rgba(251, 146, 60, 0.5);
}

.active-lime {
    --spot-color: #a3e635;
    --spot-glow: rgba(163, 230, 53, 0.5);
}

.active-blue {
    --spot-color: #60a5fa;
    --spot-glow: rgba(96, 165, 250, 0.5);
}

.active-rose {
    --spot-color: #fb7185;
    --spot-glow: rgba(251, 113, 133, 0.5);
}

/* =========================================
   GLOBAL RESET
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    /* transition: background-color 0.4s ease, border-color 0.4s ease; */
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    overflow-x: hidden;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(20, 184, 166, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(20, 184, 166, 0.8);
}

/* Utilities */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* =========================================
   BACKGROUND: CYBER GRID & ORBS
   ========================================= */
.animated-bg {
    position: fixed;
    inset: 0;
    z-index: -5;
    pointer-events: none;
    overflow: hidden;
    background-image:
        linear-gradient(var(--grid-color-1) 2px, transparent 2px),
        linear-gradient(90deg, var(--grid-color-2) 2px, transparent 2px);
    background-size: 40px 40px;
    animation: pan-grid 8s linear infinite;
}

.animated-bg::before,
.animated-bg::after {
    content: "";
    position: absolute;
    inset: -50%;
    z-index: -6;
    pointer-events: none;
}

.animated-bg::before {
    background: radial-gradient(circle at 50% 50%, var(--orb-1), transparent 40%);
    animation: float-orb-1 15s ease-in-out infinite alternate;
}

.animated-bg::after {
    background: radial-gradient(circle at 50% 50%, var(--orb-2), transparent 50%);
    animation: float-orb-2 20s ease-in-out infinite alternate;
}

@keyframes pan-grid {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 0 40px;
    }
}

@keyframes float-orb-1 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(20vw, 20vh) scale(1.5);
    }
}

@keyframes float-orb-2 {
    0% {
        transform: translate(20vw, -10vh) scale(1.2);
    }

    100% {
        transform: translate(-20vw, 20vh) scale(0.8);
    }
}

/* =========================================
   NAVBAR (PILL SHAPE & GLOW)
   ========================================= */
.navbar-wrapper {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1150px;
    z-index: 100;
}

nav {
    background: var(--nav-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid var(--glass-border);
    border-radius: 9999px;
    /* Pill shape */
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: pulse-border 1.5s ease-in-out infinite alternate;
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 15px var(--pulse-glow), inset 0 0 5px rgba(20, 184, 166, 0.1);
        border-color: var(--pulse-border);
    }

    100% {
        box-shadow: 0 0 25px rgba(20, 184, 166, 0.4), inset 0 0 10px rgba(20, 184, 166, 0.2);
        border-color: rgba(20, 184, 166, 0.6);
    }
}

.logo-box {
    width: 96px;
    height: 48px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(20, 184, 166, 0.4);
    border: 1px solid rgba(20, 184, 166, 0.3);
    margin-left: 4px;
}

.logo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-light {
    display: block;
}

.logo-dark {
    display: none;
}

[data-theme="dark"] .logo-light {
    display: none;
}

[data-theme="dark"] .logo-dark {
    display: block;
}

/* Desktop Links */
.nav-links {
    display: none;
    list-style: none;
    gap: 4px;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-link {
    position: relative;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-link:hover {
    color: var(--text-main);
}

/* The Magic Spotlight Effect */
.spotlight-container {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 96px;
    height: 48px;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-link.active .spotlight-container {
    opacity: 1;
}

.nav-link.active {
    color: var(--spot-color);
}

.spotlight-bar {
    width: 48px;
    height: 4px;
    border-radius: 9999px;
    background: var(--spot-color);
    box-shadow: 0 0 8px var(--spot-color);
}

.spotlight-beam {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, var(--spot-glow), transparent);
    clip-path: polygon(35% 0, 65% 0, 100% 100%, 0% 100%);
    opacity: 0.6;
}

/* Controls Area */
.controls-area {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 9999px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--glass-border);
}

[data-theme="dark"] .controls-area {
    background: rgba(255, 255, 255, 0.05);
}

.theme-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.theme-btn:hover {
    background: var(--bg-base);
    color: #eab308;
    /* Yellow */
    box-shadow: 0 0 5px rgba(250, 204, 21, 0.5);
}

/* Mobile Menu Button */
.mobile-toggle {
    display: block;
    background: var(--bg-base);
    border: none;
    width: 48px;
    height: 28px;
    border-radius: 9999px;
    position: relative;
    cursor: pointer;
    padding: 4px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .mobile-toggle {
        display: none;
    }
}

.mobile-knob {
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s ease, background-color 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

[data-theme="dark"] .mobile-knob {
    background: var(--text-muted);
}

.mobile-knob span {
    width: 8px;
    height: 1px;
    background: #0f172a;
}

.mobile-toggle.is-open {
    background: rgba(244, 63, 94, 0.2);
}

/* rose-500/20 */
.mobile-toggle.is-open .mobile-knob {
    transform: translateX(20px) rotate(180deg);
    background: #f43f5e;
    /* rose-500 */
}

.mobile-toggle.is-open .mobile-knob span {
    display: none;
}

.mobile-toggle.is-open .mobile-knob::after {
    content: "\f00d";
    /* FontAwesome X */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: white;
    font-size: 10px;
}

/* Mobile Overlay Menu */
.mobile-menu {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px) scale(0.95);
    width: 90%;
    max-width: 350px;
    border-radius: 24px;
    padding: 20px;
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 40px rgba(20, 184, 166, 0.2);
    border: 1px solid rgba(20, 184, 166, 0.3);
    display: flex;
    /* Add this */
    flex-direction: column;
    /* Add this */
    gap: 12px;
}

.mobile-menu.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-radius: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.mobile-link i {
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: color 0.3s;
}

.mobile-link:hover {
    background: var(--bg-base);
    transform: translateX(8px);
}

/* Specific Mobile Gradients for Active states */
.mobile-link.active.active-cyan {
    background: linear-gradient(to right, #06b6d4, #3b82f6);
    color: white;
    transform: translateX(8px);
}

.mobile-link.active.active-fuchsia {
    background: linear-gradient(to right, #d946ef, #a855f7);
    color: white;
    transform: translateX(8px);
}

.mobile-link.active.active-purple {
    background: linear-gradient(to right, #a855f7, #6366f1);
    color: white;
    transform: translateX(8px);
}

.mobile-link.active.active-orange {
    background: linear-gradient(to right, #f97316, #ef4444);
    color: white;
    transform: translateX(8px);
}

.mobile-link.active.active-lime {
    background: linear-gradient(to right, #84cc16, #22c55e);
    color: white;
    transform: translateX(8px);
}

.mobile-link.active.active-blue {
    background: linear-gradient(to right, #3b82f6, #6366f1);
    color: white;
    transform: translateX(8px);
}

.mobile-link.active.active-rose {
    background: linear-gradient(to right, #f43f5e, #ec4899);
    color: white;
    transform: translateX(8px);
}

.mobile-link.active i {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* =========================================
   MAIN CONTENT
   ========================================= */
main {
    min-height: 100vh;
    padding-top: 120px;
    /* Offset for navbar */
    max-width: 1200px;
    margin: 0 auto;
    padding-inline: 20px;
}

img {
    max-width: 100%;
    height: auto;
}

/* =========================================
   FOOTER (EXACT MATCH)
   ========================================= */
footer {
    margin-top: 80px;
    border-top: 1px solid var(--glass-border);
    position: relative;
    z-index: 10;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-text h3 {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(to right, #2dd4bf, #3b82f6);
    /* teal-400 to blue-500 */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-text p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    padding: 8px;
    border-radius: 9999px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Specific Social Colors from React Code */
.soc-globe {
    color: #0d9488;
}

/* teal-600 */
[data-theme="dark"] .soc-globe {
    color: #2dd4bf;
}

/* teal-400 */
.soc-globe:hover {
    background: rgba(20, 184, 166, 0.2);
}

.soc-insta {
    color: #db2777;
}

/* pink-600 */
[data-theme="dark"] .soc-insta {
    color: #f472b6;
}

/* pink-400 */
.soc-insta:hover {
    background: rgba(236, 72, 153, 0.2);
}

.soc-linkedin {
    color: #2563eb;
}

/* blue-600 */
[data-theme="dark"] .soc-linkedin {
    color: #60a5fa;
}

/* blue-400 */
.soc-linkedin:hover {
    background: rgba(59, 130, 246, 0.2);
}

.soc-twitter {
    color: #1f2937;
}

/* gray-800 */
[data-theme="dark"] .soc-twitter {
    color: #d1d5db;
}

/* gray-300 */
.soc-twitter:hover {
    background: rgba(107, 114, 128, 0.2);
}


/* Global scroll progress bar */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%;
  z-index: 9999;

  background: linear-gradient(
    to right,
    #2dd4bf,
    #3b82f6,
    #9333ea
  );

  transform-origin: left;
  transform: scaleX(var(--scroll-progress, 0));
  transition: transform 0.1s linear;

  will-change: transform;
}