/* =====================================================
   Benjamin Kravets Portfolio - Snazzylabs-Inspired Design
   Colors: Blue (#4CA7F8) | Yellow (#F4BF45)
   ===================================================== */

/* CSS Variables */
:root {
    --color-blue: #4CA7F8;
    --color-blue-dark: #3a8fd6;
    --color-blue-light: #e8f4fd;
    --color-yellow: #F4BF45;
    --color-yellow-dark: #d9a832;
    --color-yellow-light: #fef9e8;

    --color-text: #1a1a2e;
    --color-text-secondary: #4a4a68;
    --color-text-muted: #8888a0;
    --color-bg: #ffffff;
    --color-bg-alt: #f8f9fc;
    --color-border: #e8e8f0;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --transition: 0.3s ease;
}

/* Dark Mode - Auto-detects system preference */
@media (prefers-color-scheme: dark) {
    :root {
        --color-blue: #5AB4FF;
        --color-blue-dark: #4CA7F8;
        --color-blue-light: #1a2a3a;
        --color-yellow: #F4BF45;
        --color-yellow-dark: #d9a832;
        --color-yellow-light: #2a2520;

        --color-text: #f0f0f5;
        --color-text-secondary: #b0b0c0;
        --color-text-muted: #7878a0;
        --color-bg: #0f0f1a;
        --color-bg-alt: #1a1a2e;
        --color-border: #2a2a40;

        --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    }

    /* Hero section header in dark mode */
    .hero {
        background: linear-gradient(135deg, #0f0f1a 0%, #1a2a3a 100%);
    }

    .hero::before {
        background: radial-gradient(ellipse, rgba(90, 180, 255, 0.1) 0%, transparent 70%);
    }

    /* Navbar adjustments for dark mode */
    .navbar {
        background: rgba(15, 15, 26, 0.95) !important;
        border-bottom-color: #2a2a40;
    }

    .navbar.scrolled {
        background: rgba(15, 15, 26, 0.98) !important;
    }

    /* Mobile menu in dark mode */
    .nav-menu.active {
        background: #0f0f1a;
    }

    .nav-toggle span {
        background: #f0f0f5;
    }

    /* View Resume button (secondary button) in dark mode */
    .btn--secondary {
        background: #1a1a2e;
        color: #f0f0f5;
        border-color: #2a2a40;
    }

    .btn--secondary:hover {
        border-color: #5AB4FF;
        color: #5AB4FF;
        background: #1a1a2e;
    }

    /* Project titles in dark mode */
    .project-title {
        color: var(--color-text);
    }

    .project-content {
        background: var(--color-bg);
    }

    /* Footer in dark mode */
    .footer {
        background: #0a0a12;
        color: #f0f0f5;
    }

    .footer-tagline {
        color: rgba(240, 240, 245, 0.6);
    }

    .footer-contact-item {
        color: rgba(240, 240, 245, 0.8);
    }

    .footer-bottom p {
        color: rgba(240, 240, 245, 0.5);
    }

    /* Image placeholder adjustments */
    .project-image-placeholder {
        background: linear-gradient(135deg, var(--color-blue-light) 0%, var(--color-bg-alt) 100%);
    }

    /* About section image placeholder */
    .about-image-placeholder {
        background: linear-gradient(135deg, var(--color-blue-light) 0%, var(--color-bg-alt) 100%);
    }

    /* Project header gradient */
    .project-header {
        background: linear-gradient(135deg, #0f0f1a 0%, #1a2a3a 100%);
    }
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.3;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-blue);
    letter-spacing: -0.02em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: color var(--transition);
}

.nav-link:hover {
    color: var(--color-blue);
}

.nav-link--cta {
    background: var(--color-blue);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    transition: background var(--transition), transform var(--transition);
}

.nav-link--cta:hover {
    background: var(--color-blue-dark);
    color: white;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-blue-light) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 120%;
    background: radial-gradient(ellipse, rgba(76, 167, 248, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    max-width: 700px;
    position: relative;
    z-index: 1;
}

.hero-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-blue);
    background: var(--color-blue-light);
    padding: 8px 16px;
    border-radius: 50px;
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    border: none;
}

.btn--primary {
    background: var(--color-blue);
    color: white;
    box-shadow: 0 4px 14px rgba(76, 167, 248, 0.35);
}

.btn--primary:hover {
    background: var(--color-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 167, 248, 0.45);
}

.btn--secondary {
    background: var(--color-bg);
    color: var(--color-text);
    border: 2px solid var(--color-border);
}

