/* 
 * ===================================================================
 * Shibani Portfolio - Modern Glassmorphism Styling System
 * ===================================================================
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* Theme Variables */
:root {
    /* Dark Theme (Default) */
    --bg-primary: #080b11;
    --bg-secondary: #0f131f;
    --bg-tertiary: #171d2f;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-1: #00f2fe; /* Cyber Cyan */
    --accent-2: #4facfe; /* Electric Blue */
    --accent-3: #7f00ff; /* Neon Purple */
    --accent-gradient: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
    --accent-gradient-hover: linear-gradient(135deg, var(--accent-3) 0%, var(--accent-2) 50%, var(--accent-1) 100%);
    
    --glass-bg: rgba(15, 19, 31, 0.75);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shadow: rgba(0, 0, 0, 0.4);
    --card-glow: rgba(0, 242, 254, 0.03);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --header-height: 80px;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
    --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

    --transition-fast: 0.12s var(--ease-out);
    --transition-normal: 0.22s var(--ease-out);
    --transition-slow: 0.38s var(--ease-out);
}

/* Light Theme overrides */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --accent-1: #0ea5e9; /* Sky Blue */
    --accent-2: #4f46e5; /* Indigo */
    --accent-3: #9333ea; /* Purple */
    
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(15, 23, 42, 0.06);
    --glass-shadow: rgba(15, 23, 42, 0.05);
    --card-glow: rgba(14, 165, 233, 0.02);
}

/* CSS Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

button, input, textarea {
    font-family: inherit;
    background: none;
    border: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Typography Utility */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

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

.section-title-wrapper {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle,
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-1);
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.22);
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.06);
    transition: all 0.3s ease;
}

[data-theme="light"] .section-subtitle,
[data-theme="light"] .section-tag {
    background: rgba(14, 165, 233, 0.08);
    border-color: rgba(14, 165, 233, 0.25);
    color: #0284c7;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.08);
}

.section-tag:hover,
.section-subtitle:hover {
    transform: translateY(-2px);
    border-color: var(--accent-1);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.2);
}

/* Pulsing radar dot */
.tag-pulse {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-1);
    box-shadow: 0 0 8px var(--accent-1);
    position: relative;
}

.tag-pulse::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 1px solid var(--accent-1);
    animation: radarPulse 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes radarPulse {
    0%   { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2.4); opacity: 0; }
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: var(--border-radius-sm);
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 100px 0;
    position: relative;
}

/* Glassmorphism Class */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 var(--glass-shadow);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 30px;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient-hover);
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: -1;
}

.btn-primary:hover {
    box-shadow: 0 6px 24px rgba(0, 242, 254, 0.5);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    border: 2px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-1);
}

@media (hover: hover) and (pointer: fine) {
    .btn:hover {
        transform: translateY(-2px);
    }
}

/* Floating Navigation Bar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    align-items: center;
    z-index: 1000;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: height var(--transition-normal), background-color var(--transition-normal), backdrop-filter var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

header.scrolled {
    height: 70px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px var(--glass-shadow);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo a {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    font-family: var(--font-heading);
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.logo span {
    color: var(--accent-1);
    transition: color var(--transition-fast);
}

.nav-menu ul {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 12px;
    border-radius: 8px;
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: var(--glass-border);
}

.nav-item.active .nav-link {
    color: var(--accent-1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--transition-fast) var(--ease-out);
    border-radius: 2px;
}

.nav-item.active .nav-link::after {
    transform: scaleX(1);
}

/* Nav Actions & Theme Switcher */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Mobile drawer backdrop */
.nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
    z-index: 998;
}

.nav-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-footer {
    display: none;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--glass-border);
    transform: scale(1.05);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform var(--transition-fast);
}

.theme-toggle:hover svg {
    transform: rotate(15deg) scale(1.1);
}

/* Theme Toggle SVG States — animated crossfade */
.theme-toggle {
    position: relative;
    overflow: hidden;
}

