/* ══════════════════════════════════════════════════════
   SOURAVA PORTFOLIO — PREMIUM THEME 2.0
   Typography: Consolas
   ══════════════════════════════════════════════════════ */

/* ─── DESIGN TOKENS ─────────────────────────────────── */
:root {
    --bg: #0a0a0f;
    --bg-secondary: #12121a;
    --text: #e8e6f0;
    --muted: #9896a8;
    --accent: #a78bfa;
    --accent-secondary: #6d28d9;
    --accent-glow: rgba(167, 139, 250, 0.35);
    --accent-text: #0a0a0f;
    --card-bg: rgba(22, 22, 35, 0.7);
    --card-border: rgba(167, 139, 250, 0.12);
    --bubble-bg: rgba(22, 22, 35, 0.85);
    --bubble-text: #e8e6f0;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --gradient-main: linear-gradient(135deg, #a78bfa 0%, #6d28d9 50%, #4f46e5 100%);
    --gradient-warm: linear-gradient(135deg, #f472b6 0%, #a78bfa 100%);
    --font-main: Consolas, 'Courier New', monospace;
    --font-mono: Consolas, 'Courier New', monospace;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

.light-theme {
    --bg: #f5f0eb;
    --bg-secondary: #ebe5dd;
    --text: #1a1425;
    --muted: rgba(26, 20, 37, 0.65);
    --accent: #7c3aed;
    --accent-secondary: #5b21b6;
    --accent-glow: rgba(124, 58, 237, 0.25);
    --accent-text: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.75);
    --card-border: rgba(124, 58, 237, 0.12);
    --bubble-bg: #1a1425;
    --bubble-text: #f5f0eb;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(0, 0, 0, 0.06);
}

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

html {
    /* Native smooth scroll removed to prevent conflict with Lenis JS smooth scroll */
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    cursor: none;
}

@media (pointer: coarse) {
    body {
        cursor: auto;
    }
}

/* ─── NOISE OVERLAY ──────────────────────────────────── */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* ─── PARTICLE CANVAS ────────────────────────────────── */
#particles-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ─── CUSTOM CURSOR ──────────────────────────────────── */
.cursor-dot {
    position: fixed;
    top: -4px;
    left: -4px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    z-index: 99999;
    pointer-events: none;
    will-change: transform;
}

.cursor-ring {
    position: fixed;
    top: -20px;
    left: -20px;
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    z-index: 99998;
    pointer-events: none;
    will-change: transform;
    transition: width 0.3s var(--transition), height 0.3s var(--transition), border-color 0.3s;
}

.cursor-ring.hover {
    width: 60px;
    height: 60px;
    top: -30px;
    left: -30px;
    border-color: var(--accent-secondary);
    background: rgba(167, 139, 250, 0.08);
}

/* ─── CONTAINER ──────────────────────────────────────── */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* ─── GLASS NAV ──────────────────────────────────────── */
.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    margin-bottom: 50px;
    gap: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    position: sticky;
    top: 12px;
    z-index: 100;
    transition: box-shadow 0.4s var(--transition);
}

.glass-nav:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* ─── LOGO ───────────────────────────────────────────── */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    color: var(--text);
    white-space: nowrap;
    transition: transform 0.35s var(--transition), color 0.25s;
}

.logo:hover {
    transform: translateY(-2px) scale(1.03);
    color: var(--accent);
}

.logo-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: inline-block;
    transition: transform 0.4s var(--transition);
}

.logo:hover .logo-icon {
    transform: rotate(-15deg) scale(1.15);
}

.logo-accent {
    color: var(--accent);
}

/* ─── NAV ────────────────────────────────────────────── */
.nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: all 0.3s var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--text);
    background: var(--accent-glow);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 999px;
    transition: all 0.35s var(--transition);
    transform: translateX(-50%);
}

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

/* Hamburger */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    width: 32px;
    height: 24px;
    cursor: pointer;
    position: relative;
    padding: 0;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    position: absolute;
    left: 0;
    transition: all 0.3s var(--transition);
}

.hamburger-line:nth-child(1) {
    top: 2px;
}

.hamburger-line:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-line:nth-child(3) {
    bottom: 2px;
}

.nav-toggle.active .hamburger-line:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

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

.nav-toggle.active .hamburger-line:nth-child(3) {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}

