/* whitneydoughty.com — black editorial modeling portfolio */

:root {
    --night: #0a0a0a;
    --panel: #131313;
    --panel-2: #1a1718;
    --ice: #f5f2ec;
    --dim: #9d968c;
    --glow: #c2848d;
    --line: rgba(245, 242, 236, 0.14);
    --font-script: "Great Vibes", cursive;
    --font-display: "Cormorant Garamond", Georgia, serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    background: var(--night);
    color: var(--ice);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, svg { max-width: 100%; }
a { color: var(--ice); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }

h1 { font-family: var(--font-script); font-weight: 400; line-height: 1; }
h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.4rem; }

.kicker {
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--glow);
    display: block;
    margin-bottom: 0.6rem;
}

/* ---------- Progress ---------- */

.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 2px;
    z-index: 70;
    background: linear-gradient(90deg, rgba(194, 132, 141, 0.4), var(--glow));
    box-shadow: 0 0 10px rgba(194, 132, 141, 0.5);
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
}

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

.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 0.7rem 1.6rem;
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.92), rgba(10, 10, 10, 0.78));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.brand {
    font-family: var(--font-script);
    font-size: 1.9rem;
    color: var(--ice);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 1.4rem; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--dim);
    white-space: nowrap;
    transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--ice); }
@media (max-width: 52rem) {
    .site-nav a:not(:nth-child(-n+3)) { display: none; }
}

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

.hero {
    position: relative;
    min-height: min(100svh, 58rem);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: var(--night);
}
.hero-bg {
    position: absolute;
    inset: -12% 0;
    z-index: 0;
    background:
        linear-gradient(to bottom, rgba(10, 10, 10, 0.5), rgba(10, 10, 10, 0.15) 45%, rgba(10, 10, 10, 0.92)),
        var(--hero, url("/images/hero.webp")) center 30% / cover no-repeat;
    will-change: transform;
}
.hero-inner { position: relative; z-index: 2; width: 100%; padding: 0 0 4.5rem; text-align: center; }
.hero h1 {
    font-size: clamp(3.6rem, 11vw, 7.5rem);
    text-shadow: 0 6px 40px rgba(0, 0, 0, 0.8);
}
.hero .sub {
    font-family: var(--font-display);
    font-size: clamp(1rem, 2.4vw, 1.3rem);
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: var(--dim);
    margin-top: 0.8rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 1.8rem; }
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.8rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ice);
    border: 1px solid var(--line);
    border-radius: 0;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}
.btn:hover { border-color: var(--glow); background: rgba(194, 132, 141, 0.1); transform: translateY(-2px); }
.btn-solid { background: var(--glow); border-color: var(--glow); color: #1a1114; font-weight: 700; }
.btn-solid:hover { background: #d69aa3; border-color: #d69aa3; color: #1a1114; }
.btn-ghost { background: transparent; }

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

.about { padding: 6rem 0 3rem; }
.about-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.3fr;
    gap: 3.5rem;
    align-items: center;
    max-width: 62rem;
    margin: 0 auto;
}
.about-photo {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center top;
    border: 1px solid var(--line);
}
.section-title { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 1.4rem; }
.section-title .script { font-family: var(--font-script); font-weight: 400; color: var(--glow); font-size: 1.25em; }
.section-title::after {
    content: "";
    display: block;
    width: 4.5rem;
    height: 1px;
    margin-top: 1rem;
    background: linear-gradient(90deg, var(--glow), transparent);
    transform-origin: left;
}
.about p { color: var(--ice); margin-bottom: 1rem; }
.credit-line { color: var(--dim); font-size: 0.95rem; }
.credit-line a { color: var(--ice); text-decoration-color: rgba(194, 132, 141, 0.5); }
.credit-line a:hover { color: #fff; }
@media (max-width: 52rem) {
    .about-grid { grid-template-columns: 1fr; gap: 2rem; }
    .about-photo { max-width: 20rem; }
}

/* ---------- Galleries ---------- */

.work { padding: 2.5rem 0; }
/* Heading clearance exceeds the columns' maximum drift (±30px), so the
   drifting photos can never reach a section title at either end */
.work-section { padding: 3rem 0 3.2rem; }
.work-head {
    display: flex;
    align-items: baseline;
    gap: 1.2rem;
    margin-bottom: 3.2rem;
    position: relative;
    z-index: 2;
}
.work-head h2 { font-size: clamp(2rem, 5.5vw, 3.1rem); font-family: var(--font-script); font-weight: 400; }
.work-head .count {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--dim);
    font-size: 0.85rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}
.work-grid { columns: 4 15rem; column-gap: 0.8rem; }
.work-grid.cols { columns: unset; display: flex; gap: 0.8rem; align-items: flex-start; }
.work-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.8rem; will-change: transform; }
.work-grid.cols a { margin-bottom: 0; }
.work-grid a {
    position: relative;
    display: block;
    margin-bottom: 0.8rem;
    break-inside: avoid;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid rgba(245, 242, 236, 0.07);
}
.work-grid img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease, opacity 0.5s ease, filter 0.5s ease;
}
.work-grid a:hover img { transform: scale(1.03); filter: brightness(1.06); }
.work-empty {
    border: 1px dashed var(--line);
    text-align: center;
    color: var(--dim);
    padding: 3rem 1.4rem;
}
@media (max-width: 46rem) {
    .work-grid { columns: 2; column-gap: 0.55rem; }
    .work-grid a { margin-bottom: 0.55rem; }
}

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

