/*
  ahaz.net, "Raised shoulder" brand system (dark/graphite theme).
  Tokens taken from brand exploration B (tokens.css):
    colour   bg #242724, bg-2 #20231f, panel #2b2e2a, line #535c50,
             fg/chalk #d3d3c6 (10.0:1 on bg), fg-2/linen #b7bbaf (7.7:1),
             fg-dim/lichen #9ca497 (5.9:1, metadata only), accent/flax #c6b88c (7.7:1),
             accent-hover #d2c49a, on-accent #242724, focus/straw #ddbb78
    radius   3 / 6 / 10 px
    space    4 8 12 16 24 32 48 64 px
    type     12 13 16 20 28 40 px, leading 1.5; ui face for reading, mono for meta and labels;
             headings at regular weight with slight negative tracking
    line     1px solid hairlines, no shadows, gradients or glow; sentence case, no uppercase labels
  Faces: B names Segoe UI (proprietary) and Cascadia Mono (OFL). Self-hosted here as
  Selawik (OFL, Microsoft's open, metric-compatible Segoe UI stand-in) and Cascadia Mono,
  both Latin-subset WOFF2 with licences in /assets/fonts/.
  Wordmark: original lowercase geometry in B's manner (measured letters, flat strokes, one
  rounded shoulder per arch), the dot in flax. Mark ("floating hook"): a chalk double-storey a
  with a detached flax hook block, set left of the wordmark in the header.

  Combined design: one restrained idea from each project variant, adapted to the tokens above
  (flax stays the only accent; no new colours):
    v1 SpriteSwapper  project titles in Big Shoulders Display 800 (condensed), sentence case
    v2 Kodiff         a mono title bar on each project: domain on the left, status on the right
                      ("live" with a filled flax square, the wordmark's dot)
    v3 Hooks for Harry  plain numbered project markers 01-04 (no seals), flax mono in the bar
    v4 DaynaFX        gallery rhythm: more air between projects
*/

