/* Organic site styles.
   Layout: one centered column (68rem) with a 38rem reading measure; pages are stacked
   sections, and colored bands span the full width with their own inner wrapper. */

:root {
  /* Color, taken from the portrait: porcelain-and-tile white ground, grey-lilac bathwater
     for bands, plum ink from the sheer top, berry accent from the lipstick, copper from the
     hair for "in development" states and the Concept badge. */
  --bg: #f5f4f2;
  --surface: #e7e3e6;
  --card: #fcfbfa;
  --ink: #231a21;
  --muted: #66585f;
  --line: #dad3d6;
  --accent: #8a2d43;
  --accent-strong: #6c2034;
  --accent-ink: #ffffff;
  --spore: #9a5a28;
  --spore-soft: #f3e4d6;
  --tile: rgba(35, 26, 33, 0.06);

  /* Type */
  --font-display: "Times New Roman", Times, "Liberation Serif", serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: 2.125rem;
  --step-4: clamp(2.375rem, 1.6rem + 3.4vw, 3.75rem);

  --radius: 10px;
  --wrap: 68rem;
  --measure: 38rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161117;
    --surface: #211a22;
    --card: #261e27;
    --ink: #f0e9ec;
    --muted: #b5a8af;
    --line: #3a3039;
    --accent: #e48ba1;
    --accent-strong: #f2abbc;
    --accent-ink: #1a1018;
    --spore: #e2a271;
    --spore-soft: #34251b;
    --tile: rgba(240, 233, 236, 0.05);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #161117;
  --surface: #211a22;
  --card: #261e27;
  --ink: #f0e9ec;
  --muted: #b5a8af;
  --line: #3a3039;
  --accent: #e48ba1;
  --accent-strong: #f2abbc;
  --accent-ink: #1a1018;
  --spore: #e2a271;
  --spore-soft: #34251b;
  --tile: rgba(240, 233, 236, 0.05);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}

img, svg, canvas { max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: var(--step-4); letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.3; }
p { margin: 0; }

a { color: var(--accent-strong); text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  z-index: 20;
}
.skip-link:focus { top: 12px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding-block: 1rem;
}
.header-inner .site-nav { margin-left: auto; }
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent-strong); }
.theme-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle:empty { visibility: hidden; }
@media (max-width: 40rem) {
  .header-inner .theme-toggle { order: 2; margin-left: auto; }
  .header-inner .site-nav { order: 3; margin-left: 0; flex-basis: 100%; }
}
/* The logo is a single O in Times New Roman. */
.brand {
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--accent-strong); }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Sections */
main { display: block; }
.section { padding-block: clamp(3rem, 2rem + 4vw, 5rem); }
.section + .section { border-top: 1px solid var(--line); }
.stack { display: grid; gap: 1.25rem; }
.stack-lg { display: grid; gap: 2.5rem; }
.prose { max-width: var(--measure); display: grid; gap: 1.1rem; }
.lede { font-size: var(--step-1); color: var(--muted); max-width: var(--measure); }
.eyebrow {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.page-head { padding-block: clamp(3rem, 2rem + 4vw, 4.5rem) 0; }
.page-head .stack > * { max-width: 46rem; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}
.button:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); }
.button.secondary { background: transparent; color: var(--accent-strong); }
.button.secondary:hover { background: var(--surface); color: var(--ink); }

.status {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 700;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  vertical-align: middle;
}
.status.live { color: var(--accent-strong); }
.status.dev { color: var(--spore); }

/* Home hero */
/* The hero sits on a faint tile grid, echoing the bathroom wall in the portrait. */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--tile) 1px, transparent 1px),
    linear-gradient(90deg, var(--tile) 1px, transparent 1px);
  background-size: 7.5rem 5rem;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 30rem);
  padding-block: clamp(3.5rem, 2rem + 6vw, 7rem);
}

/* The concept image fills the right side and fades into the page on its left and
   bottom edges, so the headline and buttons sit on the faded part. */
