/* =============================================
   VARIABLES & THEMES
   ============================================= */
:root {
    --max-w: 800px;
    --nav-h: 64px;

    /* LIGHT THEME */
    --bg: #F8F5F0;
    --bg2: #EFEFEB;
    --surface: #EDE9E2;
    --border: #D8D4CC;
    --text: #111111;
    --text-muted: #555550;
    --text-faint: #999993;
    --accent: #1A1A2E;
    --accent2: #C1392B;
    --tag-bg: #E5E0D8;
    --tag-text: #111111;
    --nav-bg: rgba(248, 245, 240, 0.92);
    --proj-num: #DDDAD4;
    --img-border: #D8D4CC;
    --surface-rgb: 237, 233, 226;
    --border-rgb: 216, 212, 204;
    --cta-bg: #f39c12;
    --cta-text: #ffffff;
    --cta-bg-rgb: 243, 156, 18;
}

[data-theme="dark"] {
    --bg: #06070F;
    --bg2: #0D0F1C;
    --surface: #111525;
    --border: #1F2438;
    --text: #F0EDFF;
    --text-muted: #A8A5C0;
    --text-faint: #555570;
    --accent: #C1392B;
    --accent2: #E85D4A;
    --tag-bg: #1A1E35;
    --tag-text: #C0BEDC;
    --nav-bg: rgba(6, 7, 15, 0.94);
    --proj-num: #181B2E;
    --img-border: #1F2438;
    --surface-rgb: 17, 21, 37;
    --border-rgb: 31, 36, 56;
    --cta-bg: #C1392B;
    --cta-text: #ffffff;
    --cta-bg-rgb: 193, 57, 43;
}

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

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

body {
    font-family: 'Mozilla Text', sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background 0.45s ease, color 0.45s ease;
    overflow-x: hidden;
}

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

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

/* =============================================
   CONTAINER
   ============================================= */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

/* =============================================
   NAVBAR
   ============================================= */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: border-color 0.45s ease;
}

#navbar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-h);
    background-image: linear-gradient(to bottom,
            rgba(248, 245, 240, 0) 0%,
            #F8F5F0 100%),
        url('images/navbar-bg.png');
    background-size: cover;
    background-position: center;
    z-index: -1;
    pointer-events: none;
    transition: background-image 0.45s ease;
}

[data-theme="dark"] #navbar::before {
    background-image: linear-gradient(to bottom,
            rgba(6, 7, 15, 0) 0%,
            #06070F 100%),
        url('images/navbar-bgdark.png');
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-logo {
    font-family: 'Gayathri', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.nav-logo .dot {
    color: #f39c12;
}

[data-theme="dark"] .nav-logo .dot {
    color: var(--accent2);
}

.nav-links {
    display: flex;
    gap: 2px;
    align-items: center;
    flex: 1;
    flex-wrap: wrap;
}

.nav-links a {
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--text-muted);
    padding: 4px 9px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--text);
    background: var(--surface);
}

.nav-cv-link {
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
}

.nav-cv-link:hover {
    background: var(--surface) !important;
}

/* Theme toggle wrapper — stripped of min-height override for nav */
.theme-toggle-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
}

.theme-toggle-wrapper .toggle-switch {
    position: relative;
    display: inline-block;
    width: 68px;
    height: 34px;
    transform: scale(1);
    transition: transform 0.2s;
}

.theme-toggle-wrapper .toggle-switch:hover {
    transform: scale(1.1);
}

.theme-toggle-wrapper .toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-toggle-wrapper .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, #f1c40f, #f39c12);
    transition: 0.4s;
    border-radius: 34px;
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.4);
    overflow: hidden;
}

.theme-toggle-wrapper .slider:before {
    position: absolute;
    content: "☀️";
    height: 27px;
    width: 27px;
    left: 4px;
    bottom: 3px;
    background: white;
    transition: 0.4s;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.theme-toggle-wrapper input:checked+.slider {
    background: linear-gradient(145deg, #2c3e50, #34495e);
    box-shadow: 0 0 15px rgba(44, 62, 80, 0.5);
}

.theme-toggle-wrapper input:checked+.slider:before {
    transform: translateX(34px);
    content: "🌙";
}

.theme-toggle-wrapper .clouds {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.theme-toggle-wrapper .cloud {
    position: absolute;
    width: 18px;
    height: 18px;
    fill: rgba(255, 255, 255, 0.8);
    transition: all 0.4s ease;
}

.theme-toggle-wrapper .cloud1 {
    top: 8px;
    left: 8px;
    animation: floatCloud1 8s infinite linear;
}

.theme-toggle-wrapper .cloud2 {
    top: 12px;
    left: 36px;
    transform: scale(0.8);
    animation: floatCloud2 12s infinite linear;
}

@keyframes floatCloud1 {
    0% {
        transform: translateX(-20px);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        transform: translateX(70px);
        opacity: 0;
    }
}

@keyframes floatCloud2 {
    0% {
        transform: translateX(-20px) scale(0.8);
        opacity: 0;
    }

    20% {
        opacity: 0.7;
    }

    80% {
        opacity: 0.7;
    }

    100% {
        transform: translateX(70px) scale(0.8);
        opacity: 0;
    }
}

.theme-toggle-wrapper input:checked+.slider .cloud {
    opacity: 0;
    transform: translateY(-20px);
}

/* Burger */
.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: 8px;
}

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

.nav-mobile {
    display: none;
    flex-direction: column;
    background: var(--nav-bg);
    border-top: 1px solid var(--border);
    padding: 12px 24px 16px;
}

.nav-mobile a {
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.95rem;
    color: var(--text-muted);
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    transition: color 0.2s;
}

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

.nav-mobile a:hover {
    color: var(--text);
}

.nav-mobile.open {
    display: flex;
}

/* =============================================
   SECTIONS COMMON
   ============================================= */
section {
    padding: 96px 0 64px;
    position: relative;
}

section::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(var(--border-rgb), 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

section:first-of-type {
    padding-top: calc(var(--nav-h) + 80px);
}

.section-tag {
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.9rem;
    color: var(--text-faint);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

.section-header-row {
    margin-bottom: 52px;
}

.section-title {
    font-family: 'Gayathri', sans-serif;
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

/* =============================================
   ABOUT
   ============================================= */
#about {
    overflow: hidden;
    padding-top: calc(var(--nav-h) + 120px);
    padding-bottom: 140px;
}

#about::after {
    display: none;
}

.about-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1.0;
    pointer-events: none;
    z-index: 0;
}

/* Light: show light video, hide dark video */
.about-bg-video--dark {
    display: none;
}

/* Dark: show dark video, hide light video */
[data-theme="dark"] .about-bg-video--light {
    display: none;
}

[data-theme="dark"] .about-bg-video--dark {
    display: block;
}

/* Gradient overlay: transparent top → background bottom */
#about::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(248, 245, 240, 0) 0%,
            rgba(248, 245, 240, 0) 50%,
            rgba(248, 245, 240, 0.08) 56%,
            rgba(248, 245, 240, 0.18) 62%,
            rgba(248, 245, 240, 0.30) 68%,
            rgba(248, 245, 240, 0.44) 74%,
            rgba(248, 245, 240, 0.60) 80%,
            rgba(248, 245, 240, 0.78) 88%,
            rgba(248, 245, 240, 0.92) 94%,
            #F8F5F0 100%);
    z-index: 1;
    pointer-events: none;
}

/* Dark mode gradient: fade to #06070F */
[data-theme="dark"] #about::before {
    background: linear-gradient(to bottom,
            rgba(6, 7, 15, 0) 0%,
            rgba(6, 7, 15, 0.3) 40%,
            rgba(6, 7, 15, 0.75) 70%,
            #06070F 100%);
}

#about .container {
    position: relative;
    z-index: 2;
}

