/* ============================================================
   ASHLYN HALL — PORTFOLIO STYLES
   Plain CSS, no build step. Colours and fonts live in :root.
   ============================================================ */

:root {
  --paper: #f7f4ee;
  --paper-deep: #efe9de;
  --ink: #1b1a17;
  --ink-soft: #45423c;
  --muted: #7a766e;
  --line: #ddd6ca;
  --accent: #4a6553;
  --accent-deep: #30453a;
  --accent-soft: #e4ebe4;
  --serif: "EB Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "EB Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --max: 1180px;
  --gutter: clamp(20px, 5vw, 72px);
  --nav-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 1.15rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; }
p { margin: 0 0 1.25em; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 4px; }
.skip-link:focus { top: 1rem; }
.container { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
[id] { scroll-margin-top: calc(var(--nav-h) + 2.5rem); }

/* ---------- Type ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.05; letter-spacing: -.01em; margin: 0; }
.title { font-size: clamp(2.5rem, 5.2vw, 4.25rem); }
.subtitle { font-size: clamp(1.75rem, 3vw, 2.4rem); }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin: 0 0 1.1rem; }
.lead { font-family: var(--serif); font-size: clamp(1.35rem, 2.1vw, 1.7rem); line-height: 1.45; font-weight: 400; }
.muted { color: var(--muted); }
.link-arrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .86rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; border-bottom: 1px solid currentColor; padding-bottom: .25rem; }
.link-arrow span { transition: transform .3s var(--ease); }
.link-arrow:hover span { transform: translateX(4px); }
.link-underline { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: .28em; transition: text-decoration-color .3s; }
.link-underline:hover { text-decoration-color: currentColor; }
.credit { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: .8rem 0 0; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .6rem; padding: .95rem 1.6rem; border: 1px solid currentColor; border-radius: 999px; font-family: var(--sans); font-size: .86rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; line-height: 1; cursor: pointer; transition: background .3s, color .3s, border-color .3s; }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn--solid { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--solid:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light:hover { background: var(--paper); border-color: var(--paper); }
.btn--ghost { background: transparent; color: inherit; border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { background: rgba(255,255,255,.14); border-color: #fff; }

/* ---------- Navigation ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--nav-h); display: flex; align-items: center; color: var(--ink); transition: background .4s, box-shadow .4s, color .4s; }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.nav__brand { font-family: var(--serif); font-size: 1.55rem; font-weight: 600; line-height: 1; }
.nav__links { display: flex; gap: 2.1rem; list-style: none; }
.nav__links a { font-size: .84rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; position: relative; padding: .35rem 0; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav--solid, .nav.is-scrolled { background: rgba(247,244,238,.86); -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px); box-shadow: 0 1px 0 var(--line); color: var(--ink); }
.nav--overlay:not(.is-scrolled):not(.is-open) { color: #fff; }
.nav__toggle { display: none; width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: inherit; }
.nav__toggle span { display: block; width: 24px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
.nav.is-open .nav__toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav.is-open .nav__toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav__toggle { display: inline-flex; }
  .nav__menu { position: fixed; inset: 0; background: var(--paper); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility 0s linear .35s; }
  .nav.is-open .nav__menu { opacity: 1; visibility: visible; transition: opacity .35s var(--ease); }
  .nav__links { flex-direction: column; gap: .6rem; text-align: center; }
  .nav__links a { font-family: var(--serif); font-size: 2.6rem; font-weight: 500; text-transform: none; letter-spacing: -.01em; }
  .nav__links a::after { display: none; }
  .nav__links a[aria-current="page"] { color: var(--accent); }
  .nav.is-open { color: var(--ink); }
  .nav__brand, .nav__toggle { position: relative; z-index: 2; }
}

/* ---------- Hero (home) ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; background: #14130f; color: #fff; overflow: hidden; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.05) 35%, rgba(0,0,0,.74) 100%); }
.hero__content { position: relative; padding: calc(var(--nav-h) + 5rem) 0 5.5rem; }
.hero .eyebrow { color: rgba(255,255,255,.82); }
.hero__title { font-size: clamp(3.9rem, 11.5vw, 9.5rem); font-weight: 500; line-height: .92; letter-spacing: -.025em; margin: 0 0 1.4rem; }
.hero__lead { font-family: var(--serif); font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.35; max-width: 30ch; color: rgba(255,255,255,.9); margin: 0 0 2.25rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero__credit { position: absolute; right: var(--gutter); bottom: 1.2rem; margin: 0; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.6); }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 8rem) 0; }
.section--tint { background: var(--paper-deep); }
.section--flush-top { padding-top: 0; }
.section__head { max-width: 62ch; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.page-head { padding: calc(var(--nav-h) + clamp(3.5rem, 8vw, 6.5rem)) 0 clamp(2.5rem, 6vw, 4.5rem); }
.page-head .title { margin-bottom: 1.5rem; }
.page-head .lead { max-width: 60ch; margin: 0; color: var(--ink-soft); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; }
.about__body .lead { margin-bottom: 1.75rem; }
.about__body p:not(.lead):not(.eyebrow) { color: var(--ink-soft); }
.about__body .link-arrow { margin-top: .5rem; }
.about__media { margin: 0; }
.about__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; }

/* ---------- Facts ---------- */
.facts { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.fact { background: var(--paper-deep); padding: 2rem 1.75rem; }
.fact__label { font-size: .76rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 .9rem; }
.fact__value { font-family: var(--serif); font-size: 1.45rem; line-height: 1.25; margin: 0; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5; background: #1a1916; color: #fff; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.card:hover img { transform: scale(1.045); }
.card__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 5rem 1.75rem 1.75rem; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.74)); }
.card__eyebrow { font-size: .76rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.75); margin: 0 0 .6rem; }
.card h3 { font-size: 1.8rem; line-height: 1.1; }

