/* ========================================
   Elena Matyushenko - Portfolio
   Design System: Dark + Orange/Ginger Accent
   ======================================== */

:root {
    --bg: #0a0a0b;
    --bg-rgb: 10, 10, 11;
    --bg-card: #111113;
    --bg-card-rgb: 17, 17, 19;
    --bg-card-hover: #1a1a1d;
    --text: #ffffff;
    --text-muted: #b0aca5;
    --text-warm: #e8e4dd;
    --accent: #e8722a;
    --accent-light: #f59e4c;
    --accent-rgb: 232, 114, 42;
    --accent-glow: rgba(232, 114, 42, 0.3);
    --accent-gradient: linear-gradient(135deg, #e8722a, #f5a623, #e8722a);
    --accent-title-gradient: linear-gradient(135deg, #ff6a00, #f5a623, #ffe0b2, #f5a623, #e8722a, #ff8c42);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(232, 114, 42, 0.3);
    --canvas-filter: sepia(0.7) saturate(2.5) hue-rotate(-5deg) brightness(0.85);
    --canvas-opacity: 0.3;
    --font-main: 'Inter', -apple-system, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --radius: 16px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* REMOVED: Theme blocks (Ocean, Cosmos, Forest, Mono) moved to separate pages */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg);
    background:
        radial-gradient(ellipse at 20% 0%, rgba(var(--accent-rgb), 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(var(--accent-rgb), 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(var(--accent-rgb), 0.03) 0%, transparent 70%),
        var(--bg);
}

body {
    font-family: var(--font-main);
    background: transparent;
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

::selection {
    background: var(--accent);
    color: var(--bg);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* REMOVED: Custom Cursor - user requested removal */
.cursor, .cursor-follower { display: none; }

/* ========== Canvas Background ========== */
#fluid-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    opacity: var(--canvas-opacity);
    filter: var(--canvas-filter);
    pointer-events: auto;
}

/* ========== Theme Switcher ========== */
.theme-switcher {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 4px 8px;
    border-radius: 100px;
    background: rgba(var(--bg-card-rgb), 0.4);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.theme-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-dot .dot-inner {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
    transition: transform 0.3s ease;
}

.theme-dot:hover .dot-inner {
    transform: scale(1.2);
}

.theme-dot.active {
    border-color: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

.theme-dot.active .dot-inner {
    transform: scale(1.15);
}

/* ========== Navigation ========== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    background: rgba(var(--bg-rgb), 0.6);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    transform: translateY(-100%);
    animation: slideDown 0.8s 0.5s forwards;
}

@keyframes slideDown {
    to { transform: translateY(0); }
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
    text-shadow: 0 0 20px var(--accent-glow);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent);
    transition: width var(--transition);
}

.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }

/* ========== Hero Section ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 6rem 2.5rem 4rem;
}

.hero-content {
    max-width: 900px;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    border: 1px solid var(--accent);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeUp 0.8s 0.8s forwards;
    box-shadow: 0 0 15px var(--accent-glow), inset 0 0 15px rgba(var(--accent-rgb), 0.05);
    text-shadow: 0 0 10px var(--accent-glow);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero-title .line {
    display: block;
    opacity: 0;
    animation: fadeUp 0.8s forwards;
}

.hero-title .line:nth-child(1) { animation-delay: 1s; }
.hero-title .line:nth-child(2) { animation-delay: 1.2s; }

.hero-title .accent {
    background: var(--accent-title-gradient);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    animation: fadeUp 0.8s 1.2s forwards, accentShift 10s 2.5s ease-in-out infinite;
    text-shadow: none;
    filter: drop-shadow(0 0 12px rgba(var(--accent-rgb), 0.15));
}

@keyframes accentShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 3rem;
    line-height: 1.7;
    opacity: 0;
    animation: fadeUp 0.8s 1.4s forwards;
}

/* Stats */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeUp 0.8s 1.6s forwards;
}

.stat {
    text-align: center;
    padding: 1.2rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(var(--bg-card-rgb), 0.6);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat:hover {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.08);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--accent-glow), 0 0 15px rgba(var(--accent-rgb), 0.1);
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent);
    display: inline;
    text-shadow: 0 0 20px var(--accent-glow);
}

.stat-suffix {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--accent-light);
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.3rem;
}

/* CTA Buttons */
.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    opacity: 0;
    animation: fadeUp 0.8s 1.8s forwards;
}

.btn {
    padding: 0.9rem 2rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    border: 1px solid var(--accent);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    transform: translateY(-3px);
    box-shadow: 0 10px 40px var(--accent-glow), 0 0 20px rgba(var(--accent-rgb), 0.2);
}

.btn-outline {
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent-light);
    border: 1px solid rgba(var(--accent-rgb), 0.4);
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.1);
    animation: btnPulse 2.5s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.25), transparent);
    animation: btnShine 3s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% {
        box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.1), 0 0 0 0 rgba(var(--accent-rgb), 0.15);
    }
    50% {
        box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.25), 0 0 40px rgba(var(--accent-rgb), 0.1);
    }
}

