:root {
    --bg-color: #F7F5DC;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --accent: #be082d;

    /* USER REQUESTED LOADER VARS */
    --lime: #FFFDD0;
    --red: #be082d;
    --pink: #F0E8BB;
    --dark-blue: #E1D2A6;
    --light-blue: #FFFDD0;
    --background: #F7F5DC;
    --white: #1a1a1a;
    --wiggle: linear(0, 0.739 6.1%, 0.912 8.8%, 0.954 10.1%, 0.967 11.4%, 0.954 12.7%, 0.916 14%, 0.751 16.9%, -0.304 29%, -0.446 31.8%, -0.511 34.5%, -0.517 35.7%, -0.509 37%, -0.455 39.6%, 0.035 51.2%, 0.126 54.4%, 0.171 57.5%, 0.178 59.9%, 0.164 62.5%, 0.025 72.8%, -0.017 78.2%, -0.023 82.8%, -0.004 93%, 0);

    /* Fonts */
    --font-heading: 'moonlander', sans-serif;
    --font-primary: 'Century Gothic', sans-serif;
    --font-secondary: 'Futura', sans-serif;
}

@font-face {
    font-family: moonlander;
    src: url(./fonts/Moonlander.ttf);
    font-display: swap;
}

/* Houdini Properties */
@property --distance-x {
    syntax: "<length>";
    inherits: true;
    initial-value: 0px;
}

@property --distance-y {
    syntax: "<length>";
    inherits: true;
    initial-value: 0px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   NAVIGATION (Hidden initially, faded in via JS)
   ========================================= */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    z-index: 100;
    opacity: 0;
    /* Hidden until intro completes */
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-primary);
}

.contact-btn {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--accent);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-icon-btn {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 4px;
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 7px;
    transition: border-color 0.3s, color 0.3s, background 0.3s;
    animation: nav-icon-pulse 3.5s ease-in-out infinite;
}

#dragon-btn {
    animation: dragon-btn-pulse 3.5s ease-in-out infinite;
    animation-delay: 0s;
}

@keyframes dragon-btn-pulse {
    0%, 60%, 100% { transform: scale(1); color: var(--text-primary); border-color: rgba(0,0,0,0.18); }
    65%           { transform: scale(1.28); color: #39ff6a; border-color: #39ff6a; }
    70%           { transform: scale(0.92); color: #39ff6a; border-color: #39ff6a; }
    75%           { transform: scale(1.14); color: var(--text-primary); border-color: rgba(0,0,0,0.18); }
    80%           { transform: scale(1); }
}

#music-btn {
    animation-delay: 1.2s;
}

.nav-icon-btn svg {
    width: 100%;
    height: 100%;
}

.nav-icon-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(190, 8, 45, 0.06);
    animation: none;
}

.nav-icon-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(190, 8, 45, 0.1);
    animation: none;
}

@keyframes nav-icon-pulse {
    0%, 60%, 100% { transform: scale(1); }
    65%           { transform: scale(1.28); }
    70%           { transform: scale(0.92); }
    75%           { transform: scale(1.14); }
    80%           { transform: scale(1); }
}

.contact-btn:hover {
    background: var(--accent);
    color: var(--bg-color);
}

/* Center Plus Symbol */
#center-plus {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: var(--accent);
    font-weight: bold;
    z-index: 15;
}

/* =========================================
   USER REQUESTED LOADER STYLES
   ========================================= */
#loading-wrapper {
    position: fixed;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background-color: var(--background);
    z-index: 9999;
    display: grid;
    place-items: center;
    /* transition: transform 1s ease-in-out; */
    /* Manual control via GSAP */
}

#loader-title {
    font-size: clamp(3rem, 10vw, 6rem);
    margin: 0;
    /* user-select: none; included in span */
}

