/* ==========================================================================
   serg — Personal Site & Visual FX Suite
   Design System: Steam Glassmorphism & Cyber Aesthetics
   ========================================================================== */

:root {
    --bg-primary: #080b12;
    --bg-secondary: #101624;
    --bg-card: rgba(16, 22, 36, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.04);

    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 242, 254, 0.5);

    --accent-cyan: #00f2fe;
    --accent-blue: #4facfe;
    --accent-purple: #7f00ff;
    --accent-pink: #ff007f;
    --accent-green: #00e676;
    --accent-gold: #ffb703;
    
    --text-main: #f0f4f8;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Fira Code', monospace;

    --gradient-primary: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    --gradient-gold: linear-gradient(135deg, #ffe259, #ffa751);

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input {
    font-family: inherit;
}

/* --- Ambient Light & Grid --- */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    z-index: -2;
    opacity: 0.35;
}

.glow-1 { top: -10%; left: 15%; width: 550px; height: 550px; background: radial-gradient(circle, rgba(0, 242, 254, 0.3), transparent); }
.glow-2 { top: 45%; right: -10%; width: 650px; height: 650px; background: radial-gradient(circle, rgba(127, 0, 255, 0.25), transparent); }

.grid-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 36px 36px;
    pointer-events: none;
    z-index: -1;
}

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

.section {
    padding: 80px 0;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(8, 11, 18, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.35rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--text-main);
    display: flex;
    align-items: center;
}

.brand-code { color: var(--accent-cyan); }

.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-cyan);
}

.nav-btn {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: var(--accent-cyan) !important;
}

.nav-btn:hover {
    background: rgba(0, 242, 254, 0.2);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

/* --- Home Minimal Page --- */
.home-minimal-container {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 100px;
}

.minimal-title {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 12px;
}

.minimal-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 500px;
}

.bg-switcher-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 24px;
}

.bg-switcher-btn {
    padding: 6px 14px;
    border-radius: 6px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    transition: var(--transition);
}

.bg-switcher-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(0, 242, 254, 0.1);
}

/* --- INTENSE Bouncing Cat Text --- */
.cat-header-center {
    text-align: center;
    margin-bottom: 48px;
}

.cat-bounce-text-intense {
    font-size: 3.5rem;
    font-weight: 900;
    display: inline-flex;
    justify-content: center;
    gap: 4px;
    user-select: none;
    padding: 10px 0;
}

.cat-bounce-text-intense span {
    display: inline-block;
    color: var(--accent-gold);
    text-shadow: 0 0 16px rgba(255, 183, 3, 0.8), 0 0 32px rgba(255, 0, 127, 0.7);
    animation: intense-bounce 0.9s cubic-bezier(0.28, 0.84, 0.42, 1) infinite alternate;
}

