/* ==========================================================================
   Portfolio
   Design system: one accent, strong type scale, generous spacing, no gradients
   beyond a single subtle hero wash. Light is the base; dark overrides follow.
   ========================================================================== */

:root {
  /* surfaces — cool neutrals derived from the brand navy, not a generic grey */
  --bg:            #f5f8fa;
  --surface:       #ffffff;
  --surface-2:     #edf2f7;
  --surface-3:     #e2e9f0;
  --border:        #d7e0e9;
  --border-strong: #b6c4d2;

  /* text */
  --text:       #001a34;
  --text-2:     #41566b;
  --text-3:     #6c7f92;

  /* accent — brand blue darkened to stay readable on white (5.6:1),
     with the pure brand cyan reserved for graphic marks */
  --accent:        #0b6f9c;
  --accent-2:      #002245;
  --accent-strong: #002245;
  --accent-on:     #ffffff;
  --accent-soft:   #e2f1f9;
  --brand:         #0c9eda;

  /* signal */
  --warn: #92600f;

  /* type */
  --font-display: 'Sora', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* rhythm */
  --gutter: 16px;
  --maxw: 1160px;
  --radius: 14px;
  --radius-sm: 9px;

  --shadow-sm: 0 1px 2px rgba(20, 21, 15, .05), 0 1px 3px rgba(20, 21, 15, .04);
  --shadow-md: 0 4px 12px rgba(20, 21, 15, .07), 0 2px 4px rgba(20, 21, 15, .04);
  --shadow-lg: 0 18px 48px rgba(20, 21, 15, .12);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #080d14;
    --surface:       #0e151e;
    --surface-2:     #141d28;
    --surface-3:     #1c2734;
    --border:        #1f2b39;
    --border-strong: #32435a;

    --text:   #e8eef5;
    --text-2: #a9b8c8;
    --text-3: #79899b;

    --accent:        #4fb8ea;
    --accent-2:      #8ed4f5;
    --accent-strong: #0c9eda;
    --accent-on:     #00182f;
    --accent-soft:   #0d2637;
    --brand:         #0c9eda;

    --warn: #e0b064;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, .45);
    --shadow-lg: 0 20px 56px rgba(0, 0, 0, .6);

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg:            #080d14;
  --surface:       #0e151e;
  --surface-2:     #141d28;
  --surface-3:     #1c2734;
  --border:        #1f2b39;
  --border-strong: #32435a;

  --text:   #e8eef5;
  --text-2: #a9b8c8;
  --text-3: #79899b;

  --accent:        #4fb8ea;
  --accent-2:      #8ed4f5;
  --accent-strong: #0c9eda;
  --accent-on:     #00182f;
  --accent-soft:   #0d2637;
  --brand:         #0c9eda;

  --warn: #e0b064;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, .45);
  --shadow-lg: 0 20px 56px rgba(0, 0, 0, .6);

  color-scheme: dark;
}

/* --------------------------------------------------------------- reset -- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.16;
  letter-spacing: -.022em;
  margin: 0;
  font-weight: 700;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
a { color: inherit; }

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

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

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

/* ------------------------------------------------------------- layout -- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(64px, 9vw, 116px); }
.section + .section { padding-top: 0; }

.section-head { max-width: 640px; margin-bottom: clamp(32px, 4vw, 52px); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: block;
}

.section-head h2 { font-size: clamp(28px, 4.2vw, 42px); }
.section-head p {
  margin-top: 14px;
  color: var(--text-2);
  font-size: clamp(16px, 1.6vw, 18px);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-strong);
  color: var(--accent-on);
  padding: 10px 16px;
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------- nav -- */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.nav[data-scrolled="true"] { border-bottom-color: var(--border); }

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  flex: none;
}
.brand-logo {
  height: 26px;
  width: auto;
  display: block;
}
@media (max-width: 420px) { .brand-logo { height: 22px; } }

.foot-logo { height: 20px; width: auto; color: var(--text-3); }

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
  align-items: center;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color .16s ease, background .16s ease;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }

.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: 8px; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 17px; height: 17px; }

.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: none; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: block; }
}

.nav-toggle { display: none; }

@media (max-width: 880px) {
  .nav-links {
    position: fixed;
    inset: 66px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 10px var(--gutter) 18px;
    margin: 0;
    box-shadow: var(--shadow-md);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
  }
  .nav-links[data-open="true"] { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 12px 10px; font-size: 16px; }
  .nav-toggle { display: grid; margin-left: auto; }
  .nav-actions { margin-left: 0; }
}

/* --------------------------------------------------------------- hero -- */

.hero {
  position: relative;
  padding-block: clamp(56px, 9vw, 104px) clamp(48px, 7vw, 84px);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -40% 20% auto -10%;
  height: 560px;
  background: radial-gradient(ellipse at 30% 40%, color-mix(in srgb, var(--brand) 20%, transparent), transparent 62%);
  pointer-events: none;
  z-index: 0;
}