@media (max-width: 720px) {
    .nav-toggle {
        display: block;
    }

    .nav {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        background: var(--card-bg);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        flex-direction: column;
        padding: 12px;
        border-radius: var(--radius-md);
        border: 1px solid var(--glass-border);
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
        display: none;
        min-width: 180px;
        z-index: 60;
    }

    .nav.open {
        display: flex;
    }

    .nav-link {
        padding: 10px 14px;
        width: 100%;
        text-align: left;
        border-radius: var(--radius-sm);
    }
}

/* ─── THEME TOGGLE ───────────────────────────────────── */
.theme-toggle {
    background: var(--gradient-main);
    border: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.3s var(--transition), box-shadow 0.3s;
    flex-shrink: 0;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.theme-icon {
    display: inline-block;
}

/* ─── MODEL CONTAINER ────────────────────────────────── */
.model-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px 0 18px 0;
    position: relative;
}

.model-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    filter: blur(40px);
    opacity: 0.5;
    transition: transform 0.1s linear, opacity 0.1s linear, filter 0.1s linear;
    pointer-events: none;
}

/* Breathe animation only for idle state - will be overridden by JS during startup */
@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.8;
    }
}

.model-glow.idle {
    animation: breathe 4s ease-in-out infinite;
}

model-viewer {
    width: 480px;
    height: 360px;
    max-width: 100%;
    background: transparent;
    border-radius: var(--radius-md);
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.8s ease;
    touch-action: none;
}

/* ─── MODEL LOADER ─────────────────────────────────── */
.model-loader {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 3px solid var(--accent-glow);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 2;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.model-loader.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ─── MODEL FALLBACK ───────────────────────────────── */
.model-fallback {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 480px;
    height: 360px;
    max-width: 100%;
    z-index: 1;
    animation: fadeIn 0.8s ease forwards;
}

.fallback-avatar {
    filter: drop-shadow(0 0 20px var(--accent-glow));
    animation: float 3s ease-in-out infinite;
}

.fallback-hint {
    margin-top: 16px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
    background: var(--glass-bg);
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 520px) {
    model-viewer {
        width: 100%;
        height: auto;
        aspect-ratio: 4/3;
    }
}

/* reveal animation for top level elements */
.speech-bubble,
.bento-container {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 520ms ease, transform 520ms ease;
}

.revealed {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
}

/* ─── SPEECH BUBBLE ──────────────────────────────────── */
.speech-bubble {
    background: var(--bubble-bg);
    color: var(--bubble-text);
    padding: 16px 28px;
    border-radius: var(--radius-xl);
    display: inline-block;
    margin: 20px 0 40px 0;
    font-size: 15px;
    font-family: var(--font-mono);
    text-align: center;
    border: 1px solid var(--card-border);
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: float 3s ease-in-out infinite;
}

.speech-pulse {
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid var(--accent);
    opacity: 0;
    animation: pulse-ring 2.5s ease-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.08);
        opacity: 0;
    }
}

/* ─── PROFILE ────────────────────────────────────────── */
.profile-section {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin: 40px 0;
    justify-content: center;
}

.profile-text {
    text-align: center;
}

.glitch-name {
    font-size: clamp(28px, 6vw, 42px);
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    line-height: 1.2;
    cursor: default;
    font-family: var(--font-main);
}

.subtitle {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.tag-pill {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 999px;
    letter-spacing: 1px;
    background: var(--glass-bg);
    border: 1px solid var(--card-border);
    color: var(--muted);
    text-transform: uppercase;
}

.tag-divider {
    color: var(--accent);
    font-weight: 300;
    font-size: 18px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><linearGradient id="g" x1="0%25" y1="0%25" x2="100%25" y2="100%25"><stop offset="0%25" style="stop-color:%23a78bfa"/><stop offset="100%25" style="stop-color:%236d28d9"/></linearGradient></defs><circle cx="50" cy="50" r="50" fill="url(%23g)"/><circle cx="50" cy="40" r="12" fill="white"/><ellipse cx="50" cy="65" rx="18" ry="12" fill="white"/></svg>');
    background-size: cover;
}

.avatar-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: var(--gradient-main) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: spin-slow 8s linear infinite;
}

@keyframes spin-slow {
    to {
        transform: rotate(360deg);
    }
}