.site-footer {
    border-top: 1px solid var(--line);
    padding: 3rem 0;
    color: var(--dim);
    font-size: 0.95rem;
    text-align: center;
}
.site-footer .script { font-family: var(--font-script); font-size: 2rem; color: var(--ice); display: block; margin-bottom: 0.6rem; }
.site-footer a { color: var(--ice); text-decoration-color: rgba(194, 132, 141, 0.5); }
.site-footer a:hover { color: #fff; }

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

.lightbox {
    position: fixed; inset: 0; z-index: 100;
    display: none; align-items: center; justify-content: center;
    background: rgba(5, 5, 5, 0.96);
    padding: 2.5rem;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: min(92vw, 60rem);
    max-height: 88vh;
    border: 1px solid var(--line);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8);
}
.lightbox button {
    position: absolute;
    background: rgba(245, 242, 236, 0.07);
    color: var(--ice);
    border: 1px solid var(--line);
    border-radius: 50%;
    width: 2.9rem; height: 2.9rem;
    font-size: 1.4rem; line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}
.lightbox button:hover { background: var(--glow); color: #171205; }
.lb-close { top: 1.1rem; right: 1.1rem; }
.lb-prev { left: 1.1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1.1rem; top: 50%; transform: translateY(-50%); }
.lb-caption {
    position: absolute;
    bottom: 1.1rem; left: 50%;
    transform: translateX(-50%);
    color: var(--dim);
    font-family: var(--font-display);
    letter-spacing: 0.2em;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* ---------- Motion (JS + motion-ok only) ---------- */

@media (prefers-reduced-motion: no-preference) {
    html.js .reveal {
        opacity: 0;
        transform: translateY(26px);
        transition: opacity 0.9s ease, transform 0.9s ease;
        transition-delay: var(--d, 0s);
    }
    html.js .reveal.in { opacity: 1; transform: none; }

    html.js .section-title.reveal::after {
        transform: scaleX(0);
        transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s;
    }
    html.js .section-title.reveal.in::after { transform: scaleX(1); }

    /* Photos develop like prints in a darkroom */
    html.js .work-item.reveal {
        opacity: 0;
        transform: translateY(34px);
        filter: brightness(0.25) contrast(0.85) sepia(0.25);
        transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), filter 1.4s ease;
        transition-delay: var(--d, 0s);
    }
    html.js .work-item.reveal.in { opacity: 1; transform: none; filter: none; }

    .hero-bg { animation: hero-zoom 2.6s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
    .hero-inner > * { animation: rise 1.1s cubic-bezier(0.22, 1, 0.36, 1) backwards; }
    .hero-inner > :nth-child(2) { animation-delay: 0.18s; }
    .hero-inner > :nth-child(3) { animation-delay: 0.36s; }
    @keyframes hero-zoom { from { transform: scale(1.06); } to { transform: scale(1); } }
    @keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

    .lightbox.open img { animation: lb-pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1); }
    @keyframes lb-pop { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
}
