:root {
    --bg-color: #0a0a0a;
    /* Slightly lighter/richer black */
    --text-primary: #f5f5f5;
    --text-secondary: #888888;
    --accent-color: #ffffff;
    --cursor-color: #ffffff;

    --font-main: 'Manrope', sans-serif;

    --spacing-sm: 1.5rem;
    --spacing-md: 3rem;
    --spacing-lg: 8rem;
    --spacing-xl: 12rem;
    /* Luxury spacing */
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.5;
    overflow-x: hidden;
    cursor: default;
    -webkit-font-smoothing: antialiased;
    /* Crisper text */
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    display: none;
}

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

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: width 0.2s, height 0.2s;
}

/* Layout Utilities */
.container {
    max-width: 1400px;
    /* Wider container for modern look */
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: start;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 300;
    /* Lighter weights are sleeker */
    line-height: 1.1;
    letter-spacing: -0.02em;
    /* Tighter tracking */
}

h1 {
    letter-spacing: -0.03em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.6;
}

/* Navbar - Glassmorphism */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    /* Center the inner content */
    z-index: 100;
    background: rgba(5, 5, 5, 0.0);
    /* Transparent start */
    transition: background 0.3s ease;
    mix-blend-mode: difference;
}

.nav-content {
    width: 100%;
    max-width: 1800px;
    /* Constrained width */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    transition: padding 0.3s ease;
}

.navbar.scrolled {
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    mix-blend-mode: normal;
}

.navbar.scrolled .nav-content {
    padding: 1rem 5%;
}

.logo {
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.nav-links a {
    margin-left: 3rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    position: relative;
}

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

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

/* Hero Section - Immersive */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    position: relative;
    overflow: hidden;
    /* Immersive Background */
    background-image: url('assets/exterior.png');
    /* Fallback / Static */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Simple Parallax */
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.3));
    /* Gradient Overlay */
    z-index: 1;
}

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

.hero-content h1 {
    font-size: clamp(3rem, 6.5vw, 8rem);
    font-weight: 200;
    /* Super sleek thin font */
    margin-bottom: 1rem;
    line-height: 1.1;
    white-space: nowrap;

}

.hero-content .subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 500px;
    font-weight: 300;
    letter-spacing: 0.02em;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    padding-left: 1.5rem;
}

.hero-tagline {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    color: var(--accent-color);
    margin-bottom: 2rem;
    display: block;
    text-transform: uppercase;
    opacity: 0.8;
}

.delay-2 {
    animation-delay: 0.4s;
}

/* About Section */
.about-section {
    padding: var(--spacing-xl) 0;
    min-height: auto;
    background-color: var(--bg-color);
    position: relative;
    z-index: 2;
}

.about-grid {
    display: grid;
    grid-template-columns: 280px 1.5fr 1fr;
    /* Profile | Bio | Skills */
    gap: 4rem;
    align-items: start;
}

.profile-col {
    padding-top: 7.5rem;
    /* Aligns image top with the text content of neighbor columns, accounting for their headers */
    width: 100%;
}

.profile-img-container {
    width: 100%;
    aspect-ratio: 4/5;
    /* Professional portrait ratio */
    overflow: hidden;
    /* border-radius: 4px; No radius for sleek brutalist/modern feel, or small radius */
    position: relative;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.5s ease, transform 0.5s ease;
}

.profile-img-container:hover .profile-img {
    filter: grayscale(0%);
    transform: scale(1.03);
}

.bio-text h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}


.bio-text p {
    margin-bottom: 2rem;
    font-weight: 300;
}



/* Skill/Services Section (New) */
.column-header {
    font-size: 3rem;
    text-transform: none;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    /* Reduced from 3rem slightly as text is smaller */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
    color: var(--accent-color);
    font-weight: 300;
}

.skills-list ul {
    list-style: none;
}

.skills-list li {
    margin-bottom: 2.5rem;
    /* Increased breathing room */
}

.skill-title {
    display: block;
    font-size: 1.15em;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #ffffff;
    /* Match highlight-tool style */
}



