/* ============================================================
   Guillermo Jimenez — personal hub
   "Research journal" — crisp white + green in light, warm
   cream-on-green-black in dark. Unified by one green accent,
   mono margin-metadata + dashed rules, Fraunces serif display,
   Geist sans body, Geist Mono chrome.
   Light ≈ Nous (paper journal). Dark ≈ Hermes (warm terminal).
   ============================================================ */

/* ---- tokens : light (default) ---- */
:root {
  color-scheme: light;

  --bg: #fbfbf7;          /* clean near-white, a hair warm */
  --bg-tint: #f4f3ea;     /* faint wash */
  --surface: #ffffff;     /* raised card */
  --surface-2: #f5f4ec;
  --line: #e3e1d3;        /* hairline */
  --line-2: #cfccba;      /* dashed rules / hover */

  --ink: #1a1c14;         /* near-black, faint green-warm */
  --ink-2: #585a4b;       /* muted body */
  --ink-3: #8a8975;       /* faint metadata (>=3:1) */

  --accent: #1d7a44;      /* forest green */
  --accent-2: #15663700;  /* (unused placeholder) */
  --accent-strong: #155a33;
  --accent-soft: rgba(29, 122, 68, 0.08);
  --accent-line: rgba(29, 122, 68, 0.30);
  --on-accent: #fbfbf7;

  --shadow: rgba(26, 28, 20, 0.05);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --r: 10px;
  --r-sm: 7px;
  --maxw: 980px;
  --ease: cubic-bezier(0.22, 0.61, 0.21, 1);
}

/* ---- tokens : dark (warm green-black terminal) ---- */
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #11140e;          /* deep warm green-black */
  --bg-tint: #161a12;
  --surface: #181c13;
  --surface-2: #1f241a;
  --line: #2c3326;
  --line-2: #3c4533;

  --ink: #ece3cd;         /* warm cream */
  --ink-2: #a8a48d;       /* muted warm */
  --ink-3: #807c66;       /* faint */

  --accent: #79cf8e;      /* fresh green on dark */
  --accent-strong: #95dca6;
  --accent-soft: rgba(121, 207, 142, 0.12);
  --accent-line: rgba(121, 207, 142, 0.30);
  --on-accent: #0e150c;

  --shadow: rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* dark gets a faint warm bloom for depth; light stays clean paper */
