/* ==========================================================================
   BENTO STUDIO — the résumé as a bento board
   Canvas #FAFAF8 · cards #FFF · hairline #E7E5E0 · accent persimmon #FF5A36
   Inter (UI/display) + JetBrains Mono (labels/stats)
   ========================================================================== */

:root {
  --canvas: #FAFAF8;
  --card: #FFFFFF;
  --hairline: #E7E5E0;
  --hairline-strong: #DAD7D0;
  --ink: #1A1917;
  --body: #44403B;
  --muted: #6B655E;
  --faint: #8A847C;
  --accent: #FF5A36;
  --accent-deep: #E84A28;
  --accent-ink: #D63A16;
  --wash-sage: #F4F7F1;
  --wash-sky: #F2F6F9;
  --wash-sand: #FAF5EC;
  --ink-card: #201E1B;

  --font-ui: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  --r-card: 20px;
  --r-inner: 12px;

  --shadow-rest: 0 1px 2px rgba(26, 22, 17, 0.04), 0 6px 20px rgba(26, 22, 17, 0.05);
  --shadow-lift: 0 2px 4px rgba(26, 22, 17, 0.05), 0 14px 34px rgba(26, 22, 17, 0.09);

  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 40px;
  --s-6: 48px;
  --s-8: 64px;
  --s-10: 80px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.011em;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }

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

::selection { background: var(--accent); color: #FFFFFF; }

/* skip link — hidden until keyboard focus, styled like a board tile */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #FCFBF9;
  border-radius: var(--r-inner);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: var(--shadow-lift);
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}
.skip-link:focus {
  clip-path: none;
  opacity: 1;
  pointer-events: auto;
}
#main:focus { outline: none; }

/* type refinement — balanced headings, orphan-free paragraphs */
.identity-name, .section-title, .contact-title, .feature-name,
.project-name, .role-title, .edu-degree, .edu-tile-degree { text-wrap: balance; }
.identity-intro, .about-paragraphs p, .contact-subtitle, .feature-desc,
.tp-desc, .project-desc, .role-summary { text-wrap: pretty; }

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- card language ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-rest);
  position: relative;
}
@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease; }
}
@media (hover: hover) {
  .card:hover {
    box-shadow: var(--shadow-lift);
    border-color: var(--hairline-strong);
  }
  @media (prefers-reduced-motion: no-preference) {
    .card:hover { transform: translateY(-2px); }
  }
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 250, 248, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 14px var(--s-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.nav-monogram {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 11px;
  background: var(--ink);
  color: #FCFBF9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.nav-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40vw;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-menu a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}
@media (prefers-reduced-motion: no-preference) {
  .nav-menu a { transition: color 150ms ease, background-color 150ms ease; }
}
.nav-menu a:hover { color: var(--ink); background: rgba(26, 25, 23, 0.05); }
.nav-menu a.is-active { color: var(--accent-ink); background: rgba(255, 90, 54, 0.09); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--card);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.nav-toggle-icon { display: inline-flex; flex-direction: column; gap: 4px; }
.nav-toggle-icon i {
  display: block;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: var(--s-2);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    min-width: 200px;
    padding: 8px;
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: 16px;
    box-shadow: var(--shadow-lift);
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu a { border-radius: 10px; padding: 10px 14px; }
}

/* ==========================================================================
   BENTO BOARD
   ========================================================================== */
.board-wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: var(--s-4) var(--s-3) var(--s-2);
}
.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(148px, auto);
  grid-auto-flow: dense;
  gap: var(--s-2);
}

/* spans — desktop */
.tile-identity { grid-column: span 2; grid-row: span 2; }
.tile-feature  { grid-column: span 2; }
.tile-timeline { grid-row: span 2; }
.tile-skills   { grid-column: span 2; }

/* ---------- identity ---------- */
.tile-identity {
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
}
.identity-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
}
.identity-avatar {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  flex: none;
  background: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.identity-avatar img { width: 100%; height: 100%; object-fit: cover; }
.identity-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--card);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
@media (prefers-reduced-motion: no-preference) {
  .pill-dot { animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 90, 54, 0.35); }
    50% { box-shadow: 0 0 0 5px rgba(255, 90, 54, 0); }
  }
}
.identity-eyebrow { margin-bottom: 10px; color: var(--accent-ink); }
.identity-name {
  font-size: clamp(2.1rem, 4.4vw, 3.05rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
  color: var(--ink);
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
  margin-bottom: var(--s-2);
}
.identity-intro {
  font-size: 16px;
  line-height: 1.65;
  color: var(--body);
  max-width: 46ch;
  margin-bottom: var(--s-3);
}
.identity-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: var(--s-3);
}
.identity-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: var(--s-2);
  border-top: 1px solid var(--hairline);
}
.identity-location { text-transform: none; letter-spacing: 0.02em; font-size: 12px; }
.identity-social { display: flex; gap: 8px; }
.identity-social a,
.contact-social a {
  width: 36px;
  height: 36px;
  border: 1px solid var(--hairline);
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: var(--card);
}
@media (prefers-reduced-motion: no-preference) {
  .identity-social a, .contact-social a { transition: color 150ms ease, border-color 150ms ease, transform 150ms ease; }
}
.identity-social a:hover, .contact-social a:hover {
  color: var(--accent-ink);
  border-color: var(--accent);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .identity-social a:hover, .contact-social a:hover { transform: translateY(-2px); }
}
.identity-social svg, .contact-social svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--r-inner);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
}
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease; }
}
.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(255, 90, 54, 0.28);
}
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost {
  background: var(--card);
  border-color: var(--hairline-strong);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn:hover { transform: translateY(-2px); }
}

