/* ============================================
   Ahmad Sultan — Personal Website
   Dark cinematic theme
   ============================================ */

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

:root {
    --bg: #0a0a0a;
    --bg-surface: #111111;
    --bg-card: #161616;
    --text: #e8e4de;
    --text-secondary: #8a8580;
    --text-dim: #5a5550;
    --accent: #c9a96e;
    --accent-hover: #dfc08a;
    --border: #1e1e1e;
    --font-heading: 'Cormorant Garamond', 'Georgia', serif;
    --font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    /* Animation controls (overridden by JS from content.json) */
    --anim-stars-opacity: 0.6;
    --anim-stars-density: 1;
    --anim-meteors-opacity: 0.6;
    --anim-meteors-density: 1;
    --anim-orbits-opacity: 0.6;
    --anim-orbits-density: 1;
    --anim-nebula-opacity: 0.6;
    --anim-nebula-density: 1;
    --anim-dividers-opacity: 0.6;
    --anim-scroll-opacity: 0.6;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
}

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

/* --- Navigation --- */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    transition: all 0.4s ease;
    background: transparent;
}

#nav.scrolled {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text);
    letter-spacing: 0.12em;
    transition: color 0.3s ease;
}

.nav-logo:hover {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

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

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 6px;
    z-index: 110;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 1px;
    background: var(--text);
    transition: all 0.3s ease;
}

.nav-toggle.open span:first-child {
    transform: rotate(45deg) translate(4px, 4px);
}

.nav-toggle.open span:last-child {
    transform: rotate(-45deg) translate(4px, -4px);
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 98;
}

.nav-overlay.open {
    display: block;
}

/* --- Hero --- */
#hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    opacity: 0;
    transition: opacity 1.8s ease;
}

.hero-img.hero-img-active {
    opacity: 1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.35) 0%,
        rgba(0, 0, 0, 0.1) 40%,
        rgba(0, 0, 0, 0.2) 70%,
        rgba(10, 10, 10, 1) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 2rem;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.8rem, 7.5vw, 6.5rem);
    font-weight: 300;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 1.2rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 0.8rem;
    font-weight: 300;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.scroll-line {
    width: 1px;
    height: 48px;
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.6));
    animation: scroll-drop 2s ease-in-out infinite;
    opacity: var(--anim-scroll-opacity);
}

@keyframes scroll-drop {
    0% { top: -100%; }
    50% { top: 100%; }
    100% { top: 100%; }
}

/* --- Sections --- */
section {
    padding: 7rem 0;
}

.section-heading {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-dim);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin-bottom: 3.5rem;
    max-width: 600px;
}

/* --- About --- */
#about {
    padding-top: 2rem;
}

.about-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 5rem;
    align-items: start;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 2px;
}

.about-image::after {
    content: '';
    position: absolute;
    inset: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 2px;
    pointer-events: none;
}

.about-text .section-heading {
    margin-bottom: 2rem;
}

.about-lead {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--text);
    line-height: 1.45;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.85;
    margin-bottom: 1.1rem;
}

.about-text p.about-bridge {
    color: var(--accent);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-style: italic;
    line-height: 1.7;
    margin-top: 1.5rem;
}

/* --- Work & Publications --- */
#work {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.work-grid {
    display: grid;
    gap: 1px;
    background: var(--border);
}

.work-card {
    background: var(--bg-surface);
    padding: 2.5rem 2.5rem 2.5rem 2.8rem;
    transition: background 0.3s ease;
    border-left: 3px solid transparent;
}

.work-card:hover {
    background: var(--bg-card);
    border-left-color: var(--accent);
}

.work-label {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 0.8rem;
}

.work-card h3 {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 400;
    margin-bottom: 0.7rem;
    line-height: 1.3;
    color: var(--text);
}

.work-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 0.8rem;
    max-width: 700px;
}

.work-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.5rem;
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.work-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--accent);
    transition: all 0.3s ease;
}

.work-link:hover {
    color: var(--accent-hover);
    transform: translateX(4px);
}

.work-link span {
    margin-left: 0.5em;
    transition: transform 0.3s ease;
}

.work-link:hover span {
    transform: translateX(3px);
}