#loader-title span {
    display: inline-block;
    white-space: pre;
    user-select: none;
    /* Updated Colors: Red/White/Grey Context */
    text-shadow:
        calc(var(--distance-x)) calc(var(--distance-y)) rgba(255, 66, 66, 0.9),
        calc(var(--distance-x) * 2) calc(var(--distance-y) * 2) rgba(26, 26, 26, 0.9),
        calc(var(--distance-x) * 3) calc(var(--distance-y) * 3) rgba(136, 136, 136, 0.9),
        calc(var(--distance-x) * 4) calc(var(--distance-y) * 4) rgba(255, 0, 0, 0.9),
        calc(var(--distance-x) * 5) calc(var(--distance-y) * 5) rgba(200, 200, 200, 0.9);

    animation: swoosh infinite both var(--wiggle);
    animation-duration: 1.5s;
    animation-delay: calc(0s + var(--index) * .05s);
    /* Start immediately */
}

@keyframes swoosh {
    to {
        transform: translateY(100px) translateX(10px);
        --distance-y: -10px;
        --distance-x: 1px;
    }
}

#loading-percent {
    position: absolute;
    bottom: 20%;
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    color: var(--white);
    font-weight: bold;
    letter-spacing: 2px;
}

/* =========================================
   INTRO TEXT OVERLAY
   ========================================= */
#intro-sequence {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    /* Flex to center content */
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 10000;
    /* ABOVE loader (9999) so text is visible */
    background-color: var(--bg-color);
    /* Solid bg to cover loader */
    opacity: 0;
    /* Start hidden, JS will fade it in */
}

/* We will make intro sequence z-index 10000 so it can be seen on top if needed, or we hide loader wrapper. */

.intro-stage {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    /* Hidden by default */
    background-color: var(--bg-color);
    /* Matches bg to hide home */
}

/* NEURAL NODES LAYOUT */
.intro-stage {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    pointer-events: none;
}

.neural-network-container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    overflow: visible;
}

.intro-main-text {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    color: var(--text-primary);
    text-transform: uppercase;
    z-index: 2;
    background: var(--bg-color);
    /* Mask lines behind text */
    padding: 10px 20px;
    position: relative;
}

/* NODES */
.node-words-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.node-word {
    font-family: var(--font-secondary);
    font-size: 1rem;
    color: var(--accent);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(26, 26, 26, 0.5);
    z-index: 10;
}

.node-word::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background: var(--lime);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--lime);
}


/* CONNECTING LINES */
.connection-lines {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    /* Brighter lines */
    z-index: 1;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.connection-lines::after,
.connection-lines::before {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
}

/* Crosshair effect */
.connection-lines::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
}

.connection-lines::after {
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
}


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

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

/* SKIP BUTTON */
#skip-intro {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 10000;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.3);
    color: rgba(0, 0, 0, 0.6);
    font-family: var(--font-secondary);
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 10px 24px;
    cursor: pointer;
    pointer-events: auto;
    /* Override parent's pointer-events: none */
    opacity: 0;
    animation: skipFadeIn 0.8s ease 2s forwards;
    transition: all 0.3s ease;
}

#skip-intro:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.2);
}

#skip-intro span {
    display: inline-block;
    transition: transform 0.3s ease;
}

#skip-intro:hover span {
    transform: translateX(4px);
}

#skip-intro.fade-out {
    opacity: 0 !important;
    animation: none;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

@keyframes skipFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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


/* =========================================
   CIRCLE UI
   ========================================= */
#hero-circle-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: var(--bg-color);
}

#circle {
    height: 180vh;
    width: 180vh;
    top: 50%;
    left: -80vh;
    transform: translate(0, -50%) rotate(100deg);
    position: absolute;
    border-radius: 50%;
    border: 2px solid #be082d;
    z-index: 10;
    will-change: transform;
}

.stripe {
    width: 100%;
    height: 80px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(0, -50%);
    transform-origin: 0% 50%;
    display: flex;
    /* transition: all 0.5s; NOT on parent to avoid conflict with GSAP rotation of parent? No this is stripe. */
}

