:root {
    --primary: #18181B;
    --secondary: #3F3F46;
    --cta: #2563EB;
    --background: #FAFAFA;
    --text: #09090B;
    --text-muted: #52525B;
    --card-bg: #FFFFFF;
    --border: #E4E4E7;
    --font-heading: 'Caveat', cursive;
    --font-body: 'Quicksand', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--background);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

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

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 20px 0;
    background: rgba(250, 250, 250, 0.8);
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

nav.scrolled {
    padding: 12px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s ease;
    position: relative;
}

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

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

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

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 60;
}

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

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

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

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

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    position: relative;
}

.hero-content {
    max-width: 700px;
    padding-right: 40px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(48px, 10vw, 80px);
    font-weight: 700;
    line-height: 1.1;
    color: var(--primary);
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease 0.1s forwards;
}

.hero h1 .highlight {
    color: var(--cta);
}

.hero p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease 0.2s forwards;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease 0.3s forwards;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--cta);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--secondary);
    transform: translateY(-2px);
}

.hero-visual {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 45%;
    height: 80%;
    opacity: 0;
    animation: fadeIn 0.8s ease 0.5s forwards;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.hero-visual .code-block {
    background: var(--primary);
    border-radius: 16px;
    padding: 32px;
    color: #A1A1AA;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    line-height: 1.8;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%) rotate(3deg);
}

.hero-visual .code-block .keyword { color: #C084FC; }
.hero-visual .code-block .function { color: #60A5FA; }
.hero-visual .code-block .string { color: #34D399; }
.hero-visual .code-block .comment { color: #71717A; }

.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(36px, 6vw, 52px);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 17px;
    max-width: 500px;
    margin: 0 auto;
}

.about {
    background: var(--card-bg);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image .image-frame {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 120px;
    color: white;
    position: relative;
    overflow: hidden;
}

.about-image .image-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.about-content h3 {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
}

.about-content p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 24px;
}

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

.stat-item {
    text-align: center;
    padding: 20px;
    background: var(--background);
    border-radius: 12px;
}

.stat-item .number {
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 700;
    color: var(--cta);
}

.stat-item .label {
    font-size: 14px;
    color: var(--text-muted);
}

.skills-section {
    background: var(--background);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.1);
    border-color: var(--cta);
}

.skill-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--cta) 0%, #1d4ed8 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.skill-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.skill-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.skill-card p {
    font-size: 14px;
    color: var(--text-muted);
}

.projects {
    background: var(--card-bg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
}

.project-card {
    background: var(--background);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
}

.project-image {
    height: 220px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 20.5V29H0V11.5l20-8.5v17zM20 20.5L40 3v27.5L20 20.5z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.project-icon {
    width: 64px;
    height: 64px;
    opacity: 0.9;
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(37, 99, 235, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.project-overlay span {
    color: white;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-content {
    padding: 24px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.project-tag {
    font-size: 12px;
    font-weight: 500;
    color: var(--cta);
    background: rgba(37, 99, 235, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
}

.project-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.project-content p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.resume {
    background: var(--background);
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    padding-bottom: 48px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -5px;
    top: 4px;
    width: 12px;
    height: 12px;
    background: var(--cta);
    border-radius: 50%;
}

.timeline-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--cta);
    margin-bottom: 8px;
}

.timeline-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.timeline-card:hover {
    border-color: var(--cta);
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.08);
}

.timeline-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.timeline-card .company {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.timeline-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.contact {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 100px 0;
}

.contact h2 {
    font-family: var(--font-heading);
    font-size: clamp(36px, 6vw, 52px);
    font-weight: 700;
    margin-bottom: 16px;
}

.contact p {
    color: #A1A1AA;
    font-size: 17px;
    max-width: 500px;
    margin: 0 auto 32px;
}

.contact .btn-primary {
    background: white;
    color: var(--primary);
}

.contact .btn-primary:hover {
    background: #f4f4f5;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

footer {
    background: var(--primary);
    border-top: 1px solid #27272a;
    padding: 32px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    color: #71717A;
    font-size: 14px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #27272a;
    border-radius: 8px;
    color: #A1A1AA;
    transition: all 0.2s ease;
    text-decoration: none;
}

.social-links a:hover {
    background: var(--cta);
    color: white;
}

.social-links svg {
    width: 20px;
    height: 20px;
}

.reveal {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

@media (max-width: 1200px) {
    .hero {
        flex-direction: column;
        justify-content: center;
        padding: 100px 24px 60px;
    }

    .hero-visual {
        position: relative;
        width: 100%;
        max-width: 450px;
        height: auto;
        opacity: 1;
        animation: none;
        order: -1;
    }

    .hero-visual .code-block {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin: 0 auto;
        padding: 20px;
        font-size: 12px;
    }

    .hero-content {
        width: 100%;
        text-align: center;
    }

    .hero h1 {
        font-size: clamp(28px, 5vw, 48px);
    }

    .hero p {
        max-width: 100%;
    }

    .hero-cta {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .mobile-overlay {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background: var(--card-bg);
        flex-direction: column;
        padding: 80px 32px 32px;
        gap: 0;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 50;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        border-bottom: 1px solid var(--border);
    }

    .nav-links a {
        display: block;
        padding: 16px 0;
        font-size: 16px;
    }

    .nav-links a::after {
        display: none;
    }

    .hero-visual {
        display: none;
    }

    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero h1 {
        font-size: clamp(36px, 10vw, 56px);
    }

    .hero p {
        font-size: 16px;
    }

    .hero-cta {
        flex-direction: column;
    }

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

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

    .about-image {
        max-width: 280px;
        margin: 0 auto;
    }

    .about-image .image-frame {
        font-size: 80px;
    }

    .about-content h3 {
        font-size: 28px;
        text-align: center;
    }

    .about-content p {
        font-size: 15px;
        text-align: center;
    }

    .stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .stat-item {
        padding: 16px 12px;
    }

    .stat-item .number {
        font-size: 32px;
    }

    .stat-item .label {
        font-size: 12px;
    }

    .section {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-header h2 {
        font-size: clamp(28px, 6vw, 40px);
    }

    .section-header p {
        font-size: 15px;
    }

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

    .skill-card {
        padding: 20px;
    }

    .skill-card h3 {
        font-size: 16px;
    }

    .skill-card p {
        font-size: 13px;
    }

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

    .project-content {
        padding: 20px;
    }

    .project-content h3 {
        font-size: 18px;
    }

    .project-content p {
        font-size: 13px;
    }

    .timeline {
        padding: 0 8px;
    }

    .timeline::before {
        left: 4px;
    }

    .timeline-item {
        padding-left: 32px;
        padding-bottom: 32px;
    }

    .timeline-card {
        padding: 20px;
    }

    .timeline-card h3 {
        font-size: 16px;
    }

    .timeline-card .company {
        font-size: 14px;
    }

    .timeline-card p {
        font-size: 13px;
    }

    .contact {
        padding: 60px 0;
    }

    .contact h2 {
        font-size: clamp(28px, 6vw, 40px);
    }

    .contact p {
        font-size: 15px;
        padding: 0 16px;
    }

    footer {
        padding: 24px 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-content p {
        font-size: 13px;
    }

    nav .container {
        padding: 0 16px;
    }

    .logo {
        font-size: 22px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 16px;
    }

    .hero-badge {
        font-size: 13px;
        padding: 6px 12px;
    }

    .hero h1 {
        font-size: clamp(32px, 12vw, 48px);
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
    }

    .stat-item .number {
        font-size: 28px;
    }

    .stat-item .label {
        text-align: right;
    }

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

    .project-tags {
        gap: 6px;
    }

    .project-tag {
        font-size: 11px;
        padding: 3px 8px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .social-links {
        gap: 12px;
    }

    .social-links a {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 400px) {
    .hero {
        padding: 90px 0 50px;
    }

    .about-image {
        max-width: 220px;
    }

    .about-image .image-frame {
        font-size: 60px;
    }

    .timeline-card {
        padding: 16px;
    }

    .timeline-date {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Project Gallery ── */
.project-gallery {
    height: 240px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    cursor: pointer;
}

.gallery-slides {
    display: flex;
    height: 100%;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.gallery-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    flex-shrink: 0;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
}

.gallery-slide img.hidden,
.gallery-slide img[data-failed] {
    display: none;
}

.gallery-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 0;
}

/* Hide placeholder when image loads */
.gallery-slide img:not([data-failed]) ~ .gallery-placeholder {
    display: none;
}

/* Navigation arrows */
.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
    z-index: 4;
}

.gallery-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.08);
}

.project-gallery:hover .gallery-btn {
    opacity: 1;
}

.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

/* Dot indicators */
.gallery-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 4;
}

.gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.45);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.25s ease;
}

.gallery-dot.active {
    background: white;
    width: 22px;
}

/* Counter badge */
.gallery-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    z-index: 4;
}

/* Expand hint */
.gallery-expand {
    position: absolute;
    bottom: 12px;
    right: 10px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.85);
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 4;
    pointer-events: none;
}

.project-gallery:hover .gallery-expand {
    opacity: 1;
}

/* ── Lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.93);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.lightbox-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px;
    max-width: 92vw;
}

.lightbox-project-name {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.lightbox-img {
    max-width: 88vw;
    max-height: 76vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    transition: opacity 0.2s ease;
}

.lightbox-img.loading {
    opacity: 0.4;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 2;
}

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

.lightbox-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lightbox-btn {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.15s ease;
}

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

.lightbox-counter {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 500;
    min-width: 44px;
    text-align: center;
}

@media (max-width: 768px) {
    .project-gallery {
        height: 200px;
    }

    .gallery-btn {
        opacity: 1;
        width: 30px;
        height: 30px;
    }

    .gallery-expand {
        display: none;
    }

    .lightbox-img {
        max-height: 65vh;
    }
}