.skill-desc {
    display: block;
    color: var(--text-primary);
    /* Matched to bio text color */
    font-size: 1rem;
    font-weight: 300;
    max-width: 90%;
    line-height: 1.5;
}

.skill-desc .highlight-tool {
    font-size: 1em;
    /* Reset zoom on tools inside desc since title is smaller now */
}

.highlight-tool {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.15em;
}


/* Work Section */
.work-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--bg-color);
}

.work-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
    gap: 2rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 300;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 1.5rem;
}

.filter-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s;
    font-family: var(--font-main);
}

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

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

.work-section .container {
    max-width: 1800px;
    /* Wider container for gallery but constrained */
    width: 95%;
    padding: 0;
    /* Padding handled by width or internal gaps, or keep padding if needed for mobile edges */
    margin: 0 auto;
}

/* Masonry Grid Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    /* Tighter gap looks more professional */
    grid-auto-flow: dense;
}

/* Hide vertical stack styles */
.project-stack,
.project-item,
.project-img,
.project-meta {
    display: none;
}

.gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    height: 100%;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Filter Animation Class */
.gallery-item.hide {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    position: absolute;
    /* Take out of flow? No, Grid is tricky. simpler: display:none via JS or just opacity */
}

/* Better grid filtering usually requires Isotope or robust JS. Simple method: toggle display check JS. */

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
    filter: grayscale(100%);
    /* Start B&W for art feel */
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
    filter: grayscale(0%);
    /* Color on hover */
}

/* Gallery Video */
.gallery-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
    filter: grayscale(100%);
}

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

.item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    /* Let clicks pass through to video if needed, though surrounding div handles click */
}

.gallery-item:hover .item-info {
    opacity: 1;
    transform: translateY(0);
}

.item-info h4 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 0.3rem;
    font-weight: 400;
}

.item-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Masonry Spans */
@media (min-width: 768px) {
    .span-2-2 {
        grid-column: span 2;
        grid-row: span 2;
    }

    .span-2-1 {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    .span-2-2,
    .span-2-1 {
        grid-column: span 2;
        grid-row: auto;
    }
}

/* Contact Section */
.contact-section {
    /* scroll-snap-align: center; removed */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* Ensure no other content is visible */
    margin-bottom: 0;
    padding: 0;
    position: relative;
}

.contact-section h2 {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.btn-primary {
    display: inline-block;
    padding: 1rem 2rem;
    border: 1px solid var(--text-primary);
    margin-top: var(--spacing-md);
    transition: all 0.3s ease;
}

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

.footer {
    position: absolute;
    bottom: 2rem;
    width: 100%;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

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

.fade-in-scroll {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.fade-in-scroll.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Mobile */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    .profile-col {
        grid-column: span 2;
        /* Profile on top or side? Let's put profile small or hidden? No, show it. */
        max-width: 400px;
        margin: 0 auto;
    }

    .bio-col {
        grid-column: 1 / -1;
    }

    .skills-col {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .grid-2-col {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .profile-col {
        grid-column: span 1;
        width: 100%;
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .cursor-dot,
    .cursor-outline {
        display: none;
        /* Hide custom cursor on touch */
    }

    body {
        cursor: auto;
    }
}

/* Lightbox Styles - Restored */
.lightbox {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 10000;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(5, 5, 5, 0.95);
    /* Black w/ opacity */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
}

.lightbox-content-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 1200px;
    max-height: 80vh;
    display: flex;
    /* Centers content */
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    /* Base style for img, video, iframe */
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    display: block;
}

/* Specifics for iframe to ensure it has height */
iframe.lightbox-content {
    height: 80vh;
    background: #fff;
    border: none;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    position: absolute;
    bottom: 5%;
    left: 10%;
    font-size: 1.2rem;
    font-weight: 300;
}

.close-btn {
    position: absolute;
    top: 30px;
    right: 50px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: 100;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10001;
}

.close-btn:hover,
.close-btn:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@media (max-width: 700px) {
    .lightbox-content {
        width: 95%;
    }
}