/* ==========================================
   CSS Variables & Reset (Spatial Brutalism)
   ========================================== */
:root {
    --color-black: #1a1a1a;
    --color-stone: #f4f0eb;
    --color-gray: #666666;
    --color-green: #2a4b3c;
    --color-silver: #9ea9a4;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

::selection {
    background-color: var(--color-green);
    color: var(--color-stone);
}

::-moz-selection {
    background-color: var(--color-green);
    color: var(--color-stone);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    background-color: var(--color-stone);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-stone);
    color: var(--color-black);
    line-height: 1.4;
    overflow-x: hidden;
}

/* ==========================================
   Navigation
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 2rem 0;
    background: transparent;
}

.nav-container {
    max-width: 90vw;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--color-black);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.header-logo-svg {
    height: 48px;
    width: auto;
    display: block;
}

#header-autograph-path {
    fill: none;
    stroke: var(--color-green);
    stroke-width: 16; /* Thicker stroke since we're scaling it down by roughly 10x */
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-link {
    color: var(--color-black);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: var(--transition-smooth);
}

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

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10rem 5vw;
}

.hero-content {
    width: 100%;
}

.greeting {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-gray);
    margin-bottom: 2rem;
}

.hero-title {
    font-size: clamp(4rem, 15vw, 15rem);
    font-weight: 800;
    line-height: 0.85;
    letter-spacing: -0.04em;
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
}

.title-line {
    display: block;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 500;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 0.9rem;
    color: var(--color-gray);
    max-width: 400px;
    margin-bottom: 4rem;
}

.hero-buttons {
    display: flex;
    gap: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    border-radius: 0;
}

.btn-primary {
    background: var(--color-green);
    color: var(--color-stone);
}

.btn-primary:hover {
    background: transparent;
    color: var(--color-green);
    box-shadow: inset 0 0 0 2px var(--color-green);
}

.btn-secondary {
    background: transparent;
    color: var(--color-green);
    box-shadow: inset 0 0 0 2px var(--color-green);
}

.btn-secondary:hover {
    background: var(--color-green);
    color: var(--color-stone);
}

.scroll-indicator {
    display: none;
}

/* ==========================================
   General Sections
   ========================================== */
section {
    padding: 15rem 5vw;
}

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

.section-header {
    margin-bottom: 8rem;
}

.section-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-gray);
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.04em;
}

/* ==========================================
   Signature Scroll Animation
   ========================================== */
.signature-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 5vw;
    overflow: visible;
    /* Give it enough height to act as a proper scroll trigger zone */
    min-height: 50vh;
}

.signature-svg {
    width: 100%;
    max-width: 700px;
    height: auto;
    overflow: visible;
    display: block;
}

#autograph-path {
    fill: none;
    stroke: var(--color-green);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-linejoin: round;
    /* dasharray & dashoffset are set by JS after measuring getTotalLength() */
}

/* ==========================================
   About Section — Accordion + Background Image
   ========================================== */

.about-interactive {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    min-height: 560px;
    background: var(--color-stone);
    border: 1px solid var(--color-silver);
    display: flex;
    align-items: stretch;
}

/* Background image — fills right ~65% */
.about-bg-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 65%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

/* Gradient fade from white-to-transparent left-to-right */
.about-fade-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 70%;
    height: 100%;
    background: linear-gradient(
        to right,
        var(--color-stone) 30%,
        rgba(244, 240, 235, 0.92) 50%,
        rgba(244, 240, 235, 0.5) 65%,
        transparent 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Left content panel (z above overlay) */
.about-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 1.6rem;
    padding: 3rem 2rem 3rem 2.5rem;
    width: 52%;
    min-width: 0;
}

/* Arrows column */
.about-arrows-col {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: center;
    flex-shrink: 0;
}

.about-arrow {
    all: unset;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--color-silver);
    color: var(--color-black);
    background: rgba(244, 240, 235, 0.85);
    transition: var(--transition-smooth);
}

.about-arrow:hover {
    background: var(--color-green);
    border-color: var(--color-green);
    color: var(--color-stone);
}

/* Accordion */
.about-accordion {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.about-accordion-item {
    display: flex;
    flex-direction: column;
}

/* Pill button */
.about-pill-btn {
    all: unset;
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.72rem 1.3rem;
    border-radius: 50px;
    border: 1.5px solid var(--color-silver);
    background: rgba(244, 240, 235, 0.88);
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    align-self: flex-start;
    user-select: none;
    backdrop-filter: blur(4px);
}

.about-pill-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--color-green);
    box-shadow: 0 4px 16px rgba(42, 75, 60, 0.1);
}

