/* =============================================================
   Ada Fenwick — portfolio
   Plain CSS, mobile first, light + dark themes.
   ============================================================= */

:root {
  --font-display: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --bg: #faf8f5;
  --bg-alt: #f3efe8;
  --surface: #ffffff;
  --surface-2: #f6f2ec;
  --text: #17140f;
  --text-soft: #4a443b;
  --muted: #7a7266;
  --line: rgba(23, 20, 15, 0.12);
  --line-strong: rgba(23, 20, 15, 0.22);
  --accent: #c2521f;
  --accent-2: #e0913f;
  --accent-ink: #ffffff;
  --accent-soft: rgba(194, 82, 31, 0.1);
  --shadow-sm: 0 1px 2px rgba(28, 20, 10, 0.06);
  --shadow: 0 1px 2px rgba(28, 20, 10, 0.05), 0 14px 34px -18px rgba(28, 20, 10, 0.35);
  --header-bg: rgba(250, 248, 245, 0.82);

  --wrap: 1120px;
  --pad: clamp(20px, 5vw, 40px);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;

  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0f0e0c;
  --bg-alt: #141210;
  --surface: #1a1815;
  --surface-2: #211e1a;
  --text: #f6f1e9;
  --text-soft: #cfc6b8;
  --muted: #9c9285;
  --line: rgba(246, 241, 233, 0.14);
  --line-strong: rgba(246, 241, 233, 0.28);
  --accent: #f0894f;
  --accent-2: #f6c37a;
  --accent-ink: #241206;
  --accent-soft: rgba(240, 137, 79, 0.14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 40px -20px rgba(0, 0, 0, 0.8);
  --header-bg: rgba(15, 14, 12, 0.8);

  color-scheme: dark;
}

* { box-sizing: border-box; }

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

html.no-scroll,
body.no-scroll {
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.35s ease, color 0.35s ease;
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 9.5vw, 4.1rem); }
h2 { font-size: clamp(1.8rem, 6.6vw, 2.9rem); }
h3 { font-size: 1.25rem; line-height: 1.25; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ============================================================ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--bg);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

@supports (backdrop-filter: blur(12px)) {
  .site-header.is-stuck {
    background: var(--header-bg);
    backdrop-filter: saturate(150%) blur(14px);
    -webkit-backdrop-filter: saturate(150%) blur(14px);
  }
}

.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -24px rgba(0, 0, 0, 0.5);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "brand toggle" "nav nav";
  align-items: center;
  gap: 4px 12px;
  padding-top: 12px;
  padding-bottom: 10px;
}

.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1;
  padding-bottom: 2px;
}

.brand-text { font-size: 1rem; }

.site-nav {
  grid-area: nav;
  display: flex;
  gap: 4px;
  margin: 0 -10px -4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }

.site-nav a {
  position: relative;
  padding: 9px 10px;
  font-size: 0.9rem;
  color: var(--text-soft);
  text-decoration: none;
  border-radius: 8px;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--text); background: var(--accent-soft); }

.theme-toggle {
  grid-area: toggle;
  position: relative;
  width: 62px;
  height: 34px;
  margin: 5px 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.theme-toggle-track {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}

.theme-toggle .icon { width: 15px; height: 15px; }

.theme-toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.32s cubic-bezier(0.34, 1.4, 0.64, 1);
}

html[data-theme="dark"] .theme-toggle-knob { transform: translateX(28px); }
html[data-theme="light"] .theme-toggle .icon-sun,
html[data-theme="dark"] .theme-toggle .icon-moon { color: var(--accent); }

/* ============================================================== hero */

.hero {
  position: relative;
  padding: clamp(36px, 9vw, 80px) 0 clamp(34px, 7vw, 64px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -30% 40% 40% -10%;
  background: radial-gradient(circle at 30% 40%, var(--accent-soft), transparent 62%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  gap: 34px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-soft);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2fae6b;
  box-shadow: 0 0 0 0 rgba(47, 174, 107, 0.55);
  animation: pulse 2.6s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 174, 107, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(47, 174, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 174, 107, 0); }
}

