/* 
   David Ojabo - Architectural Portfolio Style Sheet
   Designed for deep blacks, clean grids, fine lines, and editorial typography.
*/

/* Imports */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* Variables */
:root {
    --bg-primary: #0A0A0A;
    --bg-secondary: #121212;
    --bg-darker: #050505;
    
    --text-primary: #F5F5F7;
    --text-secondary: #8E8E93;
    --text-muted: #48484A;
    
    --accent-gold: #C5A880;
    --accent-gold-hover: #E5D3B3;
    --border-color: #2C2C2E;
    --border-light: rgba(255, 255, 255, 0.08);
    
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    
    --grid-gap: 2rem;
    --sidebar-width: 80px;
    --header-height: 80px;
    
    --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-drag: none;
}

html {
    scroll-behavior: initial; /* Controlled by Lenis */
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 16px;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    min-height: 100vh;
    font-weight: 300;
    line-height: 1.6;
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold);
}

/* Custom Cursor */
.custom-cursor {
    width: 8px;
    height: 8px;
    background-color: var(--accent-gold);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.custom-cursor-ring {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.1s cubic-bezier(0.1, 0.8, 0.3, 1), border-color 0.3s;
}

.custom-cursor.hovered {
    width: 12px;
    height: 12px;
    background-color: var(--text-primary);
}

.custom-cursor-ring.hovered {
    border-color: var(--accent-gold);
    transform: translate(-50%, -50%) scale(1.5);
}

.custom-cursor-ring.dragging {
    border-color: var(--accent-gold-hover);
    border-style: dashed;
}

/* Grain Overlay */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 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)' opacity='0.02'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9990;
}

/* Architectural Grid lines overlay */
.grid-lines-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    padding: 0 4%;
    z-index: 10;
}

.grid-lines-overlay .grid-line {
    width: 1px;
    height: 100%;
    background-color: var(--border-light);
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-darker);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), visibility 1s;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-logo {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    letter-spacing: 0.2em;
    color: var(--text-primary);
    margin-bottom: 2rem;
    overflow: hidden;
}

.preloader-logo span {
    display: inline-block;
    transform: translateY(100%);
    animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.preloader-progress {
    width: 200px;
    height: 1px;
    background-color: var(--border-color);
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.preloader-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: var(--accent-gold);
    transition: width 0.1s linear;
}

.preloader-number {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

/* Animations */
@keyframes slideUp {
    to {
        transform: translateY(0);
    }
}

/* Floating Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4%;
    z-index: 900;
    border-bottom: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(10, 10, 10, 0.7);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s;
}

.navbar.nav-hidden {
    transform: translateY(-100%);
}

.nav-logo {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.nav-logo:hover {
    color: var(--accent-gold);
}

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

.nav-links a {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition-fast);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-gold);
    transition: var(--transition-smooth);
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mobile Nav Overlay */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background-color: var(--bg-secondary);
    z-index: 999;
    padding: 10% 8%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid var(--border-color);
    transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav.open {
    right: 0;
}

.mobile-nav-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.mobile-nav-links a {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    color: var(--accent-gold);
    padding-left: 10px;
}

/* Typography Helpers & Grid system */
section {
    position: relative;
    padding: 120px 4%;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid var(--border-light);
}

.section-tag {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--accent-gold);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: block;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 3.5rem;
    letter-spacing: -0.01em;
}

.section-title span {
    font-style: italic;
    color: var(--accent-gold);
}

/* Hero Section */
#hero {
    height: 100vh;
    padding: 0;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.hero-3d-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-grid {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(12, 1fr);
    padding: 0 4%;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.hero-title-container {
    grid-column: 1 / 11;
    grid-row: 5 / 10;
    align-self: start;
    margin-top: 1.5rem;
}

.hero-name {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.hero-name span {
    color: var(--accent-gold);
    display: block;
    font-weight: 300;
}

.hero-role {
    font-family: var(--font-sans);
    font-size: clamp(0.75rem, 2vw, 1rem);
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    display: inline-block;
}

.hero-statement-container {
    grid-column: 1 / 6;
    grid-row: 10 / 12;
    align-self: end;
}

.hero-statement {
    font-family: var(--font-serif);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 300;
    line-height: 1.4;
    color: var(--text-primary);
    font-style: italic;
}

.hero-scroll-indicator {
    grid-column: 11 / 13;
    grid-row: 11 / 12;
    justify-self: end;
    align-self: end;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.hero-scroll-text {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    color: var(--text-secondary);
}

.hero-scroll-line {
    width: 1px;
    height: 80px;
    background-color: var(--border-color);
    position: relative;
    overflow: hidden;
}

.hero-scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background-color: var(--accent-gold);
    animation: scrollAnimation 2s infinite ease-in-out;
}

@keyframes scrollAnimation {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(270%);
    }
}

/* Selected Projects */
#projects {
    padding-top: 140px;
}

.projects-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.project-search-container {
    position: relative;
    width: 300px;
}

.project-search {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 2rem 0.5rem 0;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    transition: var(--transition-fast);
}

.project-search:focus {
    outline: none;
    border-bottom-color: var(--accent-gold);
}

.project-search-container svg {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    fill: var(--text-secondary);
    pointer-events: none;
}

.projects-filters {
    display: flex;
    gap: 1.5rem;
}

.filter-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: var(--transition-fast);
    position: relative;
}

