/* ============================================================
   Cinematic Darkroom — Aatmaj Amol Salunke photography
   ============================================================ */

:root {
    --bg: #0c0b09;
    --bg-2: #14120f;
    --surface: #191611;
    --text: #e9e4da;
    --muted: #9a938a;
    --amber: #c9a36a;
    --amber-bright: #e0b87d;
    --hairline: rgba(233, 228, 218, 0.09);
    --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    font-weight: 300;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection { background: var(--amber); color: var(--bg); }

a { color: inherit; }

:focus-visible { outline: 1px solid var(--amber); outline-offset: 3px; }

/* ---------- Film grain ---------- */

.grain {
    position: fixed;
    inset: -100%;
    width: 300%;
    height: 300%;
    pointer-events: none;
    z-index: 9000;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grain-jitter 0.9s steps(4) infinite;
}

@keyframes grain-jitter {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(-1.2%, 0.8%); }
    50%  { transform: translate(0.9%, -1.1%); }
    75%  { transform: translate(-0.6%, -0.7%); }
    100% { transform: translate(0, 0); }
}

/* ---------- Header ---------- */

header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.4rem 0;
    transition: background 0.4s ease, padding 0.4s ease, border-color 0.4s ease;
    border-bottom: 1px solid transparent;
}

header.scrolled {
    background: rgba(12, 11, 9, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--hairline);
    padding: 0.9rem 0;
}

nav {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.8rem;
}

.nav-links a {
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--muted);
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 4px;
}

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

.nav-links a:hover { color: var(--amber-bright); }
.nav-links a:hover::after { width: 100%; }

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1200;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 1px;
    margin-left: 9px;
    background: var(--text);
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
    position: fixed;
    inset: 0;
    /* Below the header (1000) so the logo and ✕ toggle stay usable on top */
    z-index: 999;
    background: rgba(12, 11, 9, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-menu.open { opacity: 1; visibility: visible; }

.mobile-menu a {
    font-family: var(--serif);
    font-size: 2.2rem;
    font-weight: 500;
    font-style: italic;
    text-decoration: none;
    color: var(--text);
    transition: color 0.3s ease;
}

.mobile-menu a:hover { color: var(--amber); }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    height: 100svh;
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-slides { position: absolute; inset: 0; background: var(--bg-2); }

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease;
    will-change: opacity, transform;
}

.hero-slide.active {
    opacity: 1;
    animation: kenburns 9s ease-out forwards;
}

@keyframes kenburns {
    from { transform: scale(1); }
    to   { transform: scale(1.07); }
}

.hero-veil {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, rgba(12, 11, 9, 0.25) 0%, rgba(12, 11, 9, 0.72) 100%),
        linear-gradient(to top, var(--bg) 0%, rgba(12, 11, 9, 0.25) 28%, rgba(12, 11, 9, 0.35) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 2rem;
    max-width: 900px;
    animation: hero-in 1.6s cubic-bezier(0.19, 1, 0.22, 1) 0.3s backwards;
}

@keyframes hero-in {
    from { opacity: 0; transform: translateY(36px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-kicker,
.section-kicker {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 1.6rem;
}

.hero h1 {
    font-family: var(--serif);
    font-size: clamp(3rem, 8vw, 6.2rem);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: 0.01em;
    margin-bottom: 1.8rem;
}

.hero h1 em,
h2 em {
    font-style: italic;
    color: var(--amber-bright);
}

.hero-sub {
    font-size: 1rem;
    font-weight: 300;
    color: var(--muted);
    max-width: 560px;
    margin: 0 auto;
    letter-spacing: 0.02em;
}

.scroll-cue {
    position: absolute;
    bottom: 2.2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.64rem;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--muted);
    transition: color 0.3s ease;
}

.scroll-cue:hover { color: var(--amber); }

.scroll-cue-line {
    display: block;
    width: 1px;
    height: 52px;
    background: var(--hairline);
    position: relative;
    overflow: hidden;
}

.scroll-cue-line::after {
    content: '';
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 50%;
    background: var(--amber);
    animation: cue-drop 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

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

/* ---------- Sections ---------- */

.section-head {
    max-width: 1500px;
    margin: 0 auto;
    padding: 7rem 2.5rem 3.4rem;
}

h2 {
    font-family: var(--serif);
    font-size: clamp(2.2rem, 4.5vw, 3.6rem);
    font-weight: 500;
    line-height: 1.1;
}

.section-count {
    margin-top: 0.9rem;
    font-size: 0.78rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ---------- Gallery ---------- */

.gallery-section { background: var(--bg); }

.gallery {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 2.5rem 6rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: 8px;
    gap: 14px;
}

.g-item {
    position: relative;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--hairline);
    cursor: pointer;
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.g-item.visible { opacity: 1; transform: translateY(0); }

.g-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.92) contrast(1.02);
    transition: transform 1.1s cubic-bezier(0.19, 1, 0.22, 1), filter 0.6s ease;
}

.g-item:hover img {
    transform: scale(1.045);
    filter: saturate(1.05) contrast(1.03);
}

.g-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.3rem 1.2rem;
    background: linear-gradient(to top, rgba(8, 7, 5, 0.82) 0%, transparent 45%);
    opacity: 0;
    transition: opacity 0.45s ease;
}

.g-item:hover .g-overlay,
.g-item:focus-visible .g-overlay { opacity: 1; }

.g-num {
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--amber);
}

.g-title {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.15rem;
    color: var(--text);
    margin-top: 0.15rem;
}