/* pressed states — every control answers the click */
.btn:active { transform: translateY(0) scale(0.985); }
.btn-primary:active { background: var(--accent-ink); }
.btn-ghost:active { background: var(--canvas); border-color: var(--ink); }
.nav-menu a:active { background: rgba(26, 25, 23, 0.09); color: var(--ink); }
.nav-toggle:active { background: var(--canvas); }
a.card:active { transform: translateY(0); }
.identity-social a:active, .contact-social a:active { transform: translateY(0); color: var(--accent-deep); }
.project-links a:active, .footer-links a:active, .tile-more:active { color: var(--accent-deep); }

/* ---------- stat tiles ---------- */
.tile-stat {
  padding: var(--s-3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--s-1);
  min-height: 148px;
}
.stat-value {
  font-size: clamp(2.5rem, 4vw, 3.3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-label { text-transform: uppercase; }
.tile-stat.is-accent {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(255, 90, 54, 0.30);
}
.tile-stat.is-accent .stat-value { color: #FFFFFF; }
/* small text needs AA on persimmon — deep rust reads at ~5.5:1 */
.tile-stat.is-accent .stat-label { color: #40130B; }
@media (hover: hover) {
  .tile-stat.is-accent:hover { border-color: var(--accent); box-shadow: 0 12px 30px rgba(255, 90, 54, 0.38); }
}

/* ---------- shared tile bits ---------- */
.tile-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--s-2);
}
.label-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.tile-arrow {
  position: absolute;
  top: var(--s-3);
  right: var(--s-3);
  width: 32px;
  height: 32px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--muted);
  background: var(--card);
}
@media (prefers-reduced-motion: no-preference) {
  .tile-arrow { transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease; }
}
a.card:hover .tile-arrow {
  background: var(--ink);
  border-color: var(--ink);
  color: #FCFBF9;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-block;
  padding: 5px 11px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--body);
  white-space: nowrap;
}
.chip.chip-more { color: var(--accent-ink); border-color: rgba(255, 90, 54, 0.35); }

/* ---------- featured project tile ---------- */
.tile-feature {
  padding: var(--s-3) var(--s-4);
  background: var(--wash-sand);
  display: flex;
  flex-direction: column;
  padding-right: var(--s-8);
}
.feature-name {
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.feature-desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--body);
  margin-bottom: var(--s-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile-feature .chip-row { margin-top: auto; }

/* ---------- timeline tile ---------- */
.tile-timeline {
  padding: var(--s-3);
  display: flex;
  flex-direction: column;
}
.timeline {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding-left: 20px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--hairline-strong);
}
.timeline li { position: relative; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--hairline-strong);
}
.timeline li.is-current::before {
  background: var(--accent);
  border-color: var(--accent);
}
.tl-role {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.35;
}
.tl-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.tile-more {
  margin-top: var(--s-2);
  padding-top: var(--s-2);
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-ink);
  display: inline-block;
}
.tile-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- small project tiles ---------- */
.tile-project {
  padding: var(--s-3);
  padding-right: var(--s-7, 56px);
  display: flex;
  flex-direction: column;
  background: var(--wash-sage);
}
#tile-project-c { background: var(--wash-sky); }
.tp-label { margin-bottom: 12px; }
.tp-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}
.tp-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--body);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- skills tile ---------- */
.tile-skills { padding: var(--s-3) var(--s-4); background: var(--wash-sage); }
#tile-skills .chip { background: rgba(255, 255, 255, 0.85); }

