/* naithanweigh.com: dark, low-glare one-pager. Tokens first, then layout. */
:root {
  color-scheme: dark;

  --bg: #121417;
  --surface: #181b1f;
  --surface-2: #1e2227;
  --line: #2a2f36;
  --text: #e3dfd7;
  --muted: #a39f97;
  --faint: #85827b;
  --accent: #7fc4be;          /* sea glass: links, focus, primary actions */
  --accent-soft: rgba(127, 196, 190, 0.12);
  --status: #d8a862;          /* amber: "early / in progress" only */
  --status-soft: rgba(216, 168, 98, 0.12);
  --accent-hover: #95d2cc;
  --on-accent: #0e1f1e;
  --link-line: rgba(127, 196, 190, 0.35);
  --line-strong: #3a4048;
  --header-bg: rgba(18, 20, 23, 0.82);
  --glow: rgba(127, 196, 190, 0.09);
  --photo-filter: saturate(0.85) brightness(0.92);
  --cover-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 24px 48px -18px rgba(0, 0, 0, 0.7);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --text-sm: 0.875rem;
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
  --text-h2: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
  --text-hero: clamp(2.75rem, 1.6rem + 5vw, 5.25rem);

  --space-section: clamp(4rem, 3rem + 4vw, 7.5rem);
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --radius-sm: 6px;
  --radius-lg: 18px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 220ms;
}

/* Light theme: warm paper, darker accent so links keep 4.5:1 contrast */
:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f6f3ee;
  --surface: #fffdf9;
  --surface-2: #f0ece5;
  --line: #e2ddd4;
  --line-strong: #c9c3b8;
  --text: #1d1f22;
  --muted: #55524c;
  --faint: #6b675f;
  --accent: #276d67;
  --accent-hover: #1f5a55;
  --accent-soft: rgba(39, 109, 103, 0.1);
  --on-accent: #ffffff;
  --link-line: rgba(39, 109, 103, 0.35);
  --status: #8f5c12;
  --status-soft: rgba(143, 92, 18, 0.1);
  --header-bg: rgba(246, 243, 238, 0.85);
  --glow: rgba(39, 109, 103, 0.08);
  --photo-filter: none;
  --cover-shadow: 0 18px 36px -16px rgba(40, 30, 10, 0.35);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--text-base)/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--link-line);
  text-underline-offset: 0.2em;
  transition: text-decoration-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
a:hover { text-decoration-color: var(--accent); }

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

.wrap {
  width: min(1080px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  z-index: 20;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.75rem;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.site-nav ul {
  display: flex;
  gap: clamp(0.75rem, 0.4rem + 1.4vw, 1.75rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--muted);
  font-size: var(--text-sm);
  text-decoration: none;
}
.site-nav a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 2rem + 7vw, 8rem) var(--space-section);
  overflow: hidden;
}
.hero::before {               /* low glow, no hard gradient blob */
  content: "";
  position: absolute;
  inset: -30% 40% auto -20%;
  height: 520px;
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: end;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.25rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
}
.hero h1 em { font-style: italic; color: var(--muted); font-weight: 400; }
.lede {
  font-size: var(--text-lg);
  color: var(--muted);
  max-width: 36rem;
  margin: 0 0 2rem;
}
.lede strong { color: var(--text); font-weight: 500; }

.portrait {
  margin: 0;
  position: relative;
  justify-self: end;
  width: min(100%, 320px);
}
.portrait::after {            /* offset frame for depth */
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  z-index: -1;
}
.portrait img {
  border-radius: var(--radius-lg);
  filter: var(--photo-filter);
  aspect-ratio: 1;
  object-fit: cover;
}

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: 500 var(--text-sm)/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { border-color: var(--accent); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* ---------- Sections ---------- */
.section { padding-block: var(--space-section); border-top: 1px solid var(--line); }
.section-head {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  gap: 1.5rem;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}
.section-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--faint);
  padding-top: 0.9rem;
}
.section h2,
.section-head h1 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}
.section-body { margin-left: calc(10rem + 1.5rem); max-width: 44rem; }
.section-body > p:first-child { margin-top: 0; }
.section-wide { margin-left: calc(10rem + 1.5rem); }

/* Skills */
.skills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.25rem 3rem;
  margin: 0;
}
.skills dt {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}
.skills dd { margin: 0; }
.skills ul { list-style: none; margin: 0; padding: 0; color: var(--muted); }
.skills li { padding: 0.3rem 0; border-bottom: 1px dashed var(--line); }
.skills li:last-child { border-bottom: 0; }