/* Mobile: gradient covers earlier to hide dark video content */
@media (max-width: 680px) {
    #about::after {
        display: none !important;
    }

    #about::before {
        background: linear-gradient(to bottom,
                rgba(248, 245, 240, 0) 0%,
                rgba(248, 245, 240, 0) 50%,
                rgba(248, 245, 240, 0.08) 56%,
                rgba(248, 245, 240, 0.18) 62%,
                rgba(248, 245, 240, 0.30) 68%,
                rgba(248, 245, 240, 0.44) 74%,
                rgba(248, 245, 240, 0.60) 80%,
                rgba(248, 245, 240, 0.78) 88%,
                rgba(248, 245, 240, 0.92) 94%,
                #F8F5F0 100%) !important;
    }

    [data-theme="dark"] #about::before {
        background: linear-gradient(to bottom,
                rgba(6, 7, 15, 0) 0%,
                rgba(6, 7, 15, 0) 50%,
                rgba(6, 7, 15, 0.32) 65%,
                rgba(6, 7, 15, 0.52) 75%,
                rgba(6, 7, 15, 0.75) 85%,
                #06070F 100%) !important;
    }
}

.about-layout {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 32px;
    align-items: start;
}

.about-label-col {
    padding-top: 10px;
}

.about-headline h1 {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(2.7rem, calc(6vw + 8px), 4.1rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: var(--text);
    margin-bottom: 20px;
}

/* Light mode: text shadow for readability over video */
:root .about-headline h1 {
    text-shadow: 0 0 15px rgba(248, 245, 240, 1.0),
        0 0 30px rgba(248, 245, 240, 0.95),
        0 0 45px rgba(248, 245, 240, 0.8),
        0 2px 8px rgba(248, 245, 240, 0.6);
}

:root .about-text {
    color: #000000;
    text-shadow: 0 0 12px rgba(248, 245, 240, 1.0),
        0 0 24px rgba(248, 245, 240, 0.95),
        0 0 36px rgba(248, 245, 240, 0.8),
        0 1px 6px rgba(248, 245, 240, 0.6);
    font-weight: 550;
}

:root #about .section-tag {
    text-shadow: 0 0 12px rgba(248, 245, 240, 1.0),
        0 0 24px rgba(248, 245, 240, 0.9);
}

/* Dark mode: reset color and remove shadow */
[data-theme="dark"] .about-headline h1,
[data-theme="dark"] #about .section-tag {
    text-shadow: none;
}

[data-theme="dark"] .about-text {
    color: var(--text);
    text-shadow: none;
    font-weight: 400;
}

.about-headline h1 em {
    font-style: italic;
    color: var(--accent);
}

[data-theme="dark"] .about-headline h1 em {
    color: var(--accent2);
}

