/* ---------------------------------------------------------------------------
   Ridge Chang. Personal site.
   Direction: Mono Technical (warm cream palette)
   --------------------------------------------------------------------------- */

:root {
  --bg: #faf8f4;
  --ink: #1a1a1a;
  --taupe: #6b6357;
  --soft: #a8a098;
  --cream: #d4cec4;
  --rule: rgba(26, 26, 26, 0.12);
  --rule-strong: rgba(26, 26, 26, 0.24);
  --hairline: rgba(26, 26, 26, 0.06);
  --accent: #5c6b58;          /* muted moss */
  --accent-bg: rgba(92, 107, 88, 0.12);
  --accent-bg-strong: rgba(92, 107, 88, 0.2);

  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.page-home { overflow: hidden; height: 100vh; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
button { font: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* Selection & focus --------------------------------------------------- */
::selection { background: var(--accent-bg-strong); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* Typography helpers -------------------------------------------------- */
.mono { font-family: var(--mono); }
.eyebrow {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--taupe);
}
.eyebrow .dollar { color: var(--accent); margin-right: 6px; }
.section-h {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(40px, 4.8vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
}
.kbd {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--accent-bg);
  color: var(--ink);
  padding: 1px 6px;
  border-radius: 2px;
}

/* Top navigation ------------------------------------------------------ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 3.5vw, 44px);
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 16px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(4px);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.nav-brand .dot {
  width: 11px;
  height: 11px;
  background: var(--accent);
  border-radius: 1px;
  flex: 0 0 auto;
}
.nav-brand .slash { color: var(--soft); }
.nav-brand .here { color: var(--taupe); }

.nav-links {
  display: flex;
  gap: clamp(18px, 2.5vw, 32px);
  color: var(--taupe);
  font-size: 15px;
}
.nav-links a {
  text-decoration: none;
  color: var(--taupe);
  position: relative;
  padding: 4px 0;
  transition: color 0.12s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.is-active { color: var(--ink); }
.nav-links a.is-active::before {
  content: "▸";
  position: absolute;
  left: -12px;
  top: 4px;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--taupe);
  font-size: 15px;
}
.nav-status .pulse {
  width: 9px; height: 9px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(92,107,88,0.5);
  animation: nav-pulse 2.4s infinite;
}
@keyframes nav-pulse {
  0% { box-shadow: 0 0 0 0 rgba(92,107,88,0.45); }
  70% { box-shadow: 0 0 0 8px rgba(92,107,88,0); }
  100% { box-shadow: 0 0 0 0 rgba(92,107,88,0); }
}

/* Mobile nav toggle */
.nav-toggle { display: none; background: transparent; border: 0; color: var(--ink); }

/* Layout ------------------------------------------------------------- */
.page { flex: 1; }
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section + .section { border-top: 1px solid var(--hairline); }

/* Footer ------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--rule);
  padding: 40px clamp(24px, 4vw, 48px);
  font-family: var(--mono);
  font-size: 14px;
  color: var(--taupe);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer a { color: var(--taupe); text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer .footer-left { display: flex; align-items: center; gap: 8px; }
.footer .footer-right { display: flex; gap: 20px; flex-wrap: wrap; }
.footer .dot { color: var(--accent); }

/* Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  font-family: var(--mono);
  font-size: 14px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease, transform 0.12s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost {
  border-color: var(--rule);
  color: var(--taupe);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink); background: transparent; }

/* Real image inside a .frame: hide the placeholder grid + labels */
.frame:has(img) {
  background: none;
}
.frame:has(img)::before,
.frame:has(img)::after {
  display: none;
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Show the whole image (letterboxed) instead of cropping */
.frame.contain img {
  object-fit: contain;
  background: #1a1a1a;
}

/* Portrait / image placeholder -------------------------------------- */
.frame {
  position: relative;
  overflow: hidden;
  background: var(--cream);
  background-image:
    repeating-linear-gradient(0deg, rgba(26,26,26,0.06) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, rgba(26,26,26,0.06) 0 1px, transparent 1px 8px);
}
.frame::before,
.frame::after {
  position: absolute;
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(26,26,26,0.55);
  letter-spacing: 0.05em;
}
.frame::before {
  content: attr(data-name);
  top: 12px;
  left: 12px;
}
.frame::after {
  content: "[drop image here]";
  bottom: 12px;
  left: 12px;
}
.frame[data-fmt]::before {
  content: attr(data-name);
}
.frame .fmt {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(26,26,26,0.55);
}

/* Terminal block ---------------------------------------------------- */
.terminal {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--taupe);
  background: rgba(26,26,26,0.03);
  border-left: 2px solid var(--accent);
  padding: 16px 18px;
  line-height: 1.8;
}
.terminal .dollar { color: var(--accent); }
.terminal .reply { color: var(--ink); }
.terminal .comment { color: var(--soft); }

/* Stats grid (used on home + a few places) -------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.stat-grid .stat-k {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--soft);
  margin-bottom: 4px;
  letter-spacing: 0.06em;
}
.stat-grid .stat-v {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--ink);
}

/* Chip / status badge ----------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  padding: 3px 7px;
  background: var(--accent-bg);
  color: var(--accent);
}
.chip::before {
  content: "●";
  font-size: 8px;
}
.chip.wip {
  background: rgba(107,99,87,0.12);
  color: var(--taupe);
}
.chip.muted {
  background: var(--hairline);
  color: var(--taupe);
}

/* Reveal-on-scroll -------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-in { opacity: 1; transform: none; }

/* Cursor for typewriter --------------------------------------------- */
.cursor {
  display: inline-block;
  width: 0.55em;
  height: 0.9em;
  background: var(--ink);
  margin-left: 4px;
  vertical-align: -0.08em;
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }
/* Hide a queued cursor until its typewriter starts. */
.said[data-pending] .cursor { visibility: hidden; }

/* Tag / inline pill (for hl in copy) -------------------------------- */
.tag-pill {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--accent-bg);
  color: var(--ink);
  padding: 1px 6px;
}

/* ---------------------------------------------------------------------
   HOME
   --------------------------------------------------------------------- */
.home-hero {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  min-height: calc(100vh - 78px); /* nav height */
}
.home-portrait {
  position: relative;
  min-height: 420px;
  border-radius: 14px;
  overflow: hidden;
  margin: clamp(20px, 3.5vw, 44px) 0 clamp(20px, 3.5vw, 44px) clamp(20px, 3.5vw, 44px);
}
.home-intro {
  padding: clamp(28px, 4.5vw, 56px) clamp(28px, 4vw, 52px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
}
.home-intro .preamble {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--taupe);
  line-height: 1.8;
}
.home-intro h1 {
  font-family: var(--sans);
  font-weight: 500;
  margin: 0;
  font-size: clamp(44px, 6.4vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.028em;
}
.home-intro h1 .said { color: var(--taupe); }
.home-intro .lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--taupe);
  max-width: 560px;
  margin: 0;
}
.home-intro .cta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Now / shelf strip at the bottom of home --------------------------- */
.now-strip {
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 24px;
  padding: 24px clamp(20px, 4vw, 40px);
  align-items: center;
  background: var(--bg);
  font-size: 13px;
}
.now-strip .label {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--soft);
}
.now-strip .body { color: var(--ink); line-height: 1.55; }
.now-strip .body em { font-style: normal; color: var(--taupe); }
.now-strip .meta { font-family: var(--mono); font-size: 11.5px; color: var(--taupe); }