.hero .wrap { position: relative; z-index: 1; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-2);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 7px 13px;
  border-radius: 999px;
  margin-bottom: 26px;
}
.hero-tag::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 26%, transparent);
}

.hero h1 {
  font-size: clamp(36px, 6.4vw, 68px);
  font-weight: 800;
  letter-spacing: -.035em;
  max-width: 16ch;
}
.hero h1 em { font-style: normal; color: var(--accent); }
:root[data-theme="dark"] .hero h1 em { color: var(--accent-2); }

.hero-role {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.5vw, 15px);
  color: var(--text-2);
  letter-spacing: -.01em;
}
.hero-role b { color: var(--text); font-weight: 500; }

.hero-body {
  margin-top: 22px;
  max-width: 62ch;
  font-size: clamp(16.5px, 1.75vw, 19px);
  color: var(--text-2);
}

.hero-cta {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .14s ease, background .16s ease, border-color .16s ease, color .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-strong); color: var(--accent-on); }
.btn-primary:hover { background: var(--accent); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn svg { width: 16px; height: 16px; }

.proof {
  margin-top: clamp(40px, 5vw, 62px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.proof div { background: var(--surface); padding: 20px 22px; }
.proof .v {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: -.03em;
}
.proof .l { font-size: 13px; color: var(--text-3); margin-top: 2px; }

@media (max-width: 720px) {
  .proof { grid-template-columns: repeat(2, 1fr); }
}

.marquee {
  margin-top: 30px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-block: 14px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee ul {
  display: flex;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
  width: max-content;
  animation: slide 46s linear infinite;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-3);
  white-space: nowrap;
}
.marquee:hover ul { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee ul { animation: none; flex-wrap: wrap; width: auto; }
}

/* --------------------------------------------------------------- fit -- */

/* Fixed track counts rather than auto-fit: six cards must fill whole rows,
   otherwise the 1px grid background shows through as an empty tile. */
.fit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.fit-card { background: var(--surface); padding: 26px 24px; }
.fit-card h3 { font-size: 17px; margin-bottom: 9px; }
.fit-card p { font-size: 14.8px; color: var(--text-2); }

@media (max-width: 980px) { .fit-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .fit-grid { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------- projects -- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}
.filter {
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: all .16s ease;
}
.filter:hover { border-color: var(--border-strong); color: var(--text); }
.filter[aria-pressed="true"] {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: var(--accent-on);
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
  position: relative;
}
.card::after {
  content: '';
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 2px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--brand);
  opacity: 0;
  transition: opacity .18s ease;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.card:hover::after { opacity: 1; }
.card.featured::after { opacity: .32; }
.card.featured:hover::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .card:hover { transform: none; } }

.card.featured { grid-column: span 1; }

.card-top { display: flex; align-items: flex-start; gap: 12px; }
.card-top h3 { font-size: 20px; letter-spacing: -.025em; }
.card-ctx {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 5px;
  letter-spacing: -.005em;
}
.badge {
  margin-left: auto;
  flex: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  padding: 4px 9px;
  border-radius: 999px;
}

.card-tagline { font-size: 15px; color: var(--text-2); }

.card-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.card-features li {
  font-size: 14.2px;
  color: var(--text-2);
  padding-left: 19px;
  position: relative;
}
.card-features li::before {
  content: '';
  position: absolute;
  left: 2px; top: 9px;
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--brand);
  opacity: .8;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
}
.chip.more { color: var(--text-3); background: transparent; }

.card-contrib {
  font-size: 13.4px;
  color: var(--text-3);
  border-left: 2px solid var(--accent);
  padding-left: 12px;
}

.card-actions {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.link-btn {
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--accent);
  background: none;
  border: none;
  padding: 6px 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.link-btn:hover { color: var(--accent-2); }
.link-btn svg { width: 15px; height: 15px; }
.card-actions .sep { color: var(--border-strong); }

.link-btn svg { transition: transform .18s ease; }
.card:hover .link-btn svg { transform: translateX(3px); }

/* ---------------------------------------------------------- case study -- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  padding: clamp(0px, 4vh, 40px) var(--gutter);
  overflow-y: auto;
  background: color-mix(in srgb, var(--bg) 72%, #000 28%);
  backdrop-filter: blur(6px);
}
.modal[data-open="true"] { display: block; }

.modal-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 860px;
  margin-inline: auto;
  box-shadow: var(--shadow-lg);
  animation: rise .22s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { .modal-panel { animation: none; } }

.modal-head {
  position: sticky;
  top: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 22px 26px 18px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  z-index: 2;
}
.modal-head h2 { font-size: clamp(22px, 3vw, 30px); }
.modal-close { margin-left: auto; flex: none; }

.modal-body { padding: 26px; display: flex; flex-direction: column; gap: 30px; }
.modal-body .cs-block p,
.modal-body .cs-block li { max-width: 72ch; }

.cs-block h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.cs-block h3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.cs-block p { color: var(--text-2); font-size: 15.5px; }
.cs-block ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 9px; }
.cs-block li { color: var(--text-2); font-size: 15px; }
.cs-block li::marker { color: var(--accent); }

.cs-challenge {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cs-challenge + .cs-challenge { margin-top: 12px; }
.cs-challenge .q {
  font-weight: 600;
  color: var(--text);
  font-size: 15px;
  padding-left: 22px;
  position: relative;
}
.cs-challenge .q::before {
  content: 'Problem';
  position: absolute;
  left: 0; top: 0;
  font-family: var(--font-mono);
  font-size: 0;
}
.cs-challenge .q::after {
  content: '→';
  position: absolute;
  left: 2px; top: 0;
  color: var(--warn);
  font-weight: 700;
}
.cs-challenge .a {
  font-size: 14.8px;
  color: var(--text-2);
  padding-left: 22px;
  position: relative;
}
.cs-challenge .a::after {
  content: '✓';
  position: absolute;
  left: 2px; top: 0;
  color: var(--accent);
  font-weight: 700;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
.stack-col h4 {
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
  margin-bottom: 9px;
}

.cs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 13.5px;
  color: var(--text-3);
  font-family: var(--font-mono);
}

/* The request path, drawn as a chain. Scrolls on its own at narrow widths
   rather than forcing the modal body sideways. */
.flow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.flow-node {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 6px 11px;
  white-space: nowrap;
}
.flow-node:first-child { border-color: var(--accent); color: var(--accent); }
.flow-node:last-child  { border-color: var(--accent); color: var(--accent); }

.flow-arrow {
  width: 14px;
  height: 1px;
  background: var(--border-strong);
  position: relative;
  flex: none;
}
.flow-arrow::after {
  content: '';
  position: absolute;
  right: -1px; top: -2.5px;
  border-left: 5px solid var(--border-strong);
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
}

.cs-note {
  font-size: 13.8px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  margin: 0;
}

.cs-count {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

/* --------------------------------------------------------------- skills -- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.skill-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
}
.skill-card h3 {
  font-size: 15px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.skill-card h3::before {
  content: '';
  width: 5px; height: 16px;
  border-radius: 2px;
  background: var(--brand);
  flex: none;
}

/* ------------------------------------------------------------- approach -- */

.approach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 22px;
}
.approach-item {
  border-top: 2px solid var(--border);
  padding-top: 18px;
  transition: border-color .2s ease;
}
.approach-item:hover { border-top-color: var(--accent); }
.approach-item .n {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}
.approach-item h3 { font-size: 17.5px; margin-bottom: 9px; }
.approach-item p { font-size: 14.8px; color: var(--text-2); }

/* ---------------------------------------------------------------- about -- */

.about {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }

.about-text { display: flex; flex-direction: column; gap: 18px; }
.about-text p { color: var(--text-2); font-size: clamp(16px, 1.6vw, 17.5px); }

.facts {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 8px 22px;
}
.facts dl { margin: 0; }
.facts .row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}
.facts .row:last-child { border-bottom: 0; }
.facts dt {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.facts dd { margin: 0; font-size: 15px; font-weight: 500; }

.form-note { font-size: 12.8px; color: var(--text-3); }

/* --------------------------------------------------------------- footer -- */

footer {
  border-top: 1px solid var(--border);
  margin-top: clamp(56px, 8vw, 96px);
  padding-block: 32px 40px;
}
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  align-items: center;
  font-size: 13.8px;
  color: var(--text-3);
}
.foot a { color: var(--text-2); text-decoration: none; }
.foot a:hover { color: var(--accent); }
.foot .right { margin-left: auto; display: flex; gap: 20px; }
.foot-brand { display: flex; align-items: center; }

/* ------------------------------------------------------------ resources -- */

.resources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.resource {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .18s ease;
}
.resource:hover { border-color: var(--border-strong); }

.resource-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.resource-head h3 { font-size: 16.5px; letter-spacing: -.02em; }

.band {
  margin-left: auto;
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.resource > p { font-size: 14.5px; color: var(--text-2); }

/* A prior engagement with no repository behind it reads as a quieter badge. */
.badge-muted {
  color: var(--text-3);
  background: var(--surface-2);
  border-color: var(--border);
}
.card-top .badge + .badge-muted { margin-left: 6px; }

/* ------------------------------------------------------------- reveal -- */

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s cubic-bezier(.2,.7,.3,1), transform .55s cubic-bezier(.2,.7,.3,1);
}
[data-reveal][data-shown="true"] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

body.modal-open { overflow: hidden; }

.inline-code {
  font-family: var(--font-mono);
  font-size: .88em;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
}