.sun-icon,
.moon-icon {
    position: absolute;
    transition: opacity 0.3s var(--ease-out), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark mode: show moon, hide sun */
.sun-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
    pointer-events: none;
}
.moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Light mode: show sun, hide moon */
[data-theme="light"] .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    pointer-events: auto;
}
[data-theme="light"] .moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
    pointer-events: none;
}

/* Subtle glow ring colour per theme */
[data-theme="dark"] .theme-toggle {
    box-shadow: 0 0 0 0px rgba(0, 242, 254, 0);
}
[data-theme="dark"] .theme-toggle:hover {
    box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.18);
    border-color: rgba(0, 242, 254, 0.3);
}
[data-theme="light"] .theme-toggle:hover {
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.22);
    border-color: rgba(251, 191, 36, 0.4);
    color: #d97706;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* Hero Section with Interactive Canvas */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-tag {
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.2);
    color: var(--accent-1);
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 6px 16px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 24px;
    min-height: 2.7rem; /* Prevents layout shifting during typing */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1.8rem;
    background-color: var(--accent-1);
    animation: blinkCursor 0.8s step-end infinite;
}

@keyframes blinkCursor {
    from, to { background-color: transparent }
    50% { background-color: var(--accent-1) }
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.hero-socials {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 50px;
}

.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-fast);
}

.social-icon:hover {
    border-color: var(--accent-1);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
    color: var(--accent-1);
}

.social-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 60px;
    align-items: center;
}

.about-img-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.about-img-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    background: var(--accent-gradient);
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.15;
    z-index: 0;
    animation: pulse 6s infinite alternate;
}

/* Rotating Tech Ring around Profile Image */
.about-img-ring {
    position: absolute;
    width: 310px;
    height: 310px;
    border: 2px dashed rgba(0, 242, 254, 0.4);
    border-radius: 50%;
    animation: rotateRing 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

[data-theme="light"] .about-img-ring {
    border-color: rgba(14, 165, 233, 0.3);
}

@keyframes rotateRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.about-img-card {
    position: relative;
    z-index: 1;
    border-radius: 50%;
    padding: 10px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    box-shadow: 0 20px 40px var(--glass-shadow);
}

.about-img-card img {
    border-radius: 50%;
    width: 280px;
    height: 280px;
    object-fit: cover;
}

.about-info-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.about-info-item {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    padding: 16px 20px;
    transition: all var(--transition-fast);
}

.about-info-item:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    border-color: rgba(0, 242, 254, 0.2);
}

.about-info-item strong {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 4px;
}

.about-info-item span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Skills Layout */
.skills-container {
    margin-top: 40px;
}

.skills-title {
    font-size: 1.3rem;
    margin-bottom: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skills-title::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: var(--glass-border);
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 600;
}

.skill-name {
    color: var(--text-primary);
}

.skill-percent {
    color: var(--accent-1);
}

.skill-bar-bg {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.skill-bar-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    width: 0; /* Animated dynamically in JS */
    transition: width 1.5s cubic-bezier(0.1, 1, 0.1, 1);
}

/* Services / Expertise Cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-card {
    border-radius: var(--border-radius-lg);
    padding: 40px;
    transition: opacity var(--transition-normal), border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-normal), transform var(--transition-normal);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transform: perspective(1000px) translateY(0);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 100% 0%, var(--card-glow) 0%, transparent 70%);
    z-index: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(350px circle at var(--mouse-x, 0px) var(--mouse-y, 0px), rgba(0, 242, 254, 0.08), transparent 80%);
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: 1;
    pointer-events: none;
}

.service-card:hover::after {
    opacity: 1;
}

.service-card:hover {
    border-color: rgba(0, 242, 254, 0.25);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.service-card:active {
    transform: scale(0.98) !important;
}

.service-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-md);
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.15);
    color: var(--accent-1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
    transition: all var(--transition-fast);
}

.service-card:hover .service-icon {
    background: var(--accent-gradient);
    color: #fff;
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.service-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-title {
    font-size: 1.4rem;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.service-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* Experience Section Timeline */