/* ---------------------------------------------------------------------
   ABOUT
   --------------------------------------------------------------------- */
.about-hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.about-hero .copy h1 {
  margin: 12px 0 0;
}
.about-hero .copy p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  margin: 18px 0 0;
  max-width: 560px;
}
.about-hero .gallery {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-rows: 240px 240px 240px auto;
  grid-template-areas:
    "portrait thumb1"
    "portrait thumb2"
    "stone    thumb3"
    "cap      cap";
  gap: 14px;
}
.about-hero .gallery .frame { border-radius: 10px; overflow: hidden; }
.about-hero .gallery .frame:nth-of-type(1) { grid-area: portrait; }
.about-hero .gallery .frame:nth-of-type(2) { grid-area: thumb1; }
.about-hero .gallery .frame:nth-of-type(3) { grid-area: thumb2; }
.about-hero .gallery .frame:nth-of-type(4) { grid-area: stone; }
.about-hero .gallery .frame:nth-of-type(5) { grid-area: thumb3; }
.about-hero .gallery .cap {
  grid-area: cap;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--soft);
  margin-top: 2px;
}

/* Hobbies grid */
.hobby-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.hobby-card .frame { height: 200px; margin-bottom: 12px; border-radius: 10px; overflow: hidden; }
.hobby-card .title {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 6px;
}
.hobby-card .meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--soft);
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.hobby-card p {
  margin: 0;
  font-size: 15px;
  color: var(--taupe);
  line-height: 1.6;
}
.hobby-card ul {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--taupe);
}
.hobby-card ul li::before { content: "// "; color: var(--soft); }