.hero h1 { max-width: 18ch; }

.lede {
  margin-top: 20px;
  max-width: 52ch;
  font-size: 1.06rem;
  color: var(--text-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--accent-soft); border-color: var(--accent); }

.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 36px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.stats div { min-width: 0; }
.stats dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}
.stats dd {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-card {
  display: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-card-art svg { width: 100%; height: auto; display: block; }

.hero-card-body { padding: 20px; }
.hero-card-label {
  margin: 0 0 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}
.hero-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* ============================================================ sections */

.section {
  padding: clamp(48px, 10vw, 96px) 0;
  scroll-margin-top: 124px;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}

.section-kicker {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.section-note {
  margin: 0;
  max-width: 44ch;
  color: var(--muted);
  font-size: 0.97rem;
}

/* ========================================================== work grid */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.chip-count {
  font-size: 0.76rem;
  opacity: 0.62;
  font-variant-numeric: tabular-nums;
}

.filter-status {
  margin: 0 0 22px;
  font-size: 0.85rem;
  color: var(--muted);
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  -webkit-tap-highlight-color: transparent;
}
.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-2);
}
.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .card-cover img { transform: scale(1.045); }

.card-year {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  backdrop-filter: blur(6px);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 18px 20px;
}

.card-discipline {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.card-summary { color: var(--text-soft); font-size: 0.95rem; }

.card-tags, .post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 500;
  white-space: nowrap;
}

.empty-state {
  padding: 40px 0;
  color: var(--muted);
  text-align: center;
}

/* ============================================================= writing */

.post-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.post-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: start;
  gap: 14px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background-color 0.2s ease, padding-left 0.2s ease;
}
.post-row:hover { background: var(--accent-soft); }

.post-thumb {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1;
  padding-bottom: 2px;
}

