@import url('https://api.fontshare.com/v2/css?f[]=elza@1,2,100,101,200,201,300,301,400,401,500,501,600,601,700,701,800,801,900,901&display=swap');

@font-face {
    font-family: 'Benzin';
    src: url('media/typeface/Benzin-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Benzin';
    src: url('media/typeface/Benzin-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Benzin';
    src: url('media/typeface/Benzin-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
}

/* ============================================
   Design Tokens (CSS Variables)
   ============================================ */
:root {
    /* Base Themes: Dark (Default) */
    --bg: #000000;
    --text: #ffffff;
    --text-inverse: #000000;
    --color-text-light: rgba(255, 255, 255, 0.7);
    --color-text-lighter: rgba(255, 255, 255, 0.4);

    --glass-bg: rgba(0, 0, 0, 0.15);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: 25px;
    --glass-saturate: 180%;

    --marker-bg: #fff;
    --marker-text: #000;
    --marker-border: rgba(255, 255, 255, 0.4);

    --pill-hover-bg: #fff;
    --pill-hover-text: #000;

    --btn-bg: rgba(255, 255, 255, 0.1);
    --btn-text: #fff;
    --btn-hover-bg: #fff;
    --btn-hover-text: #000;

    --item-bg: rgba(255, 255, 255, 0.03);
    --item-hover-bg: #fff;
    --item-hover-text: #000;

    /* Spacing (small, large) */
    --space-sm: 8px;
    --space-lg: 24px;

    /* Typography (small, large) */
    --font-s: 0.9rem;
    --font-l: 1.2rem;

    /* Misc */
    --radius-md: 6px;
    --transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);

    /* Compatibility aliases */
    --color-background: var(--bg);
    --color-background-alt: var(--bg);
    --color-text: var(--text);
    --color-primary: var(--text);
    --color-border: var(--text);

    --space-xs: var(--space-sm);
    --space-md: var(--space-sm);
    --space-xl: var(--space-lg);
    --space-2xl: var(--space-lg);
    --space-3xl: calc(var(--space-lg) * 1.5);
    --space-4xl: calc(var(--space-lg) * 2.5);
    --space-5xl: calc(var(--space-lg) * 3.5);

    --font-family: 'Elza', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-base: var(--font-s);
    --font-size-sm: var(--font-s);
    --font-size-md: var(--font-l);
    --font-size-lg: 1.5rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2.8rem;
    --font-size-3xl: 3rem;
    --line-height-tight: 1;
    --line-height-normal: 1.6;
    --line-height-relaxed: 1.7;

    --radius-none: 0;
    --radius-sm: var(--radius-md);
    --radius-lg: var(--radius-md);
    --radius-xl: calc(var(--radius-md) * 2);
    --radius-full: 999px;

    /* Glass Effects */
    --glass-blur: 25px;
    --glass-saturate: 180%;

    --blur-light: 0.5px;
    --blur-heavy: 6px;

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.5s ease;
    --transition-smooth: var(--transition-normal);
}

[data-theme="light"] {
    --bg: #ffffff;
    --text: #000000;
    --text-inverse: #ffffff;
    --color-text-light: rgba(0, 0, 0, 0.6);
    --color-text-lighter: rgba(0, 0, 0, 0.4);

    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(0, 0, 0, 0.1);

    --marker-bg: #000;
    --marker-text: #fff;
    --marker-border: rgba(0, 0, 0, 0.1);

    --pill-hover-bg: #000;
    --pill-hover-text: #fff;

    --btn-bg: rgba(0, 0, 0, 0.05);
    --btn-text: #000;
    --btn-hover-bg: #000;
    --btn-hover-text: #fff;

    --item-bg: rgba(0, 0, 0, 0.03);
    --item-hover-bg: #000;
    --item-hover-text: #fff;
}

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

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
* {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

html, body {
    height: 100%;
    overflow-x: hidden;
    font-family: var(--font-family);
    -webkit-overflow-scrolling: touch;
}

body {
    background: var(--bg);
    color: var(--text);
}

/* ============================================
   Layout Utility Classes
   ============================================ */

.container {
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Default container padding for content sections (not archive) */
.section .container,
main .container,
#portfolioMain .container {
    padding: 0 24px;
}

/* Section - vertical spacing wrapper */
.section {
    padding: var(--space-4xl) 0;
}

.section--header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    z-index: 100;
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--glass-border);
    overflow: hidden;
}

.header-background-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 100%;
    width: auto;
    opacity: 0.05;
    filter: invert(1);
    z-index: 0;
    pointer-events: none;
    transition: filter 0.3s ease;
}

