/* style.css - Production Ready | Hex Theme Overlay | Custom Scrollbar | Live Border Pulse */

/* ---------- RESET & VARIABLES ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark theme (default) */
    --carbon: #0b0f14;
    --obsidian: #0f1620;
    --gold: #f5c84b;
    --gold-glow: rgba(245, 200, 75, 0.35);
    --text-light: rgba(255, 255, 255, 0.92);
    --text-muted: rgba(255, 255, 255, 0.64);
    --border-dim: rgba(255, 255, 255, 0.10);
    --card-bg: rgba(255, 255, 255, 0.06);
    --glass-bg: rgba(15, 22, 32, 0.52);
    --glass-strong: rgba(15, 22, 32, 0.74);
    --toggle-button-bg: rgba(255, 255, 255, 0.08);
    /* Default for dark mode */
    --shadow-md: 0 18px 45px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.55);
    --transition-smooth: 240ms cubic-bezier(0.2, 0.8, 0.2, 1);

    /* Spacing scale */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;

    /* Section Backgrounds */
    --section-bg-1: transparent;
    --section-bg-2: rgba(255, 255, 255, 0.01);
    --section-bg-3: rgba(255, 255, 255, 0.015);
    --section-bg-4: rgba(255, 255, 255, 0.02);
    --section-bg-5: rgba(255, 255, 255, 0.01);
}

/* Light theme */
.light-mode {
    --carbon: #F5F5F5;
    --obsidian: #FFFFFF;
    --gold: #a07a1f;
    --text-light: #111111;
    --text-muted: #2c2c2c;
    --border-dim: #DDDDDD;
    --card-bg: rgba(255, 255, 255, 0.85);
    --glass-bg: rgba(245, 245, 245, 0.9);
    --glass-strong: rgba(255, 255, 255, 0.95);
    --gold-glow: rgba(106, 80, 17, 0.25);
    --toggle-button-bg: rgba(0, 0, 0, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--carbon);
    color: var(--text-light);
    font-family: 'Inter', system-ui, sans-serif;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.2s ease;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--gold);
    color: #000;
    padding: 0.5rem 1rem;
    z-index: 10000;
    text-decoration: none;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

/* Ambient background */
.ambient-bg {
    position: fixed;
    inset: -25%;
    z-index: -2;
    pointer-events: none;
    background: radial-gradient(700px 520px at 30% 20%, rgba(245, 200, 75, 0.16), transparent 60%),
        radial-gradient(680px 520px at 75% 35%, rgba(120, 210, 255, 0.12), transparent 62%);
    filter: blur(30px) saturate(1.05);
    opacity: 0.22;
}

/* Floating Shapes Background */
.floating-shapes-container {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.floating-shapes-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 30%, var(--carbon) 70%);
    pointer-events: none;
    z-index: 1;
}

.shape-item {
    position: absolute;
    background: var(--gold-glow);
    opacity: 0.5;
    filter: blur(1px);
    pointer-events: none;
    will-change: transform;
    transform-origin: center center;
}

.shape-item:nth-child(odd) {
    animation-duration: 18s;
    animation-delay: 0s;
}

.shape-item:nth-child(even) {
    animation-duration: 20s;
    animation-delay: 5s;
}

.shape-item:nth-child(3n) {
    animation-duration: 16s;
    animation-delay: 10s;
}

.shape-item:nth-child(4n) {
    animation-duration: 22s;
    animation-delay: 2s;
}

.shape-circle {
    border-radius: 50%;
}

.shape-triangle {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.shape-quadrilateral {
    clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
}

.shape-pentagon {
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}

.shape-hexagon {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

@keyframes floatShape {
    0% {
        transform: translate3d(0, 0, 0);
    }

    25% {
        transform: translate3d(20px, -30px, 0);
    }

    50% {
        transform: translate3d(-15px, -60px, 0);
    }

    75% {
        transform: translate3d(25px, -20px, 0);
    }

    100% {
        transform: translate3d(-20px, -80px, 0);
    }
}

@keyframes rotateShape {
    from {
        rotate: 0deg;
    }

    to {
        rotate: 360deg;
    }
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 2rem);
}

/* Section entrance animation */
.section-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.9, 0.4, 1.1),
        transform 0.7s cubic-bezier(0.2, 0.9, 0.4, 1.1),
        background-color 1s ease-out;
}