.about-accordion-item.active .about-pill-btn {
    background: var(--color-black);
    border-color: var(--color-black);
    color: var(--color-stone);
    box-shadow: 0 6px 20px rgba(26, 26, 26, 0.15);
}

.about-pill-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.about-accordion-item.active .about-pill-icon {
    background: var(--color-stone);
    border-color: var(--color-stone);
    color: var(--color-black);
}

.about-pill-label {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* Accordion description (collapsed by default) */
.about-accordion-desc {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease,
                padding 0.3s ease;
    opacity: 0;
    padding: 0 0 0 3rem;
}

.about-accordion-item.active .about-accordion-desc {
    max-height: 200px;
    opacity: 1;
    padding: 0.8rem 0 0.4rem 3rem;
}

.about-accordion-desc p {
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--color-gray);
    font-weight: 500;
    background: rgba(244, 240, 235, 0.9);
    border-radius: 14px;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(158, 169, 164, 0.3);
    backdrop-filter: blur(4px);
}

/* Slide animations on image panel */
@keyframes slideInFromRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInFromLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}

.about-slide-in-right {
    animation: slideInFromRight 0.45s cubic-bezier(0.25, 1, 0.5, 1) both;
}

.about-slide-in-left {
    animation: slideInFromLeft 0.45s cubic-bezier(0.25, 1, 0.5, 1) both;
}

/* Responsive */
@media (max-width: 900px) {
    .about-interactive {
        min-height: 480px;
    }
    .about-content {
        width: 60%;
        padding: 2rem 1.5rem 2rem 1.5rem;
        gap: 1rem;
    }
    .about-bg-image { width: 60%; }
    .about-fade-overlay { width: 75%; }
}

@media (max-width: 640px) {
    .about-interactive {
        min-height: auto;
        flex-direction: column;
    }
    .about-bg-image {
        position: relative;
        width: 100%;
        height: 220px;
        order: -1;
    }
    .about-fade-overlay {
        display: none;
    }
    .about-content {
        width: 100%;
        padding: 1.5rem;
    }
}








/* ==========================================
   Footer CTA Section
   ========================================== */

/* List */
.about-list {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-list-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1.1rem 2.4rem;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
    border-left: 3px solid transparent;
    color: var(--color-gray);
}

.about-list-item:hover {
    background: rgba(42, 75, 60, 0.05);
    color: var(--color-black);
}

.about-list-item.active {
    border-left-color: var(--color-green);
    color: var(--color-black);
    background: rgba(42, 75, 60, 0.06);
}

.about-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.25s, color 0.25s;
}

.about-list-item.active .about-item-icon {
    background: var(--color-green);
    border-color: var(--color-green);
    color: var(--color-stone);
}

.about-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* ---- Right: Image Panel ---- */
.about-image-panel {
    position: relative;
    overflow: hidden;
    background: var(--color-black);
    min-height: 600px;
}

.about-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.75;
    transition: opacity 0.4s ease;
}

/* Description card overlay */
.about-desc-card {
    position: absolute;
    top: 2rem;
    left: 2rem;
    right: 2rem;
    background: rgba(244, 240, 235, 0.93);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 1.8rem 2rem;
    z-index: 5;
    border: 1px solid rgba(158, 169, 164, 0.3);
}

.about-desc-text {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.65;
    color: var(--color-black);
}

/* Slide animations */
@keyframes slideInFromRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0);    }
}

@keyframes slideInFromLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0);     }
}

.about-slide-in-right {
    animation: slideInFromRight 0.45s cubic-bezier(0.25, 1, 0.5, 1) both;
}

.about-slide-in-left {
    animation: slideInFromLeft 0.45s cubic-bezier(0.25, 1, 0.5, 1) both;
}

/* Responsive */
@media (max-width: 900px) {
    .about-interactive {
        grid-template-columns: 1fr;
    }
    .about-image-panel {
        min-height: 400px;
        order: -1;
    }
    .about-list-panel {
        border-right: none;
        border-top: 1px solid var(--color-silver);
    }
}





/* ==========================================
   Footer CTA Section
   ========================================== */

.footer-cta-section {
    position: relative;
    width: 100%;
    min-height: 540px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 5vw;
    overflow: hidden;
}

/* Center content */
.footer-cta-center {
    text-align: center;
    max-width: 560px;
    position: relative;
    z-index: 2;
}