/* "ls" hobby table */
.ls-table {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  background: rgba(26,26,26,0.03);
  border-left: 2px solid var(--accent);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 70px 110px 1fr;
  row-gap: 8px;
  column-gap: 14px;
}
.ls-table .perm { color: var(--soft); }
.ls-table .when { color: var(--taupe); }
.ls-table .name strong { font-weight: 500; }
.ls-table .name span { color: var(--taupe); }

/* ---------------------------------------------------------------------
   EXPERIENCE (work + education)
   --------------------------------------------------------------------- */
.timeline {
  border-top: 1px solid var(--ink);
}
.timeline-row {
  display: grid;
  grid-template-columns: 120px 1.4fr 1.6fr 200px;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.timeline-row .when {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--taupe);
  line-height: 1.6;
}
.timeline-row .when strong { color: var(--ink); display: block; font-weight: 500; }
.timeline-row .role {
  font-size: 21px;
  font-weight: 500;
  line-height: 1.25;
  margin: 0 0 4px;
}
.timeline-row .place {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--soft);
  letter-spacing: 0.04em;
}
.timeline-row .body {
  font-size: 16px;
  line-height: 1.65;
  color: var(--taupe);
}
.timeline-row .stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.timeline-row .stack span {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--taupe);
  padding: 3px 7px;
  border: 1px solid var(--rule);
}

/* Skill matrix */
.skills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.skills h4 {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--taupe);
  text-transform: uppercase;
}
.skills ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--mono);
  font-size: 14.5px;
  color: var(--ink);
}
.skills ul li::before {
  content: "▸";
  color: var(--accent);
  margin-right: 8px;
}

/* ---------------------------------------------------------------------
   PROJECTS
   --------------------------------------------------------------------- */
.proj-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
  gap: 24px;
  flex-wrap: wrap;
}
.proj-th {
  display: grid;
  grid-template-columns: 60px minmax(180px, 1.1fr) 1.4fr minmax(180px, 220px);
  gap: 16px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--soft);
  padding: 0 0 10px;
  border-bottom: 1px solid var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.proj-row {
  display: grid;
  grid-template-columns: 60px minmax(180px, 1.1fr) 1.4fr minmax(180px, 220px);
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
  font-size: 15.5px;
  color: var(--ink);
  text-decoration: none;
}
.proj-row .year { font-family: var(--mono); color: var(--taupe); padding-top: 2px; }
.proj-row .name { font-weight: 500; font-size: 17px; margin-bottom: 4px; }
.proj-row .slug { font-family: var(--mono); font-size: 12px; color: var(--soft); letter-spacing: 0.05em; }
.proj-row .summary { color: var(--taupe); line-height: 1.6; }
.proj-row .stack { font-family: var(--mono); font-size: 13px; color: var(--taupe); line-height: 1.7; }
.proj-row .arrow {
  font-family: var(--mono);
  color: var(--taupe);
  text-align: right;
  transition: transform 0.18s ease, color 0.18s ease;
}

/* Featured project hero (top of projects page) */
.featured {
  display: block;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  background: rgba(26,26,26,0.02);
  padding: 36px 40px;
  margin-bottom: 48px;
}
.featured h2 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 42px;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 12px 0 18px;
}
.featured p { font-size: 17px; line-height: 1.65; color: var(--taupe); margin: 0 0 22px; max-width: 820px; }
.featured .copy { display: flex; flex-direction: column; }
.featured .copy .meta {
  display: flex; gap: 8px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 14px; color: var(--taupe);
}
.featured .copy .meta span { padding: 4px 10px; border: 1px solid var(--rule); }

/* ---------------------------------------------------------------------
   CONTACT
   --------------------------------------------------------------------- */
.contact-page { width: 100%; }

/* Centered header (no side panel anymore) */
.contact-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.contact-head h1 { margin: 12px 0 0; }
.contact-head .lede {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  max-width: 580px;
  margin: 26px auto 0;
}