.experience-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent-1), var(--accent-3), transparent);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 60px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 4px solid var(--accent-1);
    box-shadow: 0 0 10px var(--accent-1);
    transition: all var(--transition-fast);
    z-index: 2;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.2);
    border-color: #fff;
    box-shadow: 0 0 15px var(--accent-1);
}

.timeline-content-card {
    border-radius: var(--border-radius-md);
    padding: 30px;
    transition: transform var(--transition-normal), border-color var(--transition-fast), box-shadow var(--transition-normal);
}

.timeline-content-card:hover {
    border-color: rgba(127, 0, 255, 0.2);
}

.timeline-content-card:active {
    transform: scale(0.98) !important;
}

@media (hover: hover) and (pointer: fine) {
    .timeline-content-card:hover {
        transform: translateX(5px);
    }
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.timeline-role {
    font-size: 1.25rem;
    font-weight: 700;
}

.timeline-company {
    font-size: 0.95rem;
    color: var(--accent-2);
    font-weight: 500;
    margin-top: 2px;
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Education Grid */
.education-wrapper {
    margin-top: 100px;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
}

.education-card {
    border-radius: var(--border-radius-md);
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-normal);
}

.education-card:hover {
    border-color: rgba(0, 242, 254, 0.2);
}

.education-card:active {
    transform: scale(0.98) !important;
}

@media (hover: hover) and (pointer: fine) {
    .education-card:hover {
        transform: translateY(-5px);
    }
}

.edu-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.15);
    color: var(--accent-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.edu-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.edu-title {
    font-size: 1.15rem;
    font-weight: 700;
}

.edu-org {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: -10px;
}

.edu-date {
    font-size: 0.85rem;
    color: var(--accent-1);
    font-weight: 600;
    margin-top: auto;
}

/* Projects Grid */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--accent-1);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
}

.project-card {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: opacity var(--transition-normal), border-color var(--transition-fast), transform var(--transition-normal);
    opacity: 1;
    transform: scale(1);
}

.project-card:active {
    transform: scale(0.98) !important;
}

.project-card.hide {
    display: none;
}

.project-media {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(8, 11, 17, 0.95) 10%, rgba(8, 11, 17, 0.4) 100%);
    opacity: 0;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    transition: opacity var(--transition-fast);
    z-index: 1;
}

.project-card:hover .project-media img {
    transform: scale(1.08);
}

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

.project-meta-on-hover {
    color: #fff;
}

.project-tags-hover {
    font-size: 0.8rem;
    color: var(--accent-1);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    display: block;
}

.project-title-hover {
    font-size: 1.25rem;
    font-weight: 700;
}

.project-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-tag {
    font-size: 0.75rem;
    background: var(--bg-tertiary);
    color: var(--accent-2);
    border: 1px solid var(--glass-border);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 700;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.project-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    cursor: pointer;
}

.project-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: transform var(--transition-fast);
}

.project-link:hover svg {
    transform: translateX(4px);
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.contact-info-card {
    border-radius: var(--border-radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-card-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--border-radius-sm);
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.15);
    color: var(--accent-1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-card-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-card-details h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.contact-card-details p, .contact-card-details a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.contact-card-details a:hover {
    color: var(--accent-1);
}

/* Form Styling */
.contact-form-card {
    border-radius: var(--border-radius-lg);
    padding: 40px;
}

.form-group {
    position: relative;
    margin-bottom: 28px;
}

.form-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    padding: 16px 20px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-1);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
    background: var(--bg-secondary);
}

.form-label {
    position: absolute;
    left: 20px;
    top: 16px;
    color: var(--text-muted);
    font-size: 0.95rem;
    pointer-events: none;
    transition: all var(--transition-fast);
}