.about-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.meta-chip {
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.72rem;
    background: var(--tag-bg);
    color: var(--tag-text);
    padding: 4px 12px;
    border-radius: 100px;
    border: 1px solid var(--border);
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.meta-sep {
    color: var(--text-faint);
}

.about-text {
    font-size: 1rem;
    line-height: 1.72;
    color: var(--text-muted);
    max-width: 560px;
    margin-bottom: 32px;
}

.about-line {
    height: 3px;
    width: 48px;
    background: var(--accent);
    border-radius: 2px;
    transition: background 0.4s;
}

[data-theme="dark"] .about-line {
    background: var(--accent2);
}

/* Cyber Glitch Effect */
.cyber-glitch {
    position: relative;
    display: inline-block;
    font-weight: 400;
    color: var(--accent);
    /* Dark text for light mode */
    text-shadow: none;
    /* No shadow on main text to keep it sharp */
    --glitch-2: #ff7300;
    animation: cyber-pulse 2s infinite;
    z-index: 1;
}

[data-theme="dark"] .cyber-glitch {
    color: #cdfff5;
    text-shadow: 0 0 5px rgba(0, 255, 204, 0.5), 0 0 15px rgba(0, 255, 204, 0.3);
    --glitch-2: #00ffcc;
}

.cyber-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.6;
    pointer-events: none;
    z-index: -1;
    color: transparent;
    left: -2px;
    text-shadow: 2px 0 var(--glitch-2);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

@keyframes cyber-pulse {

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

    50% {
        transform: scale(1.02);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip-path: inset(10% 0 60% 0);
        transform: translate(2px, -1px);
    }

    20% {
        clip-path: inset(80% 0 5% 0);
        transform: translate(-2px, 2px);
    }

    40% {
        clip-path: inset(30% 0 20% 0);
        transform: translate(2px, 1px);
    }

    60% {
        clip-path: inset(70% 0 10% 0);
        transform: translate(-1px, -2px);
    }

    80% {
        clip-path: inset(5% 0 80% 0);
        transform: translate(1px, 2px);
    }

    100% {
        clip-path: inset(50% 0 30% 0);
        transform: translate(-2px, -1px);
    }
}

/* =============================================
   ABOUT — SOUND TOGGLE
   ============================================= */
.about-sound-toggle {
    position: absolute;
    bottom: 28px;
    right: 28px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #C1392B 0%, #e74c3c 50%, #f39c12 100%);
    color: #ffffff;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.about-sound-toggle:hover {
    background: linear-gradient(135deg, #a93226 0%, #c0392b 50%, #e67e22 100%);
    color: #ffffff;
    transform: translateY(-2px) scale(1.04);
}

.about-sound-toggle:active {
    transform: translateY(0) scale(0.96);
}

.about-sound-toggle .sound-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
    transition: transform 0.25s ease;
}

/* Default: show OFF icon, hide ON icon */
.about-sound-toggle .sound-icon--on {
    display: none;
}

.about-sound-toggle .sound-icon--off {
    display: block;
}

/* When sound is active */
.about-sound-toggle.sound-active .sound-icon--on {
    display: block;
    animation: soundIconBounce 1.2s ease-in-out infinite;
}

.about-sound-toggle.sound-active .sound-icon--off {
    display: none;
}

.about-sound-toggle.sound-active {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 50%, #2ecc71 100%);
}

.about-sound-toggle.sound-active:hover {
    background: linear-gradient(135deg, #16a085 0%, #138d75 50%, #27ae60 100%);
}

[data-theme="dark"] .about-sound-toggle {
    background: linear-gradient(135deg, #E85D4A 0%, #C1392B 50%, #f39c12 100%);
}

[data-theme="dark"] .about-sound-toggle.sound-active {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 50%, #2ecc71 100%);
}

.sound-label {
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

@keyframes soundIconBounce {

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

    30% {
        transform: scale(1.12);
    }

    60% {
        transform: scale(0.95);
    }
}

/* Mobile positioning */
@media (max-width: 680px) {
    .about-sound-toggle {
        bottom: 18px;
        right: 18px;
        padding: 8px 14px;
        font-size: 0.58rem;
    }

    .about-sound-toggle .sound-icon {
        width: 15px;
        height: 15px;
    }
}


/* =============================================
   PROJECTS
   ============================================= */
#projects {
    padding-bottom: 0;
}

#projects::after {
    display: none;
}

.project-item {
    padding: 24px 0;
}

.project-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.view-more-btn {
    align-self: flex-end;
}

.proj-divider {
    height: 1px;
    background: rgba(var(--border-rgb), 0.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin: 24px 0;
    transition: background 0.4s;
}

.project-meta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.proj-tag-container {
    position: relative;
    display: inline-flex;
    cursor: pointer;
}

.proj-tag {
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: transparent;
    color: var(--accent);
    padding: 3px 10px;
    border-radius: 0;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

[data-theme="dark"] .proj-tag {
    color: var(--accent2);
}

.proj-tooltip {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    padding: 6px 12px;
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    background: radial-gradient(circle at center, var(--cta-bg) -50%, var(--bg) 140%);
    border: none;
    border-radius: 6px;
    box-shadow: 0 8px 30px -8px var(--cta-bg);
    color: #000000;
    z-index: 100;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

[data-theme="dark"] .proj-tooltip {
    background: radial-gradient(circle at center, var(--accent2) -50%, var(--bg) 110%);
    box-shadow: 0 8px 30px -8px var(--accent2);
    color: #fff;
}

/* Tooltip Arrow */
.proj-tooltip::before {
    position: absolute;
    content: "";
    height: 6px;
    width: 12px;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: #fcb94f;
    /* Theme Yellow */
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    border: none;
}

[data-theme="dark"] .proj-tooltip::before {
    background: var(--accent2);
}

/* Active and Hover states */
.proj-tag-container.tooltip-active .proj-tooltip,
.proj-tag-container:hover .proj-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
    animation: tooltip-float-top 3s ease-in-out infinite;
}

.proj-title {
    font-family: 'Mozilla Text', sans-serif;
    font-size: clamp(1.3rem, 3.4vw, 1.9rem);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text);
    letter-spacing: -0.025em;
    margin-bottom: 14px;
}

.proj-brief {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-muted);
    margin-bottom: 24px;
    max-width: 600px;
}

/* Project images — Isometric 4D Gallery */
.proj-images {
    position: relative;
    width: 100%;
    height: clamp(140px, 20vw, 220px);
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
    transform-style: preserve-3d;
}

.proj-images img {
    position: absolute;
    width: 32%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border: 2px solid var(--border);
    border-radius: 8px;
    box-shadow: rgba(0, 0, 0, 0.4) 0px 20px 30px -10px;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: zoom-in;
}

[data-theme="dark"] .proj-images img {
    box-shadow: rgba(0, 0, 0, 0.8) 0px 20px 30px -10px;
}

/* INITIAL 3D STACKED STATE */
.proj-images img:nth-child(1) {
    transform: translateX(-15%) rotateY(35deg) rotateX(10deg) translateZ(40px);
    z-index: 3;
}

.proj-images img:nth-child(2) {
    transform: translateX(0%) rotateY(35deg) rotateX(10deg) translateZ(0px);
    z-index: 2;
    filter: brightness(0.7);
}

.proj-images img:nth-child(3) {
    transform: translateX(15%) rotateY(35deg) rotateX(10deg) translateZ(-40px);
    z-index: 1;
    filter: brightness(0.4);
}

/* HOVER SPREAD STATE */
.proj-images:hover img:nth-child(1) {
    --tx: -105%;
    transform: translateX(var(--tx)) rotateY(0) rotateX(0) translateZ(0);
    z-index: 3;
    filter: brightness(1);
}

.proj-images:hover img:nth-child(2) {
    --tx: 0%;
    transform: translateX(var(--tx)) rotateY(0) rotateX(0) translateZ(0);
    z-index: 3;
    filter: brightness(1);
}

.proj-images:hover img:nth-child(3) {
    --tx: 105%;
    transform: translateX(var(--tx)) rotateY(0) rotateX(0) translateZ(0);
    z-index: 3;
    filter: brightness(1);
}

/* Individual Image Hover (popping out a bit more) */
.proj-images:hover img:hover {
    transform: translateX(var(--tx)) scale(1.15) translateZ(30px);
    box-shadow: rgba(0, 0, 0, 0.6) 0px 30px 40px -10px;
    border-color: var(--accent);
    z-index: 4;
}

/* Buttons group */
.proj-weblinks {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 4px;
    align-self: flex-end;
}

/* ---- THE UIVERSE BUTTON ---- */
.button {
    --btn-color: #f39c12;
    --btn-hover-color: #e67e22;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 52px;
    background:
        radial-gradient(ellipse 45% 70% at 52% 48%, rgba(243, 156, 18, 0.90) 0%, rgba(243, 156, 18, 0.72) 15%, rgba(243, 156, 18, 0.45) 30%, rgba(243, 156, 18, 0.18) 50%, transparent 65%),
        radial-gradient(ellipse 30% 55% at 38% 58%, rgba(243, 156, 18, 0.70) 0%, rgba(243, 156, 18, 0.40) 20%, rgba(243, 156, 18, 0.12) 45%, transparent 62%),
        radial-gradient(ellipse 35% 45% at 63% 42%, rgba(243, 156, 18, 0.55) 0%, rgba(243, 156, 18, 0.28) 22%, rgba(243, 156, 18, 0.08) 48%, transparent 60%),
        radial-gradient(ellipse 20% 40% at 44% 55%, rgba(243, 156, 18, 0.40) 0%, rgba(243, 156, 18, 0.15) 30%, transparent 55%),
        radial-gradient(ellipse 25% 30% at 57% 45%, rgba(243, 156, 18, 0.25) 0%, rgba(243, 156, 18, 0.08) 35%, transparent 55%),
        transparent;
    border: none;
    box-shadow: none;
    color: white;
    gap: 8px;
    border-radius: 50px;
    cursor: pointer;
    transition: none;
    font-family: 'Mozilla Text', sans-serif;
    text-decoration: none;
}

[data-theme="dark"] .button {
    --btn-color: #E85D4A;
    --btn-hover-color: #d44a38;

    background:
        radial-gradient(ellipse 45% 70% at 52% 48%, rgba(232, 93, 74, 0.90) 0%, rgba(232, 93, 74, 0.72) 15%, rgba(232, 93, 74, 0.45) 30%, rgba(232, 93, 74, 0.18) 50%, transparent 65%),
        radial-gradient(ellipse 30% 55% at 38% 58%, rgba(232, 93, 74, 0.70) 0%, rgba(232, 93, 74, 0.40) 20%, rgba(232, 93, 74, 0.12) 45%, transparent 62%),
        radial-gradient(ellipse 35% 45% at 63% 42%, rgba(232, 93, 74, 0.55) 0%, rgba(232, 93, 74, 0.28) 22%, rgba(232, 93, 74, 0.08) 48%, transparent 60%),
        radial-gradient(ellipse 20% 40% at 44% 55%, rgba(232, 93, 74, 0.40) 0%, rgba(232, 93, 74, 0.15) 30%, transparent 55%),
        radial-gradient(ellipse 25% 30% at 57% 45%, rgba(232, 93, 74, 0.25) 0%, rgba(232, 93, 74, 0.08) 35%, transparent 55%),
        transparent;
}

.button:hover,
.button:active,
.button:focus {
    background:
        radial-gradient(ellipse 45% 70% at 52% 48%, rgba(243, 156, 18, 0.90) 0%, rgba(243, 156, 18, 0.72) 15%, rgba(243, 156, 18, 0.45) 30%, rgba(243, 156, 18, 0.18) 50%, transparent 65%),
        radial-gradient(ellipse 30% 55% at 38% 58%, rgba(243, 156, 18, 0.70) 0%, rgba(243, 156, 18, 0.40) 20%, rgba(243, 156, 18, 0.12) 45%, transparent 62%),
        radial-gradient(ellipse 35% 45% at 63% 42%, rgba(243, 156, 18, 0.55) 0%, rgba(243, 156, 18, 0.28) 22%, rgba(243, 156, 18, 0.08) 48%, transparent 60%),
        radial-gradient(ellipse 20% 40% at 44% 55%, rgba(243, 156, 18, 0.40) 0%, rgba(243, 156, 18, 0.15) 30%, transparent 55%),
        radial-gradient(ellipse 25% 30% at 57% 45%, rgba(243, 156, 18, 0.25) 0%, rgba(243, 156, 18, 0.08) 35%, transparent 55%),
        transparent;
    border: none;
    box-shadow: none;
    transform: none;
    outline: none;
}

[data-theme="dark"] .button:hover,
[data-theme="dark"] .button:active,
[data-theme="dark"] .button:focus {
    background:
        radial-gradient(ellipse 45% 70% at 52% 48%, rgba(232, 93, 74, 0.90) 0%, rgba(232, 93, 74, 0.72) 15%, rgba(232, 93, 74, 0.45) 30%, rgba(232, 93, 74, 0.18) 50%, transparent 65%),
        radial-gradient(ellipse 30% 55% at 38% 58%, rgba(232, 93, 74, 0.70) 0%, rgba(232, 93, 74, 0.40) 20%, rgba(232, 93, 74, 0.12) 45%, transparent 62%),
        radial-gradient(ellipse 35% 45% at 63% 42%, rgba(232, 93, 74, 0.55) 0%, rgba(232, 93, 74, 0.28) 22%, rgba(232, 93, 74, 0.08) 48%, transparent 60%),
        radial-gradient(ellipse 20% 40% at 44% 55%, rgba(232, 93, 74, 0.40) 0%, rgba(232, 93, 74, 0.15) 30%, transparent 55%),
        radial-gradient(ellipse 25% 30% at 57% 45%, rgba(232, 93, 74, 0.25) 0%, rgba(232, 93, 74, 0.08) 35%, transparent 55%),
        transparent;
    border: none;
    box-shadow: none;
    transform: none;
    outline: none;
}

.button .text {
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    -webkit-text-stroke: 1.4px rgba(243, 156, 18, 0.9);
    text-stroke: 1.0px rgba(243, 156, 18, 0.9);
    paint-order: stroke fill;
}

[data-theme="dark"] .button .text {
    -webkit-text-stroke: 0.4px rgba(232, 93, 74, 0.9);
    text-stroke: 1.0px rgba(232, 93, 74, 0.9);
}

.button .svg {
    display: flex;
    align-items: center;
    padding-top: 2px;
}

.button .svg svg {
    width: 20px;
    height: 18px;
}

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

.button:hover .svg svg {
    animation: jello-vertical 0.9s both;
    transform-origin: left;
}

@keyframes jello-vertical {
    0% {
        transform: scale3d(1, 1, 1);
    }

    30% {
        transform: scale3d(0.75, 1.25, 1);
    }

    40% {
        transform: scale3d(1.25, 0.75, 1);
    }

    50% {
        transform: scale3d(0.85, 1.15, 1);
    }

    65% {
        transform: scale3d(1.05, 0.95, 1);
    }

    75% {
        transform: scale3d(0.95, 1.05, 1);
    }

    100% {
        transform: scale3d(1, 1, 1);
    }
}

/* GitHub button */
.github-btn-wrapper {
    display: inline-flex;
    position: relative;
}

.group-github-btn {
    --gh-bg-1: #f39c12;
    --gh-bg-2: #e67e22;
    --gh-hover-1: #e67e22;
    --gh-hover-2: #d35400;

    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--gh-bg-1), var(--gh-bg-2));
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.5s;
    overflow: visible;
}

