:root {
    --color-bg: #111110;
    --color-text: #FFFFFF;
    --color-accent: #D4AF37;
    --color-muted: rgba(255, 255, 255, 0.6);
    --color-border: rgba(255, 255, 255, 0.1);
    --color-card: rgba(26, 26, 24, 0.4);
    --color-nav: rgba(0, 0, 0, 0.3);
    --transition-smooth: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    --font-primary: 'Roboto', sans-serif;
}

/* Base Styles & Translucent Effect */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Flexible Media */
img, video {
    max-width: 100%;
    height: auto;
    display: block;
}
html { 
    scroll-behavior: smooth; 
    background-color: #0b0f17; /* Fallback dark background */
}

/* Fixed background image container to bypass iOS Safari background-attachment: fixed bug */
html::before {
    content: "";
    position: fixed;
    inset: -50px; /* Expand slightly to hide blur artifacts at screen edges */
    background: url('../images/project2-thumb.jpg') no-repeat center center;
    background-size: cover;
    filter: blur(30px) saturate(1.4);
    -webkit-filter: blur(30px) saturate(1.4);
    z-index: -2;
    pointer-events: none;
}

body {
    font-family: var(--font-primary), -apple-system, sans-serif;
    background-color: transparent; /* Allow html background to show through */
    color: var(--color-text);
    line-height: 1.6;
    font-size: clamp(14px, 1.2vw + 10px, 18px); /* Fluid typography */
    overflow-x: hidden;
    position: relative;
}

/* Translucent Glass Layer */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 9, 0.55);
    z-index: -1;
}

/* Global glass card helper */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(18px) saturate(1.5);
    -webkit-backdrop-filter: blur(18px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
    border-radius: 16px;
}



.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 clamp(1.5rem, 5vw, 6%); }
.text-center { text-align: center; }
.bg-white { background: transparent; }
.bg-gray { background: transparent; }

/* Top Navigation Bar */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    background: var(--color-nav);
    backdrop-filter: blur(25px);
    border-bottom: 1px solid var(--color-border);
    padding: 20px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}



.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2001;
    padding: 0;
}

.hamburger-btn span {
    width: 100%;
    height: 2px;
    background-color: var(--color-text);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger-btn.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; }
.hamburger-btn.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.nav-track {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.nav-link {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.4s ease;
    padding: 8px 12px;
    opacity: 0.7;
    position: relative;
    font-family: 'Inter', sans-serif;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 1px;
    background: var(--color-accent);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

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

.nav-link.active::after {
    transform: scaleX(1);
}

/* Projects Dropdown in Top Nav */
.projects-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(13, 13, 12, 0.7);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 40px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    border-radius: 14px;
    z-index: 10;
}

.projects-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(10px);
}

.sub-link {
    font-size: 12px;
    letter-spacing: 0.5px;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap;
    opacity: 0.8;
}

.sub-link:hover { color: var(--color-accent); opacity: 1; }

/* Highlights / Metrics Section (Integrated) */
.highlights-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); 
    gap: 15px; 
}
.metric-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 25px 15px;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.metric-card:hover {
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(212,175,55,0.2);
}
.metric-number {
    font-size: 38px;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: 8px;
    font-family: var(--font-primary), sans-serif;
}
.metric-label {
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--color-muted);
    text-transform: uppercase;
    font-weight: 500;
}

@media (max-width: 768px) {
    .metric-number { font-size: 28px; }
    .metric-card { padding: 20px 10px; }
    .highlights-grid { grid-template-columns: repeat(2, 1fr); }
}

.section-heading { font-family: 'Outfit', sans-serif; color: var(--color-accent); }
.section-title { font-size: clamp(48px, 8vw, 72px); font-weight: 700; letter-spacing: -3px; margin-bottom: 60px; line-height: 1.1; color: var(--color-accent); }

/* About Section Full Page */
.about-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 120px 0 80px;
}

.about-container { position: relative; z-index: 1; width: 100%; max-width: 1100px; }

