/* Amberfly site styles. Light, calm, personal. No build step.
   Fonts: Figtree (variable 300-900) for everything, Caveat 500 (subset) for small hand-written notes. Both OFL,
   self-hosted in fonts/. Colours: warm paper #FAF7F2, ink #211C19, amber accent #A9550B (text) / #C46A12 (marks). */
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-var.woff2") format("woff2");
  font-weight: 300 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-var-italic.woff2") format("woff2");
  font-weight: 300 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("fonts/caveat-500.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #faf7f2;
  --bg-2: #f2ede5;
  --line: #e3dbd0;
  --text: #211c19;
  --muted: #6b625b;
  --accent: #a9550b;
  --accent-soft: #c46a12;
  --wrap: 68rem;
  --font: "Figtree", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 1.5rem + 3.2vw, 3.6rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
::selection { background: #f3d9b8; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--text); color: var(--bg); padding: .6rem 1rem; font-weight: 600;
}
.skip:focus { top: 1rem; }

/* Header */
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem 1.5rem;
  flex-wrap: wrap; padding: 1.4rem 0 1.2rem;
}
.brand-row { display: flex; align-items: center; gap: 1.1rem; }
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em;
}
.brand img { width: 40px; height: auto; }
.tagline {
  display: none; margin: 0; padding-left: 1.1rem; border-left: 1px solid var(--line);
  color: var(--muted); font-size: .92rem;
}
@media (min-width: 60rem) { .tagline { display: block; } }
.nav ul { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a {
  display: block; padding: .35rem 0; color: var(--text); text-decoration: none; font-weight: 500;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent-soft); }
@media (max-width: 30rem) { .nav ul { gap: 1.15rem; } }

/* Hero (home and 404) */
.hero { padding: clamp(1.5rem, 5vw, 4rem) 0 clamp(1.5rem, 4vw, 3rem); }
.hero .wrap { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 52rem) { .hero .wrap { grid-template-columns: 1.5fr 1fr; gap: 3rem; } }
.hello { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem); font-weight: 600; margin: 0 0 .4rem; letter-spacing: -.01em; }
.hero h1 { margin-bottom: .4em; }
.lede { font-size: clamp(1.1rem, 1rem + .45vw, 1.3rem); color: var(--muted); max-width: 34rem; }
.hero-art { position: relative; justify-self: center; width: min(62%, 21rem); margin: 0; }
@media (min-width: 52rem) { .hero-art { width: min(100%, 22rem); } }
.hi-note {
  position: absolute; top: .4rem; right: -1rem; margin: 0;
  font-family: var(--hand); font-size: 1.7rem; line-height: 1; color: var(--accent-soft);
  transform: rotate(-12deg);
}

/* Sections */
.section { padding: clamp(1.75rem, 4vw, 3rem) 0; }
.section h2 { margin-bottom: 1.1rem; }
.kicker { color: var(--muted); font-weight: 500; font-size: .95rem; margin: 0 0 .4rem; }
.kicker a { color: var(--muted); }
.section-head { max-width: 40rem; margin-bottom: 1.75rem; }
.section-head p { color: var(--muted); }
.note { color: var(--muted); font-size: .9rem; }
.spaced { margin-top: 1.75rem; }
.soon { color: var(--accent); font-weight: 500; }
.hand { font-family: var(--hand); font-size: 1.35em; line-height: 1; color: var(--accent-soft); }

/* Project tiles (home): photo, title, one line */
.tiles { display: grid; gap: 2rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.tile { position: relative; }
.tile img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; border-radius: 4px; background: var(--bg-2); }
.tile h3 { margin: .9rem 0 .15rem; }
.tile p { color: var(--muted); margin: 0; }
.tile p.soon { margin: 0; color: var(--accent); }
.tile a.stretch { color: var(--text); text-decoration: none; }
.tile a.stretch::after { content: ""; position: absolute; inset: 0; }
.tile:hover a.stretch, .tile a.stretch:focus-visible { text-decoration: underline; text-decoration-thickness: 1px; }