/* ---------- education tile ---------- */
.tile-education { padding: var(--s-3); background: var(--wash-sky); }
.edu-tile-degree {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 4px;
}
.edu-tile-school { font-size: 13.5px; color: var(--body); margin-bottom: 10px; }
.edu-tile-period { text-transform: none; letter-spacing: 0.02em; }

/* ---------- contact "now playing" bar ---------- */
.tile-contact {
  margin-top: var(--s-2);
  background: var(--ink-card);
  border-color: var(--ink-card);
  padding: var(--s-2) var(--s-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
}
.np-left { display: flex; align-items: center; gap: var(--s-2); min-width: 0; }
.np-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  flex: none;
}
.np-eq i {
  display: block;
  width: 4px;
  border-radius: 2px;
  background: var(--accent);
}
.np-eq i:nth-child(1) { height: 40%; }
.np-eq i:nth-child(2) { height: 90%; }
.np-eq i:nth-child(3) { height: 55%; }
.np-eq i:nth-child(4) { height: 75%; }
@media (prefers-reduced-motion: no-preference) {
  .np-eq i { animation: eq 1.1s ease-in-out infinite alternate; }
  .np-eq i:nth-child(2) { animation-delay: -0.3s; }
  .np-eq i:nth-child(3) { animation-delay: -0.6s; }
  .np-eq i:nth-child(4) { animation-delay: -0.9s; }
  @keyframes eq {
    from { height: 25%; }
    to { height: 100%; }
  }
}
.np-text { min-width: 0; }
.np-status {
  color: rgba(252, 251, 249, 0.6);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #FCFBF9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile-contact .btn { flex: none; }

/* ==========================================================================
   BELOW THE FOLD — sections in the same card language
   ========================================================================== */
.section {
  max-width: 1160px;
  margin: 0 auto;
  padding: var(--s-8) var(--s-3) 0;
  /* render below-the-fold sections lazily; generous estimates keep scroll stable */
  content-visibility: auto;
  contain-intrinsic-size: auto 760px;
}
#experience { contain-intrinsic-size: auto 1400px; }
#projects { contain-intrinsic-size: auto 1500px; }
.section-head {
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--hairline);
}
.section-label { color: var(--accent-ink); flex: none; }
.section-title {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
  word-break: keep-all;
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: var(--s-2);
  align-items: start;
}
.about-card { padding: var(--s-4); }
.about-paragraphs p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--body);
}
.about-paragraphs p + p { margin-top: var(--s-2); }
.about-facts-card { padding: var(--s-3) var(--s-4); background: var(--wash-sand); }
.about-facts { display: flex; flex-direction: column; }
.about-facts > div { padding: 14px 0; }
.about-facts > div + div { border-top: 1px solid rgba(26, 25, 23, 0.07); }
.about-facts dt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}
.about-facts dd {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

/* ---------- experience ---------- */
.role-list { display: flex; flex-direction: column; gap: var(--s-2); }
.role-card { padding: var(--s-4); }
.role-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.role-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.3;
}
.role-company { font-size: 14.5px; color: var(--muted); margin-top: 2px; }

/* ---------- employer logo mark in the role header ---------- */
.role-head > div { flex: 1 1 auto; min-width: 0; }
.role-logo {
  flex: 0 0 auto;
  width: 88px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 2px;
}
.role-logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  object-fit: contain;
  display: block;
}
@media (max-width: 719px) {
  .role-logo { width: 74px; height: 26px; }
}
@media (forced-colors: active) {
  .role-logo img { forced-color-adjust: none; }
}
.role-period {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--canvas);
  white-space: nowrap;
}
.role-period .pill-dot { width: 6px; height: 6px; }
.role-summary { font-size: 15px; color: var(--body); margin-bottom: var(--s-2); max-width: 72ch; }
.role-points { display: flex; flex-direction: column; gap: 10px; margin-bottom: var(--s-2); }
.role-points li {
  position: relative;
  padding-left: 22px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--body);
  max-width: 76ch;
}
.role-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 8px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.role-card .chip-row { padding-top: var(--s-2); border-top: 1px solid var(--hairline); }