/* --- Photography --- */
#photography {
    padding-bottom: 5rem;
}

.gallery-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 3rem;
}

.gallery-tab {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.55rem 1.15rem;
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 2px;
    white-space: nowrap;
}

.gallery-tab:hover {
    border-color: var(--text-dim);
    color: var(--text);
}

.gallery-tab.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(201, 169, 110, 0.06);
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    transition: opacity 0.35s ease;
}

.gallery-grid {
    column-count: 3;
    column-gap: 0.6rem;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 0.6rem;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    border-radius: 2px;
    opacity: 0;
    animation: gallery-item-in 0.5s ease forwards;
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.5s ease;
    filter: brightness(0.82);
}

.gallery-item:hover img {
    transform: scale(1.04);
    filter: brightness(1);
}

@keyframes gallery-item-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Lightbox --- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

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

.lightbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 3rem;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    transition: opacity 0.25s ease, transform 0.15s ease;
    user-select: none;
    -webkit-user-drag: none;
    cursor: grab;
    transform-origin: center center;
}

.lightbox-content img.zoomed {
    cursor: grab;
}

.lightbox-content img.panning {
    cursor: grabbing;
    transition: opacity 0.25s ease;
}

.lightbox-close {
    position: absolute;
    top: 1.2rem;
    right: 1.8rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s ease;
    line-height: 1;
    padding: 0.5rem;
}

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

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 2.8rem;
    cursor: pointer;
    padding: 1rem;
    z-index: 10;
    transition: color 0.3s ease;
    line-height: 1;
    user-select: none;
}

.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
    color: rgba(255, 255, 255, 0.85);
}

/* Lightbox zoom controls */
.lightbox-zoom {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active:hover .lightbox-zoom,
.lightbox-zoom:focus-within {
    opacity: 1;
}

.lightbox-zoom input[type="range"] {
    width: 100px;
    accent-color: var(--accent);
    cursor: pointer;
}

.lightbox-zoom-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.lightbox-zoom-btn:hover {
    color: #fff;
}

.lightbox-zoom-reset {
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 0.6rem;
    margin-left: 0.2rem;
}

.lightbox-counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    font-family: var(--font-body);
}

/* --- Star Dividers (space-themed section transitions) --- */
.star-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 1.5rem 0;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.star-divider.visible {
    opacity: var(--anim-dividers-opacity);
    transform: scale(1);
}

.star-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.5;
    animation: star-twinkle 3s ease-in-out infinite alternate;
}

.star-dot:last-child {
    animation-delay: 1.5s;
}

.star-line {
    width: 80px;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(201, 169, 110, 0.35), transparent);
}

.star-icon {
    color: var(--accent);
    font-size: 0.75rem;
    opacity: 0.6;
    margin: 0 1rem;
    animation: star-twinkle 4s ease-in-out infinite alternate;
    animation-delay: 0.8s;
}

@keyframes star-twinkle {
    0% { opacity: 0.25; transform: scale(0.85); }
    50% { opacity: 0.8; transform: scale(1.15); }
    100% { opacity: 0.35; transform: scale(0.9); }
}

/* --- Dynamic animations (generated by JS) --- */
#about,
#photography,
#work {
    position: relative;
    overflow: hidden;
}

.gallery-container {
    position: relative;
}

#about .container {
    position: relative;
}

footer {
    position: relative;
}

/* Star constellation dots */
.anim-star {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: var(--accent);
    pointer-events: none;
    z-index: 0;
    animation: star-twinkle-anim var(--tw-dur, 4s) ease-in-out infinite alternate;
    animation-delay: var(--tw-delay, 0s);
}

@keyframes star-twinkle-anim {
    0% { opacity: var(--star-lo, 0.08); transform: scale(0.8); }
    50% { opacity: var(--star-hi, 0.25); transform: scale(1.2); }
    100% { opacity: var(--star-lo, 0.08); transform: scale(0.9); }
}

/* Meteor streaks */
.anim-meteor {
    position: absolute;
    width: var(--m-len, 90px);
    height: 1px;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    background: linear-gradient(to right, transparent, rgba(201, 169, 110, 0.5), rgba(255, 255, 255, 0.25), transparent);
    animation: meteor-fly var(--m-dur, 8s) ease-in-out var(--m-delay, 0s) infinite;
    transform: rotate(var(--m-angle, -25deg));
}