@keyframes btnShine {
    0% { left: -100%; }
    60% { left: 200%; }
    100% { left: 200%; }
}

.btn-outline:hover {
    background: rgba(var(--accent-rgb), 0.18);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 40px var(--accent-glow), 0 0 30px rgba(var(--accent-rgb), 0.3);
    text-shadow: 0 0 10px var(--accent-glow);
    animation: none;
}

.btn-outline:hover::before {
    animation: none;
    opacity: 0;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeUp 0.8s 2.2s forwards;
}

.scroll-line {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s infinite;
    box-shadow: 0 0 8px var(--accent-glow);
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.scroll-indicator span {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== Sections ========== */
.section {
    position: relative;
    z-index: 2;
    padding: 7rem 2.5rem;
}

.section-dark {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

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

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 3.5rem;
    text-align: center;
    position: relative;
}

.section-title {
    text-shadow: 0 0 30px rgba(var(--accent-rgb), 0.15);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 1rem auto 0;
    border-radius: 2px;
    box-shadow: 0 0 15px var(--accent-glow);
}

/* ========== About ========== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text {
    opacity: 0;
    transform: translateX(-30px);
}

.about-text.visible {
    animation: slideInLeft 0.8s forwards;
}

@keyframes slideInLeft {
    to { opacity: 1; transform: translateX(0); }
}

.about-lead {
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-warm);
}

.about-text p {
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-warm);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.about-text strong {
    font-family: var(--font-main);
    color: var(--accent-light);
    font-weight: 600;
}

.about-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.highlight-card {
    padding: 1.5rem;
    border: 1px solid rgba(var(--accent-rgb), 0.15);
    border-radius: var(--radius);
    background: rgba(var(--bg-card-rgb), 0.7);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px);
    box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.06);
}

.highlight-card.visible {
    animation: fadeUp 0.6s forwards;
}

.highlight-card:nth-child(1).visible { animation-delay: 0.1s; }
.highlight-card:nth-child(2).visible { animation-delay: 0.2s; }
.highlight-card:nth-child(3).visible { animation-delay: 0.3s; }
.highlight-card:nth-child(4).visible { animation-delay: 0.4s; }

.highlight-card:hover {
    border-color: rgba(var(--accent-rgb), 0.25);
    background: rgba(var(--accent-rgb), 0.04);
}

.highlight-icon {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 0.8rem;
}

.highlight-card h3 {
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #ffffff;
}

.highlight-card p {
    font-family: var(--font-main);
    font-size: 0.85rem;
    color: var(--text-warm);
    line-height: 1.5;
}

/* ========== Skills ========== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.skill-category {
    padding: 2rem;
    border: 1px solid rgba(var(--accent-rgb), 0.15);
    border-radius: var(--radius);
    background: rgba(var(--bg-card-rgb), 0.7);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px);
    box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.08);
}

.skill-category.visible {
    animation: fadeUp 0.6s forwards;
}

.skill-category:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 16px 50px rgba(var(--accent-rgb), 0.25), 0 0 30px rgba(var(--accent-rgb), 0.12), inset 0 1px 0 rgba(var(--accent-rgb), 0.3);
    background: rgba(var(--accent-rgb), 0.08);
}

.skill-cat-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    color: var(--accent);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    font-size: 0.82rem;
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--text-warm);
    border: 1px solid rgba(var(--accent-rgb), 0.18);
    transition: all var(--transition);
}

.tag:hover {
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent-light);
    border-color: rgba(var(--accent-rgb), 0.4);
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.15);
    text-shadow: 0 0 8px rgba(var(--accent-rgb), 0.3);
}

/* ========== Projects ========== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.project-card {
    padding: 2.2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(var(--bg-card-rgb), 0.7);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
}

.project-card.visible {
    animation: fadeUp 0.6s forwards;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition);
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 16px 50px var(--accent-glow), 0 0 20px rgba(var(--accent-rgb), 0.08);
}

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

.project-featured {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(var(--bg-card-rgb), 0.8), rgba(var(--accent-rgb), 0.06));
}

.project-badge {
    display: inline-block;
    padding: 0.25rem 0.8rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--accent);
    margin-bottom: 1rem;
}

.project-name {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.project-tagline {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-warm);
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

.project-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.project-metrics span {
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.project-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    transition: color var(--transition);
}

.project-link:hover {
    color: var(--accent-light);
    text-shadow: 0 0 10px var(--accent-glow);
}

/* ========== Gallery ========== */
.gallery-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-top: -2rem;
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.45rem 1.2rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font-main);
    white-space: nowrap;
}

