/* Beautiful Gradient CSS Variables */
:root {
    --primary-color: #667eea;
    --primary-light: #764ba2;
    --primary-dark: #5a67d8;
    --secondary-color: #4a5568;
    --accent-color: #ed8936;
    --success-color: #38b2ac;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    --border-color: #e2e8f0;
    
    /* Retro Space Travel Poster Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-mars: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ff4e50 100%);
    --gradient-jupiter: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --gradient-ocean-world: linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #667eea 100%);
    --gradient-coruscant: linear-gradient(135deg, #2d1b69 0%, #764ba2 50%, #f093fb 100%);
    --gradient-sunset: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 50%, #ffd1ff 100%);
    --gradient-deep-space: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --gradient-nebula: linear-gradient(135deg, #2d1b69 0%, #11998e 50%, #38ef7d 100%);
    /* Retro space poster palette */
    --mars-coral: #E55A3C;
    --mars-rust: #C4442D;
    --sky-teal: #65B6A7;
    --sky-mint: #9AD0C5;
    --shadow-navy: #0F2A3C;

    --gradient-aurora: linear-gradient(135deg, var(--sky-teal) 0%, var(--sky-mint) 45%, #6f8ad9 100%);
    --gradient-cool-space: linear-gradient(135deg, #0f2a3c 0%, #1e5f9d 55%, #00c6d4 100%);
    --gradient-vintage-orange: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    --gradient-retro-blue: linear-gradient(135deg, #4facfe 0%, #00c6d4 100%);
    --gradient-space-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Enhanced Shadows with Color */
    --shadow-sm: 0 2px 4px rgba(102, 126, 234, 0.1);
    --shadow-md: 0 4px 12px rgba(102, 126, 234, 0.15);
    --shadow-lg: 0 8px 25px rgba(102, 126, 234, 0.2);
    --shadow-xl: 0 12px 35px rgba(102, 126, 234, 0.25);
    --shadow-2xl: 0 25px 50px rgba(102, 126, 234, 0.3);
    
    /* Generous Border Radius */
    --radius-sm: 0.75rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    --radius-2xl: 2.5rem;
    --radius-3xl: 3rem;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.gradient-text {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem; /* keep consistent height so pages can offset their top padding */
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: none;
    color: #999;
    border-radius: var(--radius-md);
    letter-spacing: 0.05em;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Language toggle subtle highlight */
.lang-active {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(102,126,234,0.15);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Nav Dropdowns */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0;
}

.nav-chevron {
    font-size: 0.55rem;
    transition: transform 0.2s ease;
    opacity: 0.5;
}

.nav-dropdown:hover .nav-chevron,
.nav-dropdown.open .nav-chevron {
    transform: rotate(180deg);
    opacity: 0.8;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1001;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
    display: block;
    padding: 0.55rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: color 0.15s ease, background 0.15s ease;
}

.nav-dropdown-item:hover {
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.06);
}

.nav-dropdown-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Active state on dropdown toggle when child is active */
.nav-dropdown-toggle.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-dropdown-toggle.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    /* Deeper aurora — richer teal/navy/indigo for night-sky feel */
    background-image: linear-gradient(135deg, #2b6358 0%, #3d7e72 30%, #465f9e 70%, #384a8a 100%);
}

/* ── Starfield ── "flying through space" parallax ─────────────── */
/* Two layers drift the SAME direction at very different speeds,   */
/* simulating forward motion: distant stars crawl, near ones stream */

/* Layer 1 — distant stars: tiny, dim, barely moving */
.hero::before {
    content: '';
    position: absolute;
    inset: -120px;          /* extra oversize for the long drift */
    background-image:
        radial-gradient(1.5px 1.5px at  18px  22px, #fff, rgba(255,255,255,0.5) 1px, transparent 2.5px),
        radial-gradient(1px   1px   at  72px  58px, #fff, rgba(255,255,255,0.4) 1px, transparent 2px),
        radial-gradient(1px   1px   at 134px  14px, #fff, rgba(255,255,255,0.45) 1px, transparent 2px),
        radial-gradient(1.5px 1.5px at  46px 102px, #fff, rgba(255,255,255,0.35) 1px, transparent 2.5px),
        radial-gradient(1px   1px   at 198px  76px, #fff, rgba(255,255,255,0.5) 1px, transparent 2px),
        radial-gradient(1px   1px   at 112px 138px, #fff, rgba(255,255,255,0.3) 1px, transparent 2px),
        radial-gradient(1.5px 1.5px at 256px  42px, #fff, rgba(255,255,255,0.45) 1px, transparent 2.5px),
        radial-gradient(1px   1px   at 168px 112px, #fff, rgba(255,255,255,0.35) 1px, transparent 2px),
        radial-gradient(1px   1px   at  88px  86px, #fff, rgba(255,255,255,0.25) 1px, transparent 2px),
        radial-gradient(1.5px 1.5px at 224px 126px, #fff, rgba(255,255,255,0.4) 1px, transparent 2.5px),
        radial-gradient(1px   1px   at   5px  50px, #fff, rgba(255,255,255,0.3) 1px, transparent 2px),
        radial-gradient(1.5px 1.5px at 100px  20px, #fff, rgba(255,255,255,0.45) 1px, transparent 2.5px),
        radial-gradient(1px   1px   at 160px 155px, #fff, rgba(255,255,255,0.35) 1px, transparent 2px),
        radial-gradient(1px   1px   at 240px  80px, #fff, rgba(255,255,255,0.4) 1px, transparent 2px),
        radial-gradient(1.5px 1.5px at  30px 140px, #fff, rgba(255,255,255,0.3) 1px, transparent 2.5px),
        radial-gradient(1px   1px   at 180px  48px, #fff, rgba(255,255,255,0.45) 1px, transparent 2px),
        radial-gradient(1px   1px   at 270px 110px, #fff, rgba(255,255,255,0.35) 1px, transparent 2px),
        radial-gradient(1.5px 1.5px at 140px  98px, #fff, rgba(255,255,255,0.4) 1px, transparent 2.5px),
        radial-gradient(1px   1px   at  58px  32px, #fff, rgba(255,255,255,0.3) 1px, transparent 2px),
        radial-gradient(1px   1px   at 220px 152px, #fff, rgba(255,255,255,0.35) 1px, transparent 2px),
        radial-gradient(1.5px 1.5px at  10px 108px, #fff, rgba(255,255,255,0.4) 1px, transparent 2.5px),
        radial-gradient(1px   1px   at 260px  18px, #fff, rgba(255,255,255,0.5) 1px, transparent 2px);
    background-size: 280px 160px;
    background-repeat: repeat;
    animation: starFlyFar 90s linear infinite,
               starTwinkle1 7s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

/* Layer 2 — near stars: larger, brighter, streaming past faster */
.hero::after {
    content: '';
    position: absolute;
    inset: -200px;          /* much larger oversize for the fast drift */
    background-image:
        radial-gradient(2.5px 2.5px at  30px  44px, #fff, rgba(255,255,255,0.6) 1.5px, transparent 4px),
        radial-gradient(2px   2px   at 150px  28px, #fff, rgba(255,255,255,0.55) 1.5px, transparent 3.5px),
        radial-gradient(1.5px 1.5px at  94px  72px, #fff, rgba(255,255,255,0.4) 1px, transparent 3px),
        radial-gradient(2.5px 2.5px at 210px  96px, #fff, rgba(255,255,255,0.5) 1.5px, transparent 4px),
        radial-gradient(1.5px 1.5px at  56px 118px, #fff, rgba(255,255,255,0.35) 1px, transparent 3px),
        radial-gradient(2px   2px   at 270px  52px, #fff, rgba(255,255,255,0.55) 1.5px, transparent 3.5px),
        radial-gradient(1.5px 1.5px at 180px 142px, #fff, rgba(255,255,255,0.35) 1px, transparent 3px),
        radial-gradient(2.5px 2.5px at 120px  18px, #fff, rgba(255,255,255,0.6) 1.5px, transparent 4px),
        radial-gradient(2px   2px   at  70px 160px, #fff, rgba(255,255,255,0.5) 1.5px, transparent 3.5px),
        radial-gradient(1.5px 1.5px at 250px  70px, #fff, rgba(255,255,255,0.4) 1px, transparent 3px),
        radial-gradient(2.5px 2.5px at 320px 140px, #fff, rgba(255,255,255,0.55) 1.5px, transparent 4px),
        radial-gradient(2px   2px   at  10px 130px, #fff, rgba(255,255,255,0.45) 1.5px, transparent 3.5px),
        radial-gradient(1.5px 1.5px at 200px  10px, #fff, rgba(255,255,255,0.4) 1px, transparent 3px),
        radial-gradient(2px   2px   at 130px 100px, #fff, rgba(255,255,255,0.5) 1.5px, transparent 3.5px),
        radial-gradient(2.5px 2.5px at 300px  30px, #fff, rgba(255,255,255,0.6) 1.5px, transparent 4px),
        radial-gradient(1.5px 1.5px at  45px  55px, #fff, rgba(255,255,255,0.35) 1px, transparent 3px);
    background-size: 340px 180px;
    background-repeat: repeat;
    animation: starFlyNear 30s linear infinite,
               starTwinkle2 9s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

/* Both layers drift the same direction — near layer ~3× faster for depth */
@keyframes starFlyFar {
    from { transform: translate(0, 0); }
    to   { transform: translate(280px, 160px); }
}
@keyframes starFlyNear {
    from { transform: translate(0, 0); }
    to   { transform: translate(340px, 180px); }
}

/* Gentle twinkle — offset so the two layers breathe independently */
@keyframes starTwinkle1 {
    0%, 100% { opacity: 0.8; }
    50%      { opacity: 1; }
}
@keyframes starTwinkle2 {
    0%, 100% { opacity: 0.85; }
    50%      { opacity: 1; }
}

/* ── Shooting stars — radiate outward (animated via JS WAAPI) ───── */
.shooting-star {
    position: absolute;
    height: 1.5px;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    border-radius: 999px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(200,215,255,0.05) 20%,
        rgba(220,230,255,0.25) 55%,
        rgba(255,255,255,0.6) 90%,
        #fff 100%);
    box-shadow: 0 0 6px 1px rgba(180,200,255,0.12);
    transform-origin: right center;
}

.hero-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    z-index: 2;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 80vh;
}

.hero-title {
    font-family: 'Bebas Neue', var(--font-family);
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
    color: #ffffff;
    transition: color 0.3s ease;
}

/* Apple-style gradient text for name */
.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    text-shadow: none !important;
    /* Fallback for browsers that don't support background-clip */
    color: #ffffff;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #ffffff;
    font-weight: 600; /* Apple-style semi-bold */
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

.hero-description {
    font-size: 1.125rem;
    color: #ffffff;
    margin-bottom: 2rem;
    line-height: 1.6; /* Apple-style line height */
    font-weight: 500; /* Apple-style medium weight */
    transition: color 0.3s ease;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.hero-location i {
    color: var(--accent-color);
}

/* Profile Card */
.profile-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-2xl);
    border: 2px solid rgba(255, 255, 255, 0.2);
    max-width: 320px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-stellar);
}

.profile-image {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
}

.profile-initials {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 2;
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.profile-initials::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.status-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: var(--success-color);
    border-radius: 50%;
    border: 3px solid white;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    text-align: center;
}

.stat {
    padding: 0.5rem;
    text-align: center;
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    /* Keep words intact so labels don't split awkwardly */
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-xl);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Sections */
section {
    padding: 5rem 0;
}

/* Alternating high-contrast panel theming */
/* White panels */
.skills,
.contact {
    background: #ffffff;
}

.skills .section-title,
.contact .section-title {
    color: var(--text-primary);
    text-shadow: none;
}

.skills .section-subtitle,
.contact .section-subtitle {
    color: var(--text-secondary);
    text-shadow: none;
}

/* Color panels (already themed): ensure titles/subtitles are bright */
.about .section-title,
.travel-preview .section-title {
    color: #ffffff;
}

.about .section-subtitle,
.travel-preview .section-subtitle {
    color: #ffffff;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

/* Add a subtle star overlay to additional sections using the same pattern */
#skills, #contact {
    position: relative;
    overflow: hidden;
}

#skills::after, #contact::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.35), transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.25), transparent),
        radial-gradient(1px 1px at 160px 30px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 50px 100px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 180px 60px, rgba(255,255,255,0.2), transparent);
    background-repeat: repeat;
    background-size: 180px 120px;
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

#skills > *, #contact > * { position: relative; z-index: 1; }

.section-title {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    /* Force a very light panel */
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%) !important;
    background-color: #ffffff !important;
    position: relative;
    transition: background 0.15s ease;
    overflow: hidden;
}

.about::before { display: none; }

/* Animated stars for space sections */
.about::after { display: none; }

.about.show-stars::after {
    opacity: 0.6;
}

@keyframes sparkle {
    from { transform: translateX(0); }
    to { transform: translateX(200px); }
}

/* Cursor-following stars */
.cursor-star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #ffffff 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    animation: starTwinkle 1.5s ease-out forwards;
}

.cursor-star::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 8px;
    background: linear-gradient(to bottom, transparent, #ffffff, transparent);
    transform: translate(-50%, -50%);
}

.cursor-star::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 2px;
    background: linear-gradient(to right, transparent, #ffffff, transparent);
    transform: translate(-50%, -50%);
}

@keyframes starTwinkle {
    0% {
        opacity: 1;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) rotate(360deg);
    }
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
    position: relative;
    z-index: 1;
}

/* Apple-style high contrast text over gradients */
.about .section-title {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: none;
}

.about .section-subtitle {
    color: var(--text-secondary);
    font-weight: 600;
    text-shadow: none;
}

.about-paragraph {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-weight: 500;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.highlight {
    display: flex;
    gap: 1rem;
    align-items: start;
}

.highlight i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.highlight h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.highlight p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 400;
}

.tech-stack {
    padding: 1.75rem 2rem;
    border-radius: var(--radius-2xl);
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    background: #fafafa;
}

.tech-stack h4 {
    margin-bottom: 1rem;
    color: #999;
    font-weight: 500;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tech-item {
    background: transparent;
    color: #555 !important;
    padding: 0.4rem 0.9rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.25s ease;
    border: 1px solid #ddd;
    position: relative;
    letter-spacing: 0.01em;
}

.tech-item:hover {
    background: #f0f0f0;
    color: #333 !important;
    border-color: #bbb;
    transform: translateY(-1px);
}


/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 2.5rem;
    border-radius: var(--radius-2xl);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-cosmos);
}

.skill-category:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-2xl);
}

.skill-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.skill-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: iconShimmer 4s ease-in-out infinite;
}

@keyframes iconShimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.skill-icon i {
    font-size: 1.5rem;
    color: white;
}

.skill-category h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.skill-category ul {
    list-style: none;
    text-align: left;
}

.skill-category li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.skill-category li:last-child {
    border-bottom: none;
}

/* Travel Preview Section */
.travel-preview {
    /* Cool deep-space gradient for readability */
    background-image: var(--gradient-cool-space);
    position: relative;
}

.travel-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.6) 100%);
    pointer-events: none;
}

/* Apple-style high contrast for travel section */
.travel-preview .section-title {
    color: #ffffff;
    font-weight: 700; /* Apple-style bold */
    letter-spacing: -0.02em; /* Apple-style tight tracking */
    transition: color 0.3s ease;
    text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.travel-preview .section-subtitle {
    color: #ffffff;
    font-weight: 600; /* Apple-style semi-bold */
    transition: color 0.3s ease;
    text-shadow: 0 1px 6px rgba(0,0,0,0.35);
}

.travel-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}

.travel-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    padding: 2rem;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.travel-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-stellar);
}

.travel-stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    font-size: 2rem;
}



.travel-cta {
    text-align: center;
    margin-top: 3rem;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 1.25rem;
    color: white;
}

.contact-details h4 {
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.contact-details a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

.contact-cta {
    text-align: center;
    background: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.contact-cta h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-cta p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-right {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .hero {
        min-height: 100vh;
        padding: 0;
        align-items: center;
        justify-content: center;
        padding-top: 6rem;
        padding-bottom: 2rem;
    }
    
    .hero-content {
        min-height: auto;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
    }
    /* Ensure text appears above image on small screens */
    .hero-text { order: 1; }
    .hero-image { order: 2; }
    
    .hero-container {
        padding: 0 1rem;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 4rem;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Mobile dropdown styles */
    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown-toggle {
        justify-content: center;
        width: 100%;
    }

    .nav-dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        background: rgba(0, 0, 0, 0.02);
        border: none;
        border-radius: 0;
        box-shadow: none;
        backdrop-filter: none;
        min-width: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }

    .nav-dropdown.open .nav-dropdown-menu {
        max-height: 300px;
        padding: 0.25rem 0;
        transform: none;
    }

    .nav-dropdown-item {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .nav-chevron {
        font-size: 0.5rem;
    }

    /* Disable hover open on mobile */
    .nav-dropdown:hover .nav-dropdown-menu {
        max-height: 0;
        padding: 0;
    }

    .nav-dropdown.open .nav-dropdown-menu,
    .nav-dropdown:hover.open .nav-dropdown-menu {
        max-height: 300px;
        padding: 0.25rem 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-location {
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .travel-stats {
        grid-template-columns: 1fr;
    }
    
    .tech-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .tech-item {
        padding: 0.875rem 1rem;
        font-size: 0.85rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    section {
        padding: 3rem 0;
    }
    
    .hero {
        min-height: 100vh;
        padding: 0;
        align-items: center;
        justify-content: center;
        padding-top: 5rem;
        padding-bottom: 2rem;
    }
    
    .hero-content {
        min-height: auto;
        gap: 1.5rem;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .hero-container {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.1;
        margin-bottom: 0.5rem;
        margin-top: 0;
        word-break: break-word;
    }
    
    .hero-subtitle {
        font-size: 1.05rem;
        margin-bottom: 0.875rem;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .profile-card {
        padding: 1.5rem;
        width: calc(100% - 40px);
        max-width: 420px;
        margin: 0 auto;
    }
    .profile-photo { width: 110px; height: 110px; }

    /* Improve hero stats readability on small screens */
    .profile-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        align-items: start;
    }
    .stat-number { font-size: 1.15rem; margin-bottom: 0.15rem; }
    .stat-label {
        font-size: 0.7rem;
        white-space: normal; /* allow wrap on mobile */
        line-height: 1.15;
        letter-spacing: 0.04em;
    }
}

/* Projects Page Styles */
.featured-project {
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
    padding: 5rem 0;
}

.all-projects {
    background: #ffffff;
    padding: 5rem 0;
}

.contact-cta-section {
    background: var(--gradient-cool-space);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.contact-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.contact-cta-section .section-title {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.contact-cta-section .section-subtitle {
    color: #ffffff;
    text-shadow: 0 1px 6px rgba(0,0,0,0.35);
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.project-showcase {
    margin-bottom: 4rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    border: 2px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.project-card.featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    max-width: 1000px;
    margin: 0 auto;
}

.project-image {
    position: relative;
    overflow: hidden;
}

.project-preview {
    height: 200px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-card.featured .project-preview {
    height: 100%;
    min-height: 300px;
}

.project-preview i {
    font-size: 3rem;
    color: white;
    opacity: 0.8;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-image:hover .project-overlay {
    opacity: 1;
}

.project-content {
    padding: 2rem;
}

.project-card.featured .project-content {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-badge {
    display: inline-block;
    background: var(--gradient-mars);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    width: fit-content;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.project-card.featured .project-title {
    font-size: 2rem;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tech-tag {
    background: var(--gradient-primary);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

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

/* Active navigation link */
.nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-link.active::after {
    width: 100%;
}

/* Responsive Design for Projects */
@media (max-width: 768px) {
    .project-card.featured {
        grid-template-columns: 1fr;
    }
    
    .project-card.featured .project-preview {
        height: 200px;
        min-height: auto;
    }
    
    .project-card.featured .project-content {
        padding: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Extra small screens - ensure name is always visible */
@media (max-width: 375px) {
    .hero {
        min-height: 100vh;
        padding-top: 4rem;
        padding-bottom: 2rem;
        align-items: center;
        justify-content: center;
    }
    
    .hero-content {
        align-items: center;
        justify-content: center;
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
        margin-top: 0;
        text-align: center;
        width: 100%;
    }
    
    .hero-container {
        padding: 0 0.75rem;
        width: 100%;
        max-width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════════
   DARK MODE — auto-activated by OS preference
   ═══════════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-tertiary: #1a1a2e;
        --text-primary: #e2e8f0;
        --text-secondary: #94a3b8;
        --text-light: #64748b;
        --border-color: rgba(255, 255, 255, 0.1);
        --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.45);
        --shadow-xl: 0 12px 35px rgba(0, 0, 0, 0.5);
        --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.55);
    }

    /* Navbar */
    .navbar {
        background: rgba(15, 23, 42, 0.95);
    }

    .nav-logo a { color: #94a3b8; }

    .nav-dropdown-menu {
        background: rgba(30, 41, 59, 0.98);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }

    .nav-dropdown-item:hover {
        background: rgba(102, 126, 234, 0.12);
    }

    @media (max-width: 768px) {
        .nav-menu {
            background-color: #1e293b;
        }

        .nav-dropdown-menu {
            background: rgba(255, 255, 255, 0.04);
        }
    }

    /* Profile card & glass panels */
    .profile-card {
        background: rgba(30, 41, 59, 0.92);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .status-indicator { border-color: #1e293b; }

    /* Buttons */
    .btn-secondary {
        background: rgba(30, 41, 59, 0.85);
        color: var(--text-primary);
        border-color: rgba(255, 255, 255, 0.12);
    }

    .btn-secondary:hover {
        background: rgba(51, 65, 85, 0.95);
        border-color: rgba(255, 255, 255, 0.2);
    }

    /* About section */
    .about {
        background: linear-gradient(180deg, #0f172a 0%, #162032 100%) !important;
        background-color: #0f172a !important;
    }

    /* Tech stack */
    .tech-stack {
        background: #1e293b;
        border-color: rgba(255, 255, 255, 0.06);
    }

    .tech-stack h4 { color: #64748b; }

    .tech-item {
        color: #94a3b8 !important;
        border-color: rgba(255, 255, 255, 0.1);
    }

    .tech-item:hover {
        background: rgba(255, 255, 255, 0.06);
        color: #e2e8f0 !important;
        border-color: rgba(255, 255, 255, 0.2);
    }

    /* White panel sections */
    .skills,
    .contact {
        background: #0f172a;
    }

    /* Skill cards */
    .skill-category {
        background: rgba(30, 41, 59, 0.92);
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    }

    /* Travel stats */
    .travel-stat {
        background: rgba(30, 41, 59, 0.88);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .travel-preview::before {
        background: linear-gradient(45deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.25) 100%);
    }

    /* Contact */
    .contact-cta {
        background: #1e293b;
        border-color: rgba(255, 255, 255, 0.08);
    }

    /* Footer */
    .footer {
        background: #020617;
    }

    /* Projects page */
    .featured-project {
        background: linear-gradient(180deg, #0f172a 0%, #162032 100%);
    }

    .all-projects {
        background: #0f172a;
    }

    .project-card {
        background: rgba(30, 41, 59, 0.92);
        border-color: rgba(255, 255, 255, 0.08);
    }

    /* Stars overlay on skills/contact — dim on dark since bg is already dark */
    #skills::after, #contact::after {
        opacity: 0.12;
    }
}

/* Manual override — duplicates the media-query rules so JS toggle works */
html[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #1a1a2e;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-light: #64748b;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.45);
    --shadow-xl: 0 12px 35px rgba(0, 0, 0, 0.5);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.55);
}
html[data-theme="dark"] .navbar { background: rgba(15, 23, 42, 0.95); }
html[data-theme="dark"] .nav-logo a { color: #94a3b8; }
html[data-theme="dark"] .nav-dropdown-menu { background: rgba(30, 41, 59, 0.98); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
html[data-theme="dark"] .nav-dropdown-item:hover { background: rgba(102,126,234,0.12); }
html[data-theme="dark"] .profile-card { background: rgba(30,41,59,0.92); border-color: rgba(255,255,255,0.08); }
html[data-theme="dark"] .status-indicator { border-color: #1e293b; }
html[data-theme="dark"] .btn-secondary { background: rgba(30,41,59,0.85); color: var(--text-primary); border-color: rgba(255,255,255,0.12); }
html[data-theme="dark"] .btn-secondary:hover { background: rgba(51,65,85,0.95); border-color: rgba(255,255,255,0.2); }
html[data-theme="dark"] .about { background: linear-gradient(180deg,#0f172a 0%,#162032 100%) !important; background-color: #0f172a !important; }
html[data-theme="dark"] .tech-stack { background: #1e293b; border-color: rgba(255,255,255,0.06); }
html[data-theme="dark"] .tech-stack h4 { color: #64748b; }
html[data-theme="dark"] .tech-item { color: #94a3b8 !important; border-color: rgba(255,255,255,0.1); }
html[data-theme="dark"] .tech-item:hover { background: rgba(255,255,255,0.06); color: #e2e8f0 !important; border-color: rgba(255,255,255,0.2); }
html[data-theme="dark"] .skills, html[data-theme="dark"] .contact { background: #0f172a; }
html[data-theme="dark"] .skill-category { background: rgba(30,41,59,0.92); border-color: rgba(255,255,255,0.08); box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
html[data-theme="dark"] .travel-stat { background: rgba(30,41,59,0.88); border-color: rgba(255,255,255,0.08); }
html[data-theme="dark"] .travel-preview::before { background: linear-gradient(45deg,rgba(0,0,0,0.4) 0%,rgba(0,0,0,0.25) 100%); }
html[data-theme="dark"] .contact-cta { background: #1e293b; border-color: rgba(255,255,255,0.08); }
html[data-theme="dark"] .footer { background: #020617; }
html[data-theme="dark"] .featured-project { background: linear-gradient(180deg,#0f172a 0%,#162032 100%); }
html[data-theme="dark"] .all-projects { background: #0f172a; }
html[data-theme="dark"] .project-card { background: rgba(30,41,59,0.92); border-color: rgba(255,255,255,0.08); }
html[data-theme="dark"] #skills::after, html[data-theme="dark"] #contact::after { opacity: 0.12; }

/* Force light when user explicitly picks light (overrides OS dark) */
html[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(102, 126, 234, 0.1);
    --shadow-md: 0 4px 12px rgba(102, 126, 234, 0.15);
    --shadow-lg: 0 8px 25px rgba(102, 126, 234, 0.2);
    --shadow-xl: 0 12px 35px rgba(102, 126, 234, 0.25);
    --shadow-2xl: 0 25px 50px rgba(102, 126, 234, 0.3);
}

/* ── Theme toggle button ───────────────────────────────────── */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.05rem;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.06);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon { transition: opacity 0.25s ease; }

.theme-toggle .icon-sun  { display: inline; }
.theme-toggle .icon-moon { display: none; }

@media (prefers-color-scheme: dark) {
    .theme-toggle .icon-sun  { display: none; }
    .theme-toggle .icon-moon { display: inline; }
}
html[data-theme="dark"] .theme-toggle .icon-sun  { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }
html[data-theme="light"] .theme-toggle .icon-sun  { display: inline; }
html[data-theme="light"] .theme-toggle .icon-moon { display: none; }

@media (max-width: 768px) {
    html[data-theme="dark"] .nav-menu { background-color: #1e293b; }
    html[data-theme="dark"] .nav-dropdown-menu { background: rgba(255,255,255,0.04); }
}