@keyframes meteor-fly {
    0%, 85%, 100% { opacity: 0; transform: rotate(var(--m-angle, -25deg)) translateX(0); }
    90% { opacity: var(--m-peak, 0.6); transform: rotate(var(--m-angle, -25deg)) translateX(180px); }
    95% { opacity: 0; transform: rotate(var(--m-angle, -25deg)) translateX(280px); }
}

/* Orbit rings */
.anim-orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(201, 169, 110, 0.06);
    pointer-events: none;
    z-index: 0;
    animation: orbit-pulse-anim var(--o-dur, 10s) ease-in-out var(--o-delay, 0s) infinite alternate;
}

@keyframes orbit-pulse-anim {
    0% { transform: scale(0.9) rotate(0deg); opacity: calc(var(--o-opacity, 0.5) * 0.5); }
    50% { transform: scale(1.08) rotate(8deg); opacity: var(--o-opacity, 0.5); }
    100% { transform: scale(0.95) rotate(-4deg); opacity: calc(var(--o-opacity, 0.5) * 0.4); }
}

/* Nebula glow */
.anim-nebula {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: nebula-breathe-anim var(--n-dur, 12s) ease-in-out var(--n-delay, 0s) infinite alternate;
}

@keyframes nebula-breathe-anim {
    0% { transform: scale(0.9); opacity: calc(var(--n-opacity, 0.5) * 0.6); }
    100% { transform: scale(1.15); opacity: var(--n-opacity, 0.5); }
}

/* ========== Immerse Button (centered, prominent) ========== */
.hero-immerse-btn {
    position: absolute;
    bottom: 6.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(201, 169, 110, 0.25);
    border-radius: 40px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.4s ease;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.6rem 1.4rem 0.6rem 1.1rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero-immerse-btn:hover {
    color: rgba(255, 255, 255, 0.95);
    border-color: rgba(201, 169, 110, 0.5);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 30px rgba(201, 169, 110, 0.08), inset 0 0 20px rgba(201, 169, 110, 0.03);
}

.immerse-ring {
    position: absolute;
    inset: -3px;
    border-radius: 44px;
    border: 1px solid rgba(201, 169, 110, 0.12);
    animation: immerse-ring-pulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes immerse-ring-pulse {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.06); }
}

.immerse-icon {
    font-size: 1.05rem;
    color: var(--accent);
    opacity: 0.7;
    animation: star-twinkle 3.5s ease-in-out infinite alternate;
    line-height: 1;
}

.hero-immerse-btn:hover .immerse-icon {
    opacity: 1;
}

.immerse-label {
    font-family: var(--font-body);
}