.filter-btn:hover {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent-light);
    border-color: rgba(var(--accent-rgb), 0.3);
}

.filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 2px 12px var(--accent-glow);
}

.gallery-grid {
    columns: 4 260px;
    column-gap: 12px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: var(--bg-card);
    break-inside: avoid;
    margin-bottom: 12px;
}

.gallery-item:hover {
    border-color: rgba(var(--accent-rgb), 0.4);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(var(--accent-rgb), 0.1);
    transform: translateY(-3px) scale(1.02);
    z-index: 2;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1rem 0.8rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    opacity: 0;
    transition: opacity 0.35s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-tag {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(var(--accent-rgb), 0.85);
    color: #fff;
    margin-bottom: 0.3rem;
    backdrop-filter: blur(4px);
}

.gallery-overlay p {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
}

.gallery-item.hidden {
    display: none;
}

/* REMOVED: old gallery special sizes — now uniform grid */

/* ========== Lightbox ========== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s;
    backdrop-filter: blur(20px);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 85vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.4s;
}

.lightbox.active img {
    transform: scale(1);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font-main);
}

.lightbox-close {
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.lightbox-info {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========== Contact ========== */
.contact-subtitle {
    text-align: center;
    color: var(--text-muted);
    max-width: 600px;
    margin: -2rem auto 3rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.2rem;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(var(--bg-card-rgb), 0.7);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 12px 40px var(--accent-glow), 0 0 20px rgba(var(--accent-rgb), 0.1);
}

.contact-icon {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    color: var(--accent);
    text-shadow: 0 0 15px var(--accent-glow);
    transition: all 0.3s;
}

.contact-card:hover .contact-icon {
    text-shadow: 0 0 25px var(--accent-glow), 0 0 40px rgba(var(--accent-rgb), 0.2);
    transform: scale(1.1);
}

.contact-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.contact-value {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}

/* ========== Footer ========== */
.footer {
    position: relative;
    z-index: 2;
    padding: 2rem;
    text-align: center;
    border-top: 1px solid rgba(var(--accent-rgb), 0.15);
    color: var(--text-muted);
    font-size: 0.82rem;
    box-shadow: 0 -1px 15px rgba(var(--accent-rgb), 0.05);
}

/* ========== Scroll Reveal Animation ========== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ========== Animated Glow Border ========== */
.glow-border {
    position: relative;
}

.glow-border::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, transparent, rgba(var(--accent-rgb),0.3), transparent, rgba(var(--accent-rgb),0.3), transparent);
    background-size: 300% 300%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s;
    animation: borderGlow 4s ease infinite;
}

.glow-border:hover::before {
    opacity: 1;
}

@keyframes borderGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ========== Live Status Dot ========== */
.project-status-dot {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 10px;
    height: 10px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
}

/* ========== Badge Colors ========== */
.badge-live {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.badge-oss {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.badge-civitai {
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent-light);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
}

/* Project card as link */
a.project-card {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.project-card:hover .project-link {
    color: #fff;
    transform: translateX(6px);
}

.project-link {
    display: inline-block;
    transition: all 0.3s;
}

/* ========== Gallery Enhanced ========== */
.gallery-item img {
    transition: transform 0.5s cubic-bezier(0.4,0,0.2,1), filter 0.4s;
}

.gallery-item:hover img {
    transform: scale(1.08);
    filter: brightness(1.05) contrast(1.03);
}

/* ========== Contact Card Animations ========== */
.contact-card {
    position: relative;
    overflow: hidden;
}

.contact-card::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    background: radial-gradient(circle, rgba(var(--accent-rgb),0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.contact-card:hover::after {
    width: 300px;
    height: 300px;
}

.contact-card:hover .contact-icon {
    animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(1.3); }
    60% { transform: scale(0.95); }
}

/* ========== Highlight Icon Float ========== */
.highlight-icon {
    display: inline-block;
    animation: iconFloat 3s ease-in-out infinite;
}

.highlight-card:nth-child(1) .highlight-icon { animation-delay: 0s; }
.highlight-card:nth-child(2) .highlight-icon { animation-delay: 0.5s; }
.highlight-card:nth-child(3) .highlight-icon { animation-delay: 1s; }
.highlight-card:nth-child(4) .highlight-icon { animation-delay: 1.5s; }

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ========== Nav link glow on hover ========== */
.nav-links a:hover {
    text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.4);
}

/* ========== Stat counter glow pulse ========== */
.stat:hover .stat-number {
    animation: numberGlow 0.8s ease;
}

@keyframes numberGlow {
    0%, 100% { text-shadow: 0 0 20px var(--accent-glow); }
    50% { text-shadow: 0 0 40px rgba(var(--accent-rgb),0.6), 0 0 80px rgba(var(--accent-rgb),0.3); }
}

/* ========== Section title shimmer ========== */
.section-title {
    position: relative;
    overflow: hidden;
}

.section-title::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb),0.08), transparent);
    animation: shimmer 6s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* ========== Premium Effects ========== */

