:root {
    --bg-color: #000000;
    --text-primary: #fff;
    --text-secondary: #888888;
    --accent: #ff3333;

    /* USER REQUESTED LOADER VARS */
    --lime: #f2ff49;
    --red: #ff4242;
    --pink: #fb62f6;
    --dark-blue: #645dd7;
    --light-blue: #b3fffc;
    --background: #000000;
    --white: #fff;
    --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);
}

/* 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;
}

.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(255, 255, 255, 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;
    width: 600px;
    /* Constrain width for nodes */
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    /* Ensure nodes aren't clipped */
}

.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-word {
    position: absolute;
    font-family: var(--font-secondary);
    font-size: 1rem;
    /* Larger text */
    color: var(--accent);
    /* Red accent for tech feel */
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    /* Shadow for contrast */
    z-index: 10;
    /* Ensure nodes are on top */
}

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

/* Positioning - Push further out */
/* Positioning - Push further out */
.node-tl {
    top: 0;
    left: 0;
    transform: translate(-3px, -3px);
    /* Center dot at corner */
}

.node-tr {
    top: 0;
    right: 0;
    flex-direction: row-reverse;
    transform: translate(3px, -3px);
}

.node-bl {
    bottom: 0;
    left: 0;
    transform: translate(-3px, 3px);
}

.node-br {
    bottom: 0;
    right: 0;
    flex-direction: row-reverse;
    transform: translate(3px, 3px);
}

/* 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(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 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;
    /* Default rotation set here */
    transform: translate(0, -50%) rotate(100deg);
    position: absolute;
    border-radius: 50%;
    border: 2px solid #be082d;
    z-index: 10;
}

.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;
    opacity: 0.3;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: white;
    transition: all 0.3s ease;
}

.minicircle:hover,
.minicircle.active {
    opacity: 1;
    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: #ccc;
    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: #ccc;
    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(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    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;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    backdrop-filter: blur(5px);
    border-radius: 0.25rem;
    z-index: 2;
}

.project-badge.live {
    background: rgba(255, 51, 51, 0.2);
    border-color: rgba(255, 51, 51, 0.4);
    color: var(--accent);
}

/* 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(255, 255, 255, 0.4);
    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(255, 255, 255, 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(255, 255, 255, 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(255, 255, 255, 0.65);
    letter-spacing: 1px;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.2rem;
    transition: all 0.3s ease;
}

.project-card:hover .project-tags span {
    border-color: rgba(255, 51, 51, 0.2);
    color: rgba(255, 255, 255, 0.65);
}

/* 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(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: default;
    font-size: 0.8rem;
}

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

/* 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(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    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(255, 255, 255, 0.1);
}

.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: #fff;
}

/* 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(255, 255, 255, 0.9);
    line-height: 1.5;
    padding: 1rem;
    background: rgba(255, 51, 51, 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(10, 10, 10, 0.95);
    border-left: 1px solid rgba(255, 51, 51, 0.2);
    box-shadow: -10px 0 40px rgba(255, 51, 51, 0.05);
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto;
    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(255, 255, 255, 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(255, 255, 255, 0.08);
}

.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(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    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(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    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;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.stack-item:hover img {
    opacity: 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(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    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;
    }

    .intro-main-text {
        font-size: 2.2rem;
    }

    .node-word {
        font-size: 0.8rem;
    }

    /* 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: 180vw;
        height: 180vw;
        left: -155vw;
        top: calc(45% - 90vw);
        border-width: 1px;
        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: 40px;
        justify-content: center;
    }

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

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

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

    .logo {
        font-size: 1.2rem;
    }

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

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

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

    /* 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;
    }
}