/* Stagger delay */
.cat-bounce-text-intense span:nth-child(1) { animation-delay: 0.0s; color: #ff007f; }
.cat-bounce-text-intense span:nth-child(2) { animation-delay: 0.08s; color: #ff5f56; }
.cat-bounce-text-intense span:nth-child(3) { animation-delay: 0.16s; color: #ffbd2e; }
.cat-bounce-text-intense span:nth-child(4) { animation-delay: 0.24s; color: #00e676; }
.cat-bounce-text-intense span:nth-child(5) { animation-delay: 0.32s; color: #00f2fe; }
.cat-bounce-text-intense span:nth-child(6) { animation-delay: 0.40s; color: #4facfe; }
.cat-bounce-text-intense span:nth-child(7) { animation-delay: 0.48s; color: #7f00ff; }
.cat-bounce-text-intense span:nth-child(8) { animation-delay: 0.56s; color: #ff007f; }
.cat-bounce-text-intense span:nth-child(9) { animation-delay: 0.64s; color: #ffd600; }
.cat-bounce-text-intense span:nth-child(10) { animation-delay: 0.72s; color: #00e676; }
.cat-bounce-text-intense span:nth-child(11) { animation-delay: 0.80s; color: #00f2fe; }
.cat-bounce-text-intense span:nth-child(12) { animation-delay: 0.88s; color: #ff007f; }

@keyframes intense-bounce {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
    100% {
        transform: translateY(-28px) scale(1.25) rotate(-6deg);
    }
}

/* --- STEAM TRADING CARDS GRID & 3D TILT --- */
.steam-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 36px;
    perspective: 1000px;
    padding: 20px 0;
}

.steam-card-wrapper {
    perspective: 1000px;
    display: flex;
    justify-content: center;
}

.steam-card {
    position: relative;
    width: 290px;
    height: 420px;
    border-radius: 14px;
    background: linear-gradient(145deg, #182234, #0b101c);
    border: 3px solid #2a3b5c;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 242, 254, 0.15);
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out, box-shadow 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.steam-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 25px 50px rgba(0, 242, 254, 0.3), 0 0 25px rgba(127, 0, 255, 0.4);
}

/* Steam Card Inner Frame */
.steam-card-header {
    background: linear-gradient(90deg, #1f2b42, #141c2c);
    padding: 10px 14px;
    border-bottom: 2px solid #2a3b5c;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.steam-card-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.steam-badge-rarity {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff007f, #7f00ff);
    color: #fff;
}

.steam-card-img-wrapper {
    position: relative;
    width: 100%;
    height: 270px;
    overflow: hidden;
    background: #000;
    border-bottom: 2px solid #2a3b5c;
}

.steam-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.steam-card:hover .steam-card-img {
    transform: scale(1.05);
}

/* Holofoil Glare Overlay */
.steam-card-glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0) 50%,
        rgba(0, 242, 254, 0.25) 100%
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    mix-blend-mode: overlay;
}

.steam-card:hover .steam-card-glare {
    opacity: 1;
}

.steam-card-footer {
    padding: 12px 14px;
    background: #0c121e;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.steam-card-stats {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.steam-stat-val {
    color: var(--accent-cyan);
    font-weight: 700;
}

/* --- REELS FEED OPTIMIZED --- */
.reels-feed-container {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.reel-card {
    position: relative;
    width: 100%;
    height: 78vh;
    max-height: 740px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #05070d;
    border: 1px solid var(--border-color);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
}

.reel-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    background: #000;
}

.reel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
}

.reel-info { pointer-events: auto; }
.reel-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 12px;
    background: var(--gradient-primary);
    color: #000;
    font-weight: 700;
}

.reel-title { font-size: 1.1rem; font-weight: 700; color: #fff; margin-top: 4px; }

.reel-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: auto;
}

.reel-action-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.reel-action-btn:hover { transform: scale(1.1); background: rgba(0, 242, 254, 0.3); }
.reel-action-btn.liked { color: var(--accent-pink); background: rgba(255, 0, 127, 0.25); border-color: var(--accent-pink); }

/* --- Home Top Bar & Quick Actions --- */
.home-top-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 24px;
    padding-bottom: 12px;
    z-index: 10;
    position: relative;
}

.active-highlight {
    border-color: var(--accent-cyan) !important;
    background: rgba(0, 242, 254, 0.15) !important;
    color: var(--accent-cyan) !important;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

/* --- Matrix Edge Canvas --- */
.side-matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.9;
}

/* --- Resume Enhanced Layout & Profile Card --- */
.resume-main-wrapper {
    position: relative;
    z-index: 1;
    padding-top: 24px;
    padding-bottom: 60px;
}

.resume-header-card {
    display: flex;
    gap: 28px;
    align-items: center;
    padding: 32px;
    border-radius: var(--radius-md);
    background: rgba(16, 22, 36, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 242, 254, 0.25);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 242, 254, 0.1);
    transition: var(--transition);
}

.resume-header-card:hover {
    border-color: rgba(0, 242, 254, 0.5);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 242, 254, 0.2);
}

.resume-avatar-frame {
    position: relative;
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.4);
}

.resume-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border-radius: 50%;
    display: block;
    border: 2px solid var(--bg-primary);
    image-rendering: high-quality;
    image-rendering: -webkit-optimize-contrast;
    transform: translateZ(0);
}

.resume-user-info {
    flex-grow: 1;
}

.resume-user-info h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-top: 4px;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.resume-contacts-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    transition: var(--transition);
}

.contact-pill:hover {
    background: rgba(0, 242, 254, 0.15);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateY(-2px);
}

/* Glass Card Component */
.glass-card {
    background: rgba(16, 22, 36, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: var(--transition);
}

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

.section-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}

/* Timeline & Cards readability */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.timeline-item {
    position: relative;
    padding: 22px 24px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-cyan);
    transition: var(--transition);
}

.timeline-item:hover {
    background: rgba(0, 242, 254, 0.03);
    border-color: rgba(0, 242, 254, 0.3);
    border-left-color: var(--accent-cyan);
    transform: translateX(4px);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-cyan);
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.timeline-company {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.timeline-desc {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.65;
}

.timeline-list {
    margin-top: 10px;
    margin-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-list li {
    line-height: 1.6;
}

.timeline-list li strong {
    color: #fff;
}

/* Highlight boxes for skills and about me */
.about-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.feature-box {
    padding: 18px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.feature-box:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 242, 254, 0.04);
}

.feature-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

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

/* Badge Current Course */
.badge-course {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.2), rgba(127, 0, 255, 0.2));
    border: 1px solid var(--accent-cyan);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    margin-top: 8px;
}

.skill-category {
    margin-bottom: 16px;
}

.skill-category-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.project-tags span {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-cyan);
    transition: var(--transition);
}

.project-tags span:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 242, 254, 0.15);
}

/* --- Full Mobile Responsiveness --- */
@media (max-width: 900px) {
    .resume-grid-container {
        grid-template-columns: 1fr !important;
    }
    .resume-header-card {
        flex-direction: column;
        text-align: center;
        padding: 24px 16px;
    }
    .resume-user-info h1 {
        font-size: 1.8rem;
    }
    .resume-contacts-row {
        justify-content: center;
    }
    .side-matrix-canvas {
        opacity: 0.5; /* subtler on mobile to avoid obscuring text */
    }
}

@media (max-width: 768px) {
    .nav-links { gap: 16px; }
    .nav-link { font-size: 0.85rem; }
    .minimal-title { font-size: 2.8rem; }
    .cat-bounce-text-intense { font-size: 2.4rem; }
    .steam-cards-grid { grid-template-columns: 1fr; justify-items: center; }
    .reel-card { height: 72vh; }
    .container { padding: 0 16px; }
    .side-matrix-canvas { display: none; } /* Hide on small mobile to maximize performance */
}

@media (max-width: 480px) {
    .cat-bounce-text-intense { font-size: 1.8rem; }
    .minimal-title { font-size: 2.2rem; }
    .resume-avatar-frame { width: 110px; height: 110px; }
    .timeline-item { padding: 16px; }
}

