:root {
    --bg-primary: #0a0a0a;
    /* Very dark, almost black */
    --text-primary: #e6dfcf;
    /* Light beige/sand */
    --accent: #f05431;
    /* Vibrant orange/red */
    --text-muted: #555555;
    --font-main: 'Outfit', sans-serif;
}

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

html,
body {
    width: 100%;
    overflow-x: hidden;
    background-color: var(--bg-primary); /* Back to base */
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0; /* Above the body background, below the content */
    pointer-events: none; /* Crucial: ensures we can click/scroll the page */
}

#particles-js canvas {
    display: block;
    vertical-align: bottom;
}

html,
body {
    width: 100%;
    /* Removed height: 100vh to ensure natural document scrolling */
    min-height: 100vh;
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    overflow-y: auto;
    cursor: none;
    scroll-behavior: smooth;
}

/* ==================
   Global Custom Cursor
   ================== */
.global-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    background-color: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    will-change: left, top;
}

/* ==================
   Sidebars 
   ================== */
.sidebar-left,
.sidebar-right {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    z-index: 2000;
    pointer-events: none;
    /* Let clicks/scroll pass through the transparent gutter */
}

.logo,
.social-icons,
.nav-links,
.sound-toggle {
    pointer-events: auto;
    /* Re-enable for the actual interactive elements */
}

.sidebar-left {
    left: 0;
    align-items: flex-start;
    padding-left: 50px;
    padding-top: 50px;
    padding-bottom: 50px;
}

.sidebar-right {
    right: 0;
    align-items: flex-end;
    padding-right: 50px;
    padding-top: 50px;
    padding-bottom: 50px;
}

.logo img {
    width: 140%;
    height: auto;
    object-fit: contain;
    filter: brightness(1.2);
    /* Subtle pop against the dark sidebar */
}

.social-icons {
    display: flex;
    flex-direction: column;
    gap: 40px;
    /* Increased for airy, premium feel like reference 923 */
}

.social-icon-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.social-icon-link svg {
    width: 25px;
    height: 25px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.social-text {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-left: 0;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--accent);
}

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

.social-icon-link:hover svg {
    transform: scale(1.1);
}

.social-icon-link:hover .social-text {
    margin-left: 0.8rem;
    max-width: 150px;
    opacity: 1;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* Tight, editorial stack like reference 923 */
    align-items: flex-end;
    width: 100%;
}

.main-content {
    width: 100%;
    position: relative;
    z-index: 10;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.2rem;
    /* Upscaled per request */
    font-weight: 600;
    /* Bolder for impact */
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.sound-toggle {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    transform: rotate(-90deg);
    transform-origin: center right;
    margin-bottom: 20px;
    margin-right: -20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.sound-toggle:hover {
    color: var(--text-primary);
}

/* ==================
   Hero & Masking 
   ================== */
.hero-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-text-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Base text on black background */
.background-layer {
    z-index: 10;
    color: var(--text-primary);
}

/* The magic circle masking layer - this contains the orange background and black text */
.foreground-circle-layer {
    z-index: 20;
    background-color: var(--accent);
    color: var(--bg-primary);
    /* Text becomes black inside the circle */
    /* Circle sized 42vh, positioned slightly left and up like screenshot */
    clip-path: circle(40vh at 38vw 42vh);
    pointer-events: none;
}

/* Important: The content inside the circle layer must exactly overlay the background layer 
   to create the perfect intersection illusion */
.circle-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
}

.hero-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-container,
.about-container,
.experience-container,
.motto-container {
    background: transparent;
}

.tight-trigger {
    display: inline-block;
    pointer-events: auto;
    /* Active zone for the spotlight */
    cursor: none;
}

.subtitle {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 1.1em;
    margin-bottom: 2.5rem;
    text-indent: 1.1em;
    /* Perfectly balances the trailing letter-spacing */
    text-align: center;
    z-index: 30;
    text-transform: uppercase;
    color: var(--text-primary);
    opacity: 0.9;
}

/* Extremely tight, massive typography */
.main-title {
    font-size: clamp(4rem, 11vw, 12rem);
    line-height: 0.82;
    font-weight: 900;
    letter-spacing: -0.06em;
    text-align: center;
    margin: 0;
}

@media (max-width: 1024px) {
    .foreground-circle-layer {
        clip-path: circle(30vh at 50vw 35vh);
    }
}

@media (max-width: 768px) {

    .sidebar-left,
    .sidebar-right {
        display: none;
    }

    .foreground-circle-layer {
        clip-path: circle(25vh at 50vw 35vh);
    }
}

/* ==================
   About & Experience Sections
   ================== */
.about-container,
.experience-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: block;
    scroll-margin-top: 2vh;
    /* Adds breathing room when scrolling via links */
}