/* Project */
.project {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  transition: border-color var(--dur) var(--ease);
}
.project:hover { border-color: var(--line-strong); }
.project-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.project h3 {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 500;
  margin: 0;
}
.chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.chip-status { background: var(--status-soft); color: var(--status); }
.project p { color: var(--muted); max-width: 46rem; }
.project p strong { color: var(--text); font-weight: 500; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 1.25rem 0 1.5rem; }
.tags li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-sm);
}

/* Experience */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative;
  padding: 0 0 2.25rem 1.75rem;
  border-left: 1px solid var(--line);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.55rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.timeline h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; margin: 0 0 0.25rem; }
.timeline .meta { font-family: var(--font-mono); font-size: 0.8rem; color: var(--faint); margin: 0 0 0.6rem; }
.timeline p:not(.meta) { color: var(--muted); margin: 0; }

/* Certificates */
.certs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.cert {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.cert:hover { border-color: var(--accent); transform: translateY(-2px); }
.cert .issuer { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin: 0 0 0.75rem; }
.cert h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; line-height: 1.3; margin: 0 0 0.75rem; }
.cert p { color: var(--muted); font-size: 0.95rem; margin: 0 0 1.5rem; }
.cert a { margin-top: auto; font-weight: 500; }

/* Book */
.book {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  align-items: start;
}
.book-cover img {
  border-radius: 4px;
  box-shadow: var(--cover-shadow);
  transform: rotate(-1.5deg);
  transition: transform 400ms var(--ease);
}
.book-cover:hover img { transform: rotate(0deg); }
.book h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; line-height: 1.25; margin: 0 0 1rem; }
.book p { color: var(--muted); }

/* Newsletter form */
.signup { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px dashed var(--line); }
.signup h4 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 500; margin: 0 0 0.25rem; }
.signup p { margin: 0 0 1rem; font-size: 0.95rem; }
.signup-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.signup input[type="email"],
.signup input[type="text"] {
  flex: 1 1 12rem;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font: inherit;
  font-size: var(--text-sm);
  padding: 0.7rem 1.1rem;
}
.signup input::placeholder { color: var(--faint); }
.signup input:focus { border-color: var(--accent); outline: none; }
.hp { position: absolute; left: -5000px; }
.fine { font-size: 0.8rem; color: var(--faint); margin-top: 0.75rem; }

/* Contact */
.contact-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 2rem 3rem; color: var(--faint); font-size: var(--text-sm); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer a { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .section-head { grid-template-columns: 1fr; gap: 0.5rem; }
  .section-num { padding-top: 0; }
  .section-body, .section-wide { margin-left: 0; }
}
@media (max-width: 720px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .portrait { justify-self: start; width: min(60%, 220px); order: -1; }
  .skills, .certs { grid-template-columns: 1fr; }
  .book { grid-template-columns: 1fr; }
  .book-cover { width: min(60%, 200px); }
  .site-nav .nav-optional { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .book-cover img { transform: none; }
}

/* External-link arrow, drawn in CSS so it never falls back to an emoji font */
.ext {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-left: 0.3em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M3.5 8.5l5-5M4.5 3.5h4v4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M3.5 8.5l5-5M4.5 3.5h4v4'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Project highlights, sub-heads, small notes */
.sub-head {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 3.5rem 0 1.25rem;
}
.minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 1rem; }
.mini {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.35rem;
}
.mini h4 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; margin: 0 0 0.5rem; }
.mini p { color: var(--muted); font-size: 0.93rem; margin: 0; }
.timeline h3 a { color: inherit; }
.edu-note, .meta-line { color: var(--faint); font-size: var(--text-sm); margin-top: 1.25rem; }

/* Long-form pages (privacy policy) */
.section-first { border-top: 0; padding-top: clamp(3rem, 2rem + 4vw, 6rem); }
.prose h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; margin: 2.5rem 0 0.75rem; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); font-weight: 500; }
.prose ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.prose li { margin-bottom: 0.6rem; }
.prose li::marker { color: var(--faint); }

/* Theme toggle */
.header-end { display: flex; align-items: center; gap: clamp(0.75rem, 0.4rem + 1.4vw, 1.75rem); }
.theme-toggle {
  display: none;               /* shown only when JavaScript runs (html.js) */
  place-items: center;
  flex: none;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent); }
.theme-toggle .icon {
  width: 1rem;
  height: 1rem;
  background: currentColor;
  /* moon in dark mode */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M20.5 14.6A8.5 8.5 0 0 1 9.4 3.5a8.5 8.5 0 1 0 11.1 11.1z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M20.5 14.6A8.5 8.5 0 0 1 9.4 3.5a8.5 8.5 0 1 0 11.1 11.1z'/%3E%3C/svg%3E") center / contain no-repeat;
}
:root[data-theme="light"] .theme-toggle .icon {
  /* sun in light mode */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4' fill='black'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4' fill='black'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E");
}
@media (max-width: 440px) {
  .site-nav ul { gap: 0.65rem; }
  .site-nav a { font-size: 0.82rem; }
  .header-end { gap: 0.65rem; }
  .site-nav li:first-child { display: none; }  /* "About" is the first thing below the hero anyway */
}
.wordmark { white-space: nowrap; }