.filter-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-gold);
    transition: var(--transition-smooth);
}

.filter-btn:hover,
.filter-btn.active {
    color: var(--text-primary);
}

.filter-btn.active::after {
    width: 100%;
}

/* Editorial Project Grid */
.projects-editorial-list {
    display: flex;
    flex-direction: column;
    gap: 120px;
}

.project-card {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    align-items: center;
    cursor: pointer;
}

.project-card-image-wrap {
    grid-column: 1 / 8;
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-light);
}

.project-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%) contrast(1.1);
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s;
}

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

.project-card-info {
    grid-column: 8 / 13;
    padding-left: 10%;
    z-index: 5;
    position: relative;
}

.project-card:nth-child(even) .project-card-image-wrap {
    grid-column: 6 / 13;
}

.project-card:nth-child(even) .project-card-info {
    grid-column: 1 / 6;
    grid-row: 1;
    padding-left: 0;
    padding-right: 10%;
}

.project-card-meta {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--accent-gold);
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: flex;
    gap: 1.5rem;
}

.project-card-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
    transition: var(--transition-fast);
}

.project-card:hover .project-card-title {
    color: var(--accent-gold);
    transform: translateX(10px);
}

.project-card:nth-child(even):hover .project-card-title {
    transform: translateX(-10px);
}

.project-card-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.project-card-more {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.project-card-more svg {
    width: 24px;
    height: 12px;
    fill: none;
    stroke: var(--text-primary);
    stroke-width: 1px;
    transition: var(--transition-fast);
}

.project-card:hover .project-card-more svg {
    transform: translateX(8px);
    stroke: var(--accent-gold);
}

/* Immersive Project Overlay/Detail View */
.project-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    z-index: 1500;
    overflow-y: auto;
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s, visibility 0.8s;
}

.project-detail-overlay.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.project-detail-close-btn {
    position: fixed;
    top: 2rem;
    right: 3rem;
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1600;
    backdrop-filter: blur(10px);
    transition: var(--transition-fast);
}

.project-detail-close-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: rotate(90deg);
}

/* Project Detail Content Grid */
.detail-hero {
    height: 80vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 0 6% 6% 6%;
}

.detail-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(10%) brightness(0.4);
}

.detail-hero-content {
    position: relative;
    z-index: 5;
    max-width: 800px;
}

.detail-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 300;
    line-height: 1.0;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    padding: 3rem 6%;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

.meta-item-label {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.meta-item-value {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-primary);
}

/* 3D Viewport in project detail */
.detail-interactive-section {
    padding: 80px 6%;
    border-bottom: 1px solid var(--border-color);
}

.viewport-layout {
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 3rem;
    min-height: 600px;
}

