/* Global Reset & Base Styles */
:root {
    --color-stadium: #d0d5bc;
    --color-light: #7e8486;
    --color-charleston: #b1a4a2;
    --color-florida: #c7cfca;
    --color-tower: #c1c2c0;
}

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

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #FFFFFF;
    color: #333;
    line-height: 1.4;
    overflow-x: hidden;
}

h1,
h2,
h3,
a,
p {
    color: #333;
}

a {
    text-decoration: none;
    cursor: pointer;
}

/* ============================================
   LAYOUT STRUCTURE
   ============================================ */

/* Fixed Sidebar (Bars Only) */
.fixed-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 40px;
    height: 100vh;
    z-index: 1000;
    pointer-events: none;
    /* Let clicks pass through if needed, though usually nothing behind */
}

.brand-bars {
    display: flex;
    gap: 12px;
    height: 100%;
}

.brand-bars .bar {
    width: 14px;
    height: 100%;
}

.bar-1 {
    background-color: #d0d5bc;
}

.bar-2 {
    background-color: #7e8486;
}

.bar-3 {
    background-color: #b1a4a2;
}

.bar-4 {
    background-color: #c7cfca;
}

.bar-5 {
    background-color: #c1c2c0;
}

/* Scrollable Header (Text) */
.scrollable-header {
    position: absolute;
    top: 40px;
    /* Initial top position matched to design */
    right: 170px;
    /* 40px (right) + 118px (bars width) + gap */
    width: 118px;
    /* Match bars width */
    z-index: 900;
}

.header-text-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.logo-name {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
    letter-spacing: -0.3px;
    line-height: 1.2;
    margin-bottom: 3px;
    text-decoration: none;
    /* Ensure link underline is removed */
    display: block;
    /* Behavior as block/span wrapper */
}

.logo-subtitle {
    font-size: 11px;
    font-weight: 300;
    color: #888;
    white-space: nowrap;
    margin-bottom: 22px;
    letter-spacing: 0;
}

.nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.nav a {
    font-size: 14px;
    color: #888;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav a:hover,
.nav a.active {
    color: #333;
}


/* ============================================
   MAIN CONTENT
   ============================================ */

main {
    padding: 160px 200px 80px 100px;
    /* Added top padding to clear 'header' visual space */
    min-height: 100vh;
}

/* Projects Grid - Single Column */
.projects-grid {
    display: none;
    grid-template-columns: 1fr;
    gap: 100px;
    width: 100%;
}

.projects-grid.active-view {
    display: grid;
    animation: fadeIn 0.5s ease;
}

.project-card {
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 30px;
}

.card-image-wrapper {
    position: relative;
    width: 850px;
    aspect-ratio: 4/3;
    overflow: hidden;
    background-color: #f0f0f0;
    flex-shrink: 0;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-color);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    mix-blend-mode: multiply;
    z-index: 1;
}

.card-title-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 20px;
    text-align: center;
}

.card-title-overlay h2 {
    font-size: 22px;
    font-weight: bold;
    color: #FFFFFF !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.project-card:hover .card-image-wrapper img {
    transform: scale(1.05);
}

.project-card:hover .card-overlay {
    opacity: 0.85;
}

.project-card:hover .card-title-overlay {
    opacity: 1;
}

/* Side Text Styles */
.card-side-text {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 20px;
}

.side-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.side-year {
    font-size: 14px;
    font-weight: normal;
    color: #888;
}


/* Project Detail View */
.project-detail {
    display: none;
    padding-top: 0;
}

.project-detail.active-view {
    display: block;
    animation: fadeIn 0.5s ease;
}

.back-btn {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 14px;
    color: #999;
    cursor: pointer;
    margin-bottom: 40px;
    padding: 0;
    transition: color 0.3s ease;
}

.back-btn:hover {
    color: #333;
}

.detail-container {
    max-width: 900px;
}

.detail-header {
    margin-bottom: 60px;
}

.detail-header h1 {
    font-size: 48px;
    font-weight: bold;
    letter-spacing: -1px;
    margin-bottom: 15px;
}

.detail-meta {
    font-size: 15px;
    color: #999;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.detail-desc {
    font-size: 18px;
    line-height: 1.6;
    color: #555;
    max-width: 700px;
}

.detail-gallery {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.gallery-item.full-width img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.gallery-grid-2 img,
.gallery-grid-3 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
}


/* About Section */
.content-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.content-section.active-view {
    display: block;
}

.about-container {
    display: flex;
    gap: 80px;
    align-items: flex-start;
}

.about-image {
    width: 400px;
    flex-shrink: 0;
    background-color: #f0f0f0;
}

.about-image img {
    width: 100%;
    display: block;
}

.about-text {
    flex: 1;
    max-width: 500px;
    padding-top: 20px;
}

.about-text h1 {
    font-size: 42px;
    margin-bottom: 30px;
    letter-spacing: -1px;
    color: #333;
}

.about-text .lead {
    font-size: 24px;
    margin-bottom: 30px;
    color: #666;
    font-weight: 300;
}

.about-text p {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 25px;
    color: #444;
}

.resume-btn {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid #333;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.resume-btn:hover {
    background-color: #333;
    color: #fff;
}

/* Contact Section */
.content-wrapper {
    max-width: 600px;
}

.content-wrapper h1 {
    font-size: 42px;
    margin-bottom: 30px;
    letter-spacing: -1px;
    color: #333;
}

.content-wrapper .lead {
    font-size: 24px;
    margin-bottom: 40px;
    color: #666;
    font-weight: 300;
}

.contact-link {
    font-size: 28px;
    color: #333;
    border-bottom: 2px solid #333;
    padding-bottom: 4px;
    font-weight: bold;
}

.contact-link:hover {
    color: #666;
    border-color: #666;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 40px;
    color: #333;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: #000;
}

/* Zoom Cursor for Gallery Images */
.detail-gallery img {
    cursor: zoom-in;
    transition: opacity 0.3s ease;
}

.detail-gallery img:hover {
    opacity: 0.9;
}

/* Lightbox Nav & Caption */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #333;
    font-size: 40px;
    cursor: pointer;
    padding: 20px;
    transition: color 0.3s ease;
    z-index: 2001;
}

.lightbox-nav:hover {
    color: #000;
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

.lightbox-caption {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Responsive */
@media (max-width: 1024px) {
    .fixed-sidebar {
        display: none;
        /* Hide bars on tablet/mobile if too tricky */
    }

    .scrollable-header {
        position: relative;
        top: 0;
        right: 0;
        width: 100%;
        padding: 40px;
    }

    .header-text-content {
        align-items: flex-start;
        text-align: left;
    }

    main {
        padding: 20px 40px;
    }

    .about-container {
        flex-direction: column;
        gap: 40px;
    }

    .about-image {
        width: 100%;
    }

    .card-image-wrapper {
        width: 100%;
    }
}