[data-theme="light"] .header-background-logo {
    filter: invert(0);
    opacity: 0.03;
}

.section--header > .container {
    position: relative;
    z-index: 1;
    padding: 0 24px;
    max-width: 100%;
}

/* Row - flex/grid container */
.row {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.row--header {
    width: 100%;
    justify-content: space-between;
    gap: 0;
}

.row--2col {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

/* Column - flex/grid child */
.col {
    flex: 1;
}

.col--shrink {
    flex-shrink: 0;
}

/* Column variants for specific layouts */
.row--header .col {
    display: flex;
    align-items: center;
}

.row--header .col:first-child {
    flex: 1;
    min-width: 0;
}

.row--header .col--shrink {
    flex: 0 0 auto;
    margin-left: var(--space-xl);
}

/* ============================================
   Specific Component Styles
   ============================================ */

.header-name {
    font-family: 'Benzin', var(--font-family);
    font-weight: 500; /* Matching the menu links weight */
    font-size: 1.2rem; /* Matching the menu links size */
    margin: 0;
    padding-top: 1px; /* Optical centering for Benzin */
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* Logo in pill shape to match slider and name */
.logo-capsule {
    /* logo uses shared .pill visuals; only keep size/behavior here */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: visible;
    transition: filter var(--transition-normal);
}

.logo-capsule.pill {
    padding: 0 20px; /* Increased padding for name + logo */
    gap: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.logo-capsule.pill:hover {
    background: var(--pill-hover-bg);
    border-color: var(--marker-border);
}

.logo-capsule.pill:hover .logo-text {
    color: var(--pill-hover-text);
}

.logo-capsule.pill:hover .logo-image {
    filter: invert(0); /* Flip back to black on white hover */
    opacity: 1;
}

[data-theme="light"] .logo-capsule.pill:hover .logo-image {
    filter: invert(1); /* Flip to white on black hover in light mode */
}

.logo-text {
    font-family: 'Benzin', var(--font-family);
    font-weight: 500;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text);
    transition: color 0.3s ease;
}

.logo-capsule .logo-image {
    width: 32px; /* Slightly smaller to fit with text */
    height: 32px;
    opacity: 0.8;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.logo-capsule.pill:hover .logo-image {
    opacity: 1;
}

.logo-image {
    display: block;
    width: 100%;
    height: 100%;
    animation: spin 8s linear infinite;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    filter: invert(1); /* Invert to white (assuming original is black) */
}

[data-theme="light"] .logo-image {
    filter: invert(0);
}

/* ==========================
   Procedural Capsule/Pill System
   - Adapts to content width (inline-flex)
   - Fixed height via --pill-height
   - Consistent border-radius (999px = full pill)
   ========================== */

.pill {
    --pill-height: 38px;
    position: relative;
    display: inline-flex;
    align-items: center;
    height: var(--pill-height);
    padding: 0 16px; /* horizontal padding adjusts spacing */
    border-radius: 19px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    color: var(--color-text-lighter);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.1);
    font-family: var(--font-family);
    font-size: 1.2rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all var(--transition-normal);
    cursor: pointer;
}

/* Pill hover effect - can be used on links or interactive elements */
.pill-hover {
    cursor: pointer;
}

.pill-hover:hover {
    background: var(--pill-hover-bg);
    color: var(--pill-hover-text);
}

/* ==========================
   Top Site Menu (slider marker)
   ========================== */
#siteMenu {
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
    padding-right: 0;
}

.menu-capsule {
    position: relative;
    display: inline-flex;
    gap: 0;
    align-items: center;
    padding: 0;
}

.menu-capsule.pill {
    padding: 0;
}

/* Inner capsule that slides between items */
.menu-inner {
    position: absolute;
    left: -1px;
    top: -1px;
    transform: translateX(0);
    height: var(--pill-height);
    width: 70px;
    background: var(--marker-bg);
    border: 1px solid var(--marker-border);
    border-radius: 25px;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                width 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.3s ease;
    z-index: 2;
}

.menu-link {
    font-family: 'Benzin', var(--font-family);
    color: var(--color-text-lighter);
    text-decoration: none;
    padding: 0 24px;
    padding-top: 1px; /* Optical centering for Benzin */
    display: inline-flex;
    align-items: center;
    height: var(--pill-height);
    position: relative;
    z-index: 3;
    white-space: nowrap;
    transition: color 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1.1rem;
}

.menu-link.active { 
    color: var(--marker-text);
    z-index: 4;
}

.menu-link:hover:not(.active) {
    color: var(--text);
}

/* Theme Toggle Slider */
.theme-toggle-capsule {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0;
}

.theme-inner {
    position: absolute;
    left: -1px;
    top: -1px;
    height: calc(var(--pill-height) + 2px);
    width: 50%;
    background: var(--marker-bg);
    border: 1px solid var(--marker-border);
    border-radius: 19px;
    z-index: 2;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.3s ease;
}

.theme-btn {
    position: relative;
    z-index: 3;
    padding: 0 20px;
    height: var(--pill-height);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--color-text-lighter);
    transition: color 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
}

.theme-btn.active {
    color: var(--marker-text);
}

.theme-btn:hover:not(.active) {
    color: var(--text);
}

@media (max-width: 768px) {
    #siteMenu { gap: 12px; padding-left: 8px; }
    .menu-capsule { padding: 0; gap: 0; }
    .menu-inner { height: var(--pill-height); }
    
    .section .container,
    main .container,
    #portfolioMain .container {
        padding: 0 12px;
    }
    
    .section--header > .container {
        padding: 0 12px;
    }
    
    .section--footer .container {
        padding: 0 12px;
    }
    
    .row--header .col--shrink {
        margin-left: 8px;
    }
    
    .project-video-intro {
        height: 15vh;
        min-height: 150px;
    }
}