[data-theme="dark"] .group-github-btn {
    --gh-bg-1: var(--accent2);
    --gh-bg-2: #d44a38;
    --gh-hover-1: #d44a38;
    --gh-hover-2: #b03a2e;
}

.group-github-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.gh-tooltip {
    position: absolute;
    opacity: 0;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.3s 0.1s, top 0.3s;
}

.group-github-btn:hover {
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gh-hover-1), var(--gh-hover-2));
    transform: translateY(3px);
}

.group-github-btn:hover .gh-tooltip {
    opacity: 1;
    top: -38px;
}

/* ---- PROJECT DETAIL EXPAND ---- */
.project-detail {
    display: none;
    margin-top: 32px;
    padding-top: 28px;
    border-top: none;
    box-shadow: none;
    background: transparent;
    animation: fadeSlideUp 0.35s ease forwards;
}

.project-detail.open {
    display: block;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

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

.detail-section {
    margin-bottom: 24px;
}

.detail-section h4 {
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-faint);
    margin-bottom: 8px;
}

.detail-section p {
    font-size: 0.92rem;
    line-height: 1.68;
    color: var(--text-muted);
}

.detail-section ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-section ul li {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-muted);
    padding-left: 20px;
    position: relative;
    transition: color 0.25s ease;
}

.detail-section ul li:hover {
    color: var(--text);
}

.detail-section ul li::before {
    content: '✦';
    position: absolute;
    left: 0;
    top: 4px;
    color: var(--accent);
    font-size: 0.7rem;
    transition: transform 0.25s ease, color 0.25s ease;
}

[data-theme="dark"] .detail-section ul li::before {
    color: var(--accent2);
}

