/* ==========================================================================
   Snapfolio — a portfolio template for portrait and creative photographers.

   Gallery-wall approach: near-white, black type, no decorative colour at all.
   The photographs are the only thing with colour in them, which is the point.
   ========================================================================== */

:root {
    --paper:  #fafafa;
    --ink:    #111111;
    --muted:  #6b6b6b;
    --rule:   #e2e2e2;
    --shadow: rgba(0, 0, 0, 0.14);

    --font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --wrap: 76rem;
    --gutter: clamp(1.25rem, 5vw, 3rem);
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip-link {
    position: absolute;
    left: 50%;
    top: 0;
    translate: -50% -150%;
    z-index: 200;
    padding: 0.75rem 1.25rem;
    background: var(--ink);
    color: var(--paper);
    font-size: 0.8125rem;
    text-decoration: none;
}

.skip-link:focus-visible { translate: -50% 0; }

/* --- Masthead ------------------------------------------------------------- */

.masthead {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--paper) 90%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rule);
}

.masthead__inner {
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.wordmark {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: clamp(1rem, 4vw, 2.25rem);
    list-style: none;
    padding: 0;
}

.nav a {
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s var(--ease);
}

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

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

.hero { position: relative; background: var(--ink); }

.hero__image {
    width: 100%;
    height: clamp(24rem, 78vh, 46rem);
    object-fit: cover;
    object-position: center 28%;
    opacity: 0.92;
}

.hero__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: clamp(1.75rem, 5vw, 3.5rem);
    color: #fff;
    text-shadow: 0 1px 24px rgba(0, 0, 0, 0.55);
}

.hero__caption h1 {
    font-size: clamp(2.25rem, 1.5rem + 3.6vw, 4.5rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.hero__caption p {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.85;
}

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

.section { padding-block: clamp(3.5rem, 9vw, 6.5rem); }

.section__title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

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

/* Columns give a masonry rhythm without measuring anything in JavaScript. */
.gallery {
    columns: 3 18rem;
    column-gap: clamp(0.75rem, 2vw, 1.25rem);
}

.shot {
    break-inside: avoid;
    margin: 0 0 clamp(0.75rem, 2vw, 1.25rem);
    cursor: zoom-in;
}

.shot img {
    width: 100%;
    transition: opacity 0.3s var(--ease);
}

.shot:hover img { opacity: 0.82; }

.shot figcaption {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--muted);
}

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

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.split__text p { max-width: 44ch; color: var(--muted); }
.split__text p + p { margin-top: 1rem; }

.facts {
    margin-top: 2rem;
    border-top: 1px solid var(--rule);
}

.facts > div {
    display: grid;
    grid-template-columns: 8rem 1fr;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--rule);
}

.facts dt {
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.facts dd { margin: 0; font-size: 0.9375rem; }

/* --- Contact -------------------------------------------------------------- */

.contact p { max-width: 46ch; color: var(--muted); }

.contact__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 2rem;
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    background: var(--ink);
    color: var(--paper);
    font-size: 0.8125rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: opacity 0.2s var(--ease);
}

.btn:hover { opacity: 0.82; }

.text-link {
    font-size: 0.8125rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    text-underline-offset: 4px;
}

.text-link:hover { color: var(--ink); }

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

.footer {
    border-top: 1px solid var(--rule);
    padding-block: 2rem;
    font-size: 0.8125rem;
    color: var(--muted);
}

.footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 2rem;
}

.footer strong { color: var(--ink); font-weight: 600; }

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

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.5rem, 2vw, 2rem);
    padding: clamp(1rem, 4vw, 3rem);
    background: rgba(10, 10, 10, 0.94);
}

.lightbox[hidden] { display: none; }

.lightbox__figure {
    margin: 0;
    max-width: min(100%, 68rem);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.lightbox__figure img {
    max-height: calc(100svh - 8rem);
    width: auto;
    object-fit: contain;
}

.lightbox__figure figcaption {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.lightbox__nav,
.lightbox__close {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    background: none;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s var(--ease);
}

.lightbox__nav:hover,
.lightbox__close:hover { background: rgba(255, 255, 255, 0.14); }

.lightbox__close {
    position: absolute;
    top: clamp(0.75rem, 3vw, 1.5rem);
    right: clamp(0.75rem, 3vw, 1.5rem);
    font-size: 1.75rem;
}

.lightbox :focus-visible { outline-color: #fff; }

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

@media (max-width: 48rem) {
    .split { grid-template-columns: 1fr; }
    .split__image { order: -1; }
    .facts > div { grid-template-columns: 6.5rem 1fr; }
}

@media (max-width: 30rem) {
    .lightbox__nav { width: 2.25rem; height: 2.25rem; font-size: 1.25rem; }
}

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