.str1 {
    transform: translate(0, -50%) rotate(-40deg);
}

.str2 {
    transform: translate(0, -50%) rotate(-20deg);
}

.str3 {
    transform: translate(0, -50%) rotate(0deg);
}

/* Center */
.str4 {
    transform: translate(0, -50%) rotate(20deg);
}

.str5 {
    transform: translate(0, -50%) rotate(40deg);
}

.firsthalf {
    width: 50%;
    height: 100%;
    position: relative;
    flex-shrink: 0;
    /* Ensure it stays exactly 50% width */
}

.secondhalf {
    width: 60%;
    height: 100%;
    padding-left: 120px;
    opacity: 0.5;
    color: #be082d;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: opacity 0.3s;
}

.firsthalf .dot {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    right: -5px;
    top: 50%;
    position: absolute;
    transform: translate(0, -50%);
    background-color: #ff0000;
    box-shadow: 0 0 10px #ff0000;
}

.secondhalf h4 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 400;
    color: #ff0000;
    margin-bottom: 5px;
}

.secondhalf h6 {
    font-family: var(--font-secondary);
    font-size: 1rem;
    font-weight: 300;
    color: #ff0000;
}

.stripe.active .secondhalf {
    opacity: 1;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

#panel {
    position: absolute;
    height: 40%;
    width: 50px;
    right: -3%;
    /* Start off-screen, JS animates to 3% */
    top: 50%;
    transform: translate(0, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    z-index: 20;
}

.minicircle {
    cursor: pointer;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #be082d;
    opacity: 0.25;
    will-change: transform, opacity;
}

.minicircle:hover,
.minicircle.active {
    background-color: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

/* =========================================
   SECTIONS
   ========================================= */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    pointer-events: none;
}

nav * {
    pointer-events: auto;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
}

.contact-btn {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border: 1px solid #333;
    border-radius: 4px;
}

section {
    position: relative;
    padding: 0 5%;
    width: 100%;
}

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

.section-label {
    font-family: var(--font-secondary);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ABOUT */
#about {
    padding: 10rem 5%;
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.about-text h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 4rem);
    margin-bottom: 2rem;
}

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

.about-text p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #444444;
    max-width: 60ch;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border-left: 1px solid #333;
    padding-left: 2rem;
}

.stat-item .num {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--accent);
}

.stat-item .desc {
    font-family: var(--font-secondary);
    color: var(--text-secondary);
}

/* EXPERIENCE */
#experience {
    padding-bottom: 10rem;
}

.timeline {
    border-left: 1px solid #333;
    margin-left: 1rem;
}

.timeline-item {
    margin-left: 2rem;
    margin-bottom: 4rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.4rem;
    top: 0.5rem;
    width: 0.8rem;
    height: 0.8rem;
    background: var(--bg-color);
    border: 2px solid var(--accent);
    border-radius: 50%;
}

.timeline-date {
    font-family: var(--font-secondary);
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 0.2rem;
}

.timeline-content h4 {
    font-family: var(--font-primary);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.timeline-content p {
    color: #444444;
    max-width: 60ch;
}

.tags span {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border: 1px solid #333;
    border-radius: 50px;
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.timeline-content .tags {
    margin-top: 1.5rem;
}

/* PROJECTS */
#projects {
    padding-bottom: 10rem;
}

/* PROJECTS */
#projects {
    padding-top: 6rem;
}

#projects .container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.project-card {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.4s ease;
}