.detail-section ul li:hover::before {
    transform: rotate(90deg) scale(1.2);
}

.tools-list {
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.78rem !important;
    color: var(--text) !important;
    letter-spacing: 0.02em;
}

.detail-link-btn {
    margin-top: 8px;
}

/* =============================================
   EDUCATION GRID
   ============================================= */
#edu-skills::after {
    display: none;
}

/* =============================================
   EDUCATION NARRATIVE & TOOLTIPS
   ============================================= */
.edu-narrative-container {
    max-width: 760px;
    margin-bottom: 80px;
    /* Increased spacing */
}

.edu-narrative-text {
    font-family: 'Mozilla Text', sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    font-weight: 500;
}

.edu-tooltip-container {
    --tooltip-accent: var(--accent);
    --tt-bg: #f39c12;
    /* Light mode yellow */
    --tt-text: #111;
    /* High contrast dark text for yellow */
    --tt-muted: #333;
    position: relative;
    cursor: pointer;
    display: inline-flex;
    padding: 0 0.1em;
    color: var(--text);
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    margin: 0 2px;
}

[data-theme="dark"] .edu-tooltip-container {
    --tooltip-accent: var(--accent2);
    --tt-bg: #4a0e0e;
    /* Deep dark red */
    --tt-text: #fff;
    /* High contrast white text for red-orange */
    --tt-muted: #fdd;
}

.edu-tooltip {
    position: absolute;
    bottom: 125%;
    /* Moved even closer from 140% */
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    padding: 10px 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    /* Blending Gradient Effect */
    background: radial-gradient(circle at center, var(--tt-bg) 0%, var(--bg) 140%);
    border: none;
    border-radius: 20px;
    box-shadow: 0 10px 50px -10px var(--tt-bg);
    min-width: 180px;
    width: max-content;
    z-index: 100;
    backdrop-filter: blur(4px);
}

[data-theme="dark"] .edu-tooltip {
    box-shadow: 0 15px 60px -15px var(--tt-bg);
    background: radial-gradient(circle at center, var(--tt-bg) -50%, var(--bg) 110%);
}

.edu-tooltip::before {
    position: absolute;
    content: "";
    height: 8px;
    width: 16px;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #fcb94f;
    /* Theme Yellow */
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    /* Downward arrow */
    border: none;
}

[data-theme="dark"] .edu-tooltip::before {
    background: #4a0e0e;
}

.edu-tooltip-container.tooltip-active .edu-tooltip,
.edu-tooltip-container:hover .edu-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
    animation: tooltip-float-top 3s ease-in-out infinite;
}

/* Tooltip Bottom Modifier */
.edu-tooltip-container.tooltip-bottom .edu-tooltip {
    bottom: auto;
    top: 125%;
    /* Moved even closer from 140% */
    transform: translateX(-50%) translateY(-12px);
}

.edu-tooltip-container.tooltip-bottom.tooltip-active .edu-tooltip,
.edu-tooltip-container.tooltip-bottom:hover .edu-tooltip {
    transform: translateX(-50%) translateY(0);
    animation: tooltip-float-bottom 3s ease-in-out infinite;
}

@keyframes tooltip-float-top {

    0%,
    100% {
        transform: translateX(-50%) translateY(0) scale(1);
    }

    50% {
        transform: translateX(-50%) translateY(-6px) scale(1.02);
    }
}

@keyframes tooltip-float-bottom {

    0%,
    100% {
        transform: translateX(-50%) translateY(0) scale(1);
    }

    50% {
        transform: translateX(-50%) translateY(6px) scale(1.02);
    }
}

.edu-tooltip-container.tooltip-bottom .edu-tooltip::before {
    bottom: auto;
    top: -8px;
    height: 8px;
    width: 16px;
    border: none;
    background: #fcb94f;
    /* Theme Yellow */
    clip-path: polygon(50% 0, 0 100%, 100% 100%);
    /* Upward arrow */
}

[data-theme="dark"] .edu-tooltip-container.tooltip-bottom .edu-tooltip::before {
    background: #4a0e0e;
    /* Deep dark red */
}

.tooltip-content {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.tooltip-logo {
    width: 60px;
    /* Increased from 48px */
    height: 60px;
    /* Increased from 48px */
    background: #fff;
    padding: 4px;
    /* Reduced padding to make logo larger */
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.tooltip-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.tooltip-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.tooltip-name {
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--tt-text);
    line-height: 1.2;
    display: block;
}

.tooltip-period {
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.72rem;
    color: var(--tt-muted);
    font-weight: 500;
    display: block;
}

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

.edu-tooltip-container:hover .edu-text-link {
    color: var(--tooltip-accent);
}

@keyframes bounce {
    50% {
        color: var(--tooltip-accent);
    }

    75% {
        transform: scale(0.98) rotate(0.5deg);
    }

    100% {
        transform: scale(1.02);
    }
}

/* SKILLS */
.skills-grid-section {
    margin-top: 72px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    row-gap: 20px;
    column-gap: 32px;
}

.skills-section-title {
    grid-column: 1 / -1;
    font-family: 'Gayathri', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.skills-category {
    margin-bottom: 0;
}

.skills-cat-label {
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-faint);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border);
}

.skills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 0;
    background: transparent;
    transition: transform 0.3s ease;
    cursor: default;
}

.skill-item:hover {
    transform: translateY(-3px);
}

.skill-item img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.skill-item:hover img {
    transform: scale(1.1) rotate(5deg);
}

.skill-item span {
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    transition: color 0.3s ease;
}

.skill-item:hover span {
    color: var(--accent);
}

[data-theme="dark"] .skill-item:hover span {
    color: var(--accent2);
}

/* Languages */
.lang-row {
    gap: 12px;
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    transition: transform 0.3s ease;
    cursor: default;
}

.lang-item:hover {
    transform: translateY(-3px);
}

.lang-flag {
    font-size: 1.4rem;
}

.lang-name {
    display: block;
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.2;
}

.lang-level {
    display: block;
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--text-faint);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* =============================================
   BLOG
   ============================================= */
#blog {
    overflow: hidden;
}

.blog-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1.0;
    pointer-events: none;
    z-index: 0;
}

/* Light: show light image, hide dark image */
.blog-bg-img--dark {
    display: none;
}

/* Dark: show dark image, hide light image */
[data-theme="dark"] .blog-bg-img--light {
    display: none;
}

[data-theme="dark"] .blog-bg-img--dark {
    display: block;
}

/* Gradient overlay: color → transparent (0%-30%), full transparent (30%-70%), transparent → color (70%-100%) */
#blog::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            #F8F5F0 0%,
            rgba(248, 245, 240, 0) 30%,
            rgba(248, 245, 240, 0) 70%,
            #F8F5F0 100%);
    z-index: 1;
    pointer-events: none;
}

/* Dark mode gradient: fade to #06070F */
[data-theme="dark"] #blog::before {
    background: linear-gradient(to bottom,
            #06070F 0%,
            rgba(6, 7, 15, 0) 30%,
            rgba(6, 7, 15, 0) 70%,
            #06070F 100%);
}

