/*
 * Jazelle Mae Toledo-De Guzman — portfolio
 * Theme: a cream "paper" sheet on a dusk-mauve mountain sky.
 * Colours live here as tokens; nothing else in the stylesheet uses raw colours.
 */

:root {
    --sky-1: #714f70;
    --sky-2: #5a4267;
    --sky-3: #3c3252;
    --sky-4: #252038;
    --moon-halo: #8e6b8c;
    --moon: #a8879f;
    --star: #efe4ee;
    --mtn-light: #a58cb2;
    --mtn-mid: #4a3d62;
    --mtn-near: #2c2642;

    --paper: #f5f3ec;
    --paper-deep: #ebe6dc;
    --ink: #23233a;
    --text: #3d3b4c;
    --muted: #66637a;
    --rose: #8f4f72;
    --rose-soft: rgb(143 79 114 / 0.4);
    --rule: #dcd6cc;
    --shadow: rgb(18 12 32 / 0.5);
    --backdrop: rgb(20 14 35 / 0.86);
    --placeholder-bg: #f6e3ec;

    --serif: "Newsreader", Georgia, "Times New Roman", serif;
    --mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    --pad-x: clamp(22px, 8vw, 86px);

    color-scheme: light;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background-color: var(--sky-4);
    color: var(--text);
    font-family: var(--serif);
    font-size: clamp(17px, 1.6vw, 19px);
    font-optical-sizing: auto;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
}

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

a {
    color: var(--rose);
    text-decoration: underline;
    text-decoration-color: var(--rose-soft);
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
}

a:hover {
    text-decoration-color: currentColor;
}

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

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

.nowrap {
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 10;
    padding: 8px 14px;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 13px;
}

.skip-link:focus {
    top: 16px;
}

/* ---------- Sky scene (decorative, fixed behind the sheet) ---------- */

.scene {
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 38%, var(--sky-3) 72%, var(--sky-4) 100%);
}

.scene .dots { fill: var(--star); opacity: 0.07; }
.scene .moon-halo { fill: var(--moon-halo); opacity: 0.4; }
.scene .moon { fill: var(--moon); opacity: 0.6; }
.scene .star { fill: var(--star); }
.scene .mtn-light { fill: var(--mtn-light); opacity: 0.16; }
.scene .mtn-mid { fill: var(--mtn-mid); opacity: 0.75; }
.scene .mtn-near { fill: var(--mtn-near); }
.scene .tree { fill: var(--mtn-near); opacity: 0.85; }

@media (prefers-reduced-motion: no-preference) {
    .scene .twinkle {
        animation: twinkle 5s ease-in-out infinite;
    }

    .scene .twinkle:nth-of-type(3n) { animation-delay: -1.6s; }
    .scene .twinkle:nth-of-type(3n + 1) { animation-delay: -3.2s; }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.25; }
}

/* ---------- The paper sheet ---------- */

.sheet {
    width: min(1060px, 100% - 24px);
    margin: clamp(12px, 6vw, 64px) auto;
    padding: 5px;
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 30px 80px var(--shadow);
}

.strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(4px, 0.7vw, 7px);
    margin: 0;
}

.strip-item {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 4px;
}

.strip-item img {
    width: 100%;
    aspect-ratio: 329 / 300;
    object-fit: cover;
    filter: saturate(0.7) sepia(0.2);
    transition: filter 0.4s ease;
}

/* A mauve wash ties the screenshots to the sky; hovering shows the real colours. */
.strip-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, var(--moon) 0%, var(--sky-2) 100%);
    mix-blend-mode: soft-light;
    opacity: 0.85;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.strip-item:hover img { filter: none; }
.strip-item:hover::after { opacity: 0; }

/* The portrait: a circle in true colour, centred in its tile, with no mauve wash. */
.strip-item--portrait {
    display: grid;
    place-items: center;
    aspect-ratio: 329 / 300;
    background: var(--paper-deep);
}

.strip-item--portrait::after {
    display: none;
}

.strip-item--portrait img,
.strip-item--portrait:hover img {
    width: 76%;
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    filter: none;
    box-shadow: 0 0 0 4px var(--paper), 0 10px 26px rgb(35 35 58 / 0.18);
}

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

.section {
    padding: clamp(40px, 6vw, 84px) var(--pad-x);
    border-top: 1px solid var(--rule);
}

.intro {
    padding: clamp(40px, 6vw, 84px) var(--pad-x) clamp(40px, 5vw, 64px);
}

.eyebrow {
    margin: 0;
    color: var(--rose);
    font-family: var(--mono);
    font-size: clamp(12px, 1.2vw, 15px);
    letter-spacing: 0.22em;
    line-height: 1.6;
    text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
    color: var(--ink);
    font-weight: 400;
    text-wrap: balance;
}

h1 em,
h2 em {
    font-weight: 600;
}

h1 {
    margin: 0.55em 0 0;
    font-size: clamp(44px, 7.2vw, 78px);
    line-height: 1.04;
    letter-spacing: -0.015em;
}