/* Multi-layer shadows on cards */
.highlight-card,
.skill-category,
.project-card,
.contact-card {
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.08),
        0 4px 8px rgba(0, 0, 0, 0.06),
        0 12px 24px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        inset 0 -1px 0 rgba(0, 0, 0, 0.06);
}

/* Enhanced hover depth */
.highlight-card:hover,
.skill-category:hover,
.project-card:hover,
.contact-card:hover {
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Glass shimmer sweep on hover */
.highlight-card,
.skill-category,
.project-card,
.contact-card,
.stat {
    position: relative;
    overflow: hidden;
}

.highlight-card::after,
.skill-category::after,
.project-card::after,
.stat::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
    transition: left 0.7s ease;
    pointer-events: none;
    z-index: 1;
}

.highlight-card:hover::after,
.skill-category:hover::after,
.project-card:hover::after,
.stat:hover::after {
    left: 200%;
}

/* Ambient floating orbs behind sections */
.section:nth-of-type(odd)::before {
    content: '';
    position: absolute;
    top: 15%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: ambientFloat 15s ease-in-out infinite;
    z-index: -1;
}

.section:nth-of-type(even)::before {
    content: '';
    position: absolute;
    top: 20%;
    left: -10%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.03) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: ambientFloat 18s ease-in-out infinite reverse;
    z-index: -1;
}

@keyframes ambientFloat {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(20px, -15px); }
    66% { transform: translate(-15px, 10px); }
}

/* Vignette on gallery images */
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 1;
}

/* ========== Mobile Nav Toggle ==========
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 110;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========== Responsive ========== */

/* Tablet landscape */
@media (max-width: 1024px) {
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { columns: 3; column-gap: 10px; }
    .contact-links { grid-template-columns: repeat(3, 1fr); }
    .projects-grid { gap: 1.2rem; }
}