@media (max-width: 600px) {
    .row--header .col--shrink {
        margin-left: 4px;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Name capsule — mirrors the slider visual */
.name-capsule {
    /* uses shared .pill visuals; keep only sizing/position rules here */
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ==========================
   Footer
   ========================== */
.section--footer {
    padding: var(--space-4xl) 0;
}
.section--footer .container {
    display: flex;
    justify-content: center;
    padding: 0 24px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.footer-link:hover {
    opacity: 1;
}

#sharedHeader {
    visibility: hidden;
}

#sharedHeader.header-loaded {
    visibility: visible;
}


/* Animation Full-Screen Popup Styles - Glassmorphism */
.animation-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1000;
    animation: fadeIn 0.4s ease;
    cursor: none;
}

.intro-root {
    width: 100%;
    height: 100%;
    position: relative;
}

.metaball-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: none;
    z-index: 0;
    pointer-events: none;
}

.cursor-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.close-button-topleft {
    position: fixed;
    top: var(--space-lg);
    left: 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    border: 1px solid var(--glass-border);
    padding: 0 20px;
    height: var(--pill-height);
    border-radius: 999px;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-text-lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
}

.close-button-topleft:hover {
    background: var(--pill-hover-bg);
    color: var(--pill-hover-text);
    border-color: var(--marker-border);
    transform: scale(1.1);
}

@keyframes fadeIn {
    from { 
        opacity: 0;
    }
    to { 
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header spacing variable */
:root {
    --header-height: 98px;
}

/* Content spacing adjustments */
main,
#portfolioMain {
    padding-top: var(--header-height);
    width: 100%;
    margin: 0 auto;
    z-index: 1; /* Sit below the fixed header */
}

/* Landing video specific: sit behind the header */
#portfolioMain.with-video {
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
}

/* Page transition animations */
main {
    transition: transform 400ms cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

main.page-exit {
    transform: translateX(-50px);
    opacity: 0;
}

main.page-enter {
    transform: translateX(50px);
    opacity: 0;
}

.subtitle {
    font-family: 'Benzin', var(--font-family);
    font-size: 1rem;
    color: var(--text);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
    opacity: 0.6;
}

.flavor-text {
    font-family: 'Benzin', var(--font-family);
    font-size: 2.2rem;
    font-weight: 500;
    line-height: 1.1;
    color: var(--text);
    max-width: 900px;
    margin-bottom: var(--space-xl);
}

.project-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.project-item {
    background: var(--item-bg);
    border-radius: 40px;
    border: 1px solid var(--glass-border);
    padding: var(--space-lg) var(--space-2xl);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: var(--space-md);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
}

.project-item:hover {
    background: var(--btn-hover-bg);
    border-color: var(--btn-hover-bg);
    transform: translateY(-2px);
}

.project-item:hover .project-title,
.project-item:hover .project-subtitle,
.project-item:hover .project-year,
.project-item:hover .project-description {
    color: var(--text-inverse);
}

.project-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: var(--space-lg);
}