:root[data-theme="dark"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(60rem 36rem at 50% -12%, rgba(121, 207, 142, 0.05), transparent 70%);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

::selection {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

p,
h1,
h2,
h3 {
  margin-top: 0;
  overflow-wrap: break-word;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.is-hidden {
  display: none !important;
}

/* ---- shell ---- */
.shell {
  display: grid;
  gap: clamp(30px, 5vw, 52px);
  margin: 0 auto;
  max-width: var(--maxw);
  min-height: 100vh;
  padding: 0 clamp(20px, 5vw, 48px) 64px;
}

/* ---- masthead / topbar ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  margin: 0 calc(-1 * clamp(20px, 5vw, 48px));
  padding: 13px clamp(20px, 5vw, 48px);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.14rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand::after {
  content: "*";
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.9em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  justify-content: flex-end;
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  border-radius: var(--r-sm);
  transition: color 0.18s var(--ease);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
  outline: none;
}

.nav a[aria-current="page"] {
  color: var(--accent);
}

.nav a[aria-current="page"]::before {
  content: "/";
  margin-right: 1px;
  opacity: 0.7;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: 6px;
  padding: 0;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--ink);
  border-color: var(--line-2);
  background: var(--surface);
  outline: none;
}

.theme-icon {
  position: relative;
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.6px currentColor;
}

.theme-icon::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 1.6px var(--bg);
}

:root[data-theme="dark"] .theme-icon {
  box-shadow: none;
  background: var(--accent);
}

:root[data-theme="dark"] .theme-icon::after {
  content: none;
}

/* ---- main ---- */
.main-stack {
  display: grid;
  gap: clamp(36px, 5vw, 56px);
  min-width: 0;
}

/* ---- mono labels + the dashed "journal rule" ---- */
.eyebrow,
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow::before,
.section-label::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  background: var(--accent);
}

/* dashed rule fills the rest of the header row — the journal signature */
.section-label::after {
  content: "";
  flex: 1;
  border-top: 1px dashed var(--line-2);
}

.meta {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

h1 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 460;
  letter-spacing: -0.018em;
}

.intro {
  max-width: 58ch;
  color: var(--ink-2);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* ---- panels / cards ---- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(20px, 3.2vw, 30px);
}

/* ---- hero (home) ---- */
.hero {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: clamp(10px, 3vw, 26px) 0 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(220px, 0.85fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
  min-width: 0;
}

.hero-copy {
  min-width: 0;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.3rem, 5.6vw, 3.9rem);
  line-height: 1.05;
}

.hero-copy .intro {
  margin: 0;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 26px 0 0;
  padding: 22px 0 0;
  border-top: 1px dashed var(--line-2);
  list-style: none;
}

.hero-stats li {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-stats b {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---- identity / contact card ---- */
.profile-card {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.avatar-wrap {
  display: grid;
  justify-items: center;
  gap: 14px;
  color: var(--ink);
  font-size: 1.04rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-align: center;
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  overflow: hidden;
}

.avatar::before {
  content: "GJ";
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 500;
  color: var(--accent);
}

.avatar-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-wrap:hover,
.avatar-wrap:focus-visible {
  color: var(--accent);
  outline: none;
}

.social-links {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.social-link {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px 2px;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  border-bottom: 1px solid var(--line);
  transition: color 0.18s var(--ease), padding-left 0.18s var(--ease);
}

.social-link::after {
  content: "↗";
  color: var(--ink-3);
  font-size: 0.8rem;
}

.social-link:hover,
.social-link:focus-visible {
  color: var(--accent);
  padding-left: 6px;
  outline: none;
}

.social-link:hover::after,
.social-link:focus-visible::after {
  color: var(--accent);
}

.email-link {
  text-transform: lowercase;
}

.pixel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--ink-3);
}

.social-link:hover .pixel-icon,
.social-link:focus-visible .pixel-icon {
  color: var(--accent);
}

.social-mark {
  display: block;
  width: 14px;
  height: 14px;
}

.github-mark {
  width: 13px;
  height: 13px;
}

.social-mark path {
  fill: currentColor;
}

/* ---- sections ---- */
.section {
  display: grid;
  gap: 0;
}

/* ---- indexed list rows (projects, notes) ---- */
.rows {
  display: grid;
  gap: 0;
}

.project-row,
.note-row {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 22px;
  padding: 22px 4px;
  border-bottom: 1px dashed var(--line-2);
  transition: padding-left 0.2s var(--ease);
}

.rows .project-row:first-child,
.rows .note-row:first-child {
  border-top: 1px dashed var(--line-2);
}

a.project-row:hover,
a.project-row:focus-visible,
.note-row:hover,
.note-row:focus-visible {
  outline: none;
}

a.project-row:hover,
.note-row:hover {
  padding-left: 12px;
}

.project-row > span,
.note-row > span {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

a.project-row:hover > span,
.note-row:hover > span {
  color: var(--accent);
}

.project-row h3,
.note-row h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 480;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.project-row h3 a {
  transition: color 0.18s var(--ease);
}

a.project-row:hover h3,
.project-row h3 a:hover,
.project-row h3 a:focus-visible,
.note-row:hover h3 {
  color: var(--accent);
  outline: none;
}

.project-row p,
.note-row p {
  margin: 7px 0 0;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.5;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.project-links a,
.project-links span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.project-links a:hover,
.project-links a:focus-visible {
  color: var(--accent);
  border-color: var(--accent-line);
  outline: none;
}

.project-links span {
  color: var(--ink-2);
  border-style: dashed;
}

.project-links span.live {
  color: var(--accent);
  border-style: solid;
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

/* ---- chips / pills ---- */
.chips,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.chip::before,
.pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.chip.live,
.pill.live {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.chip.build,
.pill.build,
.chip.note,
.pill.note {
  color: var(--ink-2);
}

/* ---- buttons ---- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 19px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), color 0.18s var(--ease);
}

.button:hover,
.button:focus-visible {
  border-color: var(--ink-3);
  background: var(--bg-tint);
  outline: none;
}

.button.primary {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--on-accent);
}

/* ---- page title block ---- */
.page-title {
  padding: clamp(24px, 4vw, 44px) clamp(22px, 3.2vw, 36px);
}

.page-title h1 {
  margin: 0 0 18px;
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  line-height: 1.06;
}

.page-title .intro {
  margin-bottom: 0;
}

/* ---- readme head (panel header strip) ---- */
.readme-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: calc(-1 * clamp(20px, 3.2vw, 30px)) calc(-1 * clamp(20px, 3.2vw, 30px)) 22px;
  padding: 14px clamp(20px, 3.2vw, 30px);
  border-bottom: 1px dashed var(--line-2);
}

.readme-head strong {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.readme-head span {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

/* ---- pull quote ---- */
.quote {
  margin: 0;
  padding: 2px 0 2px 22px;
  border-left: 2px solid var(--accent);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.36rem;
  font-weight: 430;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

/* ---- fact / grid ---- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.about-grid > .fact:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.fact {
  padding: 17px 19px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color 0.18s var(--ease);
}

.fact:hover {
  border-color: var(--line-2);
}

.fact strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.fact span {
  display: block;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.5;
}

/* ---- link tiles ---- */
.link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.link-tile {
  position: relative;
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 88px;
  padding: 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.link-tile::after {
  content: "↗";
  position: absolute;
  top: 14px;
  right: 15px;
  color: var(--ink-3);
  font-size: 0.82rem;
}

.link-tile:hover,
.link-tile:focus-visible {
  border-color: var(--accent-line);
  background: var(--bg-tint);
  outline: none;
}

.link-tile:hover::after {
  color: var(--accent);
}

.link-tile span {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.link-tile:hover span {
  color: var(--accent);
}

.link-tile strong {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/* ---- project detail ---- */
.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 410px);
  gap: clamp(26px, 4.5vw, 48px);
  align-items: start;
  padding: clamp(24px, 4vw, 40px);
}

.project-hero h1 {
  margin: 14px 0 18px;
  font-size: clamp(2.3rem, 5.5vw, 3.5rem);
  line-height: 1.04;
}

.project-summary {
  margin: 0 0 22px;
  max-width: 52ch;
  color: var(--ink-2);
  font-size: 1.04rem;
  line-height: 1.6;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 26px;
}

/* ---- project detail (editorial, visual-first) ---- */
.project-head {
  max-width: 64ch;
}

.back {
  margin: 0 0 22px;
}

.back a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  transition: color 0.18s var(--ease);
}

.back a:hover,
.back a:focus-visible {
  color: var(--accent);
  outline: none;
}

/* right-aligned "see all" link under a teaser list */
.section-more {
  margin: 20px 0 0;
  text-align: right;
}

.section-more a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.18s var(--ease);
}

.section-more a:hover,
.section-more a:focus-visible {
  color: var(--accent);
  outline: none;
}

.project-head h1 {
  margin: 0 0 18px;
  font-size: clamp(2.7rem, 6.4vw, 4.4rem);
  line-height: 1.01;
}

.project-head .project-summary {
  margin: 0 0 22px;
  max-width: 56ch;
  font-size: 1.14rem;
}

.project-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 26px;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.project-tags .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.project-tags.muted .dot {
  background: var(--ink-3);
}

.project-head .project-actions {
  margin-top: 0;
}

/* app-window frame around a screenshot — the visual anchor */
.app-frame {
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 1px 2px rgba(20, 16, 10, 0.04), 0 30px 60px -34px rgba(20, 16, 10, 0.22);
}

.app-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 15px;
  background: var(--bg-tint);
  border-bottom: 1px solid var(--line);
}

.app-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-2);
}

.app-bar i:last-of-type {
  background: var(--accent);
  opacity: 0.75;
}

.app-url {
  margin-left: 11px;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

.app-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.project-notes {
  max-width: 66ch;
}

.project-notes .quote {
  margin-top: 22px;
}

.project-shot {
  margin: 0;
  display: grid;
  gap: 10px;
  padding: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.project-shot img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

.project-shot.portrait img {
  max-height: 420px;
  object-fit: contain;
}

.project-shot span,
.system-preview span {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.detail-list {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.62;
}

.detail-list li::marker {
  color: var(--accent);
}

.detail-list li + li {
  margin-top: 11px;
}

/* ---- system preview block ---- */
.system-preview {
  display: grid;
  gap: 11px;
  padding: 16px;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.system-line {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

.system-line strong {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.system-line p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.93rem;
  line-height: 1.45;
}

/* ---- markdown view (agents) ---- */
.markdown-file {
  padding-bottom: 26px;
}

.markdown-source {
  margin: 0;
  overflow-x: auto;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.markdown-source code {
  font: inherit;
}

/* ---- footer ---- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
  padding-top: 24px;
  border-top: 1px dashed var(--line-2);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: flex-end;
}

.site-footer nav:only-child {
  margin-left: auto;
}

.site-footer a {
  transition: color 0.18s var(--ease);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent);
  outline: none;
}

/* ---- subscribe / newsletter ---- */
.subscribe-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(20px, 4vw, 44px);
  padding: clamp(22px, 3.2vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.subscribe-copy h2 {
  margin: 0 0 7px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.6vw, 1.95rem);
  font-weight: 460;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.subscribe-copy p {
  margin: 0;
  max-width: 46ch;
  color: var(--ink-2);
  font-size: 0.98rem;
  line-height: 1.5;
}

.subscribe-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}

.subscribe-form input {
  flex: 1 1 200px;
  min-width: 0;
  min-height: 46px;
  padding: 0 16px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}

.subscribe-form input::placeholder {
  color: var(--ink-3);
}

.subscribe-form input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.subscribe-form .button {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* ---- bio + photo strip (about) ---- */
.bio {
  max-width: 66ch;
}

.bio p {
  margin: 0;
  color: var(--ink-2);
  font-size: 1.05rem;
  line-height: 1.7;
}

.bio p + p {
  margin-top: 14px;
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.photo-strip img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

@media (max-width: 560px) {
  .photo-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---- responsive ---- */
@media (max-width: 820px) {
  .hero-grid,
  .project-hero,
  .project-detail-grid,
  .subscribe-card {
    grid-template-columns: 1fr;
  }

  .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15.5px;
  }

  .shell {
    gap: 30px;
    padding: 0 17px 52px;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 -17px;
    padding: 11px 17px;
  }

  .nav {
    flex-basis: 100%;
    justify-content: space-between;
    gap: 2px;
  }

  .nav a {
    padding: 8px 6px;
    font-size: 0.74rem;
  }

  .about-grid,
  .split,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .link-tile {
    min-height: 0;
  }

  .project-row,
  .note-row {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 2px;
  }

  .project-links,
  .note-row .chips {
    grid-column: 2;
    gap: 8px;
    justify-content: flex-start;
    margin-top: 9px;
  }

  .system-line {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

/* ---- entrance motion ---- */
@media (prefers-reduced-motion: no-preference) {
  .main-stack > * {
    animation: rise 0.6s var(--ease) both;
  }

  .main-stack > *:nth-child(2) {
    animation-delay: 0.07s;
  }

  .main-stack > *:nth-child(3) {
    animation-delay: 0.14s;
  }

  .main-stack > *:nth-child(n + 4) {
    animation-delay: 0.2s;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