.post-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.post-meta {
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.post-title {
  font-family: var(--font-display);
  font-size: 1.24rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.post-excerpt { color: var(--text-soft); font-size: 0.94rem; }

.post-arrow {
  align-self: center;
  color: var(--muted);
  font-size: 1.1rem;
  transition: transform 0.25s ease, color 0.25s ease;
}
.post-row:hover .post-arrow { transform: translateX(4px); color: var(--accent); }

/* =============================================================== about */

.about-grid { display: grid; gap: 30px; }

.about-portrait {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-width: 420px;
}
.about-portrait svg { width: 100%; height: auto; display: block; }

.about-copy h2 { margin-bottom: 18px; max-width: 22ch; }
.about-copy p { max-width: 58ch; color: var(--text-soft); }

.mini-heading {
  margin: 28px 0 12px;
  font-size: 0.78rem;
  font-family: var(--font-sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--text-soft);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
}
.check-list li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 12px;
  width: 6px;
  height: 3px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.chips li {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.86rem;
  color: var(--text-soft);
}

/* ============================================================= contact */

.contact-grid { display: grid; gap: 32px; }

.contact-intro h2 { margin-bottom: 16px; max-width: 18ch; }

.contact-details {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.contact-details li {
  display: grid;
  gap: 3px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.contact-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.contact-value { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.contact-value a { color: var(--text); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.contact-value a:hover { color: var(--accent); }

.copy-btn {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }

.contact-form {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  position: relative;
}

.field { display: grid; gap: 7px; }

.field label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-soft);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea { resize: vertical; min-height: 132px; }

.field input::placeholder,
.field textarea::placeholder { color: var(--muted); opacity: 0.75; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #d9453a; }

.field-error {
  margin: 0;
  font-size: 0.82rem;
  color: #d9453a;
}
html[data-theme="dark"] .field-error { color: #ff8b80; }

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

.form-hint {
  margin: -4px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.form-status {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.9rem;
  color: var(--accent);
  text-align: center;
}
.form-status a { color: inherit; }

/* ============================================================== footer */

.site-footer {
  padding: 28px 0 38px;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--muted);
}
.site-footer a { color: var(--text-soft); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }
.footer-inner p { margin: 0; }

/* ============================================================= overlay */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 9, 6, 0.55);
  backdrop-filter: blur(3px);
  animation: fade-in 0.25s ease;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.overlay-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 92vh;
  max-height: 92dvh;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, 0.5);
  animation: sheet-up 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  padding-top: env(safe-area-inset-top);
}

@keyframes sheet-up {
  from { transform: translateY(26px); opacity: 0.4; }
  to { transform: translateY(0); opacity: 1; }
}

.overlay-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 26px var(--pad) calc(34px + env(safe-area-inset-bottom));
}

.overlay-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.overlay-close svg { width: 20px; height: 20px; }
.overlay-close:hover { border-color: var(--accent); color: var(--accent); }

.article { max-width: 68ch; margin: 0 auto; }

.article-kicker {
  margin: 0 0 12px;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.article-kicker[style] { color: var(--tone); }
html[data-theme="dark"] .article-kicker[style] { color: var(--accent); }

.article h1 { font-size: clamp(2rem, 8vw, 3.1rem); padding-right: 40px; }

.article-lede {
  margin-top: 16px;
  font-size: 1.06rem;
  color: var(--text-soft);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--muted);
}

.article-cover {
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--tone, var(--surface-2));
}
.article-cover img { width: 100%; height: auto; }

.article-facts {
  display: grid;
  gap: 14px;
  margin: 0 0 26px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.article-facts dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
}
.article-facts dd { margin: 2px 0 0; font-size: 0.94rem; }

.article-body { font-size: 1.02rem; color: var(--text-soft); }
.article-body h3 {
  margin: 30px 0 10px;
  color: var(--text);
  font-size: 1.3rem;
}
.article-body p { margin: 0 0 1.05em; }

.article-body-post p:first-of-type { font-size: 1.1rem; color: var(--text); }

.article-body .pull-quote {
  margin: 26px 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-size: 1.28rem;
  line-height: 1.35;
  color: var(--text);
  letter-spacing: -0.01em;
}

.body-list {
  margin: 0 0 1.15em;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}
.body-list li { padding-left: 4px; }

.article-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* =========================================================== animation */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { 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;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ========================================================= breakpoints */

@media (min-width: 600px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav toggle";
    gap: 18px;
    padding-top: 14px;
    padding-bottom: 12px;
  }
  .site-nav { justify-content: center; margin: 0; }
  .site-nav a { padding: 9px 12px; }
  .brand-mark { width: 38px; height: 38px; font-size: 21px; }
  .brand-text { font-size: 1.05rem; }
  .theme-toggle { margin: 0; }

  .section { scroll-margin-top: 92px; }

  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .article-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact-form { padding: 30px; }
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
    align-items: center;
    gap: 56px;
  }
  .hero-card { display: block; }

  .about-grid { grid-template-columns: 0.8fr 1.2fr; gap: 52px; align-items: start; }
  .contact-grid { grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: start; }

  .section-head { grid-template-columns: 1fr auto; align-items: end; gap: 30px; }

  .overlay { align-items: center; }
  .overlay-panel {
    max-width: 760px;
    max-height: 86vh;
    border-radius: var(--radius-lg);
    animation: sheet-up 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .overlay-scroll { padding: 40px 48px 48px; }
  .overlay-close { top: 18px; right: 18px; }
  .article h1 { font-size: clamp(2.2rem, 3.4vw, 3rem); }
}

@media (min-width: 1040px) {
  .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .brand-text { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats div:last-child { grid-column: span 2; }
  .post-row { grid-template-columns: 1fr; padding: 18px 4px; }
  .post-thumb { display: none; }
  .post-arrow { display: none; }
}

/* Anything with the hidden attribute stays hidden, whatever its display rule. */
[hidden] { display: none !important; }