/* ---------- Works list ---------- */
.list { list-style: none; border-top: 1px solid var(--line); margin-bottom: 2.5rem; }
.list__item { display: grid; grid-template-columns: 8rem 1fr; gap: 1.5rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.list__date { font-size: .82rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.list__title { font-family: var(--serif); font-size: 1.6rem; line-height: 1.2; }
.list__meta { display: block; font-family: var(--sans); font-size: 1.02rem; color: var(--muted); margin-top: .3rem; }

/* ---------- Courses ---------- */
.courses { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); padding-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--line); }
.courses .subtitle { margin-bottom: 1.25rem; }
.pill-list { list-style: none; display: flex; flex-wrap: wrap; gap: .55rem; }
.pill-list li { padding: .5rem .95rem; border: 1px solid var(--line); border-radius: 999px; font-size: 1rem; background: #fff; }

/* ---------- Courses ---------- */
.course-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem 3rem; margin-top: 1.5rem; }
.course__code { display: block; font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.course__title { font-size: 1.4rem; margin-bottom: .4rem; }
.course__desc { color: var(--ink-soft); margin: 0; font-size: 1.05rem; }
.institution { margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--line); }
.section__head + .institution { margin-top: 0; padding-top: 0; border-top: 0; }
.badge { display: inline-block; vertical-align: middle; margin-left: .5rem; padding: .15rem .6rem; border: 1px solid var(--accent); border-radius: 999px; font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.list__desc { display: block; margin-top: .5rem; font-family: var(--sans); font-size: 1.02rem; color: var(--ink-soft); max-width: 64ch; }
.list__group { margin: 2.5rem 0 .75rem; }
.list__group:first-child { margin-top: 0; }

/* ---------- Feature rows ---------- */
.features { border-top: 1px solid var(--line); }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5.5rem); align-items: center; padding: clamp(2.5rem, 5vw, 4.5rem) 0; border-bottom: 1px solid var(--line); }
.feature__media { margin: 0; }
.feature__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.feature__media.is-landscape img { aspect-ratio: 3 / 2; }
.feature:nth-child(even) .feature__media { order: 2; }
.feature__body h3 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); margin-bottom: 1.1rem; }
.feature__body p { color: var(--ink-soft); }
.feature__body .eyebrow { margin-bottom: .9rem; }

/* ---------- Gallery ---------- */
.gallery { columns: 3; column-gap: 1.25rem; }
.gallery__item { display: block; width: 100%; break-inside: avoid; margin: 0 0 1.25rem; padding: 0; border: 0; background: var(--paper-deep); cursor: zoom-in; overflow: hidden; }
.gallery__item img { width: 100%; transition: transform 1.2s var(--ease); }
.gallery__item:hover img { transform: scale(1.03); }