/* "Quick facts" details panel — terminal-ish */
.contact-facts {
  font-family: var(--mono);
  background: rgba(26,26,26,0.03);
  border-left: 2px solid var(--accent);
  padding: 22px 26px;
  display: grid;
  grid-template-columns: 140px 1fr;
  row-gap: 14px;
  column-gap: 18px;
  font-size: 14px;
  line-height: 1.55;
}
.contact-facts .k {
  color: var(--soft);
  letter-spacing: 0.06em;
  font-size: 13.5px;
  padding-top: 2px;
}
.contact-facts .v {
  color: var(--ink);
}
.contact-facts .v em {
  font-style: normal;
  color: var(--taupe);
}
.contact-facts .v .pill {
  display: inline-block;
  background: var(--accent-bg);
  color: var(--accent);
  padding: 3px 9px;
  margin-right: 4px;
  margin-bottom: 4px;
  font-size: 14px;
}
.contact-facts .v .pulse {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: 1px;
  box-shadow: 0 0 0 0 rgba(92,107,88,0.5);
  animation: nav-pulse 2.4s infinite;
}

/* Three primary cards. Email + LinkedIn + Résumé. */
.contact-primary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 64px;
}
.contact-primary-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 36px 32px;
  border: 1px solid var(--rule);
  background: rgba(26,26,26,0.015);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  position: relative;
  min-height: 180px;
}
.contact-primary-card:hover {
  background: rgba(92,107,88,0.06);
  border-color: var(--ink);
}
.contact-primary-card:hover .cpc-arrow {
  transform: translate(3px, -3px);
  color: var(--accent);
}
.contact-primary-card .cpc-label {
  font-family: var(--mono);
  font-size: 13.5px;
  letter-spacing: 0.1em;
  color: var(--taupe);
}
.contact-primary-card .cpc-value {
  font-family: var(--mono);
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.01em;
  word-break: break-word;
}
.contact-primary-card .cpc-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 14px;
}
.contact-primary-card .cpc-arrow {
  font-family: var(--mono);
  font-size: 20px;
  color: var(--taupe);
  transition: transform 0.18s ease, color 0.18s ease;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--rule);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.contact-list a {
  display: grid;
  grid-template-columns: 170px 1fr 24px;
  gap: 16px;
  padding: 18px 4px;
  background: var(--bg);
  text-decoration: none;
  align-items: center;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink);
  transition: padding 0.15s ease;
}
.contact-list a:hover { padding-left: 12px; }
.contact-list a:hover .ext { transform: translate(2px, -2px); color: var(--accent); }
.contact-list .key { color: var(--taupe); font-size: 13.5px; letter-spacing: 0.08em; }
.contact-list .val { color: var(--ink); }
.contact-list .ext { color: var(--soft); transition: transform 0.18s ease, color 0.18s ease; text-align: right; }

/* Form */
.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--taupe);
  text-transform: uppercase;
}
.form input,
.form textarea,
.form select {
  font: inherit;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-strong);
  padding: 10px 0;
  text-transform: none;
  letter-spacing: normal;
  transition: border-color 0.15s ease;
}
.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-bottom-color: var(--ink);
}
.form textarea {
  min-height: 120px;
  resize: vertical;
  font-family: var(--sans);
}
.form .form-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--soft);
  letter-spacing: 0.06em;
}
.form .form-meta button { align-self: flex-start; }

/* Form success state */
.form .form-success {
  display: none;
  padding: 14px 16px;
  background: var(--accent-bg);
  border-left: 2px solid var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  line-height: 1.6;
}
.form.is-sent .form-success { display: block; }
.form.is-sent input,
.form.is-sent textarea,
.form.is-sent .form-meta { opacity: 0.4; pointer-events: none; }

/* ---------------------------------------------------------------------
   Page-scoped scale-up — About / Experience / Projects only.
   Bumps the dense content on these pages without affecting Home/Contact.
   --------------------------------------------------------------------- */
.page-lg { font-size: 18px; }

.page-lg .eyebrow { font-size: 14px; }
.page-lg .section-h { font-size: clamp(44px, 5.2vw, 68px); }

/* About */
.page-lg .about-hero .copy p { font-size: 20px; line-height: 1.65; max-width: 640px; }
.page-lg .about-hero .gallery .cap { font-size: 13px; }
.page-lg .hobby-card .title { font-size: 22px; }
.page-lg .hobby-card .meta { font-size: 13px; }
.page-lg .hobby-card p { font-size: 17px; line-height: 1.6; }
.page-lg .hobby-card ul { font-size: 14.5px; line-height: 1.8; }
.page-lg .ls-table { font-size: 15px; }