/* ========== Immersive Fullscreen Viewer ========== */
.immersive {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: #000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

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

.immersive-canvas {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.immersive-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1.2s ease, transform 0.15s ease;
    user-select: none;
    -webkit-user-drag: none;
    cursor: grab;
    transform-origin: center center;
}

.immersive-img.immersive-img-active {
    opacity: 1;
}

.immersive-img.imm-zoomed {
    cursor: grab;
}

.immersive-img.imm-panning {
    cursor: grabbing;
    transition: opacity 1.2s ease;
}

/* UI overlay — fades in/out based on mouse activity */
.immersive-ui {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.immersive.active .immersive-ui.visible {
    opacity: 1;
}

.immersive-ui.visible * {
    pointer-events: auto;
}

/* Close button */
.immersive-close {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.immersive-close:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Navigation arrows */
.immersive-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.immersive-prev { left: 1.2rem; }
.immersive-next { right: 1.2rem; }

.immersive-arrow:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(201, 169, 110, 0.25);
    box-shadow: 0 0 20px rgba(201, 169, 110, 0.06);
}

/* Bottom bar: progress + controls */
.immersive-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
}

.immersive-progress {
    width: 100%;
    height: 6px;
    background: none;
    overflow: hidden;
    position: relative;
}

.immersive-progress-fill {
    height: 100%;
    width: 0%;
    background:
        radial-gradient(circle 1.2px at 3px 3px, rgba(201, 169, 110, 0.5) 90%, transparent 100%),
        radial-gradient(circle 0.8px at 9px 2px, rgba(255, 235, 180, 0.4) 90%, transparent 100%),
        radial-gradient(circle 1px at 15px 4px, rgba(201, 169, 110, 0.45) 90%, transparent 100%),
        radial-gradient(circle 0.6px at 20px 1px, rgba(255, 255, 220, 0.35) 90%, transparent 100%),
        radial-gradient(circle 1.1px at 26px 3px, rgba(201, 169, 110, 0.5) 90%, transparent 100%),
        radial-gradient(circle 0.7px at 32px 5px, rgba(255, 235, 180, 0.38) 90%, transparent 100%),
        radial-gradient(circle 0.9px at 37px 2px, rgba(201, 169, 110, 0.42) 90%, transparent 100%);
    background-size: 40px 6px;
    background-repeat: repeat-x;
    transition: width 0.1s linear;
    animation: star-progress-shimmer 3s ease-in-out infinite;
}

@keyframes star-progress-shimmer {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.immersive-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
}

.imm-ctrl {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.imm-ctrl:hover {
    color: #fff;
    border-color: rgba(201, 169, 110, 0.35);
}

.imm-counter {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    font-family: var(--font-body);
    min-width: 4em;
    text-align: center;
}

.imm-zoom {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    padding-left: 1rem;
}

.imm-zoom input[type="range"] {
    width: 80px;
    accent-color: var(--accent);
    cursor: pointer;
}

.imm-zoom-reset {
    font-size: 0.58rem;
    letter-spacing: 0.05em;
    border-radius: 4px;
    width: auto;
    padding: 0 0.5rem;
}

/* Mobile adjustments for immersive */
@media (max-width: 768px) {
    .hero-immerse-btn {
        bottom: 2rem;
        font-size: 0.65rem;
        padding: 0.5rem 1.1rem 0.5rem 0.9rem;
    }
    .immersive-arrow {
        width: 38px;
        height: 38px;
        font-size: 1.5rem;
    }
    .immersive-prev { left: 0.5rem; }
    .immersive-next { right: 0.5rem; }
    .imm-zoom { display: none; }
}

/* Work card with image */
.work-card-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.work-card-inner.has-image {
    grid-template-columns: 1fr 180px;
    align-items: start;
}

.work-card-image {
    width: 100%;
    border-radius: 2px;
    object-fit: cover;
    max-height: 160px;
    border: 1px solid var(--border);
}

@media (max-width: 768px) {
    .work-card-inner.has-image {
        grid-template-columns: 1fr;
    }
    .work-card-image { max-height: 200px; width: 100%; }
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 0;
}

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

footer p {
    color: var(--text-dim);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-dim);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text);
}

/* --- Scroll Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .gallery-grid {
        column-count: 2;
    }

    .about-grid {
        gap: 3rem;
    }
}

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

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        height: 100dvh;
        background: var(--bg-surface);
        flex-direction: column;
        padding: 5rem 2.5rem;
        gap: 1.8rem;
        transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        border-left: 1px solid var(--border);
        z-index: 105;
    }

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

    .nav-links a {
        font-size: 0.85rem;
    }

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

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

    .gallery-grid {
        column-count: 2;
        column-gap: 0.4rem;
    }

    .gallery-item {
        margin-bottom: 0.4rem;
    }

    section {
        padding: 5rem 0;
    }

    .work-card {
        padding: 2rem 1.5rem 2rem 1.8rem;
    }

    footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
    }

    .lightbox-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        column-count: 1;
    }

    .hero-content h1 {
        letter-spacing: 0.1em;
    }

    .hero-subtitle {
        letter-spacing: 0.2em;
        font-size: 0.7rem;
    }

    .container {
        padding: 0 1.25rem;
    }

    .gallery-container {
        padding: 0 1.25rem;
    }

    .gallery-nav {
        gap: 0.4rem;
    }

    .gallery-tab {
        padding: 0.45rem 0.85rem;
        font-size: 0.65rem;
    }
}

/* --- Selection color --- */
::selection {
    background: rgba(201, 169, 110, 0.3);
    color: var(--text);
}

/* --- Scrollbar (webkit) --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}