.about-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 70px;
    align-items: stretch; /* Let photo match paragraph height */
}
.profile-col { display: flex; align-items: stretch; justify-content: center; }
.profile-img {
    width: 100%;
    max-width: 260px;
    height: 100%;       /* Match the bio column height */
    min-height: 320px;
    object-fit: cover;  /* Fill without distortion */
    object-position: center top;
    border-radius: 18px;
    filter: grayscale(1);
    transition: filter 0.5s ease, transform 0.5s ease;
    border: 1px solid rgba(255,255,255,0.1);
    display: block;
}
.profile-img:hover { filter: grayscale(0.2); transform: scale(1.03); }
.hero-name { font-size: clamp(28px, 4vw, 44px); font-weight: 700; margin-bottom: 8px; font-family: var(--font-primary), sans-serif; color: var(--color-text); }
.role-location { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--color-muted); margin-bottom: 24px; font-weight: 500; }
.bio-text { font-size: 18px; line-height: 1.7; color: var(--color-text); margin-bottom: 28px; max-width: 100%; }
.simple-contact { font-size: 13px; color: var(--color-muted); letter-spacing: 1px; opacity: 0.8; margin-bottom: 40px; }
.simple-contact a {
    color: var(--color-muted);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    transition: color 0.3s, border-color 0.3s;
    padding-bottom: 1px;
}
.simple-contact a:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}
.highlights-grid { 
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
    margin-top: 16px;
}

@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    .profile-img { margin: 0 auto; width: 200px; height: 280px; }
    .about-section { padding: 100px 0 60px; }
    .highlights-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .highlights-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Skills Section Full Page */
.skills-section {
    background: #0a0a09;
    padding: 100px 0;
}
.skills-container { width: 100%; max-width: 1200px; }
.skills-center-content { width: 100%; text-align: center; }
.skills-grid-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: left;
}
.skill-category {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
    padding: 30px;
    border-radius: 16px;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.skill-category:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
    border-color: rgba(212, 175, 55, 0.25);
}
.category-title { font-size: 14px; text-transform: uppercase; letter-spacing: 2px; color: var(--color-accent); margin-bottom: 25px; border-bottom: 1px solid var(--color-border); padding-bottom: 15px; }


/* Skills Layout */
.skills-grid-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(30px, 4vw, 50px);
    margin-bottom: 60px;
}
.skill-category-label {
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--color-accent);
    text-transform: uppercase;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 8px;
}
.skill-chips-container { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-chip {
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.13);
    color: var(--color-text);
    font-size: 13px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.skill-chip:hover { border-color: var(--color-accent); color: var(--color-bg); background: var(--color-accent); }

/* Project Section Blur Layer */
/* Project Section Refinement */
.projects-section { position: relative; padding: 80px 0; overflow: hidden; }

.projects-bg-blur { position: absolute; inset: -100px; z-index: 0; filter: blur(120px); opacity: 0.08; transition: opacity 1s ease; }
.projects-bg-blur img { position: absolute; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease; }
.projects-bg-blur img.active { opacity: 1; }

.projects-fg-container { position: relative; z-index: 1; }

/* Timeline & Resume Parallel Grid */
.timeline-section { padding: 80px 0; position: relative; }
.resume-grid {
    display: flex;
    flex-direction: column;
    gap: 60px;
    margin-top: 40px;
    align-items: center;
}
.resume-col {
    width: 80%;
    max-width: 1200px;
}
@media (max-width: 1024px) {
    .resume-col {
        width: 90%;
    }
}
@media (max-width: 768px) {
    .resume-col {
        width: 100%;
    }
}
.timeline-container { position: relative; margin-top: 30px; }
.timeline-item {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 30px;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 24px;
    transition: background 0.3s ease, transform 0.3s ease;
}
.timeline-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(4px);
    border-color: rgba(212, 175, 55, 0.2);
}
.timeline-date { font-size: 13px; font-weight: 700; letter-spacing: 1px; color: var(--color-accent); text-transform: uppercase; padding-top: 4px; }
.timeline-title { font-size: 24px; font-weight: 600; margin-bottom: 4px; }
.timeline-org { font-size: 17px; color: var(--color-muted); margin-bottom: 8px; font-weight: 500; }
.timeline-desc { font-size: 16px; color: var(--color-muted); line-height: 1.5; }
.timeline-list { padding-left: 20px; font-size: 16px; color: var(--color-muted); line-height: 1.75; }
.timeline-list li { margin-bottom: 10px; }