.section-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero grid overlay */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(var(--border-dim) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-dim) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .section-animate {
        opacity: 1;
        transform: none;
    }
}

/* ---------- NAVBAR ---------- */
.navbar {
    position: fixed;
    top: 20px;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.navbar-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border-radius: 60px;
    padding: 0.6rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    border: 1px solid var(--border-dim);
    box-shadow: var(--shadow-md);
    pointer-events: auto;
    transition: all var(--transition-smooth);
}

.navbar.scrolled .navbar-container {
    padding: 0.3rem 1.8rem;
    background: var(--glass-strong);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.12em;
    background: linear-gradient(135deg, var(--text-light) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
}

.logo span {
    background: linear-gradient(135deg, var(--gold) 0%, #ffd966 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-menu {
    display: flex;
    gap: 1.2rem;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.4rem 0;
    position: relative;
    opacity: 0.85;
    transition: color var(--transition-smooth);
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
    opacity: 1;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
}

.navbar-actions {
    display: flex;
    gap: 0.8rem;
}

.theme-toggle,
.mobile-toggle {
    background: var(--toggle-button-bg);
    border: 1px solid var(--border-dim);
    border-radius: 40px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: all var(--transition-smooth);
}

.light-mode .theme-toggle,
.light-mode .mobile-toggle {
    background: var(--toggle-button-bg);
}

.theme-toggle:hover,
.mobile-toggle:hover {
    background: rgba(245, 200, 75, 0.15);
    border-color: var(--gold);
}

.mobile-toggle {
    display: none;
}

/* Mobile menu */
@media (max-width: 768px) {
    .mobile-toggle {
        display: inline-flex;
    }

    .nav-menu {
        position: fixed;
        top: 4.25rem;
        right: -1rem;
        bottom: 0;
        left: auto;
        width: min(200px, 90%);
        height: 100vh;
        flex-direction: column;
        background: var(--glass-strong);
        backdrop-filter: blur(30px);
        align-items: center;
        gap: 2.5rem;
        overflow: auto;
        padding: 2rem;
        text-align: center;
        transform: translateX(100%);
        opacity: 0;
        transition: transform 0.5s cubic-bezier(0.7, 0, 0.3, 1), opacity 0.5s cubic-bezier(0.7, 0, 0.3, 1);
        pointer-events: none;
        z-index: 9999;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-menu.active {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-menu.active .nav-link {
        opacity: 0;
        transform: translateY(30px);
        animation: navLinkFadeIn 0.5s ease forwards;
    }

    .nav-menu.active .nav-link:nth-child(1) {
        animation-delay: 0.1s;
    }

    .nav-menu.active .nav-link:nth-child(2) {
        animation-delay: 0.2s;
    }

    .nav-menu.active .nav-link:nth-child(3) {
        animation-delay: 0.3s;
    }

    .nav-menu.active .nav-link:nth-child(4) {
        animation-delay: 0.4s;
    }

    .nav-menu.active .nav-link:nth-child(5) {
        animation-delay: 0.5s;
    }

    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 998;
        transition: opacity 0.5s ease;
    }

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

    body.menu-open {
        overflow: hidden;
    }
}

/* HERO Split */
.hero-split {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    min-height: 100vh;
    padding: 7rem clamp(1rem, 5vw, 2rem) 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-badge {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gold);
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.8rem);
    font-weight: 700;
    line-height: 1.05;
}

.hero-gold-line {
    width: 80px;
    height: 4px;
    background: var(--gold);
    margin: 1rem 0 1.5rem;
}

.hero-tagline {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.hero-stats>div {
    background: var(--card-bg);
    border: 1px solid var(--border-dim);
    border-radius: 999px;
    padding: 0.6rem 1.2rem;
}

.hero-stats span {
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--gold);
}

.hero-portrait {
    width: min(420px, 88vw);
    aspect-ratio: 1/1;
    position: relative;
    animation: portraitFloat 6s ease-in-out infinite;
    transition: transform var(--transition-smooth);
    z-index: 1;
    filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.4));
}