.hero-media {
  position: absolute;
  inset: 0 0 0 auto;
  width: 60%;
  margin: 0;
}
.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 45% 55%;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 60%, transparent) 22%, transparent 55%),
    linear-gradient(0deg, var(--bg) 0%, transparent 22%);
  pointer-events: none;
}
.hero-media .concept-badge { left: auto; right: max(16px, env(safe-area-inset-right, 0px)); top: 1rem; z-index: 1; }
.hero-media figcaption {
  position: absolute;
  z-index: 1;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: 0.75rem;
  max-width: 22rem;
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: right;
}
.hero-copy { display: grid; gap: 1.5rem; min-width: 0; }
.hero-copy .lede { font-size: var(--step-1); }
/* Portrait: a tall crop with a small Helvetica caption, like a magazine credit. */
.portrait { margin: 0; min-width: 0; display: grid; gap: 0.625rem; }
.portrait img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 30%;
  background: var(--surface);
}
.portrait figcaption {
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* Concept images: always carry a badge on the image and a caption under it, so an
   AI-made picture is never read as finished work. */
.concept { margin: 0; display: grid; gap: 0.625rem; min-width: 0; max-width: 34rem; }
.concept-frame { position: relative; }
.concept img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--surface);
}
.concept-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: var(--spore-soft);
  color: var(--spore);
  border: 1px solid var(--spore);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.concept figcaption {
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  color: var(--muted);
  max-width: var(--measure);
}

/* About Forest: text beside the portrait */
.person {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
  gap: 2.5rem;
  align-items: start;
}
.person .stack { min-width: 0; }

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}
.card p { color: var(--muted); }
.card .more { font-weight: 700; text-decoration: none; }
.card .more:hover { text-decoration: underline; }

/* Full-width band */
.band { background: var(--surface); border-block: 1px solid var(--line); }
.band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 2.5rem;
}
.band-inner > div { display: grid; gap: 0.5rem; min-width: 0; max-width: 40rem; }

/* About */
.statement {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.3;
  max-width: 44rem;
  text-wrap: balance;
}
.example {
  display: grid;
  gap: 0.75rem;
  max-width: var(--measure);
  padding: 1.5rem;
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.education { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; max-width: var(--measure); }
.education li { display: grid; gap: 0.125rem; }
.education .degree { color: var(--muted); }

/* Services: they run in order, so they are numbered */
.services {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: service;
  display: grid;
  border-top: 1px solid var(--line);
}
.services li {
  counter-increment: service;
  display: grid;
  grid-template-columns: 3rem minmax(0, 14rem) minmax(0, 1fr);
  gap: 0.5rem 1.5rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.services li::before {
  content: counter(service);
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1;
  color: var(--accent);
}
.services h3 { font-size: var(--step-1); }
.services p { color: var(--muted); max-width: var(--measure); }
.services .note { display: block; margin-top: 0.375rem; font-size: var(--step--1); font-style: italic; }
.steps { display: inline; font-weight: 700; color: var(--ink); }

/* Projects */
.project { display: grid; gap: 1.25rem; }
.project-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.875rem; max-width: var(--measure); }
.features li { padding-left: 1.25rem; position: relative; }
.features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}
.work-list {
  display: grid;
  grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
  margin: 0;
  border-top: 1px solid var(--line);
  max-width: 48rem;
}
.work-list dt, .work-list dd { margin: 0; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.work-list dt { font-weight: 700; padding-right: 1rem; }
.work-list dd { color: var(--muted); }

/* Support */
.help-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; max-width: var(--measure); }
.help-list li { display: grid; gap: 0.25rem; }

/* Contact */
.contact-lines { display: grid; gap: 1rem; max-width: var(--measure); }
.contact-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.contact-line .label { min-width: 7.5rem; color: var(--muted); }
.contact-line .value { font-size: var(--step-1); overflow-wrap: anywhere; }
.copy {
  font: inherit;
  font-size: var(--step--1);
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.copy:hover { border-color: var(--accent); }
.socials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 0.75rem;
}
.socials a {
  display: grid;
  gap: 0.125rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  text-decoration: none;
  color: var(--ink);
  height: 100%;
}
.socials a:hover { border-color: var(--accent); }
.socials .what { font-weight: 700; }
.socials .handle { color: var(--muted); font-size: var(--step--1); overflow-wrap: anywhere; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 0; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 2rem;
  color: var(--muted);
  font-size: var(--step--1);
}
.footer-inner ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; list-style: none; margin: 0; padding: 0; }
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--ink); }

@media (max-width: 52rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); padding-block: 0 3rem; }
  .hero-media { position: relative; width: 100%; height: clamp(16rem, 60vw, 24rem); }
  .hero-media::after { background: linear-gradient(0deg, var(--bg) 0%, transparent 45%); }
  .hero-media figcaption { bottom: 0.5rem; }
  .person { grid-template-columns: minmax(0, 1fr); }
  .person .portrait { width: min(100%, 20rem); }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .services li { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .services li p { grid-column: 2; }
}

@media (max-width: 34rem) {
  .work-list { grid-template-columns: minmax(0, 1fr); }
  .work-list dt { border-bottom: 0; padding-bottom: 0; }
  .work-list dd { padding-top: 0.25rem; }
}

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