/* Project Slider Styles */
.project-slider-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}
.project-slider-container {
    overflow: hidden;
    width: 100%;
}
.project-slider-track {
    display: flex;
    gap: 30px;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-card-dark {
    flex: 0 0 calc(50% - 15px); /* Show 2 cards at a time */
    min-width: 300px;
}
.slider-nav {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}
.slider-arrow {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.slider-arrow:hover {
    background: var(--color-accent);
    color: var(--color-bg);
    border-color: var(--color-accent);
    transform: scale(1.1);
}
.slider-arrow:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

/* Local Spacing Adjustments */
.about-section { padding: 100px 0 60px !important; }
.skills-section { padding: 60px 0 !important; }
.contact-section { padding: 80px 0 !important; }
#footer { padding: 60px 0 40px; }
.footer-divider-line { margin-bottom: 40px; }
.companies-row { margin-bottom: 40px; }

/* Timeline Styles (Legacy, kept for backup if grid fails) */
/* .timeline-container { position: relative; max-width: 900px; margin-top: 60px; } */
/* .timeline-item { display: grid; grid-template-columns: 200px 1fr; gap: 40px; margin-bottom: 80px; } */

/* Resume CTA Adjustments for small space */
.timeline-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}
.timeline-header-flex .section-heading { font-size: 28px; margin-bottom: 0; }
.resume-cta { display: flex; align-items: center; gap: 20px; }
.text-link-underline { margin-left: 0; }

.pill-btn {
    padding: 14px 28px;
    border-radius: 40px;
    background: var(--color-text);
    color: var(--color-bg);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.pill-btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.text-link-underline { font-size: 13px; font-weight: 600; color: var(--color-text); text-decoration: none; border-bottom: 1.5px solid var(--color-accent); padding-bottom: 2px; margin-left: 30px; }

/* Footer */
#footer { padding: 100px 0 60px; text-align: center; }
.footer-divider-line { width: 100%; height: 1px; background: var(--color-border); margin-bottom: 80px; }
.footer-label { font-size: 10px; letter-spacing: 4px; color: var(--color-muted); text-transform: uppercase; margin-bottom: 30px; }
.companies-row { display: flex; justify-content: center; align-items: center; gap: 40px; margin-bottom: 60px; font-size: 18px; font-weight: 500; opacity: 0.8; color: var(--color-accent); }
.footer-bottom-mini { font-size: 11px; opacity: 0.4; letter-spacing: 1px; color: var(--color-text); }

/* Resume Modal */
.overlay-hidden { position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 2000; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; display: flex; align-items: center; justify-content: center; padding: 40px; backdrop-filter: blur(10px); }
.overlay-hidden.active { opacity: 1; pointer-events: auto; }
.resume-preview-backdrop { position: absolute; inset: 0; z-index: 0; }
.resume-preview-content { position: relative; z-index: 1; width: 100%; max-width: 1000px; height: 90vh; background: #222; border-radius: 4px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 90px rgba(0,0,0,0.5); }
.resume-preview-header { padding: 20px 40px; background: #111; color: white; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #333; }
#close-resume-preview { position: absolute; top: 20px; right: 20px; background: none; border: none; color: white; font-size: 24px; cursor: pointer; z-index: 10; opacity: 0.5; transition: opacity 0.2s; }
#close-resume-preview:hover { opacity: 1; }

.resume-iframe-wrapper canvas { display: block; margin: 0 auto 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); max-width: 100%; height: auto !important; }

/* Mobile Adjustments */
@media (max-width: 1100px) {
    .resume-grid { gap: 40px; }
    .project-card-dark { flex: 0 0 100%; }
}
@media (max-width: 768px) {
    #sidebar-nav { display: none; }
    .timeline-item { grid-template-columns: 1fr; gap: 10px; }
    .timeline-date { margin-bottom: 5px; }
    .timeline-header-flex { flex-direction: column; align-items: flex-start; gap: 15px; margin-bottom: 20px; }
    .resume-cta { flex-direction: column; align-items: flex-start; gap: 10px; }
    .slider-arrow { width: 40px; height: 40px; font-size: 16px; }
}
/* Project Page Specific Styles - Single Screen Split View */
.project-page { 
    height: 100vh; 
    overflow: hidden; /* Lock the main page scroll */
    background: transparent; 
    color: #F7F5F2; 
}

.project-hero {
    height: 20vh;
    min-height: 150px;
    background: rgba(26, 24, 20, 0.4);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #FFF;
    overflow: hidden;
    padding: 20px 6%;
}

.back-link {
    position: absolute;
    top: 40px;
    left: 40px;
    color: #FFF;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 10;
    opacity: 0.6;
    transition: opacity 0.3s;
}
.back-link:hover { opacity: 1; }

.project-category {
    display: block;
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 20px;
    opacity: 0.5;
}

.project-hero-title {
    font-size: clamp(40px, 8vw, 84px);
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 20px;
}

.project-hero-sub {
    font-size: 18px;
    font-weight: 300;
    opacity: 0.7;
}

/* Split Content Area */
.project-details { 
    height: 80vh; 
    padding: 0; 
    display: flex;
    border-top: 1px solid var(--color-border);
}

.details-grid { 
    display: grid; 
    grid-template-columns: 0.8fr 1.2fr; 
    width: 100%;
    height: 100%;
}

.details-left {
    padding: 60px 8%;
    overflow-y: auto;
    border-right: 1px solid var(--color-border);
    scrollbar-width: none;
}
.details-left::-webkit-scrollbar { display: none; }

.details-right {
    padding: 40px;
    overflow-y: auto;
    background: rgba(0,0,0,0.2);
}

.project-section-heading {
    font-size: clamp(22px, 2.5vw, 32px);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--color-text);
}

/* Gallery inside Split */
.gallery-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); 
    gap: clamp(20px, 3vw, 40px);
}
.gallery-item { 
    width: 100%; 
    height: auto;
    aspect-ratio: 16/9;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }

@media (max-width: 991px) {
    .project-page { height: auto; overflow: auto; }
    .project-details { height: auto; flex-direction: column; }
    .details-grid { grid-template-columns: 1fr; height: auto; }
    .details-left { border-right: none; border-bottom: 1px solid var(--color-border); }
}

/* Software Pills */
.software-row { margin-top: 40px; }
.software-label { font-size: 10px; letter-spacing: 2px; color: var(--color-muted); margin-bottom: 15px; display: block; }
.software-pills { display: flex; flex-wrap: wrap; gap: 10px; }
/* Software Pills - Premium Yellow */
.software-pill {
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    font-size: 12px;
    font-weight: 500;
}

/* Metadata List */
.project-meta-list { list-style: none; display: flex; flex-direction: column; gap: 30px; }
.meta-item { display: flex; flex-direction: column; gap: 6px; }
.meta-label { font-size: 10px; letter-spacing: 3px; color: var(--color-accent); text-transform: uppercase; }
.meta-value { font-size: 15px; color: var(--color-text); font-weight: 400; }

/* Gallery */
.project-gallery { padding: 100px 0; background: #FFF; }
.gallery-container { max-width: 1400px; margin: 0 auto; padding: 0 6%; }
.gallery-heading { font-size: 11px; letter-spacing: 4px; color: var(--color-muted); text-transform: uppercase; margin-bottom: 40px; text-align: center; }
.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.gallery-item { cursor: pointer; overflow: hidden; border-radius: 4px; background: #F7F5F2; }
.gallery-item img { width: 100%; height: auto; display: block; transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.gallery-item:hover img { transform: scale(1.05); }

/* Next Project Footer */
.next-project-footer { padding: 120px 0; background: var(--color-bg); border-top: 1px solid #222; }
.next-project-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #FFF;
    transition: transform 0.3s;
}
.next-project-link:hover { transform: translateX(20px); }
.next-label { font-size: 10px; letter-spacing: 4px; color: var(--color-muted); text-transform: uppercase; margin-bottom: 15px; display: block; }
.next-title { font-size: 48px; font-weight: 700; letter-spacing: -1px; }
.next-arrow { font-size: 48px; opacity: 0.3; transition: opacity 0.3s, transform 0.3s; }
.next-project-link:hover .next-arrow { opacity: 1; transform: translateX(10px); }

@media (max-width: 991px) {
    .hamburger-btn { display: flex; }
    
    .nav-track {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(13, 13, 12, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 0 5%;
        gap: 15px;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease, padding 0.4s ease;
    }

    .nav-track.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        padding: 30px 5%;
        border-bottom: 1px solid var(--color-border);
    }
    
    .nav-link {
        font-size: 14px;
        font-weight: 500;
        padding: 8px 0;
        letter-spacing: 0px;
    }
    
    .nav-link::after { display: none; }
    
    .projects-dropdown { width: 100%; }
    
    .projects-dropdown .dropdown-content {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        background: transparent;
        border: none;
        padding: 10px 0 10px 15px;
        min-width: 100%;
        border-left: 1px solid var(--color-border);
        margin-left: 10px;
    }
    
    .sub-link { font-size: 14px; padding: 6px 0; display: block; }

    .details-grid { grid-template-columns: 1fr; gap: clamp(30px, 5vw, 60px); }
    .next-title { font-size: clamp(24px, 5vw, 32px); }
}

/* Project Grid & Cards - Premium Glassmorphism */
.project-grid-dark {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr));
 gap: clamp(20px, 4vw, 40px);
 margin-top: 60px;
}

.project-card-dark {
    background: rgba(26, 26, 24, 0.35);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid rgba(212, 175, 55, 0.2); /* Thin gold border */
    box-shadow: 0 8px 32px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.05);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 420px;
}