/* ---------- Video ---------- */
.video { position: relative; aspect-ratio: 16 / 9; background: #111; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Lightbox (markup is created by js/main.js) ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(14,13,11,.95); display: none; align-items: center; justify-content: center; padding: 4.5rem 1rem 4rem; }
.lightbox.is-open { display: flex; }
.lightbox__img { max-width: min(1400px, 100%); max-height: 100%; object-fit: contain; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lightbox__caption { position: absolute; left: 0; right: 0; bottom: 1.25rem; margin: 0; padding: 0 4.5rem; text-align: center; color: rgba(255,255,255,.78); font-size: 1rem; }
.lightbox__btn { position: absolute; width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: background .3s; }
.lightbox__btn:hover { background: rgba(255,255,255,.22); }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ---------- Experience ---------- */
.cv-actions { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; margin-top: 2rem; }
.cv-row { display: grid; grid-template-columns: 15rem 1fr; gap: clamp(1.5rem, 4vw, 4rem); padding: clamp(2.5rem, 5vw, 4rem) 0; border-top: 1px solid var(--line); }
.cv-row__label .subtitle { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.entry + .entry { margin-top: 2.5rem; }
.entry__title { font-size: 1.7rem; margin-bottom: .35rem; }
.entry__meta { color: var(--muted); margin-bottom: 1rem; }
.entry__list { list-style: none; }
.entry__list li { position: relative; padding-left: 1.4rem; margin-bottom: .5rem; color: var(--ink-soft); }
.entry__list li::before { content: ""; position: absolute; left: 0; top: .8em; width: .55rem; height: 1px; background: var(--accent); }
.kv { display: grid; grid-template-columns: 7.5rem 1fr; gap: .7rem 1.5rem; margin: 0; }
.kv dt { font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); padding-top: .4em; }
.kv dd { margin: 0; color: var(--ink-soft); }

/* ---------- Philosophy ---------- */
.prose-layout { display: grid; grid-template-columns: 15rem 1fr; gap: clamp(2rem, 5vw, 5rem); border-top: 1px solid var(--line); padding-top: clamp(2.5rem, 5vw, 4rem); }
.prose-aside { position: sticky; top: calc(var(--nav-h) + 1.5rem); align-self: start; }
.toc { list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; margin-bottom: .55rem; }
.toc a { display: flex; gap: .75rem; font-size: 1.02rem; color: var(--muted); transition: color .3s; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-size: .76rem; font-weight: 600; letter-spacing: .1em; color: var(--accent); padding-top: .3em; }
.toc a:hover { color: var(--ink); }
.prose { max-width: 66ch; counter-reset: principle; }
.prose h2 { counter-increment: principle; font-size: clamp(1.8rem, 2.8vw, 2.3rem); margin: 0 0 1rem; display: grid; grid-template-columns: 2.6rem 1fr; align-items: baseline; }
.prose h2::before { content: counter(principle, decimal-leading-zero); font-family: var(--sans); font-size: .8rem; font-weight: 600; letter-spacing: .16em; color: var(--accent); }
.prose h2 + p { padding-left: 2.6rem; }
.prose section + section { margin-top: 3rem; }
.prose p { color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2.5rem, 6vw, 6rem); border-top: 1px solid var(--line); padding-top: clamp(2.5rem, 5vw, 4rem); }
.contact__info p { margin-bottom: .5rem; }
.contact__info .eyebrow { margin-top: 2rem; margin-bottom: .6rem; }
.contact__info .eyebrow:first-child { margin-top: 0; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .5rem; }
.field input, .field textarea { width: 100%; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 4px; background: #fff; font: inherit; color: var(--ink); transition: border-color .3s, box-shadow .3s; }
.field textarea { resize: vertical; min-height: 160px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form__note { font-size: 1rem; color: var(--muted); margin: 1.25rem 0 0; }

/* ---------- CTA ---------- */
.cta__inner { text-align: center; max-width: 42rem; }
.cta__inner .lead { color: var(--ink-soft); margin: 1rem 0 2rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 3.5rem 0 2rem; font-size: 1.02rem; color: var(--muted); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 2.5rem; }
.footer__brand { font-family: var(--serif); font-size: 1.6rem; color: var(--ink); margin-bottom: .6rem; }
.footer__label { font-size: .76rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink); margin-bottom: .9rem; }
.footer__links { list-style: none; }
.footer__links li { margin-bottom: .35rem; }
.footer__links a:hover { color: var(--ink); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .9rem; }
.footer__bottom p { margin: 0; }

/* ---------- Reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  html.js .reveal.is-visible { opacity: 1; transform: none; }
  .hero__content > .reveal:nth-child(2) { transition-delay: .1s; }
  .hero__content > .reveal:nth-child(3) { transition-delay: .2s; }
  .hero__content > .reveal:nth-child(4) { transition-delay: .3s; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .cards { gap: 1rem; }
}
@media (max-width: 900px) {
  .about, .courses, .feature, .contact, .cv-row, .prose-layout, .course-list { grid-template-columns: 1fr; }
  .feature:nth-child(even) .feature__media { order: 0; }
  .feature__media img, .feature__media.is-landscape img { aspect-ratio: 4 / 3; }
  .about__media { order: -1; }
  .about__media img { aspect-ratio: 4 / 3; }
  .cards { grid-template-columns: 1fr; }
  .card { aspect-ratio: 16 / 10; }
  .gallery { columns: 2; }
  .prose-aside { display: none; }
  .prose h2 { grid-template-columns: 2.2rem 1fr; }
  .prose h2 + p { padding-left: 0; }
  .cv-row__label .subtitle { position: static; }
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .list__item { grid-template-columns: 1fr; gap: .25rem; }
  .kv { grid-template-columns: 1fr; gap: .2rem 0; }
  .kv dd { margin-bottom: .75rem; }
}
@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr; }
  .gallery { columns: 1; }
  .form__row { grid-template-columns: 1fr; }
  .hero__content { padding-bottom: 4rem; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}