.about-text-layer,
.experience-text-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    padding-top: 35vh;
    /* Fixes perfectly aligning both layers from the top */
    pointer-events: none;
    /* Ensure these don't block scrolling */
}

.about-content-wrapper,
.experience-content-wrapper {
    pointer-events: auto;
    /* allow clicks if there were links here */
}

.about-content-wrapper,
.experience-content-wrapper {
    width: 100%;
    padding: 0 20vw 0 15vw;
    pointer-events: none;
    /* Container itself shouldn't trigger the spotlight */
}

.mask-content {
    pointer-events: none !important;
    /* Visual only, never blocks triggers */
}

.section-label {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.6em;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.about-title,
.experience-title {
    font-size: clamp(2rem, 4vw, 4.5rem);
    line-height: 1.15;
    font-weight: 500;
    letter-spacing: -0.03em;
    text-align: left;
    margin: 0;
}

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

/* ==================
   What I Do Section
   ================== */
.what-i-do-container {
    width: 100vw;
    display: flex;
    flex-direction: column;
    padding-top: 15vh;
    padding-bottom: 20vh;
    scroll-margin-top: -8vh;
    /* Land significantly further down to match the user's visual reference */
}

.what-header {
    padding: 0 15vw;
    margin-bottom: 2rem;
}

.services-list {
    display: flex;
    flex-direction: column;
    width: 100vw;
    border-top: 1px solid rgba(230, 223, 207, 0.1);
    /* Subtle divider matches beige primary */
}

.service-row {
    width: 100vw;
    padding: 2.5vw 15vw;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 6vw;
    border-bottom: 1px solid rgba(230, 223, 207, 0.1);
    cursor: none;
    position: relative;
    z-index: 1;
    /* Establishes definitive stacking context for the background wipe to prevent it from clipping behind the body */
}

/* Premium Background Sweep Wipe */
.service-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: -1;
}

.service-name {
    position: relative;
    font-size: clamp(3rem, 7vw, 6rem);
    /* Scaled down slightly to force single line */
    font-weight: 600;
    line-height: 0.85;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin: 0;
    text-transform: uppercase;
    transform: translateX(0);
    white-space: nowrap;
    /* Strictly single line */
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.service-desc {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.4;
    max-width: 30vw;
    text-align: left;
    color: var(--bg-primary);
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.19, 1, 0.22, 1), color 0.4s ease;
    margin: 0;
}

/* Hover States for row */
.service-row:hover::before {
    transform: scaleX(1);
}

.service-row:hover .service-name {
    color: var(--bg-primary);
    transform: translateX(3vw);
    /* Premium sliding indent */
}

.service-row:hover .service-desc {
    opacity: 1;
    transform: translateX(0);
}

/* ==================
   History Section
   ================== */
.history-container {
    width: 100vw;
    display: flex;
    flex-direction: column;
    padding-bottom: 20vh;
    scroll-margin-top: 10vh;
}

.history-list {
    display: flex;
    flex-direction: column;
    width: 100vw;
    border-top: 1px solid rgba(230, 223, 207, 0.1);
}

.history-row {
    width: 100vw;
    padding: 4vw 15vw;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    /* Perfectly aligns the typography baseline of the year and the role */
    border-bottom: 1px solid rgba(230, 223, 207, 0.1);
    transition: background-color 0.4s ease;
    cursor: none;
    position: relative;
    z-index: 1;
    /* Establishes definitive stacking context for the background wipe */
}

/* Premium Background Sweep Wipe */
.history-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: -1;
}

.history-row:hover::before {
    transform: scaleX(1);
}

.history-row:hover .history-year,
.history-row:hover .history-role,
.history-row:hover .history-company {
    color: var(--bg-primary);
    /* Turn all text completely solid black against orange */
}