.project-card-dark:hover {
    transform: translateY(-6px);
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(212, 175, 55, 0.25), inset 0 1px 0 rgba(255,255,255,0.08); /* Soft gold glow */
    background: rgba(26, 26, 24, 0.5);
}

.card-image-box {
    width: 100%;
    height: 70%; /* 70% of card height */
    overflow: hidden;
    position: relative;
}

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

.project-card-dark:hover .card-image-box img {
    transform: scale(1.05); /* Slight zoom */
}

.card-body {
    padding: 12px 20px 16px 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    flex-grow: 1;
}

.card-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 6px;
}

.card-category {
    font-size: 10px;
    font-weight: 700;
    color: #FFD700; /* Brighter gold */
    text-transform: uppercase;
    letter-spacing: 2px;
}

.card-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--color-text); /* White */
    margin-top: 0;
    margin-bottom: 8px; /* Spacing between title and tech */
    line-height: 1.3;
}

.card-skills {
    font-size: 9.5px;
    font-weight: 600;
    color: var(--color-accent); /* Gold color */
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 0;
    line-height: 1.3;
}

.card-year {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .project-grid-dark { grid-template-columns: 1fr; }
    .top-nav { padding: 15px 0; }
    .container { padding: 0 5%; }
    .project-card-dark { height: 390px; }
    .card-image-box { height: 68%; }
}

/* Lightbox glassmorphism and zoom support */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

#lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    cursor: zoom-in;
}

#lightbox-img.zoomed {
    cursor: zoom-out;
}

/* Slider Dots and Control Alignment */
.slider-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 30px;
    padding: 0 10px;
}

.slider-dots {
    display: flex;
    gap: 12px;
    align-items: center;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.dot:hover {
    border-color: var(--color-accent);
}

.dot.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: scale(1.25);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}

/* Ensure visual card sizes match the original architecture template */
.project-card-dark {
    flex: 0 0 calc(50% - 15px);
    min-width: 300px;
}

@media (max-width: 1100px) {
    .project-card-dark {
        flex: 0 0 100%;
    }
}