.footer-cta-title {
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--color-black);
    margin-bottom: 1.6rem;
}

.footer-cta-desc {
    font-size: 1rem;
    color: var(--color-gray);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.footer-cta-btn {
    display: inline-block;
    border-radius: 50px !important;
}

/* Floating icon items */
.footer-icon-item {
    position: absolute;
    width: 110px;
    height: 110px;
    border-radius: 24px;
    background: var(--color-stone);
    border: 1px solid var(--color-silver);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1),
                box-shadow 0.4s cubic-bezier(0.19, 1, 0.22, 1),
                filter 0.4s ease;
    z-index: 1;
}

.footer-icon-item img,
.footer-icon-item .footer-icon-svg {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
}

.footer-icon-item .footer-icon-svg {
    display: none; /* shown via JS if img fails */
}

.footer-icon-item:hover {
    transform: scale(1.08) rotate(-2deg);
    box-shadow: 0 20px 50px rgba(42, 75, 60, 0.15);
    filter: none !important;
    border-color: var(--color-green);
}

/* Positions — mirroring reference image layout */
.footer-icon--tl {
    top: 6%;
    left: 10%;
    filter: blur(0px);
}

.footer-icon--tr {
    top: 6%;
    right: 10%;
    filter: blur(0px);
}

.footer-icon--ml {
    top: 50%;
    left: 4%;
    transform: translateY(-50%);
    filter: blur(0px);
}

.footer-icon--mr {
    top: 50%;
    right: 4%;
    transform: translateY(-50%);
    filter: blur(0px);
}

.footer-icon--bl {
    bottom: 6%;
    left: 10%;
    filter: blur(0px);
}

.footer-icon--br {
    bottom: 6%;
    right: 10%;
    filter: blur(0px);
}

/* Startup icon special SVG fallback */
.footer-icon--startup img {
    display: none;
}
.footer-icon--startup .footer-icon-svg {
    display: block;
}