.hexagon-frame {
    background: linear-gradient(90deg, var(--gold), #fff, var(--gold), #fff, var(--gold));
    background-size: 400% 100%;
    animation: borderShine 5s linear infinite;
    padding: 5px;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    border: none;
    box-shadow: none;
    overflow: hidden;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-portrait__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-portrait:hover {
    transform: scale(1.03) translateY(-5px);
}

.hero-portrait:hover .hero-portrait__img {
    transform: scale(1.1);
}

/* Interactive Shine Effect */
.hero-portrait::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.25),
            transparent);
    transform: skewX(-20deg);
    transition: left 0.7s ease-in-out;
    z-index: 2;
    pointer-events: none;
}

.hero-portrait:hover::before {
    left: 150%;
}

.hero-portrait::after {
    content: '';
    position: absolute;
    inset: -5%;
    background: radial-gradient(circle at center, var(--gold-glow) 0%, transparent 70%);
    z-index: -1;
    border-radius: 50%;
    filter: blur(35px);
    animation: glowPulse 4s infinite alternate ease-in-out;
}

@keyframes borderShine {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 400% 50%;
    }
}

@keyframes portraitFloat {

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

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

@keyframes glowPulse {
    from {
        opacity: 0.3;
        transform: scale(0.9);
    }

    to {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Hide mobile card by default */
.mobile-hero-card {
    display: none;
}

/* Mobile reorder */
@media (max-width: 768px) {
    .hero-split {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-gold-line {
        margin-left: auto;
        margin-right: auto;
    }

    /* Hide desktop hero content on mobile */
    .hero-left,
    .hero-right {
        display: none;
    }

    /* Show and style mobile hero card */
    .mobile-hero-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 2.5rem 1.5rem;
        background: var(--card-bg);
        border: 1px solid var(--border-dim);
        border-radius: 32px;
        margin: 2rem auto;
        max-width: 400px;
        box-shadow: var(--shadow-md);
        gap: 1rem;
        backdrop-filter: blur(12px);
    }

    .mobile-hero-card .hero-portrait {
        width: 200px;
        height: 200px;
        margin-bottom: 0.5rem;
    }

    .mobile-hero-card .mobile-hero-name {
        font-family: 'Space Grotesk', sans-serif;
        font-size: 2.2rem;
        font-weight: 700;
        line-height: 1.1;
        color: var(--text-light);
        margin: 0;
    }

    .mobile-hero-card .hero-stats {
        gap: 0.75rem;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        width: 100%;
    }

    .mobile-hero-card .hero-stats>div {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    .mobile-hero-card .hero-stats span {
        font-size: 1.3rem;
    }

    .hero-stats {
        justify-content: center;
    }

    .magnetic-buttons {
        justify-content: center;
    }

    /* Styles for the badge and tagline within the mobile card */
    .mobile-hero-card .mobile-hero-badge {
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 2px;
        color: var(--gold);
        margin-bottom: 0.5rem;
    }

    .mobile-hero-card .mobile-hero-tagline {
        font-size: 0.95rem;
        color: var(--text-muted);
        line-height: 1.4;
    }
}

/* Magnetic buttons */
.btn-magnetic {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(245, 200, 75, 0.65);
    color: var(--text-light);
    padding: 0.85rem 1.6rem;
    font-weight: 600;
    border-radius: 40px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-smooth);
    text-decoration: none;
}

.btn-magnetic:hover {
    background: rgba(245, 200, 75, 0.12);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.magnetic-buttons {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 480px) {
    .hero-stats {
        grid-template-columns: 1fr;
    }
}

/* Section background colors */
#hero {
    background-color: var(--section-bg-1);
}

#skills {
    background-color: var(--section-bg-2);
}

#timeline {
    background-color: var(--section-bg-3);
}

#projects {
    background-color: var(--section-bg-4);
}