.btn--secondary:hover {
    border-color: var(--color-blue);
    color: var(--color-blue);
}

.btn--full {
    width: 100%;
    justify-content: center;
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-yellow);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.section-description {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin-bottom: 48px;
}

/* Projects Section */
.projects {
    background: var(--color-bg-alt);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.project-card {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.project-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-bg-alt) 0%, var(--color-border) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    transition: transform var(--transition);
}

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

.project-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 12px;
    border-radius: 50px;
}

.project-tag--blue {
    background: var(--color-blue);
    color: white;
}

.project-tag--yellow {
    background: var(--color-yellow);
    color: var(--color-text);
}

.project-content {
    padding: 24px;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.project-description {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.project-tech li {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-muted);
    background: var(--color-bg-alt);
    padding: 4px 10px;
    border-radius: 4px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-blue);
    transition: gap var(--transition);
}

.project-link:hover {
    gap: 10px;
}

.project-link svg {
    transition: transform var(--transition);
}

.project-link:hover svg {
    transform: translateX(2px);
}

/* About Section */
.about {
    background: var(--color-bg-alt);
}

.about-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 60px;
    margin-top: 48px;
    align-items: start;
}

.about-image {
    position: sticky;
    top: 100px;
}

.about-image-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--color-blue-light) 0%, var(--color-bg) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--color-text-muted);
    border: 2px dashed var(--color-border);
}

.about-image-placeholder span {
    font-size: 0.9rem;
    font-weight: 500;
}

.about-image img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.about-content {
    max-width: 700px;
}

.about-bio {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
}

.about-involvement {
    background: var(--color-bg);
    padding: 32px;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-yellow);
}

.about-involvement h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-blue);
    margin-bottom: 20px;
}

.involvement-list {
    list-style: none;
}

.involvement-list li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}

.involvement-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.involvement-list li:first-child {
    padding-top: 0;
}

.involvement-role {
    font-weight: 600;
    color: var(--color-text);
}

.involvement-org {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* Resume Section */
.resume-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    margin-top: 48px;
}

.resume-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-blue);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-blue-light);
}

.resume-heading--skills {
    margin-top: 40px;
}

.resume-item {
    margin-bottom: 32px;
    padding-left: 20px;
    border-left: 3px solid var(--color-border);
    transition: border-color var(--transition);
}

.resume-item:hover {
    border-left-color: var(--color-yellow);
}

.resume-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.resume-item-header h4 {
    font-size: 1.05rem;
    font-weight: 600;
}

.resume-date {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-yellow);
    background: var(--color-yellow-light);
    padding: 4px 10px;
    border-radius: 4px;
}

.resume-company {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
}

.resume-note {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.resume-duties {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.resume-duties li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 6px;
}

.resume-duties li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 5px;
    height: 5px;
    background: var(--color-blue);
    border-radius: 50%;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.skill-category h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.skill-list li {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    padding: 6px 0;
    border-bottom: 1px solid var(--color-border);
}

.resume-download {
    margin-top: 48px;
}

/* Drawings Section */
.drawings {
    background: var(--color-bg-alt);
}

.drawings-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.drawing-card {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    cursor: pointer;
}

.drawing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.drawing-preview {
    height: 160px;
    background: var(--color-bg-alt);
    border-bottom: 3px solid var(--color-yellow);
}

.drawing-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}

.drawing-info {
    padding: 20px;
}

.drawing-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.drawing-info p {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
}

.drawing-format {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-blue);
    background: var(--color-blue-light);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Footer */
.footer {
    background: #1a1a2e;
    color: white;
    padding: 60px 0 32px;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 32px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-blue);
    letter-spacing: -0.02em;
}

.footer-logo--text {
    font-size: 1.5rem;
}

.footer-tagline {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-contact h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-yellow);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-contact-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    transition: all var(--transition);
}

.footer-contact-item:hover {
    color: var(--color-blue);
    transform: translateX(4px);
}

.footer-contact-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.footer-contact-item:hover svg {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Project Detail Page */
.project-header {
    padding: 140px 24px 60px;
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-blue-light) 100%);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
    transition: color var(--transition);
}

.back-link:hover {
    color: var(--color-blue);
}

.project-header-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: white;
    background: var(--color-blue);
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.project-header-tag--yellow {
    background: var(--color-yellow);
    color: var(--color-text);
}

.project-header-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.project-header-subtitle {
    font-size: 1.15rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    line-height: 1.7;
    margin-bottom: 32px;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
}