/* ---------- Writing ---------- */
.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-link {
  display: grid;
  gap: 0.35rem;
  padding: 1.75rem 0;
  color: inherit;
  text-decoration: none;
}
.post-link time { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.06em; color: var(--faint); }
.post-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--text);
  transition: color var(--dur) var(--ease);
}
.post-link:hover .post-title { color: var(--accent); }
.post-excerpt { color: var(--muted); max-width: 44rem; }

.article { max-width: 44rem; padding-block: clamp(3rem, 2rem + 4vw, 6rem) var(--space-section); }
.article-head { margin-bottom: 3rem; }
.article-head .eyebrow a { color: inherit; text-decoration: none; }
.article-head h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
}
.article-meta { font-family: var(--font-mono); font-size: 0.8rem; color: var(--faint); margin: 0 0 2rem; }
.article-thesis {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--text);
  border-left: 2px solid var(--accent);
  padding-left: 1.25rem;
  margin: 0;
}
.article-body { font-size: var(--text-lg); line-height: 1.75; }
.article-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.85rem);
  font-weight: 500;
  line-height: 1.2;
  margin: 3.5rem 0 1rem;
}
.article-body p, .article-body li { color: var(--text); opacity: 0.92; }
.article-body ul { padding-left: 1.2rem; }
.article-body li { margin-bottom: 1rem; }
.prose code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.08em 0.35em;
  overflow-wrap: anywhere;
}
.table-wrap { overflow-x: auto; margin: 2rem 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.92rem; line-height: 1.5; }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.table-wrap th { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); background: var(--surface); }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td:last-child { color: var(--accent); font-family: var(--font-mono); font-size: 0.8rem; white-space: nowrap; }
.author-box {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.author-box img { width: 64px; height: 64px; border-radius: 50%; filter: var(--photo-filter); flex: none; }
.author-box p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.author-box strong { color: var(--text); font-weight: 500; }
.post-feature { border-block: 1px solid var(--line); padding-block: 1.5rem; }

.js .theme-toggle { display: inline-grid; }

/* ---------- Featured essay on the homepage ---------- */
.hero-note { margin: 1.75rem 0 0; font-size: var(--text-sm); color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.feature {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease);
}
.feature::before {            /* soft accent wash in the corner, same family as the hero glow */
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 60%;
  height: 120%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
}
.feature:hover { border-color: var(--line-strong); }
.feature-text { position: relative; }
.feature-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 0 0 1rem; font-family: var(--font-mono); font-size: 0.78rem; color: var(--faint); }
.feature h3 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
}
.feature h3 a { color: var(--text); text-decoration: none; transition: color var(--dur) var(--ease); }
.feature h3 a:hover { color: var(--accent); }
.feature blockquote {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  border-left: 2px solid var(--accent);
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--text);
}
.feature-text > p:not(.feature-meta) { color: var(--muted); margin: 0 0 1.75rem; max-width: 40rem; }
.feature-steps {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  align-self: center;
  border-left: 1px solid var(--line);
}
.feature-steps li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.8rem;
  padding: 0.85rem 0 0.85rem 1.25rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--muted);
  border-bottom: 1px dashed var(--line);
}
.feature-steps li:last-child { border-bottom: 0; }
.feature-steps span { font-family: var(--font-mono); font-size: 0.75rem; color: var(--faint); }
.feature-steps .is-new { color: var(--accent); position: relative; }
.feature-steps .is-new::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 2px;
  background: var(--accent);
}
.feature-steps .is-new span { color: var(--accent); }
.feature-steps em { flex-basis: 100%; padding-left: 1.6rem; font-family: var(--font-body); font-style: normal; font-size: 0.8rem; color: var(--faint); }
@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .feature-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-left: 0; border-top: 1px solid var(--line); padding-top: 0.5rem; }
  .feature-steps li { padding-left: 0; border-bottom: 0; }
  .feature-steps .is-new::before { display: none; }
  .feature-steps em { padding-left: 0; }
}

/* Article endnotes */
.article-notes { margin-top: 3.5rem; padding-top: 1.75rem; border-top: 1px dashed var(--line); }
.article-notes h2 { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); margin: 0 0 1rem; }
.article-notes ol { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: 0.95rem; line-height: 1.65; }
.article-notes li { margin-bottom: 0.75rem; }
.article-notes li::marker { font-family: var(--font-mono); color: var(--faint); }
