/* =========================================================================
   Prakirti Lakhotiya — homepage
   Design language: an observation log. Deep-sky palette, hairline gold rules,
   numbered sections, and photographs treated as plates.

   Two rules govern the whole sheet:
   1. Nothing scrolls sideways. No fixed widths, no 100vw, no carousels —
      every grid collapses to fewer columns instead of overflowing.
   2. Every size is fluid. Type and spacing interpolate with clamp() so there
      are no jarring jumps at breakpoints.
   ========================================================================= */

/* ---------- tokens ---------- */
:root {
    --bg-0: #04060e;
    --bg-1: #070b16;
    --card: rgba(255, 255, 255, 0.035);
    --card-hover: rgba(255, 255, 255, 0.06);
    --line: rgba(243, 196, 99, 0.18);
    --line-soft: rgba(255, 255, 255, 0.08);

    --gold: #f3c463;
    --gold-bright: #ffdf9b;
    --ember: #ff9448;

    --text: #e9edf7;
    --text-2: #a9b3c9;
    --text-3: #7b859b;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Poppins', system-ui, -apple-system, sans-serif;

    /* Fluid scale — every value interpolates, so no breakpoint snaps sizes. */
    --step-display: clamp(2.1rem, 1.2rem + 4.4vw, 4.4rem);
    --step-h2: clamp(1.65rem, 1.2rem + 2.1vw, 2.6rem);
    --step-h3: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem);
    --step-body: clamp(0.95rem, 0.92rem + 0.16vw, 1.05rem);
    --step-small: clamp(0.72rem, 0.7rem + 0.1vw, 0.8rem);

    --gutter: clamp(1.1rem, 5vw, 2.5rem);
    --section-gap: clamp(3.5rem, 9vw, 7rem);
    --card-pad: clamp(1.25rem, 3.5vw, 2rem);

    --radius: 18px;
    --radius-lg: 24px;
}

/* ---------- reset ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    /* clip (not hidden) contains stray overflow without creating a scroll
       container, so position:sticky keeps working. */
    overflow-x: clip;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    overflow-x: clip;
    background-color: var(--bg-0);
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--step-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Deep-sky wash. Fixed attachment so it reads as depth, not as a texture
   sliding past the content. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
            radial-gradient(80% 55% at 50% -10%, rgba(255, 148, 72, 0.16), transparent 60%),
            radial-gradient(60% 45% at 12% 30%, rgba(78, 108, 214, 0.12), transparent 65%),
            radial-gradient(70% 50% at 88% 72%, rgba(160, 88, 220, 0.10), transparent 65%),
            var(--bg-0);
}

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

h1, h2, h3, p, figure, dl, dd, ul {
    margin: 0;
}

ul {
    padding: 0;
    list-style: none;
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- layout primitives ---------- */
.shell {
    /* The whole no-overflow guarantee in one line: the container can never
       exceed the viewport minus its gutters. */
    width: min(100% - (var(--gutter) * 2), 1140px);
    margin-inline: auto;
}

.section {
    padding-block: var(--section-gap);
    scroll-margin-top: 2rem;
}

/* The hero already centres its content in a full viewport, so it leaves slack
   below the buttons. A second full section's padding on top of that reads as
   a hole in the page. */
.section:first-of-type {
    padding-top: clamp(1.25rem, 4vw, 2.5rem);
}

.section--alt {
    background: linear-gradient(180deg, transparent, rgba(7, 11, 22, 0.75) 12% 88%, transparent);
}

.grid {
    display: grid;
    gap: clamp(0.9rem, 2.4vw, 1.5rem);
}

/* min(100%, …) is what stops a grid track from being wider than its parent
   on narrow screens — the usual cause of sideways scroll. */
.grid--wide {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
}

.grid--mid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.grid--tight {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
}

/* ---------- section headers ---------- */
.section-head {
    max-width: 46rem;
    margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    font-size: var(--step-small);
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
}

.eyebrow::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--line), transparent);
}

.eyebrow__num {
    font-variant-numeric: tabular-nums;
    color: var(--text-3);
}

.section-title {
    font-family: var(--font-display);
    font-size: var(--step-h2);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text);
}

.section-lede {
    margin-top: 0.9rem;
    color: var(--text-2);
    text-wrap: pretty;
}