.project-info-group {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

@media (max-width: 768px) {
    .project-header {
        grid-template-columns: 1fr;
    }
    .project-subtitle, .project-year {
        display: none;
    }
}

.project-title {
    font-family: 'Benzin', var(--font-family);
    font-size: 1.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--text);
    transition: color 0.3s ease;
}

.project-subtitle {
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.project-year {
    font-family: var(--font-family);
    font-size: 0.9rem;
    color: var(--color-text-lighter);
    transition: color 0.3s ease;
}

.project-description {
    margin-top: var(--space-sm);
    color: var(--color-text-light);
    font-size: 1rem;
    max-width: 600px;
    line-height: var(--line-height-normal);
    transition: color 0.3s ease;
}


.project-subtitle {
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.5);
    margin: 0;
    margin-left: var(--space-md);
}

.project-year {
    font-family: 'Benzin', var(--font-family);
    font-size: 1rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.3);
    text-align: right;
}

.projects-separator {
    height: 1px;
    background: linear-gradient(to right, rgba(0,0,0,0.1), rgba(0,0,0,0.05));
    margin: var(--space-xl) 0;
    width: 100%;
}

.project-thumbnail {
    width: 60px;
    height: var(--space-3xl);
    border-radius: var(--radius-none);
    overflow: hidden;
}

.expand-icon {
    font-size: var(--font-size-xl);
    font-weight: 300;
    color: var(--color-text-lighter);
    transition: transform var(--transition-normal);
}

.project-details {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height var(--transition-smooth),
                opacity var(--transition-slow) ease-in-out,
                padding var(--transition-smooth);
    padding: 0;
}

.project-details.expanded {
    max-height: 500px;
    opacity: 1;
    padding: var(--space-xl) 0 var(--space-3xl) 0;
}

.project-content {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--space-2xl);
    padding: var(--space-md) 0;
    transform: translateY(-10px);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-details.expanded .project-content {
    transform: translateY(0);
}

.project-description {
    padding-top: 10px;
}

.project-description p {
    font-family: var(--font-family);
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(0, 0, 0, 0.7);
    margin-bottom: var(--space-lg);
}

.project-image img {
    border-radius: 25px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.08);
    transition: transform 0.4s ease;
}

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

.project-item:hover .project-title {
    color: var(--pill-hover-text);
}

.project-item:hover .project-year {
    color: var(--pill-hover-text);
}

.project-item:hover .project-subtitle {
    color: var(--pill-hover-text);
}
 
/* ============================================
   Button Styles (Unified)
   ============================================ */
