:root {
    --bg-color: #0c0c0c;
    --accent: #d4af37;
    --text-primary: #EAEAEA;
    --text-secondary: #888888;

    --font-head: 'Space Grotesk', sans-serif;
    --font-alt: 'Montserrat', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --font-body: 'Space Grotesk', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* For custom cursor if needed, or keeping native for now. Let's keep native. */
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10000;
    pointer-events: none;
    mix-blend-mode: difference;
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--text-primary);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--text-primary);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

/* Grain Overlay */
.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 200vw;
    height: 200vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.05;
    background: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
}

/* Loading Screen */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 3rem 4rem;
}

.loader-content {
    display: flex;
    flex-direction: column;
}

.loader-counter {
    font-family: var(--font-mono);
    font-size: clamp(6rem, 15vw, 12rem);
    line-height: 1;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: -2px;
}

.loader-line {
    width: 100vw;
    height: 1px;
    background-color: var(--accent);
    margin-bottom: 1.5rem;
    transform-origin: left;
    margin-left: -4rem;
}

.loader-text {
    font-family: var(--font-alt);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

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

.hero-subtitle {
    font-family: 'Anton', sans-serif;
    font-size: clamp(2rem, 3.5vw, 3rem);
    text-transform: uppercase;
    color: var(--text-primary);
    letter-spacing: 0.1em;
    line-height: 1;
    margin-top: 1rem;
    margin-bottom: 1rem;
    display: inline-block;
    position: relative;
    z-index: 10;
}


.section-padding {
    padding: 6rem 4rem;
    position: relative;
    z-index: 10;
}

.mono-label {
    font-family: var(--font-alt);
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
}

/* HEADER */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 2rem 4rem;
    z-index: 50;
    mix-blend-mode: difference;
    font-family: var(--font-alt);
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

/* HERO SECTION */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding-top: 5rem;
}

.hero-title {
    font-family: 'Anton', sans-serif;
    font-size: clamp(4rem, 12vw, 10rem);
    line-height: 0.85;
    text-transform: uppercase;
    letter-spacing: -2px;
    /* text-align: center; */
}

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

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

.hero-footer {
    position: absolute;
    bottom: 3rem;
    right: 4rem;
    text-align: right;
    font-family: var(--font-alt);
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}


/* MANIFESTO */
.manifesto {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.manifesto-header {
    position: absolute;
    top: 6rem;
    left: 4rem;
}

.manifesto-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: auto;
    margin-bottom: auto;
}

.manifesto-text {
    font-family: 'Anton', sans-serif;
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 1.1;
    color: #1a1a1a;
    /* Dark text for reveal animation */
    text-transform: uppercase;
    margin: 0;
}

.manifesto-text.line-1 {
    padding-left: 15vw;
}

.manifesto-text.line-2 {
    padding-left: 25vw;
}

.manifesto-text.line-3 {
    padding-left: 5vw;
}

.manifesto-word {
    display: inline-block;
}

/* WHO AM I GRID */
.whoami {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding-top: 10rem;
    padding-bottom: 6rem;
}

.whoami-header {
    position: absolute;
    top: 6rem;
    left: 4rem;
}

.whoami-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 6rem;
    width: 100%;
}

.whoami-col {
    display: flex;
    flex-direction: column;
}

.section-sub {
    margin-bottom: 4rem;
}

.huge-title {
    font-family: 'Anton', sans-serif;
    font-size: clamp(3.5rem, 6vw, 6.5rem);
    line-height: 0.95;
    color: var(--text-primary);
    text-transform: uppercase;
    margin-bottom: 6rem;
}

.vertical-divider {
    width: 1px;
    background-color: var(--accent);
    height: 100%;
    transform-origin: top;
}

/* Info Table Formats */
.info-table {
    display: flex;
    flex-direction: column;
}

.info-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    padding: 1.5rem 0;
    border-bottom: 1px solid #222;
    opacity: 0.1;
    /* Setup for GSAP reveal */
    transform: translateY(20px);
}