/* ---------- hero ---------- */
.hero {
    position: relative;
    /* svh keeps the hero from jumping when mobile browser chrome hides. */
    min-height: 100svh;
    display: grid;
    place-items: center;
    /* Asymmetric: the bottom needs less, because the section below supplies
       its own spacing. */
    padding-block: clamp(2.5rem, 10vh, 5rem) clamp(1rem, 3vh, 2rem);
    overflow: hidden; /* keeps the corona from ever widening the page */
    text-align: center;
}

.hero__inner {
    display: grid;
    justify-items: center;
    gap: clamp(1.1rem, 3vw, 1.75rem);
}

/* Total eclipse: dark disc, bright rim, soft corona. Sized against the
   viewport so it stays a hero element and never swamps a phone screen. */
.eclipse {
    position: relative;
    width: min(46vw, 190px);
    aspect-ratio: 1;
    margin-bottom: clamp(0.5rem, 2vw, 1.25rem);
}

.eclipse::before {
    content: '';
    position: absolute;
    inset: -42%;
    border-radius: 50%;
    background: radial-gradient(circle,
    rgba(255, 196, 104, 0.45) 33%,
    rgba(255, 138, 48, 0.20) 44%,
    transparent 70%);
    filter: blur(16px);
}

.eclipse::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 42%, #0b0f1a, #04060e 72%);
    box-shadow:
            0 0 0 1.5px rgba(255, 216, 145, 0.9),
            0 0 30px 5px rgba(255, 176, 78, 0.5);
}

.hero__title {
    font-family: var(--font-display);
    font-size: var(--step-display);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.hero__title .accent {
    background: linear-gradient(120deg, var(--gold-bright), var(--ember));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Chips, not dot-separated text: they wrap cleanly at any width instead of
   leaving separators dangling at line ends. */
.roles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem 0.55rem;
    max-width: 34rem;
}

.role {
    padding: 0.34rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    font-size: var(--step-small);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-2);
    white-space: nowrap;
}

.hero__lede {
    max-width: 40rem;
    color: var(--text-2);
    text-wrap: pretty;
}

.hero__lede strong {
    color: var(--text);
    font-weight: 600;
}

.hero__note {
    max-width: 34rem;
    font-size: var(--step-small);
    font-style: italic;
    letter-spacing: 0.02em;
    color: var(--text-3);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem;
    margin-top: 0.4rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    font-size: var(--step-small);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.btn--primary {
    background: linear-gradient(135deg, var(--gold-bright), var(--ember));
    color: #1c1305;
    box-shadow: 0 8px 26px rgba(255, 148, 72, 0.25);
}

.btn--ghost {
    border: 1px solid var(--line);
    color: var(--gold);
}

/* ---------- cards ---------- */
.card {
    padding: var(--card-pad);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--card);
    transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.card__title {
    font-family: var(--font-display);
    font-size: var(--step-h3);
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

.card p + p {
    margin-top: 0.75rem;
}

.card p,
.card li {
    color: var(--text-2);
}

.card__list li {
    position: relative;
    padding-left: 1.15rem;
}

.card__list li + li {
    margin-top: 0.6rem;
}

.card__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
}

/* Pursuit cards lead with an icon. */
.pursuit__head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.6rem;
}

.pursuit__head i {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    border: 1px solid var(--line);
    font-size: 0.85rem;
    color: var(--gold);
}

.pursuit__head h3 {
    font-family: var(--font-display);
    font-size: var(--step-h3);
    font-weight: 700;
    line-height: 1.25;
}

/* ---------- gallery ---------- */
/* Masonry via columns so each frame keeps its own aspect ratio — portraits
   stay portrait, nothing is cropped to fit a uniform tile. */
.plates {
    columns: 3;
    column-gap: clamp(0.75rem, 1.8vw, 1.25rem);
}

.plate {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    position: relative;
    margin: 0 0 clamp(0.75rem, 1.8vw, 1.25rem);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.plate img {
    width: 100%;
    transition: transform 0.6s ease;
}

.plate figcaption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 2rem 0.9rem 0.75rem;
    font-size: var(--step-small);
    letter-spacing: 0.04em;
    color: #fff;
    background: linear-gradient(to top, rgba(2, 4, 10, 0.9), rgba(2, 4, 10, 0.55) 45%, transparent);
}

/* This frame is an exported story, so it carries app chrome top and bottom.
   Trimmed here rather than by re-cutting the source file. */