.project-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-meta-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
}

.project-meta-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
}

.project-detail {
    padding: 80px 0;
}

.project-description-full {
    max-width: 800px;
    margin-bottom: 64px;
}

.project-description-full h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--color-blue);
}

.project-description-full p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.project-gallery {
    margin-bottom: 64px;
}

.project-download {
    margin-bottom: 64px;
}

.project-download h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--color-blue);
}

.project-gallery h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--color-blue);
}

.gallery-grid-top {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 16px;
    margin-bottom: 16px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-grid-even {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.gallery-grid-even .gallery-item {
    aspect-ratio: 16 / 10;
}

.gallery-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-top: 32px;
    margin-bottom: 16px;
}

.gallery-item--video {
    aspect-ratio: 16 / 9;
}

.gallery-item--video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-bg-alt);
    cursor: pointer;
}

.gallery-item--large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item--third {
    aspect-ratio: 3 / 4;
}

.gallery-item--two-thirds {
    aspect-ratio: 16 / 9;
}

.gallery-item--full {
    width: 100%;
    margin-top: 16px;
    aspect-ratio: 16 / 9;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

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

.gallery-item figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    font-size: 0.85rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition);
}

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

.project-technical h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--color-blue);
}

.technical-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.technical-item {
    background: var(--color-bg-alt);
    padding: 24px;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-yellow);
}

.technical-item h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-text);
}

.technical-item ul {
    list-style: none;
}

.technical-item li {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    padding: 8px 0;
    padding-left: 16px;
    position: relative;
    border-bottom: 1px solid var(--color-border);
}

.technical-item li:last-child {
    border-bottom: none;
}

.technical-item li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--color-blue);
    border-radius: 50%;
}

/* Project card clickable styles */
.project-card--clickable {
    cursor: pointer;
}

.project-card--clickable .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 200px 1fr;
        gap: 40px;
    }

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

    .resume-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .drawings-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid-even {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item--large {
        grid-column: span 2;
        grid-row: span 1;
    }

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

    /* 3D Model Viewer tablet */
    .model-viewer-container {
        height: 420px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--color-border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero {
        padding: 100px 24px 60px;
    }

    .section {
        padding: 60px 0;
    }

    .footer-main {
        flex-direction: column;
        gap: 32px;
        text-align: center;
        align-items: center;
    }

    .footer-contact-links {
        align-items: center;
    }

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

    .about-image {
        position: static;
        max-width: 250px;
        margin: 0 auto;
    }

    .about-content {
        text-align: center;
    }

    .about-involvement {
        text-align: left;
    }

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

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

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

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

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

    .gallery-item--large {
        grid-column: span 1;
    }

    .gallery-item--third,
    .gallery-item--two-thirds {
        aspect-ratio: 16 / 9;
    }

    .project-meta {
        flex-direction: column;
        gap: 16px;
    }

    /* 3D Model Viewer mobile */
    .model-viewer-container {
        height: 350px;
    }
}

/* =====================================================
   Lightbox - Image Enlargement
   ===================================================== */

/* Enlargeable image indicator */
.enlargeable {
    cursor: zoom-in;
    transition: transform var(--transition), box-shadow var(--transition);
}

.enlargeable:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.enlargeable:focus {
    outline: 3px solid var(--color-blue);
    outline-offset: 3px;
}

/* Lightbox container */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Backdrop */
.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

/* Content container */
.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

/* Image */
.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: zoom-out;
}

/* Caption */
.lightbox-caption {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    text-align: center;
    max-width: 600px;
}

/* Close button */
.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: background var(--transition), transform var(--transition);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-close:focus {
    outline: 2px solid var(--color-blue);
    outline-offset: 2px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
    }

    .lightbox-image {
        max-height: 70vh;
        border-radius: var(--radius-sm);
    }

    .lightbox-close {
        top: -48px;
        right: 0;
    }

    .lightbox-caption {
        font-size: 0.85rem;
        padding: 0 16px;
    }
}

/* =====================================================
   3D Model Viewer Section
   ===================================================== */

.project-model-viewer {
    margin-bottom: 64px;
}

.project-model-viewer h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-blue);
}

.model-viewer-hint {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.model-viewer-container {
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    height: 500px;
    position: relative;
}

.model-viewer-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 100%;
    color: var(--color-text-muted);
    background: var(--color-bg-alt);
}

.model-viewer-loading span {
    font-size: 0.9rem;
    font-weight: 500;
}

model-viewer {
    --poster-color: transparent;
}