.viewport-container {
    background-color: var(--bg-darker);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 500px;
}

.viewport-canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.viewport-controls-hud {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.hud-btn {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-fast);
    backdrop-filter: blur(5px);
}

.hud-btn:hover,
.hud-btn.active {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.viewport-instructions {
    position: absolute;
    top: 2rem;
    left: 2rem;
    font-family: var(--font-sans);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
}

.viewport-instructions span {
    width: 6px;
    height: 6px;
    background-color: var(--accent-gold);
    border-radius: 50%;
    display: inline-block;
}

.viewport-sidebar {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.viewport-sidebar-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.viewport-sidebar-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* Floor Plans & Sketches Tab component */
.detail-drawings-section {
    padding: 80px 6%;
    border-bottom: 1px solid var(--border-color);
}

.drawings-tabs {
    display: flex;
    gap: 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.drawing-tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 1rem 0;
    cursor: pointer;
    position: relative;
    transition: var(--transition-fast);
}

.drawing-tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-gold);
    transition: var(--transition-smooth);
}

.drawing-tab-btn.active {
    color: var(--text-primary);
}

.drawing-tab-btn.active::after {
    width: 100%;
}

.drawing-tab-panel {
    display: none;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-light);
    overflow: hidden;
    position: relative;
}

.drawing-tab-panel.active {
    display: flex;
}

.drawing-tab-panel svg {
    width: 80%;
    height: 80%;
    stroke: var(--accent-gold);
    stroke-width: 1px;
    fill: none;
    opacity: 0.8;
}

.drawing-tab-panel img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(100%) invert(95%) brightness(0.85); /* Makes standard sketches look like blueprints */
}

/* Project Narrative & Gallery list */
.detail-narrative-section {
    padding: 80px 6%;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 3rem;
}

.narrative-text {
    grid-column: 1 / 7;
}

.narrative-text h3 {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.narrative-text p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.narrative-gallery {
    grid-column: 7 / 13;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.narrative-gallery-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border: 1px solid var(--border-light);
    transition: var(--transition-smooth);
}

.narrative-gallery-img:hover {
    transform: scale(1.03);
}

/* Gallery Section */
.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.gallery-filters {
    display: flex;
    gap: 1.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 20px;
    grid-auto-flow: dense;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-light);
    cursor: zoom-in;
}

.gallery-item.wide {
    grid-column: span 2;
    aspect-ratio: 2 / 1;
}

.gallery-item.tall {
    grid-row: span 2;
    aspect-ratio: 1 / 2;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(40%) contrast(1.05);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s;
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: var(--transition-fast);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
    filter: grayscale(0%) contrast(1);
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.gallery-item-category {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--accent-gold);
    text-transform: uppercase;
}

/* Lightbox (Full Screen Gallery Viewer) */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 5, 5, 0.95);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s;
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 85%;
    max-height: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border: 1px solid var(--border-color);
}

.lightbox-caption {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-top: 1.5rem;
    text-align: center;
}

.lightbox-category {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 0.5rem;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 3rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lightbox-close:hover {
    color: var(--accent-gold);
    transform: scale(1.1);
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 3rem;
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 2rem;
}

.lightbox-btn:hover {
    color: var(--accent-gold);
}

.lightbox-prev {
    left: 2%;
}

.lightbox-next {
    right: 2%;
}

/* Process Section */
.process-container-wrap {
    width: 100%;
    position: relative;
    padding: 20px 0;
}

.process-scroll-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
    width: 100%;
}

.process-step-card {
    width: 100%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 3rem;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 480px;
    transition: var(--transition-smooth);
}

.process-step-card:hover {
    border-color: var(--accent-gold);
}

@media (max-width: 1024px) {
    .process-scroll-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .process-scroll-container {
        grid-template-columns: 1fr;
    }
}

.process-step-num {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--accent-gold);
    margin-bottom: 2rem;
    font-weight: 600;
}