.plate--story img {
    margin-block: -9% -11%;
}

/* ---------- notes strip ---------- */
.note {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    padding: 0.9rem 1rem;
    border-left: 2px solid var(--line);
    background: linear-gradient(90deg, rgba(243, 196, 99, 0.05), transparent 70%);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-2);
}

.note i {
    flex: none;
    margin-top: 0.35em;
    font-size: 0.7rem;
    color: var(--gold);
}

/* ---------- quote ---------- */
.quote {
    position: relative;
    max-width: 44rem;
    margin-inline: auto;
    padding: clamp(1.75rem, 5vw, 3rem) clamp(1.25rem, 4vw, 2.5rem);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-align: center;
}

.quote p {
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 0.9rem + 1.4vw, 1.9rem);
    font-style: italic;
    line-height: 1.45;
    color: var(--gold-bright);
    text-wrap: balance;
}

/* ---------- summary ---------- */
.summary {
    display: grid;
    gap: 0;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.summary__row {
    display: grid;
    grid-template-columns: minmax(min(100%, 12rem), 0.32fr) 1fr;
    gap: 0.35rem clamp(1rem, 3vw, 2rem);
    padding: clamp(1rem, 2.6vw, 1.5rem) var(--card-pad);
}

.summary__row + .summary__row {
    border-top: 1px solid var(--line-soft);
}

.summary__row dt {
    font-family: var(--font-display);
    font-size: var(--step-h3);
    font-weight: 700;
    color: var(--gold);
}

.summary__row dd {
    color: var(--text-2);
}

/* ---------- contact ---------- */
.contacts {
    display: grid;
    gap: clamp(0.7rem, 2vw, 1.1rem);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.contact {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    height: 100%;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--text);
    text-decoration: none;
    transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

/* Each mark keeps its own brand colours — the one place on the page where
   something other than gold is allowed to shout. */
.contact__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 50%;
    font-size: 1.15rem;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.contact--mail .contact__icon {
    background: linear-gradient(135deg, #ea4335 0%, #fbbc05 42%, #34a853 72%, #4285f4 100%);
}

.contact--ig .contact__icon {
    background: linear-gradient(45deg, #feda75 0%, #fa7e1e 25%, #d62976 55%, #962fbf 80%, #4f5bd5 100%);
}

.contact--li .contact__icon {
    background: linear-gradient(135deg, #0a66c2, #1387e8);
}

.contact__meta {
    display: grid;
    gap: 0.1rem;
    min-width: 0; /* lets the address wrap instead of stretching the card */
}

.contact__label {
    font-size: var(--step-small);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-3);
}

.contact__value {
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text);
    overflow-wrap: anywhere;
}

/* ---------- footer ---------- */
.footer {
    padding-block: clamp(2.5rem, 6vw, 4rem);
    border-top: 1px solid var(--line-soft);
    text-align: center;
    font-size: var(--step-small);
    letter-spacing: 0.1em;
    color: var(--text-3);
}

/* ---------- starfield ---------- */
#stars {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* ---------- reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* =========================================================================
   Responsive. Column counts step down; nothing is ever cropped or pushed
   off-screen, and no section becomes horizontally scrollable.
   ========================================================================= */

@media (max-width: 900px) {
    .plates {
        columns: 2;
    }
}

/* Phones: photographs get the full column width. Two columns made them too
   small to read, which defeats the point of showing the work. */
@media (max-width: 620px) {
    .plates {
        columns: 1;
    }

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

    .btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .actions {
        width: 100%;
    }
}

@media (max-width: 380px) {
    .role {
        letter-spacing: 0.06em;
    }
}

/* ---------- pointer-only affordances ---------- */
@media (hover: hover) {
    .card:hover {
        transform: translateY(-4px);
        border-color: var(--line);
        background: var(--card-hover);
    }

    .plate:hover {
        transform: translateY(-4px);
        border-color: var(--line);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    }

    .plate:hover img {
        transform: scale(1.05);
    }

    .btn--primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 32px rgba(255, 148, 72, 0.35);
    }

    .btn--ghost:hover {
        background: rgba(243, 196, 99, 0.1);
        transform: translateY(-2px);
    }

    .contact:hover {
        transform: translateY(-3px);
        border-color: var(--line);
        background: var(--card-hover);
    }

    .contact:hover .contact__icon {
        transform: scale(1.06);
        box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.16);
    }
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
