/* ==========================================================
   Alex Dekker — static site (HTML5 + CSS only)
   ========================================================== */

/* Fonts, self-hosted (SIL Open Font License 1.1): Archivo Black, Space Grotesk */
@font-face {
  font-family: "Archivo Black";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/archivo-black-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo Black";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/archivo-black-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --plum: #792e5f;
  --plum-dark: #5e2249;
  --pink: #ffabab;
  --pink-soft: #ffb6b6;
  --teal: #31a59f;
  --teal-dark: #278680;
  --white: #ffffff;
  --line: rgba(255, 255, 255, 0.55);

  --display: "Archivo Black", "Arial Black", Impact, sans-serif;
  --body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 41px);
  --max: 1024px;
}

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

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

body {
  margin: 0;
  background: var(--plum);
  color: var(--white);
  font-family: var(--body);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--teal); color: var(--white);
  padding: 8px 16px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

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

/* ---------- Type ---------- */

h1, h2, h3, h4, .cv-item, .footer-name, .footer-label {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.15;
  margin: 0;
}

.h-xl  { font-size: clamp(2.2rem, 5.2vw, 3.3rem); letter-spacing: -0.02em; color: var(--pink); }
.h-lg  { font-size: clamp(1.7rem, 3.8vw, 2.4rem); letter-spacing: -0.02em; }
.h-md, .cv-item  { font-size: clamp(1.15rem, 2.3vw, 1.46rem); letter-spacing: -0.02em; color: var(--pink-soft); }

.text-link {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: color .2s ease;
}
.text-link:hover { color: var(--pink); }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--plum);
}
.site-header .inner {
  max-width: 1400px; margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  font-family: var(--body); font-weight: 700;
  font-size: 1.1rem; letter-spacing: .02em;
  text-transform: uppercase; text-decoration: none;
  color: var(--pink);
}
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; font-size: .95rem; }
.nav a:not(.btn):hover,
.nav a[aria-current="page"]:not(.btn) { text-decoration: underline; text-underline-offset: 4px; }

.btn {
  display: inline-block;
  background: var(--teal); color: var(--white);
  font-family: var(--body); font-weight: 600; font-size: .95rem;
  text-transform: uppercase; text-decoration: none; letter-spacing: .02em;
  padding: 12px 26px; border: 0; border-radius: 999px; cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.btn:hover { background: var(--teal-dark); transform: translateY(-1px); }

/* Mobile menu (checkbox toggle, no JS) */
.menu-toggle { display: none; }
.menu-btn {
  display: none; cursor: pointer;
  width: 40px; height: 40px; position: relative;
}
.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  content: ""; position: absolute; left: 8px; right: 8px; height: 2px;
  background: var(--white); transition: transform .25s ease, opacity .25s ease;
}
.menu-btn span { top: 19px; }
.menu-btn span::before { left: 0; right: 0; top: -8px; }
.menu-btn span::after  { left: 0; right: 0; top: 8px; }

@media (max-width: 767px) {
  .menu-btn { display: block; z-index: 60; }
  .nav {
    position: fixed; inset: 0;
    flex-direction: column; justify-content: center; gap: 32px;
    background: var(--plum);
    opacity: 0; visibility: hidden;
    transition: opacity .25s ease, visibility .25s;
  }
  .nav a { font-size: 1.6rem; }
  .nav .btn { font-size: 1.1rem; }
  .menu-toggle:checked ~ .nav { opacity: 1; visibility: visible; }
  .menu-toggle:checked + .menu-btn span { background: transparent; }
  .menu-toggle:checked + .menu-btn span::before { transform: translateY(8px) rotate(45deg); }
  .menu-toggle:checked + .menu-btn span::after  { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------- Layout ---------- */

main { display: block; }

.container {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
}

/* Hero */
.hero {
  max-width: var(--max); margin: 0 auto 0;
  padding: 8px var(--gutter) 0;
}
.hero-frame {
  position: relative; overflow: hidden;
  width: 100%; aspect-ratio: 942 / 278; min-height: 200px;
}
.hero-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  animation: hero-in 1.4s ease-out both;
}
.hero-frame::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(0, 0, 0, .28);
}
.hero-frame h1 {
  position: absolute; inset: 0; z-index: 1;
  display: grid; place-items: center; text-align: center;
  color: var(--white);
  padding: 0 16px;
}
@keyframes hero-in {
  from { transform: scale(1.06); filter: blur(6px); opacity: .6; }
  to   { transform: scale(1);    filter: blur(0);   opacity: 1; }
}

/* Credential list */
.cv { text-align: center; padding: 72px 0 24px; }
.cv-group { max-width: 460px; margin: 0 auto 56px; }
.cv-group h2 { margin-bottom: 28px; }
.cv-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 30px; }
.cv-group li p { margin: 8px 0 0; font-size: .95rem; }
.cv-item { display: block; }
.cv-group .cv-item a { color: var(--teal); }
.cv-group .cv-item a:hover { color: var(--pink); }