.process-step-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.process-step-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.process-step-visual {
    margin-top: auto;
    width: 100%;
    aspect-ratio: 16 / 10;
    background-color: var(--bg-darker);
    border: 1px solid var(--border-light);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.process-step-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

/* Design Philosophy */
.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--grid-gap);
}

.philosophy-card {
    grid-column: span 4;
    border: 1px solid var(--border-color);
    padding: 4rem 3rem;
    background-color: var(--bg-secondary);
    transition: var(--transition-smooth);
}

.philosophy-card:hover {
    border-color: var(--accent-gold);
    background-color: var(--bg-darker);
}

.philosophy-icon {
    width: 40px;
    height: 40px;
    stroke: var(--accent-gold);
    stroke-width: 1px;
    fill: none;
    margin-bottom: 2.5rem;
}

.philosophy-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.philosophy-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4rem;
    align-items: start;
}

.about-portrait-wrap {
    grid-column: 1 / 6;
    border: 1px solid var(--border-color);
    aspect-ratio: 4 / 5;
    overflow: hidden;
    position: relative;
}

.about-portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1);
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-portrait-wrap:hover .about-portrait {
    transform: scale(1.03);
}

.about-content {
    grid-column: 6 / 13;
}

.about-bio {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    line-height: 1.5;
    font-weight: 300;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.about-tables {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.about-table-col h3 {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--accent-gold);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.editorial-list-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
}

.editorial-list-item .item-title {
    color: var(--text-primary);
}

.editorial-list-item .item-sub {
    color: var(--text-secondary);
}

/* Journal / Thoughts */
.journal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
}

.journal-card {
    border: 1px solid var(--border-color);
    padding: 3rem;
    background-color: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    min-height: 380px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.journal-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-5px);
}

.journal-date {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    color: var(--accent-gold);
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.journal-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 300;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.journal-excerpt {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.journal-link {
    margin-top: auto;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.journal-link svg {
    width: 16px;
    height: 8px;
    fill: none;
    stroke: var(--text-primary);
    stroke-width: 1px;
    transition: var(--transition-fast);
}

.journal-card:hover .journal-link svg {
    transform: translateX(5px);
    stroke: var(--accent-gold);
}

/* Contact Section & Footer */
#contact {
    min-height: auto;
    padding-bottom: 80px;
}

.contact-layout {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4rem;
}

.contact-info {
    grid-column: 1 / 6;
}

.contact-statement {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 300;
    line-height: 1.4;
    margin-bottom: 3rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-detail-item .label {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--accent-gold);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.contact-detail-item .value {
    font-size: 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.contact-detail-item .value:hover {
    color: var(--accent-gold);
}

.cv-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 1rem 2rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.cv-download-btn:hover {
    background-color: var(--accent-gold);
    color: var(--bg-primary);
}

.contact-form-container {
    grid-column: 6 / 13;
}

.google-form-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 1.5rem 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-smooth);
}

.google-form-wrapper:hover {
    border-color: var(--accent-gold);
}

.google-form-wrapper iframe {
    width: 100%;
    height: 780px;
    border: none;
    background-color: transparent;
    /* High-end CSS inversion trick to dark-theme standard Google Forms seamlessly */
    filter: invert(90%) hue-rotate(180deg) contrast(1.2) brightness(0.85) saturate(0.8);
}

@media (max-width: 768px) {
    .google-form-wrapper iframe {
        height: 950px; /* Expands height as form inputs stack vertically on smaller viewports */
    }
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: 5rem;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}

.footer-socials {
    display: flex;
    gap: 2rem;
}

.footer-socials a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-socials a:hover {
    color: var(--accent-gold);
}

/* Custom 404 overlay */
.custom-404-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-darker);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.5s;
    text-align: center;
    padding: 2rem;
}

.custom-404-overlay.open {
    opacity: 1;
    visibility: visible;
}

.custom-404-code {
    font-family: var(--font-serif);
    font-size: clamp(6rem, 15vw, 12rem);
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--accent-gold);
}

.custom-404-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.custom-404-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 500px;
    line-height: 1.7;
    margin-bottom: 3rem;
}