#blog .container {
    position: relative;
    z-index: 2;
}

.blog-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.blog-parent {
    width: 100%;
    height: 100%;
    max-width: 350px;
    margin: 0 auto;
    perspective: 1000px;
    display: block;
}

.blog-card {
    position: relative;
    padding-top: 40px;
    border: 2px solid var(--border);
    border-radius: 8px;
    transform-style: preserve-3d;
    background: linear-gradient(135deg, #0000 18.75%, var(--surface) 0 31.25%, #0000 0),
        repeating-linear-gradient(45deg, var(--surface) -6.25% 6.25%, var(--bg) 0 18.75%);
    background-size: 60px 60px;
    background-color: var(--bg);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0px 20px 30px -10px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease-in-out;
}

[data-theme="dark"] .blog-card {
    box-shadow: 0px 20px 30px -10px rgba(0, 0, 0, 0.5);
}

.blog-card:hover {
    background-position: -100px 100px, -100px 100px;
    transform: rotate3d(0.5, 1, 0, 30deg);
}

.blog-card .content-box {
    transition: all 0.5s ease-in-out;
    padding: 50px 20px 20px 20px;
    transform-style: preserve-3d;
    border-top: 2px solid var(--border);
    border-radius: 0 0 6px 6px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    position: relative;
    z-index: 1;
}

.blog-top-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 16px;
    transform: translate3d(0px, 0px, 30px);
    transform-style: preserve-3d;
}

.blog-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.blog-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.58rem;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.reading-time {
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.blog-card .content-box::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.467);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    border-radius: 0 0 6px 6px;
    z-index: -1;
    pointer-events: none;
}

.blog-card .content-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.7;
    z-index: -2;
    transition: opacity 0.5s ease;
    border-radius: 0 0 6px 6px;
}

.blog-card-1 .content-box::before {
    background-image: url('images/blog1.jpg');
}

.blog-card-2 .content-box::before {
    background-image: url('images/blog2.jpg');
}

.blog-card:hover .content-box::before {
    opacity: 0.9;
}

.blog-card .card-title {
    display: inline-block;
    color: #ffffff;
    font-family: 'Mozilla Text', sans-serif;
    font-size: clamp(0.7rem, 2.3vw, 1.3rem);
    font-weight: 500;
    transition: all 0.5s ease-in-out;
    transform: translate3d(0px, 0px, 60px);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 12px;
}

.blog-tagline {
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.82rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 24px;
    transform: translate3d(0px, 0px, 45px);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
}

.blog-card .card-title:hover {
    transform: translate3d(0px, 0px, 90px);
    color: #f39c12;
}

[data-theme="dark"] .blog-card .card-title:hover {
    color: var(--accent2);
}

.blog-card .card-content {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.5s ease-in-out;
    transform: translate3d(0px, 0px, 30px);
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.blog-card .card-content:hover {
    transform: translate3d(0px, 0px, 60px);
}

.cta {
    position: relative;
    margin-top: auto;
    padding: 10px 14px;
    transition: all 0.2s ease;
    border: none;
    background: none;
    cursor: pointer;
    transform: translate3d(0px, 0px, 40px);
    display: flex;
    align-items: center;
    width: fit-content;
}

.cta:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    border-radius: 50px;
    background: var(--cta-bg);
    width: 38px;
    height: 38px;
    transition: all 0.3s ease;
}

.cta span {
    position: relative;
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #ffffff;
    transition: color 0.3s ease;
}

.cta svg {
    position: relative;
    top: 0;
    margin-left: 10px;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke: #ffffff;
    stroke-width: 2.5;
    transform: translateX(-5px);
    transition: all 0.3s ease;
}

.cta:hover:before {
    width: 100%;
}

.cta:hover span {
    color: var(--cta-text);
}

.cta:hover svg {
    transform: translateX(0);
    stroke: var(--cta-text);
}

.cta:active {
    transform: scale(0.95) translate3d(0px, 0px, 40px);
}

.blog-card .date-box {
    position: absolute;
    top: 30px;
    right: 30px;
    height: 60px;
    width: 60px;
    background: radial-gradient(circle at center, var(--cta-bg) 0%, rgba(var(--cta-bg-rgb), 0.75) 100%);
    border: 1px solid rgba(var(--cta-bg-rgb), 0.4);
    border-radius: 6px;
    padding: 10px;
    transform: translate3d(0px, 0px, 80px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

[data-theme="dark"] .blog-card .date-box {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
}

.blog-card .date-box span {
    display: block;
    text-align: center;
    color: #ffffff;
}

.blog-card .date-box .month {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.65rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
}

.blog-card .date-box .date {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
}

/* =============================================
   CONTACT
   ============================================= */
.contact-links {
    display: flex;
    flex-direction: column;
    margin-bottom: 52px;
}

.contact-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid rgba(var(--border-rgb), 0.2);
    transition: background 0.2s;
    gap: 16px;
}

.contact-line:last-of-type {
    border-bottom: 1px solid rgba(var(--border-rgb), 0.2);
}

.contact-line:hover {
    background: var(--surface);
    padding-left: 8px;
    padding-right: 8px;
    margin: 0 -8px;
    border-radius: 4px;
}

.contact-label {
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-faint);
    flex-shrink: 0;
    width: 80px;
}

.contact-value {
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    transition: color 0.2s;
}

.contact-arrow {
    opacity: 0;
    transition: opacity 0.2s;
}

.contact-line:hover .contact-arrow {
    opacity: 1;
}

/* ---- CV SECTION ---- */
.cv-section {
    margin-top: 0;
}

/* Switch holder — the neumorphic toggle */
.cv-toggle-area {
    margin-bottom: 0;
}

.switch-holder {
    display: inline-flex;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow:
        -6px -6px 12px rgba(255, 255, 255, 0.6),
        8px 8px 8px rgba(0, 0, 0, 0.12),
        inset 6px 6px 10px rgba(255, 255, 255, 0.6),
        inset 8px 8px 8px rgba(0, 0, 0, 0.1);
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    background: var(--surface);
    transition: background 0.4s, box-shadow 0.4s;
}

[data-theme="dark"] .switch-holder {
    box-shadow:
        -4px -4px 10px rgba(255, 255, 255, 0.04),
        6px 6px 8px rgba(0, 0, 0, 0.5),
        inset 4px 4px 10px rgba(255, 255, 255, 0.03),
        inset 6px 6px 8px rgba(0, 0, 0, 0.4);
}

.switch-label {
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.switch-toggle {
    height: 40px;
    display: flex;
    align-items: center;
}

.switch-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    z-index: -2;
}

.switch-toggle input[type="checkbox"]+label {
    position: relative;
    display: inline-block;
    width: 90px;
    height: 38px;
    border-radius: 20px;
    margin: 0;
    cursor: pointer;
    box-shadow:
        inset -6px -6px 12px rgba(255, 255, 255, 0.5),
        inset 8px 8px 8px rgba(0, 0, 0, 0.2);
    background: var(--bg2);
    transition: background 0.4s;
}