/* Experience */
.page-lg .timeline-row { padding: 30px 0; }
.page-lg .timeline-row .when { font-size: 14px; }
.page-lg .timeline-row .role { font-size: 23px; line-height: 1.25; }
.page-lg .timeline-row .place { font-size: 14px; }
.page-lg .timeline-row .body { font-size: 16.5px; line-height: 1.65; }
.page-lg .timeline-row .stack span { font-size: 14px; padding: 4px 9px; }
.page-lg .skills h4 { font-size: 14px; margin-bottom: 14px; }
.page-lg .skills ul { font-size: 15.5px; gap: 9px; }

/* Projects */
.page-lg .featured { padding: 36px 40px; }
.page-lg .featured h2 { font-size: 48px; }
.page-lg .featured p { font-size: 19px; line-height: 1.6; max-width: 880px; }
.page-lg .featured .copy .meta { font-size: 14px; }
.page-lg .featured .copy .meta span { padding: 5px 11px; }
.page-lg .proj-th { font-size: 13px; }
.page-lg .proj-row { font-size: 16.5px; padding: 26px 0; }
.page-lg .proj-row .year { font-size: 14px; }
.page-lg .proj-row .name { font-size: 19px; margin-bottom: 6px; }
.page-lg .proj-row .slug { font-size: 13px; }
.page-lg .proj-row .stack { font-size: 14px; }
.page-lg .proj-row .arrow { font-size: 18px; }
.page-lg .chip { font-size: 13px; padding: 4px 9px; }

/* ---------------------------------------------------------------------
   About page: ~90% scale (tighter than the standard page-lg).
   --------------------------------------------------------------------- */
.page-about { font-size: 17px; }
.page-about .eyebrow { font-size: 13px; }
.page-about .section-h { font-size: clamp(40px, 4.7vw, 61px); }
.page-about .section { padding: clamp(48px, 6.5vw, 80px) 0; }
.page-about .about-hero { gap: clamp(28px, 4.2vw, 56px); }
.page-about .about-hero .copy p { font-size: 18px; line-height: 1.65; max-width: 580px; }
.page-about .about-hero .gallery {
  grid-template-rows: 215px 215px 215px auto;
  gap: 12px;
}
.page-about .about-hero .gallery .cap { font-size: 12px; }
.page-about .hobby-grid { gap: 28px; }
.page-about .hobby-card .frame { height: 196px; margin-bottom: 12px; }
.page-about .hobby-card .title { font-size: 20px; }
.page-about .hobby-card .meta { font-size: 12px; }
.page-about .hobby-card p { font-size: 15.5px; line-height: 1.6; }
.page-about .hobby-card ul { font-size: 13px; line-height: 1.75; }

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 880px) {
  /* Home page: let it scroll on phones / narrow tablets. */
  body.page-home { overflow: visible; height: auto; }
  .home-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .home-portrait {
    min-height: 0;
    height: clamp(280px, 40vh, 380px);
    margin: clamp(16px, 3vw, 24px);
  }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .about-hero { grid-template-columns: 1fr; }
  .about-hero .gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 220px 220px 220px auto;
    grid-template-areas:
      "portrait portrait"
      "thumb1 thumb2"
      "stone thumb3"
      "cap cap";
  }
  .hobby-grid { grid-template-columns: 1fr; }
  .skills { grid-template-columns: repeat(2, 1fr); }

  .timeline-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .featured { padding: 24px 20px; }

  .proj-th { display: none; }
  .proj-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 22px 0;
  }
  .proj-row .year { font-size: 11px; }
  .proj-row .stack { font-size: 11px; }
  .proj-row .arrow { display: none; }

  .contact-primary { grid-template-columns: 1fr; }
  .contact-header-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-facts { grid-template-columns: 110px 1fr; padding: 18px 20px; }
  .now-strip { grid-template-columns: 1fr; }
  .nav-status { display: none; }
  .nav-links { gap: 14px; font-size: 11px; }
}

@media (max-width: 560px) {
  .nav { padding: 12px 16px; font-size: 12px; }
  .nav-brand .here, .nav-brand .slash { display: none; }
  .container { padding: 0 20px; }
  .section { padding: 48px 0; }
  .home-intro { padding: 40px 20px; gap: 22px; }
  .home-intro h1 { font-size: 36px; }
  .section-h { font-size: 30px; }
  .ls-table { grid-template-columns: 1fr; padding: 14px 14px; }
  .ls-table .perm, .ls-table .when { display: none; }
  .footer { flex-direction: column; align-items: flex-start; }
}