.project-card:hover {
    border-color: rgba(255, 51, 51, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(255, 51, 51, 0.08), 0 0 0 1px rgba(255, 51, 51, 0.1);
}

/* Image column */
.project-image {
    position: relative;
    min-height: 320px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    overflow: hidden;
}

/* YouTube embed variant */
.project-image.project-video-embed {
    padding: 0;
    display: flex;
    align-items: stretch;
}

.project-image.project-video-embed iframe {
    width: 100%;
    height: 100%;
    min-height: 320px;
    border: none;
    display: block;
}

.project-image.no-img {
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image.no-img::after {
    content: '⚡';
    font-size: 3rem;
    opacity: 0.15;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.project-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-family: var(--font-secondary);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0.4rem 0.8rem;
    backdrop-filter: blur(5px);
    border-radius: 0.25rem;
    z-index: 2;
}

.project-badge.enterprise {
    background: rgba(26, 26, 26, 0.88);
    border: 1px solid rgba(26, 26, 26, 0.6);
    color: #F7F5DC;
}

.project-badge.proprietary {
    background: rgba(194, 167, 124, 0.3);
    border: 1px solid rgba(140, 100, 40, 0.5);
    color: #5c3d11;
}

.project-badge.live {
    background: rgba(22, 163, 74, 0.15);
    border: 1px solid rgba(22, 163, 74, 0.5);
    color: #15803d;
}

/* Content column */
.project-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.project-number {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 2px;
}

.project-client {
    font-family: var(--font-secondary);
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.45);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.project-name {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.project-subtitle {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    color: var(--accent);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    opacity: 0.85;
}

.project-desc {
    font-family: var(--font-secondary);
    font-size: 1rem;
    color: rgba(0, 0, 0, 0.6);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.project-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.project-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.stat-val {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

.stat-label {
    font-family: var(--font-secondary);
    font-size: 0.7rem;
    color: rgba(0, 0, 0, 0.4);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.project-tags span {
    font-family: var(--font-secondary);
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.6);
    letter-spacing: 1px;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.2rem;
    transition: all 0.3s ease;
}

.project-card:hover .project-tags span {
    border-color: rgba(190, 8, 45, 0.3);
    color: rgba(0, 0, 0, 0.6);
}

/* Action buttons */
.project-actions {
    margin-top: auto;
}

.project-btn {
    display: inline-block;
    font-family: var(--font-secondary);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.6rem 1.5rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-btn.accent {
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
}

.project-btn.accent:hover {
    background: transparent;
    color: var(--accent);
    letter-spacing: 3px;
}

.project-btn.muted {
    background: transparent;
    color: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(0, 0, 0, 0.15);
    cursor: default;
    font-size: 0.8rem;
}

.project-demo-creds {
    display: inline-block;
    font-family: var(--font-secondary);
    font-size: 1rem;
    color: rgba(0, 0, 0, 0.4);
    letter-spacing: 0.5px;
    margin-left: 1rem;
    padding: 0.4rem 0.8rem;
    border-left: 1px solid rgba(0, 0, 0, 0.15);
}

/* MORE PROJECTS (Mini Cards) */
.more-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.mini-project-card {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mini-project-card:hover {
    border-color: rgba(255, 51, 51, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.mini-project-image {
    height: 180px;
    background: #1a1a2e;
    overflow: hidden;
}

.mini-project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mini-project-card:hover .mini-project-image img {
    transform: scale(1.05);
}

.mini-project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.mini-project-content h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
}

.mini-project-content .tags {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.mini-project-content .tags span {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-color: rgba(0, 0, 0, 0.15);
}

.mini-project-link {
    margin-top: auto;
    font-family: var(--font-secondary);
    font-size: 0.75rem;
    color: var(--accent);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    align-self: flex-start;
}

.mini-project-link:hover {
    color: var(--text-primary);
}

/* TIMELINE HIGHLIGHTS */
.timeline-item.highlight-item {
    margin-bottom: 3rem;
    /* Less space than full roles */
}

/* Make the dot for highlights different */
.timeline-item.highlight-item::before {
    background: var(--accent);
    /* Solid accent color */
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(255, 51, 51, 0.4);
    width: 0.6rem;
    height: 0.6rem;
    left: -2.3rem;
    top: 0.6rem;
}

.highlight-text {
    font-size: 1.1rem;
    color: rgba(0, 0, 0, 0.75);
    line-height: 1.5;
    padding: 1rem;
    background: rgba(190, 8, 45, 0.05);
    border-left: 2px solid var(--accent);
    border-radius: 0 0.5rem 0.5rem 0;
}

.highlight-text strong {
    color: var(--accent);
    font-weight: 700;
}

/* CONTACT */
#contact {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 1px solid #222;
}

.email-link {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 6vw, 6rem);
    color: var(--text-primary);
    text-decoration: none;
}

.email-link:hover {
    color: var(--accent);
}

.socials {
    margin-top: 4rem;
    display: flex;
    gap: 2rem;
}

.socials a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.2rem;
}

.socials a:hover {
    color: var(--text-primary);
}


/* =========================================
   POPUP PANELS
   ========================================= */
#popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9000;
    pointer-events: none;
    opacity: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: opacity 0.4s ease;
}

#popup-overlay.active {
    pointer-events: auto;
    opacity: 1;
}

.popup-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 480px;
    max-width: 90vw;
    height: 100%;
    background: rgba(235, 225, 195, 0.98);
    border-left: 1px solid rgba(190, 8, 45, 0.25);
    box-shadow: -10px 0 40px rgba(190, 8, 45, 0.08);
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 3rem 2.5rem;
    display: none;
}

.popup-panel.active {
    transform: translateX(0);
    display: block;
}

.popup-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: var(--text-secondary);
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.popup-close:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.popup-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.popup-label {
    font-family: var(--font-secondary);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.75rem;
}

.popup-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-primary);
    font-weight: 700;
}

/* THOUGHTS CARDS */
.thoughts-grid {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.thought-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.thought-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.thought-card:hover::before {
    transform: scaleY(1);
}

.thought-card:hover {
    border-color: rgba(255, 51, 51, 0.3);
    background: rgba(255, 51, 51, 0.05);
    transform: translateX(5px);
}

.thought-icon {
    font-size: 2rem;
    width: 50px;
    text-align: center;
    flex-shrink: 0;
}

.thought-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.thought-card p {
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.thought-arrow {
    margin-left: auto;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.thought-card:hover .thought-arrow {
    color: var(--accent);
    transform: translateX(5px);
}

/* STACK GRID */
.stack-category {
    margin-bottom: 2rem;
}

.stack-cat-title {
    font-family: var(--font-secondary);
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 51, 51, 0.15);
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.stack-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 0.5rem;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: default;
}

.stack-item:hover {
    border-color: rgba(255, 51, 51, 0.3);
    background: rgba(255, 51, 51, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 51, 51, 0.1);
}

.stack-item img {
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease;
}

.stack-item:hover img {
    transform: scale(1.1);
}

.stack-text-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.stack-item span:last-child {
    font-family: var(--font-secondary);
    font-size: 0.65rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-align: center;
}

/* SOCIAL LINKS */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-link-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.social-link-card:hover {
    border-color: rgba(255, 51, 51, 0.3);
    background: rgba(255, 51, 51, 0.05);
    transform: translateX(5px);
}

.social-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    border: 1px solid rgba(255, 51, 51, 0.3);
    flex-shrink: 0;
}

.social-link-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.social-link-card p {
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.social-arrow {
    margin-left: auto;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.social-link-card:hover .social-arrow {
    color: var(--accent);
    transform: translateX(5px);
}


/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* About Section */
    .about-grid {
        grid-template-columns: 1fr;
        padding-top: 2rem;
    }

    /* Intro Sequence */
    .neural-network-container {
        transform: scale(0.6);
        width: 100%;
        height: auto;
    }

    /* Stage 1: "Building / Intelligence" — shorter words, can be bigger */
    #stage-1 .intro-main-text {
        font-size: min(9vw, 2.5rem);
    }

    /* Stage 2 & 3: "Enterprise" and "AADIL SHAIK" need to fit on one line */
    #stage-2 .intro-main-text,
    #stage-3 .intro-main-text {
        font-size: min(6.5vw, 2rem);
        white-space: nowrap;
    }

    /* Prevent dt-word inline-block spans from causing horizontal scroll */
    #about, #experience, #projects, #contact {
        overflow-x: hidden;
    }

    .node-words-row {
        gap: 1.2rem;
        flex-direction: row;
        justify-content: center;
    }

    .node-word {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }

    /* Hero Circle */
    #hero-circle-container {
        height: 100dvh;
        overflow: hidden;
        width: 100%;
        position: relative;
    }

    .email-link {
        font-size: 1.5rem;
        word-break: break-all;
        padding: 0 1rem;
        line-height: normal;
    }

    #circle {
        width: 220vw;
        height: 220vw;
        left: -180vw;
        top: calc(50% - 110vw);
        border-width: 1px;
        /* GSAP overrides this via inline style — just sets initial pre-intro state */
        transform: rotate(100deg);
    }

    #skip-intro {
        bottom: 80px;
        /* More spacing on mobile */
    }

    .stripe {
        height: 60px;
    }

    .firsthalf .dot {
        height: 8px;
        width: 8px;
        right: -4px;
        box-shadow: 0 0 5px #ff0000;
    }

    .secondhalf {
        padding-left: 20px;
        justify-content: center;
    }

    .secondhalf h4 {
        font-size: 1.3rem;
    }

    .secondhalf h6 {
        font-size: 0.75rem;
    }

    /* Navigation */
    nav {
        padding: 1rem 1.5rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .contact-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    /* Panel Dots */
    #panel {
        gap: 10px;
    }

    .minicircle {
        width: 5px;
        height: 5px;
    }

    /* Popup Mobile */
    .popup-panel {
        width: 100%;
        max-width: 100vw;
        padding: 2.5rem 1.2rem;
        padding-top: 4rem;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .popup-panel::-webkit-scrollbar {
        display: none;
    }

    .popup-close {
        top: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
        font-size: 1.8rem;
    }

    .popup-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .popup-title {
        font-size: 1.5rem;
    }

    .stack-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .stack-item {
        padding: 1.2rem 0.5rem;
    }

    .stack-item img {
        width: 36px;
        height: 36px;
    }

    .stack-text-icon {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    .thought-card {
        padding: 1.2rem;
    }

    .social-link-card {
        padding: 1.2rem;
    }

    .social-icon {
        width: 44px;
        height: 44px;
    }

    /* Project Cards Mobile */
    .project-card {
        grid-template-columns: 1fr;
    }

    .project-image {
        min-height: 200px;
    }

    .project-content {
        padding: 1.5rem;
    }

    .project-name {
        font-size: 1.4rem;
    }

    .project-stats {
        gap: 1rem;
    }

    .stat-val {
        font-size: 1.1rem;
    }

    .project-client {
        font-size: 0.55rem;
    }
}
/* =========================================
   Wind & Plum Blossom Additions
   ========================================= */
#wc {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9998;
}

#dragon-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9997;
    display: none;
}
.plum-blossom {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    border-radius: 50% 0 50% 50%;
    background: #be082d;
    box-shadow: 0 0 8px rgba(190, 8, 45, 0.5);
    animation: fall linear forwards;
}
@keyframes fall {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.8; }
    90% { opacity: 0.8; }
    100% { transform: translate(-120vw, 110vh) rotate(720deg); opacity: 0; }
}

/* Portfolio v1 bar */
.portfolio-v1-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;
    padding: 1rem 2rem;
    border-top: 1px solid rgba(190, 8, 45, 0.15);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    opacity: 0.7;
}

.portfolio-v1-bar a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, opacity 0.2s;
}

.portfolio-v1-bar a:hover {
    border-bottom-color: var(--accent);
    opacity: 1;
}

@media (max-width: 600px) {
    .portfolio-v1-bar {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* Dragon pretext word scatter */
.dt-word {
    display: inline-block;
    will-change: transform;
}