/* ---------- projects ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-2);
}
.project-card {
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
}
.project-card.is-featured {
  grid-column: 1 / -1;
  background: var(--wash-sand);
}
.project-label { margin-bottom: var(--s-2); display: flex; align-items: center; gap: 8px; }
.project-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.project-card.is-featured .project-name { font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
.project-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--body);
  margin-bottom: var(--s-2);
  max-width: 70ch;
}
.project-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  flex-wrap: wrap;
  padding-top: var(--s-2);
  border-top: 1px solid var(--hairline);
}
.project-card.is-featured .project-foot { border-top-color: rgba(26, 25, 23, 0.08); }
.project-links { display: flex; gap: var(--s-2); }
.project-links a {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.project-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- project card media — generated schematic banner ---------- */
.project-card { --card-pad: var(--s-4); }
.project-media {
  margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) var(--s-3);
  border-radius: calc(var(--r-card) - 1px) calc(var(--r-card) - 1px) 0 0;
  overflow: hidden;
  background: var(--wash-sand);
  border-bottom: 1px solid var(--hairline);
}
.project-media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.project-card.is-featured .project-media img { aspect-ratio: 16 / 9; }
@media (max-width: 719px) {
  .project-card { --card-pad: var(--s-3); }
  .project-media img,
  .project-card.is-featured .project-media img { aspect-ratio: 16 / 10; }
}

/* ---------- skills — one editorial ledger card, hairline-ruled rows ---------- */
.skills-ledger { padding: var(--s-1) var(--s-4); }
.skills-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: var(--s-2);
  align-items: baseline;
  padding: var(--s-3) 0;
}
.skills-row + .skills-row { border-top: 1px solid var(--hairline); }
.skills-row-head { display: flex; align-items: baseline; gap: 10px; }
.skill-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--faint);
}

/* ---------- education ---------- */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-2);
}
.edu-card { padding: var(--s-4); }
.edu-degree {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 4px;
}
.edu-school { font-size: 14.5px; color: var(--body); margin-bottom: 6px; }
.edu-detail { font-size: 13.5px; color: var(--muted); margin-bottom: 12px; }
.edu-period {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.cert-card { padding: var(--s-4); background: var(--wash-sky); }
.cert-list { display: flex; flex-direction: column; gap: 12px; margin-top: var(--s-2); }
.cert-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2);
  font-size: 14.5px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.cert-list li span:last-child {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- contact ---------- */
#contact { padding-bottom: 0; }
.contact-card {
  padding: var(--s-8) var(--s-4);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact-card .section-label { margin-bottom: var(--s-2); }
.contact-title {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
  line-height: 1.08;
  margin-bottom: var(--s-2);
  word-break: keep-all;
  max-width: 22ch;
}
.contact-subtitle {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--body);
  max-width: 52ch;
  margin-bottom: var(--s-4);
}
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: var(--s-3); }
.contact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 12px;
  margin-bottom: var(--s-3);
}
.contact-meta span { overflow-wrap: anywhere; }
.contact-social { display: flex; gap: 10px; justify-content: center; }

/* ---------- footer ---------- */
.footer {
  margin-top: var(--s-8);
  border-top: 1px solid var(--hairline);
  background: var(--card);
}
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: var(--s-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  flex-wrap: wrap;
}
.footer-text { font-size: 13.5px; color: var(--muted); }
.footer-links { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.footer-links a { font-size: 13.5px; font-weight: 600; color: var(--body); }
.footer-links a:hover { color: var(--accent-ink); }
.footer-copy { text-transform: none; letter-spacing: 0.02em; font-size: 11px; color: var(--faint); }

/* ---------- reveal ----------
   Uses the independent `translate` property so entrance motion never fights
   the hover lift (which lives on `transform`).
   IO fallback path: JS adds .reveal / .is-in only when motion is OK.       */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; translate: 0 14px; transition: opacity 420ms ease, translate 420ms ease; }
  .reveal.is-in { opacity: 1; translate: 0 0; }
}