/* Focus and active classes for labels */
.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
    top: -10px;
    left: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-1);
    background: var(--bg-secondary);
    padding: 0 8px;
    border-radius: 4px;
}

/* Footer Section */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 40px 0;
    background: var(--bg-secondary);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-social-link {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.footer-social-link:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    transform: translateY(-2px);
}

.footer-social-link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 11, 17, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 100%;
    max-width: 650px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    position: relative;
    height: 240px;
}

.modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(8, 11, 17, 0.7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-fast);
}

.modal-close-btn:hover {
    background: #fff;
    color: #000;
}

.modal-close-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.modal-body {
    padding: 32px;
}

.modal-meta {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-1);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
}

.modal-title {
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.modal-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
}

.modal-tech {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Toast Message */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    border-radius: var(--border-radius-md);
    padding: 16px 24px;
    z-index: 3000;
    transform: translateY(100px);
    opacity: 0;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    border-left: 4px solid var(--accent-1);
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.15; }
    100% { transform: scale(1.08); opacity: 0.25; }
}

/* Reveal classes for scroll animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-title {
        font-size: 3.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    header {
        height: 70px;
    }

    .nav-cv-btn {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(300px, 80vw);
        height: 100vh;
        background: var(--bg-secondary);
        border-left: 1px solid var(--glass-border);
        flex-direction: column;
        justify-content: space-between;
        align-items: flex-start;
        padding: 85px 28px 35px;
        box-shadow: -15px 0 40px rgba(0,0,0,0.35);
        transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 999;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        width: 100%;
    }

    .nav-menu ul .nav-link {
        font-size: 1.1rem;
        padding: 8px 12px;
        width: 100%;
        display: block;
    }

    .mobile-nav-footer {
        display: block;
        width: 100%;
        padding-top: 20px;
        border-top: 1px solid var(--glass-border);
    }

    .mobile-cv-btn {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    /* Hamburger Active State */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -7px);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .timeline-date {
        margin-top: 4px;
    }
}

/* ═══════════════════════════════════════════════════════════
   SCROLL REVEAL — Unique animation per element type
   ═══════════════════════════════════════════════════════════ */

/* ── Default visibility safeguard (prevents content disappearing) ── */
.section-title-wrapper,
.service-card,
.project-card,
.timeline-item,
.education-card,
.contact-info-card,
.about-content-col,
.skill-item {
    opacity: 1;
    transform: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

/* ── Keyframes library ── */

/* 1. Rise: cards drift up from below (Services) */
@keyframes riseUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* 2. SwingLeft: timeline items swing in from left with slight rotate */
@keyframes swingLeft {
    from { opacity: 0; transform: translateX(-48px) rotate(-4deg); }
    60%  {             transform: translateX(6px)   rotate(1deg);  }
    to   { opacity: 1; transform: translateX(0)     rotate(0deg);  }
}

/* 3. PopScale: project cards scale-pop in from small */
@keyframes popScale {
    from { opacity: 0; transform: scale(0.82) translateY(20px); }
    65%  {             transform: scale(1.04) translateY(-4px);  }
    to   { opacity: 1; transform: scale(1)    translateY(0);     }
}

/* 4. FlipUp: education cards flip on X axis */
@keyframes flipUp {
    from { opacity: 0; transform: perspective(600px) rotateX(30deg) translateY(30px); }
    to   { opacity: 1; transform: perspective(600px) rotateX(0deg)  translateY(0);    }
}

/* 5. SlideRight: contact cards arrive from the right */
@keyframes slideRight {
    from { opacity: 0; transform: translateX(50px); }
    to   { opacity: 1; transform: translateX(0);    }
}

/* 6. ClipReveal: section title wipes in via clip-path */
@keyframes clipReveal {
    from { opacity: 0; clip-path: inset(0 100% 0 0); }
    to   { opacity: 1; clip-path: inset(0 0% 0 0);   }
}

/* 7. SplitLeft / SplitRight: about section columns split apart */
@keyframes splitFromLeft {
    from { opacity: 0; transform: translateX(-60px); }
    to   { opacity: 1; transform: translateX(0);     }
}
@keyframes splitFromRight {
    from { opacity: 0; transform: translateX(60px); }
    to   { opacity: 1; transform: translateX(0);    }
}

/* 8. RailIn: skill bars fly in from left edge */
@keyframes railIn {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0);     }
}