.history-year {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    width: 25vw;
    /* Sets the column grid layout implicitly */
    color: rgba(230, 223, 207, 0.85);
    /* Slightly muted soft beige */
    letter-spacing: -0.03em;
    flex-shrink: 0;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-details {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    /* Tighter gap between role and company */
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    /* Entire block slides together */
}

.history-row:hover .history-details {
    transform: translateX(2vw);
    /* High-end subtle interactive grouped nudge */
}

.history-role {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    /* Very tight tracking matching the reference */
    color: rgba(230, 223, 207, 0.85);
    /* Consistent with the year color */
    margin: 0;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-company {
    font-size: 1.1rem;
    color: rgba(230, 223, 207, 0.5);
    /* Much dimmer for secondary info */
    font-weight: 400;
    letter-spacing: 0;
    margin: 0;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================
   Motto Section
   ================== */
.motto-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: block;
}

.motto-text-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    /* Prevent blocking scroll/clicks */
}

.motto-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.motto-label {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.6em;
    margin-bottom: 2rem;
    margin-left: 0.6em;
    /* optical alignment */
    text-transform: uppercase;
}

.motto-title {
    font-size: clamp(3rem, 9vw, 10rem);
    line-height: 0.85;
    font-weight: 700;
    letter-spacing: -0.05em;
    text-align: center;
    margin: 0;
}

/* ==================
   Connect Section
   ================== */
/* ==================
   Connect Section Redesign
   ================== */
.connect-container {
    width: 100vw;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
    /* Remove excess space at the bottom */
}

.marquee-strip {
    width: 100vw;
    background-color: #050505;
    /* Slightly darker than bg */
    padding: 1.5rem 0;
    overflow: hidden;
    white-space: nowrap;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.marquee-content {
    display: flex;
    width: max-content;
    animation: marquee-scroll 30s linear infinite;
}

.marquee-group {
    display: flex;
    flex-shrink: 0;
}

.marquee-content span {
    font-family: 'Prata', serif;
    /* Bolder, higher-contrast premium serif */
    font-size: 3.5rem;
    /* Slightly larger for impact */
    font-style: italic;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    padding-right: 3rem;
    display: flex;
    align-items: center;
}

.star {
    color: var(--accent);
    font-size: 2rem;
    margin: 0 1.5rem;
    line-height: 1;
}

@keyframes marquee-scroll {
    from {
        transform: translateX(0);
    }

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

.connect-inner {
    padding: 5vh 10vw 2vh 10vw;
    /* Reduced bottom padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.connect-top-info {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 8vh;
    font-size: 1.5rem;
    /* Increased significantly from 1.1rem */
    font-weight: 700;
    letter-spacing: 0.02em;
}

.info-left,
.info-right {
    display: flex;
    gap: 2rem;
}

.info-left a,
.info-right a {
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.3s;
}

.info-left a:hover,
.info-right a:hover {
    opacity: 0.6;
}

.info-right span {
    color: var(--text-muted);
}

.connect-inner-layers {
    position: relative;
    width: 100%;
    height: 50vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    margin-bottom: 5vh;
}

.connect-text-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.connect-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 50vh;
}

.get-in-touch-title {
    font-size: clamp(5rem, 15vw, 18rem);
    line-height: 0.85;
    font-weight: 800;
    letter-spacing: -0.05em;
    text-transform: lowercase;
    text-align: center;
}

.beige-text {
    color: var(--text-primary);
}

.orange-text {
    color: var(--accent);
}

.foreground-circle-layer .beige-text,
.foreground-circle-layer .orange-text {
    color: #ffffff !important;
}

.footer-bottom-simple {
    margin-top: 2vh;
    /* Reduced margin */
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

@media (max-width: 1024px) {
    .service-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 4vw 15vw;
    }

    .service-desc {
        max-width: 100%;
        margin-top: 1rem;
        font-size: 0.95rem;
    }

    .history-row {
        flex-direction: column;
        gap: 1.5rem;
    }

    .history-year {
        width: 100%;
    }

    .connect-grid {
        flex-direction: column;
        gap: 4rem;
    }

    .empty-col {
        display: none;
    }
}