.info-label {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.info-value {
    font-family: var(--font-mono);
    color: #b5b5b5;
    /* Slightly dimmer than primary text */
    font-size: 0.95rem;
}

/* PROJECTS / PORTFOLIO */
.portfolio {
    position: relative;
    height: 100vh;
    overflow: hidden;
    margin-top: -100vh; /* Master Shutter Pull-up Effect */
    z-index: 20; /* Ensure the shutter sits forcefully above the extended pinned section behind it */
}

.portfolio-sticky {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.portfolio-horizontal {
    display: flex;
    height: 100vh;
    width: fit-content;
    padding: 0;
    align-items: center;
}

.project-card {
    display: flex;
    flex-direction: column;
    min-width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.project-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: #050505;
}

.project-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(12, 12, 12, 0.4) 0%, rgba(5, 5, 5, 0.8) 100%),
        rgba(15, 10, 25, 0.4);
    /* Dark purple tint as seen in image */
    z-index: 2;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
    /* More cinematic than full grayscale */
    transition: filter 0.5s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-image {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* New Project Layout Styles */
.mono-wrapper {
    font-family: var(--font-alt);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

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

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

.project-meta-top {
    position: absolute;
    top: 3rem;
    left: 4rem;
    z-index: 10;
    display: flex;
    gap: 1.5rem;
}

.project-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    z-index: 10;
    text-align: center;
    pointer-events: none;
}

.project-main-title {
    font-family: 'Anton', sans-serif;
    font-size: clamp(8rem, 24vw, 30rem);
    line-height: 0.8;
    color: #F2F0E6;
    /* Off-white from image */
    text-transform: uppercase;
    margin: 0;
    letter-spacing: -0.02em;
    /* subtle shadow for depth */
    text-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-subtitle {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 4rem);
    color: #A5A0FF;
    /* Light purple from image */
    margin-top: -1.5vw;
}

.project-bottom {
    position: absolute;
    bottom: 3rem;
    left: 4rem;
    right: 4rem;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.bottom-left {
    max-width: 450px;
}

.project-desc {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #888;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.tech-pills {
    display: flex;
    gap: 0.5rem;
}

.pill {
    padding: 0.3rem 0.8rem;
    border: 1px solid #333;
    background: rgba(255, 255, 255, 0.05);
    color: #EAEAEA;
    font-family: var(--font-alt);
    font-weight: 500;
    font-size: 0.7rem;
    border-radius: 2px;
}

.bottom-right {
    text-align: right;
    font-family: var(--font-mono);
}

.project-year {
    color: #555;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.project-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.link-item {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: color 0.3s ease;
    font-weight: 500;
}

.link-item span {
    font-size: 1.1rem;
}

.link-item:hover {
    color: #fff;
}

/* Cleanup old classes */
.project-info,
.project-card-full,
.portfolio-header {
    display: none;
}

/* RIGHT NOW & CONTACT (Restored after accidental deletion) */
.outro {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.outro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 4rem;
    flex-grow: 1;
}

.status-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.status-list li {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
}

.status-list span {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}

.contact-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    font-family: var(--font-head);
    margin-bottom: 3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.email-link {
    display: inline-block;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--text-primary);
    border-bottom: 2px solid transparent;
    text-decoration: none;
    margin-bottom: 4rem;
    transition: all 0.3s ease;
    font-family: 'Anton', sans-serif;
}

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

.social-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: color 0.3s ease;
    position: relative;
}

.social-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

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

.social-links a:hover::after {
    width: 100%;
}

.footer {
    display: flex;
    justify-content: space-between;
    padding-top: 4rem;
    border-top: 1px solid #333;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: auto;
}

/* PILLAR SECTIONS */
.pillar-section {
    position: relative;
    background-color: var(--bg-color);
    padding-bottom: 0 !important; /* Eliminate blank space before portfolio */
    min-height: 100vh; /* Enforces clean shutter mechanics */
}

#pillar-1 {
    z-index: 10;
}