#contact {
    background-color: var(--section-bg-5);
}

/* About */
.precision-about {
    padding: var(--space-lg) 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    /* Adjust grid for better layout */
    gap: 2.5rem;
    align-items: flex-start;
    /* Align items to the start of the cross axis */
    background: var(--glass-bg);
    /* Apply glass background to the grid container */
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-dim);
    border-radius: 28px;
    padding: 2.5rem;
}

.about-quote {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    /* flex: 1; */
    /* Removed as we are using grid now */
    border-left: 3px solid var(--gold);
    padding-left: 1.5rem;
    padding-right: 1rem;
    /* Add some padding for better spacing */
    /* No need for individual glass background here if applied to parent grid */
    /* background: var(--glass-bg); */
    /* backdrop-filter: blur(12px); */
    /* border: 1px solid var(--border-dim); */
    /* border-radius: 20px; */
}

.about-text {
    color: var(--text-muted);
    /* No need for individual glass background here if applied to parent grid */
    /* background: var(--glass-bg); */
    /* backdrop-filter: blur(12px); */
    /* border: 1px solid var(--border-dim); */
    /* border-radius: 20px; */
    padding-left: 1rem;
    /* Add some padding for better spacing */
}

.about-points {
    list-style: none;
}

.about-points li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    /* If you want each list item to have a subtle glass effect, uncomment below */
    /* background: rgba(255, 255, 255, 0.02); */
    /* border-radius: 8px; */
    /* padding: 0.5rem 1rem; */
    /* border: 1px solid rgba(255, 255, 255, 0.05); */
}

.about-points i {
    color: var(--gold);
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        /* Stack columns on mobile */
        padding: 1.5rem;
    }

    .about-quote {
        padding-left: 1rem;
        padding-right: 0;
        margin-bottom: 1.5rem;
        /* Add space between quote and text on mobile */
    }

    .about-text {
        padding-left: 0;
    }
}

/* Bento Skills */
.bento-skills {
    padding: var(--space-lg) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-md);
}

.section-title h2 {
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    font-family: 'Space Grotesk', sans-serif;
}

.section-title span {
    color: var(--gold);
}

.title-accent {
    width: 70px;
    height: 3px;
    background: var(--gold);
    margin: 0.5rem auto;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.8rem;
}

.bento-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    padding: 2rem;
    border-radius: 32px;
    border: 1px solid var(--border-dim);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bento-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(245, 200, 75, 0.25);
}

.bento-card i {
    font-size: 2.2rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

/* Timeline */
.timeline-draw {
    padding: var(--space-lg) 0;
}

.timeline-svg-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline-svg {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    width: 2px;
    height: 100%;
    z-index: 1;
    background: var(--border-dim);
}

.timeline-items {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.timeline-node {
    width: 45%;
    align-self: flex-start;
    background: var(--card-bg);
    padding: 1.2rem 1.6rem;
    border-radius: 22px;
    border: 1px solid var(--border-dim);
    transition: transform 0.2s ease, box-shadow 0.2s, background 0.3s ease;
    position: relative;
}

.timeline-node:nth-child(even) {
    align-self: flex-end;
    border-right: 4px solid var(--gold);
    border-left: 1px solid var(--border-dim);
}

.timeline-node:nth-child(odd) {
    border-left: 4px solid var(--gold);
}

.timeline-node::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 16px;
    height: 16px;
    background: var(--gold);
    border-radius: 50%;
    z-index: 3;
    transform: translateY(-50%);
}

.timeline-node:nth-child(odd)::before {
    right: -25px;
}

.timeline-node:nth-child(even)::before {
    left: -25px;
}

.timeline-node:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.node-year {
    font-weight: 700;
    color: var(--gold);
}

@media (max-width: 768px) {
    .timeline-svg {
        left: 20px;
    }

    .timeline-items {
        margin-left: 0;
    }

    .timeline-node {
        width: calc(100% - 40px);
        align-self: flex-end !important;
    }

    .timeline-node::before {
        left: -33px !important;
    }
}

/* Horizontal gallery */
.horizontal-gallery {
    padding: var(--space-lg) 0;
    overflow-x: hidden;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0 clamp(1rem, 5vw, 2rem);
    margin-bottom: 2rem;
}

.scroll-hint {
    font-size: 0.8rem;
    color: var(--gold);
}

.horizontal-scroll {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) transparent;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 1rem;
}