/* Scroll-driven version — browsers with animation-timeline get a pure-CSS
   reveal (JS sets html.sda and skips the IntersectionObserver entirely). */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    html.sda .section .card,
    html.sda .footer-inner {
      animation: card-enter linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 32%;
    }
    @keyframes card-enter {
      from { opacity: 0; translate: 0 14px; }
      to { opacity: 1; translate: 0 0; }
    }
  }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1099px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-identity { grid-column: span 2; grid-row: auto; }
  .tile-feature, .tile-skills { grid-column: span 2; }
  .tile-timeline { grid-row: span 2; }
}

@media (max-width: 719px) {
  /* micro-bento: stats + education pair up 2-across instead of stacking full-width */
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; gap: 12px; }
  .tile-identity, .tile-feature, .tile-skills, .tile-timeline, .tile-project { grid-column: span 2; }
  .tile-stat, .tile-education { grid-column: span 1; }
  .tile-timeline { grid-row: auto; }
  .tile-stat { min-height: 120px; padding: var(--s-2); }
  .tile-education { padding: var(--s-2); }
  .stat-value { font-size: 2.2rem; }
  .tile-identity { padding: var(--s-3); }
  .board-wrap { padding: var(--s-2) var(--s-2) var(--s-1); }
  .section { padding: var(--s-6) var(--s-2) 0; }
  .section-head { flex-direction: column; gap: 6px; }
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .project-grid { grid-template-columns: minmax(0, 1fr); }
  .role-card, .about-card, .edu-card, .cert-card, .project-card { padding: var(--s-3); }
  .contact-card { padding: var(--s-6) var(--s-3); }
  .tile-contact { flex-direction: column; align-items: flex-start; }
  .tile-contact .btn { width: 100%; justify-content: center; }
  .np-status, .np-name { white-space: normal; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .skills-ledger { padding: var(--s-1) var(--s-3); }
  .skills-row { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: var(--s-2) 0; }
}

/* ==========================================================================
   ACCESSIBILITY MODES
   ========================================================================== */
@media (prefers-contrast: more) {
  :root {
    --muted: #524C45;
    --faint: #6B655E;
    --body: #2E2B27;
    --hairline: #C9C5BD;
    --hairline-strong: #AFAAA1;
  }
  .np-status { color: rgba(252, 251, 249, 0.85); }
  .tile-stat.is-accent .stat-label { color: #2B0C05; }
}

@media (forced-colors: active) {
  .card, .btn, .chip, .identity-pill, .role-period, .nav-toggle,
  .identity-social a, .contact-social a { border: 1px solid CanvasText; }
  .pill-dot, .label-dot, .np-eq i, .role-points li::before,
  .timeline::before, .nav-toggle-icon i { background: CanvasText; }
  .timeline li::before { border-color: CanvasText; }
  :focus-visible { outline: 2px solid Highlight; }
}

/* ==========================================================================
   PRINT — template-specific complement to the shared assets/css/print.css.
   Hides the board's duplicate tiles and decoration so the page linearizes:
   identity -> about -> experience -> projects -> skills -> education -> contact.
   ========================================================================== */
@media print {
  .nav, .tile-stat, .tile-feature, .tile-project, .tile-timeline,
  .tile-skills, .tile-education, .tile-contact, .identity-cta,
  .identity-pill, .identity-social, .identity-avatar, .tile-arrow,
  .contact-actions, .contact-social, .footer-links {
    display: none !important;
  }
  /* entrance states must never print invisible cards */
  .reveal { opacity: 1 !important; translate: none !important; }
  .board { display: block; }
  .board-wrap, .section { padding-left: 0 !important; padding-right: 0 !important; }
  .card {
    border: none;
    border-radius: 0;
    padding: 0;
  }
  .about-grid, .project-grid, .education-grid, .role-list { display: block; }
  .about-facts-card, .project-card, .role-card, .edu-card, .cert-card { margin-top: 10pt; }
  .identity-name { font-size: 22pt; }
  .identity-intro { max-width: none; }
  .identity-meta, .role-card .chip-row, .project-foot { border-top: none; padding-top: 0; }
  .chip, .role-period { border-color: #999999; padding: 1pt 6pt; }
  .contact-card { text-align: left; align-items: flex-start; padding: 0; }
  .contact-title { font-size: 14pt; }
  .contact-subtitle, .contact-meta { margin-bottom: 6pt; }
  .skills-row { padding: 6pt 0; }
  .section-head { margin-bottom: 8pt; padding-bottom: 4pt; }
}