.gallery-status {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 0;
    color: var(--muted);
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* ---------- About ---------- */

.about-section {
    background: var(--bg-2);
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    padding: 8rem 2.5rem;
}

.about-container {
    max-width: 1150px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 5.5rem;
    align-items: center;
}

.portrait-frame {
    border: 1px solid rgba(201, 163, 106, 0.45);
    padding: 12px;
    background: var(--bg);
}

.portrait-frame img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    filter: grayscale(0.25) sepia(0.08) contrast(1.02);
    transition: filter 0.9s ease;
}

.portrait-frame:hover img { filter: grayscale(0) sepia(0); }

.portrait-caption {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.72rem;
    font-style: italic;
    letter-spacing: 0.14em;
    color: var(--muted);
}

.about-content .section-kicker { margin-bottom: 1.1rem; }

.about-content h2 { margin-bottom: 0.6rem; }

.about-content .subtitle {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.25rem;
    color: var(--amber-bright);
    margin-bottom: 0.4rem;
}

.about-content .info {
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2rem;
}

.about-content p:not(.subtitle):not(.info):not(.section-kicker) {
    color: #c9c3b8;
    font-size: 0.98rem;
    margin-bottom: 1.2rem;
    max-width: 60ch;
}

.gear {
    margin-top: 2.6rem;
    border-top: 1px solid var(--hairline);
    padding-top: 2.2rem;
}

.gear .section-kicker { margin-bottom: 1.4rem; }

.gear-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2.5rem;
}

.gear-type {
    display: block;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--amber);
}

.gear-name {
    display: block;
    font-family: var(--serif);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text);
    margin-top: 0.15rem;
}

.gear-detail {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
}

@media (max-width: 520px) {
    .gear-list { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */

footer {
    background: var(--bg);
    padding: 7rem 2.5rem 3rem;
    text-align: center;
}

.footer-email {
    display: inline-block;
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(1.4rem, 3.4vw, 2.2rem);
    color: var(--text);
    text-decoration: none;
    margin: 1.6rem 0 2.8rem;
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 0.35rem;
    transition: color 0.35s ease, border-color 0.35s ease;
}

.footer-email:hover {
    color: var(--amber-bright);
    border-color: var(--amber);
}

footer .section-kicker { margin-bottom: 1.2rem; }

.social-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 4rem;
}

.social-links a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.64rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--muted);
    transition: color 0.35s ease, transform 0.35s ease;
}

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

.social-links a:hover {
    color: var(--amber-bright);
    transform: translateY(-4px);
}

.copyright {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: var(--muted);
    border-top: 1px solid var(--hairline);
    padding-top: 2.2rem;
}

/* ---------- Lightbox ---------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(8, 7, 6, 0.96);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

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

.lightbox-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 92vw;
    max-height: 92svh;
}

.lightbox-stage img {
    max-width: 92vw;
    max-height: 82svh;
    object-fit: contain;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    animation: lb-in 0.45s cubic-bezier(0.19, 1, 0.22, 1);
    transition: opacity 0.3s ease;
}

.lightbox.loading .lightbox-stage img { opacity: 0.45; }

.lb-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border: 1px solid rgba(233, 228, 218, 0.18);
    border-top-color: var(--amber);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    z-index: 3;
    transition: opacity 0.25s ease;
    animation: lb-spin 0.9s linear infinite;
}

.lightbox.loading .lb-ring { opacity: 1; }

@keyframes lb-spin {
    to { transform: rotate(360deg); }
}

@keyframes lb-in {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

.lightbox-stage figcaption {
    display: flex;
    align-items: baseline;
    gap: 1.4rem;
    margin-top: 1.3rem;
    padding: 0 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.lb-title {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.25rem;
    color: var(--text);
}

.lb-title:empty { display: none; }

.lb-caption {
    font-size: 0.85rem;
    color: var(--muted);
}

.lb-caption:empty { display: none; }

.lb-counter {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.32em;
    color: var(--amber);
}

.lightbox-close {
    position: absolute;
    top: 1.2rem;
    right: 1.6rem;
    z-index: 2;
    background: none;
    border: none;
    font-family: var(--serif);
    font-size: 3rem;
    font-weight: 400;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
}

.lightbox-close:hover { color: var(--amber-bright); transform: rotate(90deg); }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: none;
    border: none;
    font-family: var(--serif);
    font-size: 4.4rem;
    font-weight: 400;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 1rem 1.4rem;
    transition: color 0.3s ease;
    user-select: none;
}

.lightbox-nav:hover { color: var(--amber-bright); }

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

/* ---------- Reveal on scroll ---------- */

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}

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

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .about-container {
        grid-template-columns: 1fr;
        gap: 3.5rem;
        text-align: center;
    }

    .about-portrait { max-width: 320px; margin: 0 auto; }

    .about-content p:not(.subtitle):not(.info) { margin-left: auto; margin-right: auto; }
}

@media (max-width: 768px) {
    nav { padding: 0 1.4rem; }

    .logo { font-size: 1.05rem; }

    .nav-links { display: none; }

    .nav-toggle { display: flex; }

    .section-head { padding: 4.5rem 1.4rem 2.4rem; }

    .gallery {
        padding: 0 1.4rem 4rem;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }

    .about-section { padding: 5rem 1.4rem; }

    .social-links { gap: 2rem; }

    .hero-kicker {
        font-size: 0.62rem;
        letter-spacing: 0.3em;
    }

    .lightbox-nav {
        width: 44px;
        height: 44px;
        padding: 0 0 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2rem;
        color: var(--text);
        background: rgba(12, 11, 9, 0.55);
        border: 1px solid var(--hairline);
        border-radius: 50%;
    }

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

    .lightbox-close { right: 1rem; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .grain { animation: none; }

    .hero-slide.active { animation: none; }

    .hero-content { animation: none; }

    .scroll-cue-line::after { animation: none; }

    .lb-ring { animation: none; }

    .reveal, .g-item {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