.switch-toggle input[type="checkbox"]+label::before {
    position: absolute;
    content: 'OFF';
    font-family: 'Mozilla Text', sans-serif;
    font-size: 11px;
    text-align: center;
    line-height: 24px;
    top: 7px;
    left: 7px;
    width: 42px;
    height: 24px;
    border-radius: 20px;
    background-color: #eeeeee;
    box-shadow: -2px -2px 4px rgba(255, 255, 255, 0.5), 3px 3px 5px rgba(0, 0, 0, 0.2);
    transition: 0.3s ease-in-out;
    color: #555;
}

.switch-toggle input[type="checkbox"]:checked+label::before {
    left: 46%;
    content: 'ON';
    color: #fff;
    background-color: #00b33c;
    box-shadow: -2px -2px 4px rgba(255, 255, 255, 0.4), 3px 3px 5px #00b33c;
}

/* CV Panel */
#cv-panel {
    margin-top: 24px;
    display: none;
    flex-direction: column;
    gap: 0;
}

#cv-panel.open {
    display: flex;
}

#cv-log {
    padding: 24px;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: 8px;
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.8rem;
    color: var(--text-faint);
    text-align: center;
}

#cv-drive-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.72rem;
    color: var(--text-faint);
}

#cv-drive-bar a {
    color: #006aff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

#cv-iframe {
    display: none;
    width: 100%;
    height: 680px;
    border: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
    background: #fff;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
    padding: 16px 0;
    background: var(--bg);
    border-top: 1px solid rgba(var(--border-rgb), 0.2);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
    transition: background 0.45s, border-color 0.45s;
    text-align: center;
    color: var(--text-muted);
    opacity: 0.1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}

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

.footer-name {
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.72rem;
    color: var(--text-faint);
    letter-spacing: 0.04em;
}

.footer-year {
    font-family: 'Mozilla Text', sans-serif;
    font-size: 0.7rem;
    color: var(--text-faint);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 680px) {
    .edu-grid {
        gap: 0;
    }

    .edu-item {
        gap: 20px;
        padding: 22px 0;
    }

    .edu-logo-wrap {
        width: 64px;
        height: 64px;
    }

    .edu-item:hover {
        gap: 24px;
    }

    .nav-links {
        display: none;
    }

    .nav-burger {
        display: flex;
    }

    .nav-logo {
        font-size: 1.4rem;
    }

    .nav-mobile a {
        font-size: 0.85rem;
    }

    .about-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .about-label-col {
        padding-top: 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .proj-images {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .proj-images img {
        border-radius: 4px;
    }

    .blog-item-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .skills-row {
        gap: 8px;
    }

    .lang-row {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 14px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }

    .switch-holder {
        flex-direction: column;
        gap: 14px;
    }

    .blog-card .card-title {
        font-size: 1.34rem;
    }
}

@media (max-width: 420px) {
    .proj-images {
        grid-template-columns: 1fr;
    }

    .proj-images img {
        aspect-ratio: 16/9;
    }
}

/* =============================================
   DARK MODE NAVBAR OVERRIDES (Liquid/Water Bubble Effect)
   ============================================= */
[data-theme="dark"] #navbar {
    background: transparent !important;
    border-bottom: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    padding: 12px 0 0 0 !important;
    height: auto !important;
}

[data-theme="dark"] #navbar::before {
    background-image: none !important;
    background: transparent !important;
    display: none !important;
}

[data-theme="dark"] .nav-inner {
    background: rgba(255, 255, 255, 0.03) !important;
    background-image: linear-gradient(135deg,
            rgba(255, 255, 255, 0.12) 0%,
            rgba(255, 255, 255, 0.02) 40%,
            rgba(0, 255, 204, 0.03) 65%,
            rgba(255, 255, 255, 0.06) 100%) !important;
    backdrop-filter: blur(3px) !important;
    -webkit-backdrop-filter: blur(3px) !important;
    border-radius: 50px !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow:
        inset 0 3px 6px rgba(255, 255, 255, 0.22),
        /* top highlight / liquid reflection */
        inset 0 -3px 6px rgba(0, 0, 0, 0.5),
        /* bottom shadow for 3D bubble depth */
        0 12px 36px rgba(0, 0, 0, 0.5),
        /* smooth outer drop shadow */
        0 1px 2px rgba(255, 255, 255, 0.05) !important;
    height: 58px !important;
    padding: 0 28px !important;
    max-width: calc(var(--max-w) - 48px);
    margin: 0 auto !important;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

/* Scrolled styling for dark mode bubble navbar */
[data-theme="dark"] #navbar.scrolled .nav-inner {
    background: rgba(255, 255, 255, 0.05) !important;
    background-image: linear-gradient(135deg,
            rgba(255, 255, 255, 0.14) 0%,
            rgba(255, 255, 255, 0.03) 40%,
            rgba(0, 255, 204, 0.04) 65%,
            rgba(255, 255, 255, 0.08) 100%) !important;
    box-shadow:
        inset 0 2px 4px rgba(255, 255, 255, 0.25),
        inset 0 -2px 4px rgba(0, 0, 0, 0.7),
        0 16px 40px rgba(0, 0, 0, 0.6) !important;
    transform: translateY(-2px) scale(0.99) !important;
}

/* Navigation logo in dark mode */
[data-theme="dark"] .nav-logo {
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2) !important;
    font-weight: 800 !important;
}

/* Links inside dark mode bubble navbar */
[data-theme="dark"] .nav-links a {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.25s ease !important;
}

[data-theme="dark"] .nav-links a:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.12) !important;
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.2),
        0 4px 12px rgba(0, 255, 204, 0.15) !important;
}

[data-theme="dark"] .nav-links a.active {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.16) !important;
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.25) !important;
}

[data-theme="dark"] .nav-cv-link {
    border-color: rgba(255, 255, 255, 0.45) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .nav-cv-link:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1) !important;
}

/* Burger menu spans in dark mode */
[data-theme="dark"] .nav-burger span {
    background: #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) !important;
}

/* Mobile optimizations for dark mode bubble navbar */
@media (max-width: 680px) {
    [data-theme="dark"] #navbar {
        padding: 4px 0 0 0 !important;
    }

    [data-theme="dark"] .nav-inner {
        width: calc(100% - 24px) !important;
        margin: 8px auto 0 !important;
        height: 50px !important;
        padding: 0 16px !important;
        border-radius: 30px !important;
        box-shadow:
            inset 0 2px 4px rgba(255, 255, 255, 0.22),
            inset 0 -2px 4px rgba(0, 0, 0, 0.6),
            0 8px 24px rgba(0, 0, 0, 0.5) !important;
    }

    [data-theme="dark"] .nav-mobile {
        width: calc(100% - 24px) !important;
        margin: 8px auto 0 !important;
        background: rgba(13, 15, 28, 0.88) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        border-radius: 20px !important;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6) !important;
        padding: 16px 20px !important;
    }

    [data-theme="dark"] .nav-mobile a {
        color: rgba(255, 255, 255, 0.9) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    [data-theme="dark"] .nav-mobile a:hover {
        color: #ffffff !important;
        background: rgba(255, 255, 255, 0.05) !important;
    }
}