.custom-404-btn {
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
    background: none;
    padding: 1rem 2.5rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.custom-404-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* Responsiveness overrides */
@media (max-width: 1024px) {
    section {
        padding: 90px 6%;
    }
    
    .hero-grid {
        grid-template-rows: repeat(12, 1fr);
    }
    
    .hero-title-container {
        grid-column: 1 / 13;
        grid-row: 4 / 8;
        align-self: start;
        margin-top: calc(var(--header-height) + 1rem);
    }
    
    .hero-statement-container {
        grid-column: 1 / 11;
        grid-row: 9 / 12;
        align-self: end;
    }
    
    .hero-scroll-indicator {
        display: none;
    }
    
    .project-card {
        gap: 2rem;
        grid-template-columns: 1fr;
    }
    
    .project-card-image-wrap,
    .project-card:nth-child(even) .project-card-image-wrap {
        grid-column: 1 / 13;
    }
    
    .project-card-info,
    .project-card:nth-child(even) .project-card-info {
        grid-column: 1 / 13;
        padding-left: 0;
        padding-right: 0;
        margin-top: 1.5rem;
    }
    
    .viewport-layout {
        grid-template-columns: 1fr;
    }
    
    .viewport-sidebar {
        margin-top: 1.5rem;
    }
    
    .detail-narrative-section {
        grid-template-columns: 1fr;
    }
    
    .narrative-text,
    .narrative-gallery {
        grid-column: span 1;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-portrait-wrap {
        grid-column: span 1;
        max-width: 450px;
        margin: 0 auto;
    }
    
    .about-content {
        grid-column: span 1;
    }
    
    .philosophy-grid {
        grid-template-columns: 1fr;
    }
    
    .philosophy-card {
        grid-column: span 1;
    }
    
    .contact-layout {
        grid-template-columns: 1fr;
    }
    
    .contact-info,
    .contact-form-container {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    section {
        padding: 70px 6%;
    }

    .navbar {
        height: 70px;
    }

    .nav-links {
        display: none;
    }
    
    .nav-menu-btn {
        display: block;
    }

    .hero-grid {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding-top: calc(var(--header-height) + 1.5rem);
        padding-bottom: 3rem;
        height: 100vh;
        min-height: 580px;
        pointer-events: none;
    }

    .hero-title-container {
        margin-top: 1rem;
        margin-bottom: 2rem;
        width: 100%;
    }

    .hero-statement-container {
        margin-top: auto;
        margin-bottom: 1rem;
        width: 100%;
        max-width: 100%;
    }
    
    .project-detail-close-btn {
        top: 1.5rem;
        right: 1.5rem;
        width: 44px;
        height: 44px;
    }
    
    .detail-hero {
        height: 50vh;
        padding: 0 6% 8% 6%;
    }
    
    .detail-title {
        font-size: 2.8rem;
    }

    .detail-meta-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        padding: 2.5rem 6%;
    }
    
    .viewport-container {
        min-height: 380px;
    }

    .about-tables {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .drawing-tab-panel {
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 480px) {
    section {
        padding: 60px 6%;
    }

    .hero-name {
        font-size: 2.3rem;
        line-height: 1.0;
    }

    .hero-role {
        font-size: 0.65rem;
        letter-spacing: 0.15em;
        margin-top: 0.75rem;
    }

    .hero-statement {
        font-size: 1.05rem;
        line-height: 1.5;
    }

    .hero-title-container {
        margin-top: 2rem;
    }

    .hero-statement-container {
        margin-top: auto;
    }

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

    .gallery-item.wide,
    .gallery-item.tall {
        grid-column: span 1;
        grid-row: span 1;
        aspect-ratio: 1;
    }

    .about-bio {
        font-size: 1.45rem;
        line-height: 1.6;
    }

    .about-portrait-wrap {
        aspect-ratio: 1;
    }

    .contact-statement {
        font-size: 1.8rem;
    }

    .contact-detail-item .value {
        font-size: 1.1rem;
    }

    .google-form-wrapper iframe {
        height: 980px; /* More vertical room on small phones */
    }
}