.cv-photo { width: min(376px, 100%); margin: 0 auto 64px; }
.cv-photo img { width: 100%; aspect-ratio: 376 / 223; object-fit: cover; }
.cv-photo.tall img { aspect-ratio: 376 / 182; }

/* Work together */
.together { padding: 24px 0 88px; }
.together > .container > h2 { text-align: center; margin-bottom: 56px; }
.together-grid {
  display: grid; gap: 40px;
  grid-template-columns: minmax(0, 393fr) minmax(0, 510fr);
  align-items: start;
}
@media (max-width: 767px) {
  .together-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- CSS-only gallery ---------- */

.gallery { position: relative; min-width: 0; }
.gallery input { position: absolute; opacity: 0; pointer-events: none; }

.gallery-stage {
  position: relative; aspect-ratio: 3 / 2; overflow: hidden;
  background: var(--plum-dark);
}
.gallery-stage figure {
  margin: 0; position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .5s ease, visibility .5s;
}
.gallery-stage img { width: 100%; height: 100%; object-fit: contain; }

.gallery-arrows label {
  position: absolute; top: 50%; z-index: 2;
  width: 40px; height: 40px; margin-top: -20px;
  display: none; place-items: center; cursor: pointer;
  background: rgba(0,0,0,.35); border-radius: 50%;
  color: var(--white); font-size: 20px; line-height: 1;
  transition: background .2s;
}
.gallery-arrows label:hover { background: var(--teal); }
.gallery-arrows .prev { left: 10px; }
.gallery-arrows .next { right: 10px; }

.gallery-thumbs {
  display: flex; gap: 6px; margin-top: 10px;
  overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px;
}
.gallery-thumbs label {
  flex: 0 0 auto; cursor: pointer;
  width: 64px; height: 48px; opacity: .55;
  outline: 2px solid transparent; outline-offset: -2px;
  transition: opacity .2s, outline-color .2s;
}
.gallery-thumbs label:hover { opacity: .9; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* Active-slide wiring (one rule per slide) */
#g1:checked  ~ .gallery-stage .s1,
#g2:checked  ~ .gallery-stage .s2,
#g3:checked  ~ .gallery-stage .s3,
#g4:checked  ~ .gallery-stage .s4,
#g5:checked  ~ .gallery-stage .s5,
#g6:checked  ~ .gallery-stage .s6,
#g7:checked  ~ .gallery-stage .s7,
#g8:checked  ~ .gallery-stage .s8,
#g9:checked  ~ .gallery-stage .s9,
#g10:checked ~ .gallery-stage .s10,
#g11:checked ~ .gallery-stage .s11 { opacity: 1; visibility: visible; }

#g1:checked  ~ .gallery-stage .a1,
#g2:checked  ~ .gallery-stage .a2,
#g3:checked  ~ .gallery-stage .a3,
#g4:checked  ~ .gallery-stage .a4,
#g5:checked  ~ .gallery-stage .a5,
#g6:checked  ~ .gallery-stage .a6,
#g7:checked  ~ .gallery-stage .a7,
#g8:checked  ~ .gallery-stage .a8,
#g9:checked  ~ .gallery-stage .a9,
#g10:checked ~ .gallery-stage .a10,
#g11:checked ~ .gallery-stage .a11 { display: grid; }

#g1:checked  ~ .gallery-thumbs [for="g1"],
#g2:checked  ~ .gallery-thumbs [for="g2"],
#g3:checked  ~ .gallery-thumbs [for="g3"],
#g4:checked  ~ .gallery-thumbs [for="g4"],
#g5:checked  ~ .gallery-thumbs [for="g5"],
#g6:checked  ~ .gallery-thumbs [for="g6"],
#g7:checked  ~ .gallery-thumbs [for="g7"],
#g8:checked  ~ .gallery-thumbs [for="g8"],
#g9:checked  ~ .gallery-thumbs [for="g9"],
#g10:checked ~ .gallery-thumbs [for="g10"],
#g11:checked ~ .gallery-thumbs [for="g11"] { opacity: 1; outline-color: var(--pink); }

/* ---------- Forms ---------- */

.form { display: grid; gap: 18px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .form .row { grid-template-columns: 1fr; } }
.form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.form legend, .form label { font-size: .85rem; display: block; margin-bottom: 6px; }
.form .sub { font-size: .75rem; opacity: .75; margin-top: 4px; display: block; }
.form .req { font-weight: 400; opacity: .75; margin-left: 4px; }

.form input,
.form textarea {
  width: 100%;
  font: 500 1rem/1.4 var(--body);
  color: var(--white);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 16px;
  transition: border-color .2s, background .2s;
}
.form textarea { min-height: 110px; resize: vertical; border-radius: 14px; }
.form input:hover, .form textarea:hover { border-color: var(--white); }
.form input:focus, .form textarea:focus {
  outline: none; border-color: var(--pink); background: rgba(255,255,255,.05);
}
.form input:user-invalid, .form textarea:user-invalid { border-color: #ffd36b; }
.form .hp { position: absolute; left: -9999px; }
.form .btn { justify-self: start; margin-top: 4px; }

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

.about {
  max-width: 1400px; margin: 0 auto;
  padding: 24px var(--gutter) 88px;
  display: grid; gap: 48px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}
.about h1 { margin-bottom: 24px; }
.about p { margin: 0 0 1.1em; max-width: 34em; }
.about p a { color: var(--teal); font-style: italic; text-underline-offset: 3px; }
.about p a:hover { color: var(--pink); }
.about .btn { margin-top: 16px; }
.about-photos { display: grid; gap: 24px; }
.about-photos img { width: 100%; object-fit: cover; }
@media (max-width: 767px) {
  .about { grid-template-columns: 1fr; }
}

/* ---------- Appointments / thanks ---------- */

.narrow { max-width: 510px; margin: 0 auto; padding: 32px var(--gutter) 96px; }
.narrow h1 { margin-bottom: 32px; }
.center { text-align: center; }

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

.site-footer {
  max-width: 1400px; margin: 0 auto;
  padding: 40px var(--gutter) 56px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.site-footer h2, .site-footer .footer-name { color: var(--pink); margin: 0; }
.site-footer h3, .site-footer .footer-label { color: var(--pink-soft); font-size: 1.2rem; margin: 0 0 12px; }
.site-footer address { font-style: normal; }
.site-footer address a { display: block; text-decoration: none; }
.site-footer address a:hover { color: var(--pink); }

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

.lower { text-transform: none; }

.hero-frame h1 { align-content: center; gap: 6px; }
.hero-frame h1 .eyebrow {
  display: block;
  font-family: var(--body); font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.4rem); letter-spacing: .25em;
  color: var(--pink);
}

/* ---------- Micro-Projects ---------- */

.projects { padding-top: 24px; padding-bottom: 96px; }
.projects h1 { margin-bottom: 16px; }
.projects-intro { max-width: 34em; margin: 0 0 48px; font-size: 1.05rem; }

.project-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.project-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 24px; border-radius: 16px;
  background: var(--plum-dark);
  border: 1px solid rgba(255, 255, 255, .1);
  transition: transform .2s ease, border-color .2s ease;
}
.project-card:hover { transform: translateY(-2px); border-color: var(--pink); }
.project-card p { margin: 0; font-weight: 500; flex: 1; }
.project-card .text-link { align-self: flex-start; }
.project-tag {
  align-self: flex-start;
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--plum); background: var(--pink);
  padding: 3px 10px; border-radius: 999px;
}
.project-empty {
  grid-column: 1 / -1;
  padding: 32px; border-radius: 16px; text-align: center;
  border: 1px dashed rgba(255, 255, 255, .35); opacity: .85;
}
.form-note { margin: 0; font-size: .8rem; font-weight: 500; opacity: .75; }

/* ---------- Project info pages ---------- */

.project-page { max-width: 760px; padding-top: 24px; padding-bottom: 96px; }
.project-page .back-link { display: inline-block; margin-bottom: 20px; color: var(--teal); text-decoration: none; }
.project-page .back-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.project-page h1 { margin-bottom: 12px; }
.project-summary { font-size: 1.15rem; margin: 0 0 28px; }
.project-summary a { color: var(--teal); }
.project-facts {
  display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px;
  margin: 0 0 36px; padding: 18px 20px; border-radius: 14px;
  background: var(--plum-dark); border: 1px solid rgba(255,255,255,.1);
  font-weight: 500; font-size: .95rem;
}
.project-facts dt { color: var(--pink-soft); font-weight: 700; }
.project-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.project-page h2 { margin: 32px 0 10px; }
.project-page p { font-weight: 500; margin: 0 0 1em; max-width: 40em; }
.project-page code {
  font: .9em ui-monospace, "SF Mono", Menlo, monospace;
  background: rgba(255,255,255,.1); padding: .1em .35em; border-radius: 4px;
}
.project-shots { display: grid; gap: 24px; margin-top: 40px; }
.project-shots.phone { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: start; }
.project-shots figure { margin: 0; }
.project-shots img { width: 100%; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); }
.project-shots figcaption { font-size: .85rem; font-weight: 500; opacity: .8; margin-top: 8px; }
@media (max-width: 480px) { .project-facts { grid-template-columns: 1fr; gap: 2px; } .project-facts dd { margin-bottom: 10px; } }
.project-links { display: flex; flex-wrap: wrap; gap: 16px; }
.contact-intro { margin: 0 0 32px; }
.contact-intro p { margin: 0 0 1em; font-weight: 500; }