/* =============================================
   BROWSER MOCKUP FOR SINGLE-IMAGE PROJECTS (5 & 6)
   ============================================= */
.proj-images.single-image-browser {
    height: auto;
    perspective: none;
    transform-style: flat;
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.browser {
    width: 100%;
    max-width: 560px;
    height: clamp(250px, 32vw, 350px);
    background: var(--surface);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

[data-theme="dark"] .browser {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.08);
}

.browser:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
    border-color: var(--accent);
}

[data-theme="dark"] .browser:hover {
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.6);
    border-color: var(--accent2);
}

/* tabs-head */
.tabs-head {
    background-color: #e3e3e3;
    height: 38px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-left: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    user-select: none;
    transition: background 0.4s, border-color 0.4s;
}

[data-theme="dark"] .tabs-head {
    background-color: #1e1f22;
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.tabs-head .tabs {
    display: flex;
    align-items: flex-end;
}

.tabs-head .tab-open {
    width: 170px;
    height: 30px;
    border-radius: 8px 8px 0 0;
    background-color: #f1f3f4;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    position: relative;
    transition: background 0.4s;
}

[data-theme="dark"] .tabs-head .tab-open {
    background-color: #2b2a33;
}

.tabs-head .tab-open .close-tab {
    color: #5f6368;
    font-size: 8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

[data-theme="dark"] .tabs-head .tab-open .close-tab {
    color: #b1b1b3;
}

.tabs-head .tab-open .close-tab:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #202124;
}

[data-theme="dark"] .tabs-head .tab-open .close-tab:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Rounded corners for tab integration */
.tabs-head .tab-open .rounded-l {
    position: absolute;
    background-color: #f1f3f4;
    width: 12px;
    height: 12px;
    bottom: 0;
    right: -12px;
    overflow: hidden;
    transition: background 0.4s;
}

[data-theme="dark"] .tabs-head .tab-open .rounded-l {
    background-color: #2b2a33;
}

.tabs-head .tab-open .rounded-l .mask-round {
    width: 100%;
    height: 100%;
    background-color: #e3e3e3;
    border-radius: 0 0 0 8px;
    transition: background 0.4s;
}

[data-theme="dark"] .tabs-head .tab-open .rounded-l .mask-round {
    background-color: #1e1f22;
}

.tabs-head .tab-open .rounded-r {
    position: absolute;
    background-color: #f1f3f4;
    width: 12px;
    height: 12px;
    bottom: 0;
    left: -12px;
    overflow: hidden;
    transition: background 0.4s;
}

[data-theme="dark"] .tabs-head .tab-open .rounded-r {
    background-color: #2b2a33;
}

.tabs-head .tab-open .rounded-r .mask-round {
    width: 100%;
    height: 100%;
    background-color: #e3e3e3;
    border-radius: 0 0 8px 0;
    transition: background 0.4s;
}

[data-theme="dark"] .tabs-head .tab-open .rounded-r .mask-round {
    background-color: #1e1f22;
}

.tabs-head .tab-open span {
    color: #3c4043;
    font-size: 0.68rem;
    font-weight: 550;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.4s;
    font-family: 'Mozilla Text', sans-serif;
}

[data-theme="dark"] .tabs-head .tab-open span {
    color: #fbfbfe;
}

.tabs-head .window-opt {
    display: flex;
    padding-right: 8px;
}

.tabs-head .window-opt button {
    height: 32px;
    width: 32px;
    border: none;
    background-color: transparent;
    transition: background-color 0.2s, color 0.2s;
    color: #5f6368;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

[data-theme="dark"] .tabs-head .window-opt button {
    color: #b1b1b3;
}

.tabs-head .window-opt button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .tabs-head .window-opt button:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.tabs-head .window-opt .window-close:hover {
    background-color: #e81123 !important;
    color: #fff !important;
}

/* head-browser */
.head-browser {
    height: 38px;
    background-color: #f1f3f4;
    padding: 5px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: background 0.4s;
    position: relative;
    top: 0;
    border-radius: 0;
}

[data-theme="dark"] .head-browser {
    background-color: #2b2a33;
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.head-browser input {
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    height: 100%;
    border-radius: 20px;
    outline: none;
    color: #3c4043;
    padding: 0 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    flex: 1;
    transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

[data-theme="dark"] .head-browser input {
    background-color: #1c1b22;
    border-color: transparent;
    color: #fbfbfe;
}

.head-browser input:hover {
    background-color: #f7f9fa;
    border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .head-browser input:hover {
    background-color: #2b2a33;
}

.head-browser input:focus {
    border-color: var(--accent);
    background-color: #ffffff;
}

[data-theme="dark"] .head-browser input:focus {
    border-color: var(--accent2);
    background-color: #1c1b22;
}

.head-browser button {
    width: 28px;
    height: 28px;
    border: none;
    background-color: transparent;
    color: #5f6368;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

[data-theme="dark"] .head-browser button {
    color: #b1b1b3;
}

.head-browser button:disabled {
    opacity: 0.3;
    cursor: default;
}

.head-browser button:hover:not(:disabled) {
    background-color: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .head-browser button:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.08);
}


/* browser-content */
.browser-content {
    flex: 1;
    width: 100%;
    height: calc(100% - 76px);
    overflow: hidden;
    background: #fff;
    position: relative;
}

[data-theme="dark"] .browser-content {
    background: #000;
}

.browser-content img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    position: relative !important;
    transform: none !important;
    rotate: none !important;
    filter: none !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: zoom-in !important;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.browser-content:hover img {
    transform: scale(1.03) !important;
}

@media (max-width: 680px) {
    .browser {
        height: 280px;
    }

    .tabs-head .tab-open {
        width: 120px;
    }
}

/* =============================================
   ACADEMIC PAPER DROPDOWN MENU
   ============================================= */
.dropdown-container {
    position: relative;
    display: inline-block;
    margin-top: 8px;
}

.dropdown-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    width: 290px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 100;
    padding: 8px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

[data-theme="dark"] .dropdown-menu {
    background: rgba(17, 21, 37, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5) !important;
}

.dropdown-container.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-muted) !important;
    text-decoration: none !important;
    font-size: 0.8rem;
    font-family: 'Mozilla Text', sans-serif;
    font-weight: 550;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-align: left;
}

.dropdown-menu a:hover {
    color: var(--text) !important;
    background: rgba(var(--border-rgb), 0.3);
}

[data-theme="dark"] .dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

.dropdown-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

[data-theme="dark"] .dropdown-item-icon {
    color: var(--accent2);
}

.dropdown-item-icon .doc-svg-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2.2px;
}

/* Chevron arrow rotation */
.dropdown-btn .chevron-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.dropdown-container.open .dropdown-btn .chevron-icon {
    transform: rotate(180deg);
}