/* ─── TICKER ─────────────────────────────────────────── */
.ticker-wrapper {
    overflow: hidden;
    padding: 14px 0;
    margin: 10px -20px;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    -webkit-mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
    mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}

.ticker-track {
    display: flex;
    gap: 24px;
    white-space: nowrap;
    width: max-content;
    animation: ticker 20s linear infinite;
}

.ticker-item {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.ticker-dot {
    color: var(--accent);
    font-size: 6px;
    line-height: 1;
    display: flex;
    align-items: center;
}

@keyframes ticker {
    to {
        transform: translateX(-50%);
    }
}

/* ─── SECTION HEADINGS ───────────────────────────────── */
.section-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 80px 0 32px 0;
    justify-content: center;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 1px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.section-line {
    flex: 1;
    max-width: 120px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    border-radius: 999px;
}

/* ─── WORK DESCRIPTION ───────────────────────────────── */
.work-description {
    color: var(--muted);
    margin-bottom: 24px;
    text-align: left;
    line-height: 1.85;
    font-size: 15px;
}

.work-description p {
    margin-bottom: 12px;
}

.work-description strong {
    color: var(--text);
    font-weight: 600;
}

.highlight-glow {
    color: var(--accent);
    font-weight: 700;
    position: relative;
    text-shadow: 0 0 20px var(--accent-glow);
}

/* ─── CTA BUTTON ─────────────────────────────────────── */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--gradient-main);
    color: #fff;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.35s var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 24px var(--accent-glow);
}

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

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 36px var(--accent-glow);
}

.cta-button:active {
    transform: translateY(-1px) scale(0.98);
}



/* ─── GLASS CARD ─────────────────────────────────────── */
.glass-card {
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.4s var(--transition);
}

.glass-card:hover {
    border-color: rgba(167, 139, 250, 0.3);
    box-shadow: none;
}

/* ─── TIMELINE ───────────────────────────────────────── */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-left: 24px;
    position: relative;
    text-align: left;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), transparent);
    border-radius: 999px;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 6px;
    position: relative;
    left: -21px;
    box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-year {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent);
    min-width: 60px;
    margin-left: -12px;
}

.timeline-text {
    color: var(--muted);
}

/* ─── INTERESTS ──────────────────────────────────────── */
.interests-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.interest-chip {
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--muted);
    transition: all 0.3s var(--transition);
    cursor: default;
}

.interest-chip:hover {
    transform: translateY(-3px);
}

/* ─── SOCIAL ─────────────────────────────────────────── */
.social-links {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.social-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s var(--transition);
}

.social-pill:hover {
    background: var(--accent-glow);
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 24px var(--accent-glow);
}