/* ── Section Title: clip wipe ── */
#services.active   .section-title-wrapper,
#resume.active     .section-title-wrapper,
#portfolio.active  .section-title-wrapper,
#contact.active    .section-title-wrapper,
#about.active      .section-title-wrapper,
#education.active  .section-title-wrapper {
    animation: clipReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ── Service cards: stagger riseUp ── */
#services.active .service-card {
    animation: riseUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
#services.active .service-card:nth-child(1) { animation-delay: 0.05s; }
#services.active .service-card:nth-child(2) { animation-delay: 0.12s; }
#services.active .service-card:nth-child(3) { animation-delay: 0.19s; }
#services.active .service-card:nth-child(4) { animation-delay: 0.26s; }
#services.active .service-card:nth-child(5) { animation-delay: 0.33s; }
#services.active .service-card:nth-child(6) { animation-delay: 0.40s; }

/* ── Timeline items: stagger swingLeft ── */
#resume.active .timeline-item {
    animation: swingLeft 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
#resume.active .timeline-item:nth-child(1) { animation-delay: 0.05s; }
#resume.active .timeline-item:nth-child(2) { animation-delay: 0.15s; }
#resume.active .timeline-item:nth-child(3) { animation-delay: 0.25s; }
#resume.active .timeline-item:nth-child(4) { animation-delay: 0.35s; }
#resume.active .timeline-item:nth-child(5) { animation-delay: 0.45s; }

/* ── Project cards: stagger popScale ── */
#portfolio.active .project-card {
    animation: popScale 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
#portfolio.active .project-card:nth-child(1) { animation-delay: 0.04s; }
#portfolio.active .project-card:nth-child(2) { animation-delay: 0.13s; }
#portfolio.active .project-card:nth-child(3) { animation-delay: 0.22s; }
#portfolio.active .project-card:nth-child(4) { animation-delay: 0.31s; }

/* ── Education cards: stagger flipUp ── */
#education.active .education-card {
    animation: flipUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}
#education.active .education-card:nth-child(1) { animation-delay: 0.05s; }
#education.active .education-card:nth-child(2) { animation-delay: 0.14s; }
#education.active .education-card:nth-child(3) { animation-delay: 0.23s; }
#education.active .education-card:nth-child(4) { animation-delay: 0.32s; }

/* ── Contact cards: stagger slideRight ── */
#contact.active .contact-info-card {
    animation: slideRight 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
#contact.active .contact-info-card:nth-child(1) { animation-delay: 0.06s; }
#contact.active .contact-info-card:nth-child(2) { animation-delay: 0.14s; }
#contact.active .contact-info-card:nth-child(3) { animation-delay: 0.22s; }

/* ── About section: image splits from left, text from right ── */
#about.active .about-content-col:first-child {
    animation: splitFromLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}
#about.active .about-content-col:last-child {
    animation: splitFromRight 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

/* ── Skill bars: stagger railIn ── */
#about.active .skill-item {
    animation: railIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
#about.active .skill-item:nth-child(1) { animation-delay: 0.20s; }
#about.active .skill-item:nth-child(2) { animation-delay: 0.26s; }
#about.active .skill-item:nth-child(3) { animation-delay: 0.32s; }
#about.active .skill-item:nth-child(4) { animation-delay: 0.38s; }
#about.active .skill-item:nth-child(5) { animation-delay: 0.44s; }
#about.active .skill-item:nth-child(6) { animation-delay: 0.50s; }
#about.active .skill-item:nth-child(7) { animation-delay: 0.56s; }