@media (max-width: 900px) {
    .footer-cta-section {
        min-height: 400px;
        padding: 4rem 5vw;
    }
    .footer-icon-item {
        width: 80px;
        height: 80px;
        border-radius: 18px;
    }
    .footer-icon-item img,
    .footer-icon-item .footer-icon-svg {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 600px) {
    .footer-icon--tl { top: 2%; left: 2%; }
    .footer-icon--tr { top: 2%; right: 2%; }
    .footer-icon--ml { left: -2%; }
    .footer-icon--mr { right: -2%; }
    .footer-icon--bl { bottom: 2%; left: 2%; }
    .footer-icon--br { bottom: 2%; right: 2%; }
    .footer-cta-title { font-size: 2rem; }
}




/* ==========================================
   Technologies Section
   ========================================== */
.tech-header {
    margin-bottom: 8rem;
}

.tech-title {
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.04em;
}

.tech-highlight {
    color: var(--color-green);
}

.tech-subtitle {
    font-size: 1.2rem;
    color: var(--color-gray);
    margin-top: 2rem;
    max-width: 500px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 4rem 3rem;
    background: rgba(42, 75, 60, 0.15); /* A bit more transparent for better glass effect */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(42, 75, 60, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    padding: 4rem;
    border-radius: 20px;
}

.tech-icon {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.tech-icon img {
    width: 60%;
    height: 60%;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.tech-icon:hover img {
    transform: scale(1.2);
}

/* ==========================================
   Work Section
   ========================================== */
/* ==========================================
   Circular Stacked Projects UI (Minimalist)
   ========================================== */
.projects-container {
    position: relative;
    width: 100%;
    min-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 2rem 0;
}

.circular-stack {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 850px;
    perspective: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Base Project Item */
.project-item {
    position: absolute;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform, opacity, width, height;
    cursor: pointer;
    overflow: hidden;
    background: var(--color-stone);
    border: 1px solid var(--color-silver);
    border-radius: 20px;
}

/* Pill Content Structure (Minimalist) */
.pill-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.pill-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: inherit;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

/* Card Content Structure */
.card-content {
    opacity: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 3rem;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease;
}

/* --- STATES --- */

/* 2. Expanded State (Active Card) */
.state-expanded {
    width: 100%;
    height: 750px;
    border-radius: 20px;
    transform: translateY(0) scale(1);
    z-index: 10;
    cursor: default;
    background: var(--color-stone);
}

.state-expanded .card-content {
    opacity: 1;
    pointer-events: auto;
}

.state-expanded .pill-content {
    opacity: 0;
    display: none;
}

/* 3. Stack Prev State (Pill above) */
.stack-prev {
    width: auto;
    min-width: 250px;
    height: 50px;
    border-radius: 50px;
    transform: translateY(-400px) scale(0.9);
    z-index: 5;
    opacity: 0.8;
    background: var(--color-green);
    color: var(--color-stone);
    border: 1px solid var(--color-green);
}
.stack-prev .pill-content { opacity: 1; }
.stack-prev .pill-title { color: var(--color-stone); }

/* 4. Stack Next State (Pill below) */
.stack-next {
    width: auto;
    min-width: 250px;
    height: 50px;
    border-radius: 50px;
    transform: translateY(400px) scale(0.9);
    z-index: 5;
    opacity: 0.8;
    background: var(--color-green);
    color: var(--color-stone);
    border: 1px solid var(--color-green);
}
.stack-next .pill-content { opacity: 1; }
.stack-next .pill-title { color: var(--color-stone); }

/* 5. Hidden Pill State (Background of the loop) */
.stack-hidden {
    width: auto;
    min-width: 250px;
    height: 50px;
    border-radius: 50px;
    transform: translateY(0) scale(0.7) translateZ(-200px);
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    background: var(--color-green);
    color: var(--color-stone);
}

/* Hover effect for pills acting as navigation */
.stack-prev:hover, .stack-next:hover {
    transform: translateY(inherit) scale(1.02); 
    opacity: 1;
    border-color: var(--color-black);
}

.stack-prev:hover { transform: translateY(-405px) scale(0.95); }
.stack-next:hover { transform: translateY(405px) scale(0.95); }


/* Inner Card Styling (Detailed Layout) */
.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--color-silver);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-title {
    font-size: 2rem;
    color: var(--color-black);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.project-subtitle {
    font-size: 1rem;
    color: var(--color-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.project-tag {
    padding: 0.5rem 1.2rem;
    border: 1px solid var(--color-silver);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--color-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.project-card-middle {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2.5rem; /* Increased gap to push elements apart */
}

.project-desc {
    font-size: 0.95rem; /* Decreased font size */
    color: var(--color-black);
    line-height: 1.6;
    max-width: 90%;
}

/* Tech Stack Section */
.tech-stack-container {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.section-label {
    font-size: 0.85rem;
    color: var(--color-gray);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
}

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

.tech-pill {
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--color-silver);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--color-black);
    font-weight: 600;
}

/* Feature Boxes Section */
.feature-boxes {
    display: grid;
    gap: 1.5rem;
    margin-top: 1rem;
}

.feature-boxes.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.feature-boxes.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.feature-box {
    background: var(--color-silver); 
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.feature-label {
    font-size: 0.75rem;
    color: var(--color-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.feature-text {
    font-size: 0.85rem; /* Adjusted text to fit better */
    color: var(--color-black);
    line-height: 1.5;
    font-weight: 500;
}

.project-card-bottom {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-silver);
    display: flex;
    justify-content: flex-end; 
    align-items: center;
}

.action-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.action-btn.primary {
    background: transparent;
    color: var(--color-black);
    border: 1px solid var(--color-silver);
}

.action-btn.primary:hover {
    background: var(--color-black);
    color: var(--color-stone);
}

@media (max-width: 992px) {
    .feature-boxes.grid-4, .feature-boxes.grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .circular-stack {
        height: 950px; /* Responsive increase */
    }
    
    .state-expanded {
        height: 850px;
    }
    
    .card-content {
        padding: 1.5rem;
    }
    
    .project-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .project-desc {
        max-width: 100%;
        font-size: 0.9rem;
    }
    
    .feature-boxes.grid-4, .feature-boxes.grid-3 {
        grid-template-columns: 1fr;
    }
    
    .project-card-bottom {
        justify-content: flex-start;
    }
}

/* ==========================================
   Gallery Grid View Layout (Redesign)
   ========================================== */
.gallery-grid-view {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem; /* Almost no margins */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0 6rem 0; /* extra padding to account for the translated elements */
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Make it disproportionate / staggered */
.gallery-grid-view .gallery-item:nth-child(3n+2) {
    transform: translateY(6rem);
}
.gallery-grid-view .gallery-item:nth-child(3n+3) {
    transform: translateY(2rem); /* subtle stagger for 3rd column */
}

.gallery-grid-view.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.98);
    pointer-events: none;
}

.gallery-item {
    position: relative;
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--color-silver);
    border-radius: 16px;
    /* Create the cutout cover using a pseudo element */
}

.gallery-item::after {
    content: '';
    position: absolute;
    bottom: -1px; /* Overlap border */
    right: -1px;
    width: 130px; /* Cutout width */
    height: 48px; /* Cutout height */
    background: var(--color-stone); /* Matches body background */
    border-top: 1px solid var(--color-silver);
    border-left: 1px solid var(--color-silver);
    border-top-left-radius: 12px;
    z-index: 5;
    pointer-events: none;
}

.gallery-image-container {
    width: 100%;
    aspect-ratio: 1; /* Make standard square cards */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    overflow: hidden;
    padding: 1rem; /* So the image sits nicely without clipping the cutout */
}

.gallery-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-item:hover .gallery-image-container img {
    transform: scale(1.05);
}

/* The neon text sitting inside the notch */
.gallery-notch-text {
    position: absolute;
    bottom: -1px;
    right: 0;
    width: 130px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1.2rem;
    z-index: 10;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    pointer-events: none;
}

.gallery-notch-text .highlight {
    color: var(--color-green); /* Website green */
    margin-left: 6px;
    font-weight: 900;
}

.gallery-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-black);
}

/* Close Detailed View Button */
.close-detailed-btn {
    background: transparent;
    border: none;
    color: var(--color-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.close-detailed-btn:hover {
    background: var(--color-silver);
    color: var(--color-black);
    transform: rotate(90deg);
}

/* View Video Secondary Green Button */
.action-btn.secondary-green {
    background: transparent;
    color: var(--color-green);
    border: 1px solid var(--color-green);
}

.action-btn.secondary-green:hover {
    background: var(--color-green);
    color: var(--color-stone);
}

/* Transition Utilities */
.fade-exit {
    opacity: 0 !important;
    transform: scale(0.98) !important;
    pointer-events: none;
}

.fade-enter {
    opacity: 1 !important;
    transform: scale(1) !important;
    pointer-events: auto;
}

/* Responsive Grid */
@media (max-width: 992px) {
    .gallery-grid-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .gallery-grid-view .gallery-item:nth-child(3n+2),
    .gallery-grid-view .gallery-item:nth-child(3n+3) {
        transform: translateY(0); /* reset 3 col stagger */
    }
    .gallery-grid-view .gallery-item:nth-child(2n+2) {
        transform: translateY(4rem); /* 2 col stagger */
    }
}

@media (max-width: 768px) {
    .gallery-grid-view {
        grid-template-columns: 1fr;
        padding-bottom: 2rem;
    }
    .gallery-grid-view .gallery-item:nth-child(2n+2) {
        transform: translateY(0); /* remove stagger on mobile */
    }
}

/* ==========================================
   Contact & Footer Section
   ========================================== */
.contact {
    padding-bottom: 0;
}

.contact-content {
    margin-top: 4rem;
}

.contact-text {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 4rem;
    max-width: 80vw;
}

.footer {
    padding: 10rem 5vw 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-top: 1px solid var(--color-silver);
    padding-top: 2rem;
}

.footer-content p {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

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

.social-link {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-black);
    text-decoration: none;
}

.social-link:hover {
    color: var(--color-green);
    text-decoration: underline;
}

/* ==========================================
   Project Modal
   ========================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--color-stone);
    overflow-y: auto;
}

.modal.active {
    display: block;
}

.modal-content {
    width: 100%;
    min-height: 100vh;
    padding: 8rem 5vw;
}

.modal-close {
    position: fixed;
    top: 2rem;
    right: 5vw;
    font-size: 4rem;
    line-height: 1;
    font-weight: 300;
    cursor: pointer;
    z-index: 10000;
    mix-blend-mode: difference;
    color: var(--color-stone);
}

.modal-body {
    max-width: 1200px;
    margin: 0 auto;
}

.modal-body h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

.modal-body p {
    font-size: 1.1rem;
    color: var(--color-gray);
    margin-bottom: 2rem;
    max-width: 800px;
}

.modal-body h2 {
    font-size: 2rem;
    font-weight: 800;
    margin: 4rem 0 2rem;
}

.modal-body h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
}

.modal-body ul {
    list-style: none;
    padding-left: 0;
}

.modal-body ul li {
    padding: 0.5rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--color-silver);
}

.project-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-silver);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin: 1rem 1rem 2rem 0;
    color: var(--color-green);
}

.video-container {
    margin: 4rem 0;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--color-black);
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding-top: 20vh;
    }

    .work-grid {
        gap: 6rem;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }
}