/* ─── PROJECT CARDS ──────────────────────────────────── */
.projects-container {
    display: flex;
    gap: 16px;
    margin: 24px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.project-card {
    flex: 1;
    min-width: 260px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border-color: rgba(167, 139, 250, 0.4);
}

.project-image {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.youtube-bg {
    background: linear-gradient(135deg, #1a0a2e 0%, #16213e 100%);
    position: relative;
}

.brionetai-bg {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

.project-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #FF0000;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
}

.project-info {
    padding: 16px;
}

.project-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
}

.project-subtitle {
    color: var(--muted);
    font-size: 12px;
}


/* ─── FOOTER ─────────────────────────────────────────── */
.footer {
    text-align: center;
    color: var(--muted);
    padding: 32px 0 24px;
    font-size: 12px;
    font-family: var(--font-mono);
}

.footer-line {
    width: 60px;
    height: 2px;
    background: var(--gradient-main);
    margin: 0 auto 16px;
    border-radius: 999px;
}

/* ─── SCROLL REVEAL ──────────────────────────────────── */
.scroll-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s var(--transition);
}

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

/* ─── PAGE LOAD ──────────────────────────────────────── */
body.loaded .glass-nav {
    animation: slideDown 0.6s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ══════════════════════════════════════════════════════
   BENTO GRID LAYOUT
   ══════════════════════════════════════════════════════ */
.bento-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.bento-box {
    padding: 36px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.bento-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.bento-icon {
    font-size: 20px;
}

.bento-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    font-family: var(--font-main);
}

/* Grid Spans */
.bento-intro {
    grid-column: span 12;
    justify-content: center;
}

.bento-ticker {
    grid-column: span 12;
    padding: 0;
}

.bento-ticker .bento-header {
    padding: 36px 36px 0 36px;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .bento-ticker .bento-header {
        padding: 24px 24px 0 24px;
    }
}

.bento-projects {
    grid-column: span 6;
}

.bento-bio {
    grid-column: span 6;
}

.bento-interests {
    grid-column: span 12;
}

/* Internal Tweaks */
.bento-speech {
    margin: 0 0 24px 0;
    display: inline-block;
    animation: none;
    transform: none;
    box-shadow: none;
    border: 1px solid var(--accent);
}

.bento-subtitle {
    justify-content: flex-start;
    margin: 16px 0 28px 0;
}

.bento-desc {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    max-width: 90%;
}

.bento-model-container {
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.bento-projects-container {
    flex-direction: column;
    gap: 20px;
    margin: 0;
    display: flex;
}

.bento-project-card {
    min-width: 100%;
    flex: none;
}

.bento-timeline::before {
    left: 4px;
}

.bento-timeline .timeline-dot {
    left: -22px;
}

.bento-chips {
    justify-content: flex-start;
    gap: 10px;
}

.bento-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 28px 0;
}

.bento-socials {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    justify-content: flex-start;
}

.bento-socials .social-pill {
    border-radius: 999px;
    width: auto;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .bento-intro {
        grid-column: span 12;
    }

    .bento-model {
        grid-column: span 12;
        min-height: 400px;
    }

    .bento-projects {
        grid-column: span 12;
        grid-row: span 1;
    }

    .bento-projects-container {
        flex-direction: row;
    }

    .bento-project-card {
        flex: 1;
        min-width: 260px;
    }

    .bento-bio {
        grid-column: span 6;
    }

    .bento-interests {
        grid-column: span 6;
    }
}

@media (max-width: 768px) {
    .bento-container {
        display: flex;
        flex-direction: column;
    }

    .bento-projects-container {
        flex-direction: column;
    }

    .bento-box {
        padding: 24px;
    }

    .bento-desc {
        max-width: 100%;
    }
}

/* ══════════════════════════════════════════════════════
   BLOG PAGE STYLES
   ══════════════════════════════════════════════════════ */
.blog-container {
    max-width: 1100px;
    padding-bottom: 60px;
}

.blog-hero {
    padding: 40px 20px 20px;
}

/* Minimized padding since hero background is gone */


/* ─── BLOG LIST ──────────────────────────────────────── */
.blog-list-container {
    max-width: 800px;
    margin: 20px auto 60px;
    padding: 0 20px;
    text-align: left;
}

.blog-list-header {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--accent);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
}

.blog-post-list {
    display: flex;
    flex-direction: column;
}

.blog-post-item {
    display: flex;
    align-items: baseline;
    gap: 32px;
    padding: 16px 0;
    border-top: 1px solid var(--glass-border);
    transition: all 0.3s var(--transition);
}

.blog-post-item:last-child {
    border-bottom: 1px solid var(--glass-border);
}

.blog-post-date {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--muted);
    min-width: 120px;
}

.blog-post-link {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s var(--transition);
    line-height: 1.4;
}

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

@media (max-width: 640px) {
    .blog-post-item {
        flex-direction: column;
        gap: 4px;
        padding: 20px 0;
    }

    .blog-post-date {
        min-width: auto;
        font-size: 0.75rem;
    }

    .blog-post-link {
        font-size: 1.05rem;
    }
}

/* ─── ARTICLE STYLES ─────────────────────────────────── */
.post-container {
    max-width: 800px;
    margin: 40px auto;
    text-align: left;
    padding: 0 20px 80px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 48px;
    transition: all 0.3s var(--transition);
}

.back-link:hover {
    transform: translateX(-6px);
}

.post-header {
    margin-bottom: 60px;
}

.post-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-meta {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--muted);
    display: flex;
    gap: 20px;
}

.post-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text);
    opacity: 0.9;
}

.post-content p {
    margin-bottom: 28px;
}

.post-content h2 {
    font-size: 1.75rem;
    margin: 48px 0 20px;
    color: var(--text);
}

.post-content strong {
    color: var(--accent);
}