/* ── Accessibility prefers-reduced-motion overrides ── */
@media (prefers-reduced-motion: reduce) {
    .section-title-wrapper,
    .service-card, .project-card, .timeline-item,
    .education-card, .contact-info-card,
    .about-content-col, .skill-item,
    .skill-bar-fill, .theme-toggle svg, .about-img-ring {
        animation: none !important;
        transition: opacity 0.1s linear !important;
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
    }
}

/* Blueprint Corner Crosshairs (Inspired by runrobrun.com) */
.hero-cross {
    position: absolute;
    width: 14px;
    height: 14px;
    color: var(--accent-1);
    opacity: 0.3;
    z-index: 10;
}
.hero-cross::before, .hero-cross::after {
    content: '';
    position: absolute;
    background: currentColor;
}
.hero-cross::before {
    top: 6px;
    left: 0;
    width: 14px;
    height: 2px;
}
.hero-cross::after {
    top: 0;
    left: 6px;
    width: 2px;
    height: 14px;
}
.hero-cross-tl { top: 40px; left: 40px; }
.hero-cross-tr { top: 40px; right: 40px; }
.hero-cross-bl { bottom: 40px; left: 40px; }
.hero-cross-br { bottom: 40px; right: 40px; }

/* Generative Ambient Sound Widget (Inspired by runrobrun.com) */
.sound-toggle-widget {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.sound-toggle-widget:hover {
    color: var(--accent-1);
    border-color: rgba(0, 242, 254, 0.25);
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.12);
}

.sound-toggle-widget:active {
    transform: scale(0.95);
}

.sound-wave {
    display: flex;
    align-items: flex-end;
    gap: 2.5px;
    height: 12px;
    width: 14px;
}

.sound-wave-bar {
    width: 2px;
    height: 100%;
    background-color: currentColor;
    border-radius: 1px;
    transform-origin: bottom;
    transition: transform 0.3s ease;
}

.sound-toggle-widget.playing .sound-wave-bar:nth-child(1) { animation: bounceBar 0.8s ease-in-out infinite alternate; }
.sound-toggle-widget.playing .sound-wave-bar:nth-child(2) { animation: bounceBar 0.5s ease-in-out infinite alternate 0.2s; }
.sound-toggle-widget.playing .sound-wave-bar:nth-child(3) { animation: bounceBar 0.7s ease-in-out infinite alternate 0.1s; }

@keyframes bounceBar {
    0% { transform: scaleY(0.2); }
    100% { transform: scaleY(1); }
}

/* ─── Vertical Bar Wipe Transition (Redesigned) ─────────────────── */
.pixel-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    pointer-events: none;
    display: none;
    overflow: hidden;
}

.pixel-transition-overlay.active {
    display: block;
    pointer-events: all;
}

.pixel-grid {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 0;
}

/* Each column is a full-height vertical bar */
.pixel-cell {
    flex: 1;
    height: 100%;
    background: linear-gradient(180deg, var(--bg-primary) 0%, #0d1117 100%);
    transform: scaleY(0);
    transform-origin: top center;
    transition: transform 0.32s cubic-bezier(0.76, 0, 0.24, 1);
    will-change: transform;
}

/* Retract from bottom */
.pixel-cell.retracting {
    transform-origin: bottom center;
    transform: scaleY(0);
    transition: transform 0.28s cubic-bezier(0.76, 0, 0.24, 1);
}

.pixel-cell.filled {
    transform: scaleY(1);
    transform-origin: top center;
}

/* Accent stripe on each bar — thin neon line on the leading edge */
.pixel-cell::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    opacity: 0.8;
}

.pixel-cell {
    position: relative;
}

/* Global Theme Transition (Smooth fade on toggle) */
.theme-transitioning,
.theme-transitioning * {
    transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease !important;
}