.horizontal-scroll::-webkit-scrollbar {
    height: 6px;
}

.horizontal-scroll::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 10px;
}

.horizontal-scroll::-webkit-scrollbar-thumb:hover {
    background: #e6b422;
}

.gallery-track {
    display: flex;
    gap: 2rem;
    padding: 0 clamp(1rem, 5vw, 2rem);
    width: max-content;
}

.project-card {
    width: 360px;
    height: 480px;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border-radius: 26px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s;
    scroll-snap-align: start;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-img {
    height: 70%;
    width: 100%;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-body {
    height: 30%;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 768px) {
    .project-card {
        width: 280px;
        height: 400px;
    }
}

@supports not (scroll-snap-type: x mandatory) {
    .horizontal-scroll {
        overflow-x: visible;
    }

    .gallery-track {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        width: auto;
    }
}

.scroll-navigation {
    display: flex;
    gap: 0.5rem;
}

/* Contact */
.contact-fusion {
    padding: var(--space-lg) 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.contact-panel {
    background: var(--card-bg);
    border-radius: 28px;
    padding: 1.6rem;
    backdrop-filter: blur(12px);
}

.contact-card {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    padding: 1.2rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-dim);
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    margin-bottom: 1rem;
}

.contact-card:hover {
    transform: translateX(8px);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--gold-glow);
}

.contact-card i {
    font-size: 1.2rem;
    color: var(--gold);
}

.contact-card .contact-value {
    text-decoration: none;
    color: var(--text-light);
    transition: color 0.2s ease;
}

.contact-card .contact-value:hover {
    color: var(--gold);
}

.contact-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.social-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.social-glow {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-glow a {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-dim);
    border-radius: 14px;
    color: var(--text-light);
    font-size: 1.25rem;
    text-decoration: none;
    transition: all var(--transition-smooth);
}

.social-glow a:hover {
    background: var(--gold-glow);
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 0 15px var(--gold-glow);
}

.edu-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--card-bg);
    padding: 1rem 2rem;
    border-radius: 50px;
    width: fit-content;
    margin: 0 auto;
}

.form-row--two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.field-input {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--border-dim);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-light);
    padding: 0.8rem 1rem;
    margin: 0 0 0.6rem 0;
}

.field-input:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 200, 75, 0.2);
}

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

    .form-row--two {
        grid-template-columns: 1fr;
    }
}

.premium-footer {
    text-align: center;
    margin-top: 3rem;
}

.copy {
    opacity: 0.6;
    font-size: 0.8rem;
}

/* Back to top button */
.back-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gold);
    color: #000;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top-btn:hover {
    transform: translateY(-4px);
    background: #e6b422;
}

/* Hexagon Overlay for Theme Toggle */
.hex-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    overflow: hidden;
}

.hex-cell {
    position: absolute;
    width: 60px;
    height: 68px;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    background: var(--hex-color, var(--carbon));
    border: 1px solid rgba(245, 200, 75, 0.3);
    transform: scale(1.5);
    opacity: 0;
    transition: transform 100ms cubic-bezier(0.4, 0, 0.2, 1) var(--d, 0ms),
        opacity 100ms cubic-bezier(0.4, 0, 0.2, 1) var(--d, 0ms);
    will-change: transform, opacity;
}

.hex-overlay.on .hex-cell {
    transform: scale(1);
    opacity: 1;
}

.hex-overlay.out .hex-cell {
    transition-delay: var(--dout, 0ms);
    transform: scale(0);
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {

    .hex-overlay,
    .hex-cell {
        transition: none !important;
    }
}