.btn,
button,
input[type="button"],
input[type="submit"],
.see-project-link,
.pdf-open-btn,
.cv-download,
.back-button {
    font-family: 'Benzin', var(--font-family);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    color: var(--color-text-lighter);
    border: 1px solid var(--glass-border);
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn:hover,
button:hover,
.see-project-link:hover,
.back-button:hover,
.cv-download:hover,
.pdf-open-btn:hover {
    background: var(--pill-hover-bg);
    color: var(--pill-hover-text);
    border-color: var(--marker-border);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* ============================================
   Project Page Styles
   ============================================ */
.project-page {
    animation: fadeInUp 0.5s ease;
}

.back-button {
    margin-bottom: var(--space-3xl);
}

.project-video-intro {
    width: 100%;
    position: relative;
    margin-top: 0; 
    margin-bottom: var(--space-4xl);
    display: flex;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    height: 20vh;
    min-height: 200px;
}

.intro-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.project-page-header {
    margin-bottom: var(--space-4xl);
}

.project-page-title {
    font-family: 'Benzin', var(--font-family);
    font-size: 3.5rem;
    font-weight: 500;
    margin-bottom: 15px;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1;
}

.project-page-subtitle {
    font-family: 'Benzin', var(--font-family);
    font-size: 1.2rem;
    color: rgba(0, 0, 0, 0.4);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.project-hero-image {
    margin-bottom: var(--space-4xl);
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.project-details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-4xl);
    margin-bottom: var(--space-4xl);
}

.project-description-section h3 {
    font-family: 'Benzin', var(--font-family);
    font-size: 1rem;
    font-weight: 500;
    margin: var(--space-4xl) 0 var(--space-lg) 0;
    color: rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.project-description-section h3:first-child {
    margin-top: 0;
}

.project-description-section p {
    font-family: var(--font-family);
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
}

.project-info-section {
    background: rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: var(--space-3xl);
    border-radius: 40px;
    height: fit-content;
}

.project-info-item {
    margin-bottom: var(--space-3xl);
}

.project-info-item:last-child {
    margin-bottom: 0;
}

.project-info-item h4 {
    font-family: 'Benzin', var(--font-family);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: var(--space-sm);
    color: var(--color-text-lighter);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.project-info-item p, .tech-list li {
    font-family: var(--font-family);
    color: var(--color-text-light);
    font-size: 1.1rem;
    font-weight: 400;
}

.tech-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tech-list li {
    margin-bottom: var(--space-xs);
}

.project-link {
    color: #fff;
    text-decoration: underline;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.project-link:hover {
    opacity: 0.7;
}

/* When a project link is used as a button, keep text neutral and use glass interaction */
.project-link.btn {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.project-gallery {
    margin-top: var(--space-5xl);
}

.project-gallery h3 {
    font-family: 'Benzin', var(--font-family);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: var(--space-2xl);
    color: var(--color-text-lighter);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-2xl);
}

.gallery-item img {
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover img {
    transform: scale(1.02);
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 768px) {
    .project-page-title {
        font-size: 2rem;
    }

    .project-details-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
    }

    .project-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        padding: 0 0 var(--space-2xl) 0;
    }

    .project-image {
        order: -1;
    }

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

    .project-header {
        grid-template-columns: 1fr 60px 60px 30px;
        gap: 10px;
    }

    .row--2col {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    #aboutSection .simple-img {
        max-width: 300px;
    }
}

/* ============================================
   Element Utility Classes
   ============================================ */

.simple-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-none);
}

/* Make gallery and project images behave like buttons on hover */
.gallery-item .simple-img,
.project-image .simple-img,
.project-hero-image .simple-img {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.gallery-item .simple-img:hover,
.project-image .simple-img:hover,
.project-hero-image .simple-img:hover {
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.simple-h {
    font-family: 'Benzin', var(--font-family);
    font-size: 3rem;
    font-weight: 500;
    margin-bottom: var(--space-xl);
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.simple-p {
    font-family: var(--font-family);
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--color-text-light);
    margin-bottom: var(--space-lg);
}

/* ============================================
   About Section
   ============================================ */
#aboutSection {
    margin-top: 0;
    padding: var(--space-md) 0 var(--space-5xl) 0;
}

.archive-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--space-3xl);
    gap: var(--space-xl);
}

.archive-heading h2 {
    font-family: 'Benzin', var(--font-family);
    font-size: 1.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
}

/* Projects grid — inspired by Matière Noire */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.project-card {
    position: relative;
    display: block;
    grid-column: span 4; /* default spans 4/12 columns */
    color: inherit;
    text-decoration: none;
    border-radius: 25px;
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover {
    background: var(--pill-hover-bg);
    border-color: var(--marker-border);
}

.project-card:hover .project-title,
.project-card:hover .project-meta {
    color: var(--pill-hover-text);
}

.project-card.is-feature {
    grid-column: span 6; /* featured spans wider */
}

.project-media {
    width: 100%;
    aspect-ratio: var(--ratio, 4/3);
    overflow: hidden;
    position: relative;
    background: transparent;
}

.project-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* show full image without cropping */
    background: transparent;
}

.project-caption {
    position: absolute;
    left: 15px;
    bottom: 15px;
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    border: 1px solid var(--glass-border);
    transform: translateY(0);
    opacity: 1;
    transition: all 0.3s ease;
    color: var(--text);
}

.project-card:hover .project-caption {
    background: var(--bg);
    color: var(--text);
}

.project-title {
    font-family: 'Benzin', var(--font-family);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.project-meta {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Remove hover motion/zoom effects */
.project-card:hover { transform: none; box-shadow: none; }
.project-card:hover .project-media img { transform: none; }

/* Responsive behavior */
@media (max-width: 1200px) {
    .project-card { grid-column: span 6; }
    .project-card.is-feature { grid-column: span 12; }
}

@media (max-width: 768px) {
    .projects-grid { grid-template-columns: repeat(6, 1fr); gap: 10px; }
    .project-card { grid-column: span 6; }
    .project-card.is-feature { grid-column: span 6; }
    .project-caption { left: 8px; bottom: 8px; padding: 6px 10px; }
}

/* ============================================
   Archive Section - Collage Grid Overrides
   ============================================ */

/* Archive section container - override default styles for full-width grid */
.archive-section {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    border: none;
    padding: 0;
    margin: 0;
    overflow: visible;
}

/* Scoped grid layout for archive page only */
.archive-section .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem;
    grid-auto-flow: dense;
}

/* Archive card base styles - edge-to-edge images */
.archive-section .project-card {
    position: relative;
    aspect-ratio: var(--ratio, 4/3);
    border-radius: 0;
    background: #000;
    color: #fff;
    grid-column: span 1;
    overflow: hidden;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Span utility classes for flexible collage layout */
.archive-section .project-card.span-2,
.archive-section .project-card.two-col {
    grid-column: span 2;
}

.archive-section .project-card.span-3 {
    grid-column: span 3;
}

/* Archive media fills card completely */
.archive-section .project-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: var(--ratio, 4/3);
    background: #000;
}

.archive-section .project-media img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hover zoom effect */
.archive-section .project-card:hover {
    background: #000;
    border: none;
    transform: none;
}

.archive-section .project-card:hover .project-media img {
    transform: scale(1.05);
}

/* Caption redesign - top-left with gradient background */
.archive-section .project-caption {
    position: absolute;
    top: 0;
    left: 0;
    bottom: auto;
    right: 0;
    padding: 20px 24px;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    z-index: 2;
}

/* Subtle gradient for legibility */
.archive-section .project-caption::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    z-index: -1;
}

.archive-section .project-card:hover .project-caption {
    background: transparent;
}

/* Archive caption text styling */
.archive-section .project-title {
    font-family: 'Benzin', var(--font-family);
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.archive-section .project-meta {
    font-family: var(--font-family);
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.archive-section .project-card:hover .project-title,
.archive-section .project-card:hover .project-meta {
    color: #fff;
}

/* Responsive breakpoints for archive grid */
@media (max-width: 1024px) {
    .archive-section .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .archive-section .project-card.span-2,
    .archive-section .project-card.two-col {
        grid-column: span 2;
    }
    
    .archive-section .project-card.span-3 {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .archive-section .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .archive-section .project-card.span-2,
    .archive-section .project-card.span-3,
    .archive-section .project-card.two-col {
        grid-column: span 1;
    }
    
    .archive-section .project-caption {
        padding: 16px 18px;
    }
    
    .archive-section .project-title {
        font-size: 0.85rem;
    }
    
    .archive-section .project-meta {
        font-size: 0.7rem;
    }
}

.image-stack {
    position: relative;
    width: min(100%, 420px);
    max-width: 420px;
    margin: 0 auto;
    overflow: visible;
}

.image-stack .stacked.behind {
    position: relative;
    z-index: 0;
}

.image-stack .stacked.behind img {
    width: 100%;
    height: auto;
    display: block;
}

.image-stack .stacked.behind img,
.image-stack .stacked.front img {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.image-stack .stacked.front {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.image-stack .stacked.front img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.draggable-img {
    cursor: grab;
    user-select: none;
    pointer-events: auto;
}

.draggable-img:active {
    cursor: grabbing;
}

.about-actions {
    margin-top: 18px;
}

/* .cv-download styles are inherited from unified button styles */

/* ============================================
   3D Banner Styles
   ============================================ */

.three-banner {
    width: 100%;
    height: 500px;
    margin: 0 0 var(--space-3xl) 0;
    overflow: hidden;
    position: relative;
    background: var(--bg);
}

.three-banner canvas {
    display: block;
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .three-banner {
        height: 350px;
    }
}

/* ============================================
   Lightbox / Gallery Overlay
   ============================================ */
.lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(var(--blur-heavy));
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl);
}

.lightbox-image {
    max-width: calc(100% - 160px);
    max-height: calc(100% - 120px);
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: var(--bg);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    z-index: 2100;
    background: rgba(0, 0, 0, 0.85);
    color: var(--color-background);
    border: none;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev,
.lightbox-next {
    opacity: 0.98;
}

.lightbox-prev {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close {
    right: 24px;
    top: 24px;
}

/* Lightbox controls on small screens */
@media (max-width: 600px) {
    .lightbox-prev,
    .lightbox-next {
        width: 48px;
        height: 48px;
    }
    .lightbox-image {
        max-width: calc(100% - 120px);
        max-height: calc(100% - 100px);
    }
}

/* Override button hover effects for lightbox controls */