#pillar-2 {
    z-index: 15;
    margin-top: -100vh; /* Cascade shutter trick over pillar-1 */
}
.pillar-container {
    display: flex;
    gap: 8rem;
    align-items: flex-start;
    max-width: 1400px;
    margin: 0 auto;
}
.pillar-left {
    flex: 0 0 35%;
    position: sticky;
    top: 30vh;
}
.pillar-header-mono {
    margin-bottom: 2rem;
}
.pillar-title {
    font-family: var(--font-head);
    font-size: clamp(3rem, 5vw, 4.5rem);
    line-height: 1;
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.pillar-title span {
    color: var(--text-secondary);
    font-family: var(--font-alt);
    font-size: clamp(0.9rem, 1vw, 1.1rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 1rem;
}
.pillar-focus {
    font-family: var(--font-alt);
    color: var(--accent);
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 500;
}
.pillar-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.pillar-right-header {
    margin-bottom: 3rem;
    margin-top: 5vh;
}
.pillar-line {
    width: 60%;
    height: 1px;
    background: #333;
    margin-bottom: 1rem;
}
.pillar-subtitle {
    font-family: var(--font-alt);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}
.pillar-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Tight spacing to fit on screen */
    width: 100%;
    padding-bottom: 12rem; /* Reserves bounding box space for the dynamically expanding active card */
}
.pillar-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
    overflow: hidden;
    position: relative;
}

.pillar-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.5s ease;
}

.card-title {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.2;
    transition: all 0.5s ease;
}

.card-number {
    font-family: var(--font-mono);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.5s ease;
}

.card-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-inner {
    overflow: hidden;
}

.card-desc {
    padding-top: 1.5rem;
    font-family: var(--font-body);
    color: #aaa;
    font-size: 1rem;
    line-height: 1.6;
}

/* ACTIVE STATE (Managed by GSAP Pinned Accordion) */
.pillar-card.active {
    background: #151515;
    border-color: #333;
    padding: 2.5rem 2rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8);
}
.pillar-card.active .card-content {
    grid-template-rows: 1fr;
}
.pillar-card.active .card-title {
    font-size: 2rem;
    color: var(--text-primary);
}
.pillar-card.active .card-number {
    color: var(--accent);
}

/* Add an early break for the flex layout */
@media (max-width: 1024px) {
    .pillar-container {
        gap: 4rem;
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .section-padding {
        padding: 4rem 2rem;
    }

    .header {
        padding: 1.5rem 2rem;
    }

    .whoami-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .vertical-divider {
        width: 100%;
        height: 2px;
        transform-origin: left;
    }

    .project-item {
        grid-template-columns: 1fr;
        padding: 2.5rem 0;
    }

    .outro-grid {
        grid-template-columns: 1fr;
    }

    .project-links {
        display: none !important;
    }

    .pillar-container {
        flex-direction: column;
        gap: 1.5rem; /* Ensure minimal gap on mobile */
    }
    
    .pillar-left {
        flex: 0 0 auto;
        position: static; /* Force clear the desktop sticky behavior that causes overlapping! */
        top: auto;
    }

    .pillar-title {
        font-size: 2.2rem;
        margin-bottom: 0.5rem;
    }

    .pillar-focus {
        font-size: 0.95rem;
    }

    .pillar-right {
        flex: 0 0 auto;
        width: 100%;
        padding-bottom: 0;
    }

    .pillar-right-header {
        margin-bottom: 1.5rem;
        margin-top: 0;
    }
    
    .pillar-cards {
        gap: 0.8rem; /* Tighter cards for small screens */
    }

    .pillar-card {
        padding: 1rem 1.25rem;
        border-radius: 8px;
    }
    
    .card-title {
        font-size: 1rem;
    }

    .card-desc {
        padding-top: 1rem;
        font-size: 0.9rem;
    }

    .pillar-card.active {
        padding: 1.5rem 1.25rem;
    }

    .pillar-card.active .card-title {
        font-size: 1.3rem;
    }
    
    .pillar-line {
        width: 100%;
    }
}