h2 {
    margin: 0.45em 0 0;
    font-size: clamp(32px, 4.6vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.01em;
}

.lead {
    max-width: 52em;
    margin: 1.4em 0 0;
    font-size: clamp(18px, 1.75vw, 20.5px);
    line-height: 1.9;
}

.section-lead {
    max-width: 44em;
    margin: 1em 0 0;
}

/* ---------- Intro facts and in-page nav ---------- */

.facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin: clamp(32px, 4vw, 44px) 0 0;
    padding: 24px 0 0;
    border-top: 1px solid var(--rule);
}

.facts dt,
.label {
    color: var(--rose);
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.facts dd {
    margin: 6px 0 0;
    color: var(--ink);
    line-height: 1.45;
}

.toc {
    margin-top: 32px;
}

.toc ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.toc a {
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* ---------- Experience ---------- */

.role {
    margin-top: clamp(40px, 5vw, 64px);
    padding-top: clamp(32px, 4vw, 44px);
    border-top: 1px solid var(--rule);
}

.role:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.role-head h3 {
    margin: 0.35em 0 0;
    font-size: clamp(28px, 3.4vw, 36px);
    line-height: 1.15;
}

.role-title {
    margin: 0.2em 0 0;
    color: var(--ink);
    font-size: clamp(19px, 2vw, 22px);
    font-style: italic;
}

.role-note {
    max-width: 44em;
    margin: 0.6em 0 0;
    color: var(--muted);
}

.now {
    display: inline-block;
    margin-left: 10px;
    padding: 1px 8px;
    border: 1px solid var(--rose-soft);
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 0.14em;
    vertical-align: 2px;
}

.project {
    margin-top: clamp(28px, 3.5vw, 40px);
    padding-top: clamp(28px, 3.5vw, 40px);
    border-top: 1px dashed var(--rule);
}

.project h4 {
    margin: 0;
    font-size: clamp(21px, 2.2vw, 25px);
    font-weight: 500;
    line-height: 1.3;
}

.project p {
    max-width: 46em;
    margin: 0.6em 0 0;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.tags li {
    padding: 3px 10px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: var(--paper-deep);
    color: var(--text);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.6;
}

.live-link {
    display: inline-block;
    margin-top: 14px;
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.04em;
}

.shots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
    margin-top: 24px;
}

.shot {
    margin: 0;
}

.shot--wide {
    grid-column: 1 / -1;
}

.shot a {
    display: block;
    padding: 6px;
    border: 1px solid var(--rule);
    border-radius: 6px;
    background: var(--paper-deep);
    cursor: zoom-in;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.shot a:hover {
    box-shadow: 0 12px 28px rgb(35 35 58 / 0.14);
}

.shot img {
    width: 100%;
    border-radius: 3px;
}

.shot figcaption {
    margin-top: 8px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.6;
}

/* ---------- Skills and credentials ---------- */

.toolkit {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
    gap: 32px 48px;
    margin-top: 36px;
}

.toolkit h3,
.credentials h3 {
    margin: 0;
    color: var(--rose);
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.toolkit .tags {
    margin-top: 12px;
}

.credentials {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 32px 56px;
    margin-top: 36px;
}

.cred-list {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.cred-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--rule);
    color: var(--ink);
    line-height: 1.45;
}

.cred-list li span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
}

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

.contact-list {
    display: grid;
    gap: 14px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.contact-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 18px;
}

.contact-list .label {
    min-width: 90px;
}

/* Missing details: loud on purpose, so they can't ship unnoticed. */
[data-placeholder] {
    padding: 1px 8px;
    border: 1px dashed var(--rose);
    border-radius: 4px;
    background: var(--placeholder-bg);
    color: var(--rose);
    font-family: var(--mono);
    font-size: 0.8em;
}

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

.site-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    padding: 28px var(--pad-x) 32px;
    border-top: 1px solid var(--rule);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.04em;
}

.site-footer p {
    margin: 0;
}

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

.lightbox {
    width: min(1600px, 94vw);
    max-width: none;
    max-height: 94vh;
    padding: 10px;
    border: 0;
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 30px 80px var(--shadow);
}

.lightbox::backdrop {
    background: var(--backdrop);
}

.lightbox img {
    width: 100%;
    max-height: calc(94vh - 90px);
    object-fit: contain;
    border-radius: 4px;
    background: var(--paper-deep);
}

.lightbox-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 4px 2px;
}

.lightbox-caption {
    margin: 0;
    color: var(--text);
    font-family: var(--mono);
    font-size: 13px;
}

.lightbox-close {
    flex: none;
    padding: 6px 14px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
}

.lightbox-close:hover {
    border-color: var(--rose);
    color: var(--rose);
}

/* ---------- Motion and small screens ---------- */

@media (prefers-reduced-motion: no-preference) {
    .shot a:hover {
        transform: translateY(-2px);
    }
}

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

    .strip-item img,
    .strip-item::after,
    .shot a {
        transition: none;
    }
}

@media (max-width: 720px) {
    .facts {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .shots,
    .credentials {
        grid-template-columns: 1fr;
    }

    .sheet {
        border-radius: 6px;
    }

    .lead {
        line-height: 1.75;
    }
}