/* What I do: plain text columns */
.skills {
  display: grid; gap: 1.25rem 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  list-style: none; padding: 0; margin: 0;
}
.skills li { border-top: 1px solid var(--line); padding-top: .8rem; }
.skills strong { display: block; font-weight: 600; margin-bottom: .15rem; }
.skills span { color: var(--muted); font-size: .97rem; }

/* Work page */
.product { padding: clamp(2rem, 5vw, 3.5rem) 0; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.product:first-of-type { border-top: 0; padding-top: .5rem; }
.product h2 .soon { font-size: 1rem; letter-spacing: 0; margin-left: .4rem; white-space: nowrap; }
.facts { list-style: none; padding: 0; margin: 0 0 1.75rem; color: var(--muted); font-size: .95rem; }
.facts li { display: inline; }
.facts li + li::before { content: " · "; color: var(--line); }
.gallery { display: grid; gap: 1.75rem 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); margin: 0 0 1.25rem; }
.gallery figure { margin: 0; }
.gallery figure.wide { grid-column: 1 / -1; }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; background: var(--bg-2); }
.gallery figure.wide img { aspect-ratio: 3 / 2; }
.gallery figure.wide.ui img { aspect-ratio: 16 / 9; }
.gallery figure.wide.pano img { aspect-ratio: auto; }
.gallery figure.square img { object-fit: contain; }
.gallery figcaption { padding-top: .55rem; color: var(--muted); font-size: .93rem; }

/* Shop page */
.stores { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.store { border-top: 2px solid var(--text); padding-top: 1rem; display: flex; flex-direction: column; gap: .4rem; }
.store.soon-store { border-top-color: var(--line); }
.store h2 { margin: 0; }
.store p { color: var(--muted); margin: 0; }
.store ul { margin: .25rem 0 .75rem; padding-left: 1.1rem; color: var(--muted); }
.status { font-size: .9rem; font-weight: 500; color: var(--muted); }
.status.open { color: #3f6b3a; }
.store-link { align-self: flex-start; margin-top: auto; font-weight: 600; }

/* About */
.about { display: grid; gap: 1.5rem 3rem; align-items: start; }
@media (min-width: 52rem) { .about { grid-template-columns: 13rem 1fr; } }
.about .portrait { width: 9rem; height: auto; }
@media (min-width: 52rem) { .about .portrait { width: 100%; margin-top: 2.5rem; } }
.prose { max-width: 40rem; }
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .35em; }

/* Footer: sits at the bottom, quiet */
.site-footer { padding: 2.5rem 0 2rem; color: var(--muted); font-size: .92rem; }
.site-footer .wrap {
  border-top: 1px solid var(--line); padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: .75rem 2rem; justify-content: space-between; align-items: baseline;
}
.site-footer p { margin: 0; }
.site-footer ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* Blog */
.post-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.post-list li {
  border-bottom: 1px solid var(--line); padding: 1.1rem 0 1.2rem;
  display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; align-items: start;
}
@media (min-width: 40rem) { .post-list li { grid-template-columns: 8rem 1fr; gap: 1.5rem; } }
.post-list .thumb { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; background: var(--bg-2); margin-top: .2rem; }
.post-list .thumb.mark { object-fit: contain; padding: 18%; }
.post-list h2, .post-list h3 { margin: 0 0 .2rem; font-size: 1.2rem; }
.post-list h2 a, .post-list h3 a { color: var(--accent); }
.post-list h2 a:hover, .post-list h3 a:hover { color: var(--text); }
.post-list p { margin: 0; color: var(--muted); }
.post-list .post-meta { margin: 0 0 .25rem; font-size: .88rem; }
.post-meta { color: var(--muted); font-size: .92rem; margin: 0 0 .5rem; }
.tag { font-size: .8rem; font-weight: 500; color: var(--accent); vertical-align: middle; margin-left: .3rem; letter-spacing: 0; }
.post-hero, .post figure img { width: 100%; height: auto; border-radius: 4px; }
.post figure { margin: 1.75rem 0; }
.post figcaption { color: var(--muted); font-size: .93rem; padding-top: .5rem; }
.post-back { margin-top: 2.5rem; }
.post-hero { margin: .75rem 0 1.5rem; }