/* ═══════════════════════════════════════════════════════════
   CELESTIAL THEME TRANSITIONS (Sunburst & Lunar Eclipse)
   ═══════════════════════════════════════════════════════════ */

.theme-celestial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.theme-celestial-overlay.active {
    opacity: 1;
}

/* ── 1. Solar Flare (When Sun shines through) ── */
.solar-flare {
    position: absolute;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
    will-change: transform, opacity;
}

.solar-core {
    width: 260vmax;
    height: 260vmax;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(254, 240, 138, 0.90) 12%,
        rgba(251, 191, 36, 0.75) 30%,
        rgba(245, 158, 11, 0.45) 50%,
        rgba(217, 119, 6, 0.18) 70%,
        transparent 100%
    );
    filter: blur(8px);
    animation: solarCoreExpand 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.solar-rays {
    width: 220vmax;
    height: 220vmax;
    background: conic-gradient(
        from 0deg,
        rgba(255, 245, 160, 0.5) 0deg,
        transparent 18deg,
        rgba(251, 191, 36, 0.6) 45deg,
        transparent 65deg,
        rgba(255, 255, 200, 0.7) 90deg,
        transparent 110deg,
        rgba(251, 191, 36, 0.6) 135deg,
        transparent 160deg,
        rgba(255, 245, 160, 0.5) 180deg,
        transparent 205deg,
        rgba(251, 191, 36, 0.6) 225deg,
        transparent 250deg,
        rgba(255, 255, 200, 0.7) 270deg,
        transparent 295deg,
        rgba(251, 191, 36, 0.5) 315deg,
        transparent 340deg,
        rgba(255, 245, 160, 0.5) 360deg
    );
    border-radius: 50%;
    animation: solarRaysSpin 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    mix-blend-mode: screen;
}

@keyframes solarCoreExpand {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.95;
    }
    45% {
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

@keyframes solarRaysSpin {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0.9;
    }
    50% {
        transform: translate(-50%, -50%) scale(0.85) rotate(45deg);
        opacity: 0.75;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.15) rotate(90deg);
        opacity: 0;
    }
}

/* ── 2. Lunar Eclipse Shadow (When Moon ushers in) ── */
.lunar-shadow {
    position: absolute;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
    will-change: transform, opacity;
}

.lunar-core {
    width: 260vmax;
    height: 260vmax;
    background: radial-gradient(
        circle,
        rgba(10, 15, 30, 0.98) 0%,
        rgba(13, 27, 62, 0.94) 25%,
        rgba(30, 41, 59, 0.80) 50%,
        rgba(0, 242, 254, 0.40) 70%,
        rgba(79, 172, 254, 0.15) 85%,
        transparent 100%
    );
    animation: lunarCoreExpand 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.lunar-halo {
    width: 200vmax;
    height: 200vmax;
    border-radius: 50%;
    border: 3px solid rgba(0, 242, 254, 0.7);
    box-shadow: 0 0 70px 25px rgba(0, 242, 254, 0.45), inset 0 0 50px 15px rgba(79, 172, 254, 0.35);
    animation: lunarHaloExpand 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lunarCoreExpand {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.98;
    }
    50% {
        opacity: 0.90;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

@keyframes lunarHaloExpand {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.18);
        opacity: 0;
    }
}

/* Atmospheric Sunbeams in Hero for Light Mode */
[data-theme="light"] #hero::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 700px;
    height: 700px;
    background: radial-gradient(
        circle,
        rgba(251, 191, 36, 0.22) 0%,
        rgba(245, 158, 11, 0.10) 45%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    filter: blur(40px);
    transition: opacity 0.5s ease;
}

/* Atmospheric Moonlight in Hero for Dark Mode */
[data-theme="dark"] #hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 650px;
    height: 650px;
    background: radial-gradient(
        circle,
        rgba(0, 242, 254, 0.12) 0%,
        rgba(79, 172, 254, 0.05) 50%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    filter: blur(50px);
    transition: opacity 0.5s ease;
}