@font-face {
  font-family: "Big Shoulders Display";
  src: url("/assets/fonts/big-shoulders-display-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Selawik";
  src: url("/assets/fonts/selawik-regular-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cascadia Mono";
  src: url("/assets/fonts/cascadia-mono-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #242724;
  --bg-2: #20231f;
  --panel: #2b2e2a;
  --line: #535c50;
  --fg: #d3d3c6;
  --fg-2: #b7bbaf;
  --fg-dim: #9ca497;
  --accent: #c6b88c;
  --accent-hover: #d2c49a;
  --on-accent: #242724;
  --focus: #ddbb78;
  --radius-sm: 3px;
  --radius: 6px;
  --radius-lg: 10px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --font-ui: "Selawik", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --font-display: "Big Shoulders Display", "Selawik", "Segoe UI", system-ui, sans-serif;
  --text-sm: 13px;
  --text-base: 16px;
  --text-lg: 20px;
  --text-xl: 28px;
  --text-2xl: 40px;
  --leading: 1.5;
  --measure: 62ch;
  --gutter: var(--space-5);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 5px;
  border-radius: var(--radius-sm);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
  line-height: 1.25;
}

p {
  margin: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 10;
  padding: var(--space-2) var(--space-4);
  background: var(--panel);
  color: var(--fg);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: var(--space-4);
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Hairlines sit on the content edge, not across the gutter */

.site-header .wrap,
.site-footer .wrap,
main > section + section .wrap {
  position: relative;
}

.site-header .wrap::after,
.site-footer .wrap::before,
main > section + section .wrap::before {
  content: "";
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  border-top: 1px solid var(--line);
}

.site-header .wrap::after {
  bottom: 0;
}

.site-footer .wrap::before {
  top: 0;
}

main > section + section .wrap::before {
  top: calc(-1 * var(--space-8));
}

/* Header */

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
  padding-top: var(--space-6);
  padding-bottom: var(--space-5);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  color: var(--fg);
}

.wordmark svg {
  display: block;
  flex: none;
}

.wordmark .mark {
  width: 28px;
  height: 28px;
}

.wordmark .type {
  width: 147px;
  height: 21px;
}

.wordmark .dot {
  fill: var(--accent);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 10px 0;
  color: var(--fg-2);
  font-size: var(--text-base);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

/* Sections */

main > section {
  padding: var(--space-8) 0;
}

.intro {
  padding-top: 88px;
}

.intro h1 {
  max-width: 22ch;
  font-size: clamp(var(--text-xl), 1.25rem + 2.6vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.intro p {
  max-width: var(--measure);
  margin-top: var(--space-5);
  color: var(--fg-2);
  font-size: var(--text-lg);
  line-height: var(--leading);
}

.section-title {
  margin-bottom: var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: var(--leading);
  color: var(--fg-dim);
}

.section-title::before {
  content: "└ ";
  content: "└ " / "";
  color: var(--accent);
}

/* Work */

.work-list {
  display: grid;
  gap: var(--space-7);
  margin: 0;
  padding: 0;
  list-style: none;
}

.project {
  --pad: var(--space-5);
  display: grid;
  gap: var(--space-5);
  padding: var(--pad);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

/* Title bar: number, domain, status */

.pane-bar {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) var(--space-1);
  padding: 10px var(--pad);
  border-bottom: 1px solid var(--line);
  border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0;
  background: var(--bg);
  color: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: var(--leading);
}

.pane-num {
  color: var(--accent);
}

.pane-domain {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pane-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
  white-space: nowrap;
}

.pane-status::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border: 1px solid var(--accent);
}

.pane-status.is-live::before {
  background: var(--accent);
}

.project-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: var(--measure);
}

.project h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.25rem;
  line-height: 1.05;
  letter-spacing: 0.005em;
}

.project .summary {
  color: var(--fg);
  font-size: var(--text-lg);
  line-height: 1.4;
}

.project .description {
  color: var(--fg-2);
}

.project .note {
  padding-left: var(--space-3);
  border-left: 1px solid var(--line);
  color: var(--fg-2);
  font-size: 0.9375rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-1) 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 2px var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.visit {
  margin-top: var(--space-2);
}

.visit a {
  display: inline-block;
  padding: 9px var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--accent);
  font-size: var(--text-base);
  line-height: var(--leading);
  text-decoration: none;
}

.visit a:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

.project figure {
  margin: 0;
  align-self: start;
}

.project figure img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.project .logo-panel {
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-3) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f1f3f0;
}

.project .logo-panel img {
  border: 0;
  border-radius: 0;
  background: none;
}

.project .logo-panel .logo {
  width: min(15rem, 60%);
}

.also {
  max-width: var(--measure);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  color: var(--fg-2);
}

/* Capabilities */

.capabilities-body {
  max-width: var(--measure);
}

.capabilities-body ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.capabilities-body li {
  position: relative;
  padding: var(--space-3) 0 var(--space-3) 2em;
  border-top: 1px solid var(--line);
  color: var(--fg);
}

.capabilities-body li:last-child {
  border-bottom: 1px solid var(--line);
}

.capabilities-body li::before {
  content: "└";
  content: "└" / "";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}

.capabilities-body p {
  margin-top: var(--space-6);
  color: var(--fg-2);
}

/* Contact */

.contact p {
  max-width: var(--measure);
  font-size: var(--text-lg);
  line-height: var(--leading);
}

/* Footer */

.site-footer .wrap {
  padding-top: var(--space-5);
  padding-bottom: var(--space-7);
  color: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

/* 404 */

.not-found {
  padding: 96px 0;
}

.not-found h1 {
  font-size: clamp(var(--text-xl), 1.25rem + 2.6vw, var(--text-2xl));
  letter-spacing: -0.02em;
}

.not-found p {
  max-width: var(--measure);
  margin-top: var(--space-5);
  color: var(--fg-2);
}

@media (min-width: 52rem) {
  :root {
    --gutter: 40px;
  }

  .work-list {
    gap: var(--space-8);
  }

  .project {
    --pad: var(--space-6);
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 40px;
  }

  .pane-bar {
    grid-column: 1 / -1;
  }
}

@media (max-width: 30rem) {
  body {
    font-size: var(--text-base);
  }

  :root {
    --gutter: var(--space-4);
  }

  .site-header .wrap {
    padding-top: var(--space-5);
    padding-bottom: var(--space-4);
  }

  main > section {
    padding: var(--space-7) 0;
  }

  main > section + section .wrap::before {
    top: calc(-1 * var(--space-7));
  }

  .intro {
    padding-top: 56px;
  }

  .intro p {
    font-size: 1.125rem;
  }

  .project {
    --pad: var(--space-4);
  }

  .project h3 {
    font-size: 2rem;
  }

  .project .summary {
    font-size: 1.125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