@media (max-width: 640px) {
    .post-container {
        margin: 20px auto;
    }

    .post-header {
        margin-bottom: 40px;
    }

    .post-content {
        font-size: 1.05rem;
    }
}


.nav a.active {
    color: var(--accent);
}

/* ══════════════════════════════════════════════════════
   404 PAGE STYLES
   ══════════════════════════════════════════════════════ */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--bg);
}

.error-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.error-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orbFloat 8s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #a78bfa, #6d28d9);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #818cf8, #4f46e5);
    bottom: -50px;
    right: -50px;
    animation-delay: -3s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #f472b6, #db2777);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -5s;
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(167, 139, 250, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(167, 139, 250, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

.light-theme .grid-overlay {
    background-image: linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

.error-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 40px 20px;
}

.error-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.digit {
    font-size: clamp(6rem, 20vw, 12rem);
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    font-family: var(--font-main);
}

.digit.zero {
    position: relative;
    background: none;
    -webkit-text-fill-color: transparent;
}

.planet {
    width: clamp(80px, 18vw, 140px);
    height: clamp(80px, 18vw, 140px);
    background: linear-gradient(135deg, #a78bfa 0%, #6d28d9 100%);
    border-radius: 50%;
    position: relative;
    box-shadow: inset -20px -20px 40px rgba(0, 0, 0, 0.3), 0 0 60px var(--accent-glow);
    animation: planetRotate 20s linear infinite;
    overflow: hidden;
}

.planet-ring {
    position: absolute;
    width: 180%;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(75deg);
    pointer-events: none;
    box-shadow: 0 0 20px rgba(167, 139, 250, 0.2);
}

.planet-crater {
    position: absolute;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.crater-1 {
    width: 25%;
    height: 25%;
    top: 20%;
    left: 15%;
}

.crater-2 {
    width: 15%;
    height: 15%;
    bottom: 25%;
    right: 20%;
}

.crater-3 {
    width: 10%;
    height: 10%;
    top: 50%;
    right: 30%;
}

@keyframes planetRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.glitch-text {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
}

.error-message {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 400px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.error-illustration {
    position: relative;
    height: 100px;
    margin-bottom: 30px;
}

.astronaut {
    animation: astronautFloat 4s ease-in-out infinite;
}

.astronaut-emoji {
    font-size: 4rem;
    display: inline-block;
}

@keyframes astronautFloat {

    0%,
    100% {
        transform: translateY(0) rotate(-5deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.stars {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-around;
    pointer-events: none;
}

.star {
    font-size: 1.5rem;
    animation: twinkle 2s ease-in-out infinite;
}

.star:nth-child(1) {
    animation-delay: 0s;
}

.star:nth-child(2) {
    animation-delay: 0.3s;
}

.star:nth-child(3) {
    animation-delay: 0.6s;
}

.star:nth-child(4) {
    animation-delay: 0.9s;
}

.star:nth-child(5) {
    animation-delay: 1.2s;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.error-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.home-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s var(--transition);
    font-family: var(--font-main);
}

.home-button {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: 0 8px 25px var(--accent-glow);
}

.home-button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 35px var(--accent-glow);
}

.secondary-button {
    background: var(--glass-bg);
    color: var(--text);
    border: 1px solid var(--glass-border);
}

.secondary-button:hover {
    transform: translateY(-4px);
    background: var(--accent-glow);
    border-color: rgba(167, 139, 250, 0.4);
}

.button-icon {
    font-size: 1.2rem;
}

.error-suggestions {
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: 40px;
}

.mono-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 2px;
    margin-bottom: 16px;
    font-weight: 700;
    opacity: 0.7;
}

.suggestion-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.light-theme .suggestion-links .nav-link {
    color: var(--muted);
}

.error-theme-toggle {
    position: fixed;
    top: 32px;
    right: 32px;
    z-index: 100;
}

/* ─── TABLES ─────────────────────────────────────────── */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    border: 1px solid var(--glass-border);
    padding: 14px;
    text-align: left;
}

.comparison-table th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: var(--accent);
}

.light-theme .comparison-table th {
    background: rgba(0, 0, 0, 0.05);
}

@media (max-width: 600px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .error-actions {
        flex-direction: column;
        align-items: center;
    }

    .home-button,
    .secondary-button {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}