/* Tablet portrait */
@media (max-width: 768px) {
    /* Nav — hamburger menu */
    .nav { padding: 1rem 1.5rem; }
    .nav-toggle { display: flex; }
    .theme-switcher { gap: 4px; padding: 3px 6px; }
    .theme-dot { width: 18px; height: 18px; }
    .theme-dot .dot-inner { width: 10px; height: 10px; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(var(--bg-rgb), 0.97);
        backdrop-filter: blur(30px);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 0;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid var(--border);
        z-index: 105;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border);
        letter-spacing: 0.08em;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    /* Hero */
    .hero { padding: 5rem 1.5rem 3rem; min-height: 100svh; }
    .hero-content { max-width: 100%; }
    .hero-subtitle { font-size: 1rem; margin: 0 auto 2rem; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    .stat { padding: 1rem 0.4rem; }
    .stat-number { font-size: 1.8rem; }
    .stat-suffix { font-size: 1.1rem; }
    .stat-label { font-size: 0.65rem; }
    .hero-cta { flex-direction: column; align-items: center; gap: 0.8rem; }
    .btn { width: 100%; max-width: 280px; text-align: center; padding: 0.85rem 1.5rem; }

    /* Sections */
    .section { padding: 4rem 1.5rem; }
    .section-title { font-size: clamp(1.6rem, 5vw, 2.4rem); margin-bottom: 2.5rem; }

    /* About */
    .about-grid { grid-template-columns: 1fr; gap: 2rem; }
    .about-lead { font-size: 1rem; }
    .about-text p { font-size: 0.92rem; }
    .about-highlights { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
    .highlight-card { padding: 1.2rem; }
    .highlight-card h3 { font-size: 0.9rem; }
    .highlight-card p { font-size: 0.8rem; }

    /* Skills */
    .skills-grid { grid-template-columns: 1fr; gap: 1rem; }
    .skill-category { padding: 1.5rem; }
    .tag { font-size: 0.78rem; padding: 0.25rem 0.7rem; }

    /* Projects */
    .projects-grid { grid-template-columns: 1fr; gap: 1rem; }
    .project-featured { grid-column: span 1; }
    .project-card { padding: 1.5rem; }
    .project-name { font-size: 1.3rem; }
    .project-desc { font-size: 0.85rem; }
    .project-metrics { gap: 0.5rem; }
    .project-metrics span { font-size: 0.7rem; }

    /* Gallery */
    .gallery-grid { columns: 2; column-gap: 8px; }
    .gallery-subtitle { font-size: 0.9rem; margin-top: -1.5rem; }
    .gallery-filters { gap: 0.5rem; margin-bottom: 1.5rem; }
    .filter-btn { padding: 0.4rem 1rem; font-size: 0.75rem; }

    /* Contact */
    .contact-links { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    .contact-subtitle { font-size: 0.92rem; margin: -1.5rem auto 2rem; }
    .contact-card { padding: 1.5rem 0.8rem; }

    /* Lightbox */
    .lightbox img { max-width: 95vw; max-height: 80vh; }
    .lightbox-close { top: 1rem; right: 1rem; width: 40px; height: 40px; }
    .lightbox-prev { left: 0.5rem; width: 40px; height: 40px; font-size: 1.4rem; }
    .lightbox-next { right: 0.5rem; width: 40px; height: 40px; font-size: 1.4rem; }

    /* Scroll indicator */
    .scroll-indicator { bottom: 1rem; }
    .scroll-line { height: 30px; }
}

/* Mobile phones */
@media (max-width: 480px) {
    .hero { padding: 4rem 1rem 2.5rem; }
    .hero-title { font-size: clamp(2.2rem, 11vw, 3.5rem); }
    .hero-badge { font-size: 0.7rem; padding: 0.35rem 1rem; margin-bottom: 1.5rem; }
    .hero-subtitle { font-size: 0.9rem; line-height: 1.6; }
    .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
    .stat { padding: 0.8rem 0.3rem; }
    .stat-number { font-size: 1.5rem; }
    .stat-suffix { font-size: 1rem; }

    .section { padding: 3rem 1rem; }
    .section-title { margin-bottom: 2rem; }

    .about-lead { font-size: 0.95rem; line-height: 1.7; }
    .about-text p { font-size: 0.88rem; }
    .about-highlights { grid-template-columns: 1fr; gap: 0.8rem; }

    .skill-category { padding: 1.2rem; }
    .skill-cat-title { font-size: 0.95rem; margin-bottom: 0.8rem; }
    .tag { font-size: 0.75rem; }

    .project-card { padding: 1.2rem; }
    .project-name { font-size: 1.2rem; }
    .project-tagline { font-size: 0.82rem; }
    .project-desc { font-size: 0.82rem; line-height: 1.6; }

    .gallery-grid { columns: 2; column-gap: 6px; }
    .gallery-item { border-radius: 8px; }
    .gallery-overlay p { font-size: 0.72rem; }
    .gallery-tag { font-size: 0.6rem; }

    .contact-links { grid-template-columns: 1fr; gap: 0.6rem; }
    .contact-card { flex-direction: row; gap: 1rem; padding: 1.2rem 1.5rem; text-align: left; }
    .contact-icon { font-size: 1.5rem; margin-bottom: 0; }
    .contact-label { margin-bottom: 0.1rem; }

    .footer { padding: 1.5rem 1rem; font-size: 0.75rem; }
}

/* Very small screens */
@media (max-width: 360px) {
    .hero-title { font-size: clamp(1.8rem, 10vw, 2.5rem); }
    .hero-stats { grid-template-columns: 1fr 1fr; gap: 0.4rem; }
    .stat-number { font-size: 1.3rem; }
    .stat-label { font-size: 0.6rem; letter-spacing: 0.04em; }
    .btn { font-size: 0.82rem; }
    .gallery-grid { columns: 2; column-gap: 4px; }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
    .hero { min-height: auto; padding: 4rem 2rem 2rem; }
    .hero-stats { grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
    .stat { padding: 0.6rem 0.3rem; }
    .stat-number { font-size: 1.4rem; }
    .hero-cta { flex-direction: row; }
    .btn { width: auto; }
    .scroll-indicator { display: none; }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .gallery-overlay {
        opacity: 1;
        background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.7));
    }

    .gallery-item:hover img {
        transform: none;
        filter: none;
    }

    .gallery-item:hover {
        transform: none;
    }

    .project-card:hover {
        transform: none;
    }

    .contact-card:hover {
        transform: none;
    }

    .stat:hover {
        transform: none;
    }

    .highlight-card:hover {
        transform: none;
    }

    .skill-category:hover {
        transform: none;
    }
}
