/* ===================================================
   Jomu Jojo — Portfolio (clean minimal, multi-page)
   Light/dark · grid background · system fonts
   =================================================== */

:root {
  --bg: #fafaf9;
  --bg-2: #f4f4f2;
  --bg-card: #ffffff;
  --ink: #0a0a0a;
  --ink-2: #1c1c1c;
  --muted: #6b6b6b;
  --soft: #a3a3a3;
  --line: #e8e6e1;
  --line-2: #d6d3cb;
  --grid: rgba(10, 10, 10, 0.045);
  --accent: #10b981;            /* available / status */
  --accent-soft: rgba(16, 185, 129, 0.10);
  --accent-2: #f59e0b;          /* second data series (charts) */

  --sans: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Inter Tight", "Inter", -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(20px, 4vw, 64px);
  --max: 880px;
  --max-wide: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --bg-card: #131313;
  --ink: #f4f4f3;
  --ink-2: #e5e5e2;
  --muted: #8b8b88;
  --soft: #555553;
  --line: #1f1f1d;
  --line-2: #2a2a28;
  --grid: rgba(244, 244, 243, 0.05);
  --accent: #10b981;
  --accent-soft: rgba(16, 185, 129, 0.14);
  --accent-2: #fbbf24;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  transition: background-color 400ms var(--ease), color 400ms var(--ease);
}

body {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }

::selection { background: var(--ink); color: var(--bg); }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

p { margin: 0; color: var(--ink-2); }

/* ---------- Layout ---------- */
.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}
.shell.wide { max-width: var(--max-wide); }

.page {
  padding: 96px 0 120px;
  min-height: calc(100vh - 80px);
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 22px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: color-mix(in oklch, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
}

.topbar-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav {
  display: flex;
  gap: 26px;
  align-items: center;
}
.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  padding: 4px 2px;
  transition: color 220ms var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
}

.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 220ms var(--ease), background-color 220ms var(--ease);
}
.theme-toggle:hover { color: var(--ink); background: var(--bg-2); }
.theme-toggle svg { width: 18px; height: 18px; }

/* ---------- Profile header (Home) ---------- */
.profile {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 36px;
}
.profile > .pcol { flex: 1; min-width: 0; }
.avatar {
  width: 56px; height: 56px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  position: relative;
}
.avatar .ph {
  font-family: var(--mono);
  font-size: 22px;
  color: var(--muted);
  font-weight: 600;
}
.avatar::after {
  /* tiny status dot */
  content: "";
  position: absolute;
  right: -3px; bottom: -3px;
  width: 14px; height: 14px;
  border-radius: 999px;
  background: var(--accent);
  border: 2.5px solid var(--bg);
  box-shadow: 0 0 0 0 var(--accent);
  animation: avatarPulse 2.6s var(--ease-out) infinite;
}
@keyframes avatarPulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.profile h1 {
  font-size: clamp(28px, 4vw, 36px);
  letter-spacing: -0.035em;
  line-height: 1.08;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
.profile .role {
  margin-top: 4px;
  color: var(--muted);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
}

/* ---------- Info grid ---------- */
.infogrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 36px;
}
.infogrid .field .k {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--soft);
  margin-bottom: 10px;
}
.infogrid .field .v {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.infogrid .field .v a { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.infogrid .field .v svg { width: 15px; height: 15px; color: var(--muted); flex-shrink: 0; }
.infogrid .field a:hover { color: var(--accent); }
@media (max-width: 640px) {
  .infogrid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Bio block ---------- */
.bio {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 680px;
  margin-bottom: 28px;
}
.bio .swap {
  display: inline-block;
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 1px;
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}
.bio .swap.fade { opacity: 0; transform: translateY(-4px); }
.bio strong { color: var(--ink); font-weight: 600; }

/* ---------- Now-playing strip ---------- */
.now {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 22px;
  padding: 6px 10px;
  margin-left: -10px;
  border-radius: 8px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
}
.now .dot {
  width: 14px; height: 14px;
  border-radius: 999px;
  background: #1db954;
  display: inline-grid;
  place-items: center;
}
.now .dot svg { width: 9px; height: 9px; color: white; }
.now .label { color: var(--muted); }
.now .sep { color: var(--soft); }
.now .track { color: var(--ink); }
.now .artist { color: var(--muted); }
/* Live now-playing state (real-time from Spotify) */
.now.is-live .label { color: #1db954; }
.now.is-live .dot { animation: nowPulse 1.8s var(--ease) infinite; }
@keyframes nowPulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, #1db954 55%, transparent); }
  70%  { box-shadow: 0 0 0 6px color-mix(in srgb, #1db954 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, #1db954 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .now.is-live .dot { animation: none; }
}

/* ---------- Social row ---------- */
.socials {
  display: flex;
  gap: 16px;
  margin-bottom: 56px;
}
.socials a {
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-radius: 6px;
  transition: color 220ms var(--ease), background 220ms var(--ease);
}
.socials a:hover { color: var(--ink); background: var(--bg-2); }
.socials a svg { width: 16px; height: 16px; }

/* ---------- Section labels ---------- */
.section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}

/* ---------- Tech stack ---------- */
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-bottom: 72px;
}
.stack .chip {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  display: inline-grid;
  place-items: center;
  transition: transform 220ms var(--ease), border-color 220ms var(--ease), background-color 220ms var(--ease);
  position: relative;
}
.stack .chip:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
  background: var(--bg-2);
}
.stack .chip[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 5;
}
/* In dark mode, give pure-black brand marks (Notion) a touch of contrast */
[data-theme="dark"] .stack .chip svg path[fill="#000000"],
[data-theme="dark"] .stack .chip svg[fill="#000000"] {
  fill: #f4f4f3;
}

/* ---------- Featured projects ---------- */
.featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 80px;
}
.proj {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-card);
  transition: border-color 320ms var(--ease), transform 320ms var(--ease);
  position: relative;
}
.proj:hover { border-color: var(--line-2); transform: translateY(-2px); }

.proj-thumb {
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(circle at 20% 20%, color-mix(in oklch, var(--accent) 22%, var(--bg-2)), transparent 50%),
    radial-gradient(circle at 80% 80%, color-mix(in oklch, var(--ink) 14%, var(--bg-2)), transparent 50%),
    var(--bg-2);
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.proj-thumb .ph {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 10px;
  border: 1px dashed var(--line-2);
  border-radius: 4px;
  background: color-mix(in oklch, var(--bg) 70%, transparent);
}

.proj-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.proj-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.proj-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.proj-links {
  display: flex;
  gap: 10px;
  color: var(--muted);
}
.proj-links a {
  display: grid;
  place-items: center;
  transition: color 220ms var(--ease);
}
.proj-links a:hover { color: var(--ink); }
.proj-links svg { width: 15px; height: 15px; }
.proj-desc {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}
.proj-stack {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.proj-stack .mini {
  width: 22px; height: 22px;
  border-radius: 5px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: inline-grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
}
@media (max-width: 720px) {
  .featured { grid-template-columns: 1fr; }
}

/* ---------- Experience timeline ---------- */
.timeline {
  position: relative;
  padding-left: 18px;
  margin-bottom: 80px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 6px; bottom: 6px;
  left: 4px;
  width: 1px;
  background: var(--line);
}
.tl-row {
  position: relative;
  padding-bottom: 36px;
}
.tl-row:last-child { padding-bottom: 0; }
.tl-row::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 8px;
  width: 9px; height: 9px;
  border-radius: 999px;
  background: var(--bg);
  border: 1.5px solid var(--soft);
}
.tl-row.current::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.tl-row .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}
.tl-row .left {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.tl-row h3 {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.tl-row .dot-sep { color: var(--soft); }
.tl-row .company { color: var(--muted); font-size: 14.5px; }
.tl-row .when {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}
.tl-row .meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.tl-row .desc {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 640px;
}
.tl-row ul.bullets {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}
.tl-row ul.bullets li {
  position: relative;
  padding-left: 14px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 6px;
}
.tl-row ul.bullets li::before {
  content: "·";
  position: absolute;
  left: 4px;
  color: var(--soft);
}
.tl-row .mini-stack {
  display: flex;
  gap: 6px;
  margin-top: 14px;
}
.tl-row .mini-stack .mini {
  width: 22px; height: 22px;
  border-radius: 5px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: inline-grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
}

/* ---------- Writing list ---------- */
.writing {
  margin-bottom: 80px;
}
.write-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: padding-left 280ms var(--ease);
}
.write-row:hover { padding-left: 8px; }
.write-row .title {
  font-size: 15.5px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.write-row .meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}
.write-row:hover .title { color: var(--accent); }

/* ---------- Contact ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 80px;
}
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
}
.contact-card h3 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.contact-card .lede {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 22px;
}
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.contact-list li {
  border-top: 1px solid var(--line);
}
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px;
  color: var(--ink);
  transition: padding-left 280ms var(--ease);
}
.contact-list a:hover { padding-left: 10px; }
.contact-list .ic {
  width: 32px; height: 32px;
  border-radius: 7px;
  background: var(--bg-2);
  display: grid;
  place-items: center;
  color: var(--muted);
  flex-shrink: 0;
}
.contact-list .ic svg { width: 14px; height: 14px; }
.contact-list .label {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}
.contact-list .sub {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 2px;
  font-weight: 400;
}
.contact-list .arr {
  color: var(--soft);
  transition: color 220ms var(--ease), transform 220ms var(--ease);
}
.contact-list a:hover .arr { color: var(--ink); transform: translate(2px, -2px); }
.contact-list .arr svg { width: 14px; height: 14px; }

.contact-foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}
.contact-foot .row {
  display: flex; align-items: center; gap: 8px;
}
.contact-foot .row svg { width: 13px; height: 13px; color: var(--soft); }

.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}
.form-field input,
.form-field textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 220ms var(--ease), background-color 220ms var(--ease);
  resize: none;
}
.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--soft);
}
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--ink);
  background: var(--bg-2);
}
.form-field textarea { min-height: 130px; }
.send-btn {
  width: 100%;
  margin-top: 6px;
  padding: 13px 14px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 220ms var(--ease), transform 220ms var(--ease);
}
.send-btn:hover { opacity: 0.92; }
.send-btn:active { transform: scale(0.98); }
.send-btn svg { width: 14px; height: 14px; }

@media (max-width: 720px) {
  .contact-wrap { grid-template-columns: 1fr; }
}

/* ---------- Quote / counter strip ---------- */
.quote-strip {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-card);
  overflow: hidden;
  margin-bottom: 64px;
}
.quote-strip .qcell {
  padding: 24px 28px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
}
.quote-strip .qcell .mark {
  color: var(--soft);
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.quote-strip .qcell .by {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}
.quote-strip .ccell {
  padding: 24px 28px;
  border-left: 1px solid var(--line);
  display: grid;
  place-items: center;
  text-align: center;
}
.quote-strip .ccell .num {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.quote-strip .ccell .num sup { font-size: 11px; font-weight: 500; color: var(--muted); }
.quote-strip .ccell .lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}
@media (max-width: 720px) {
  .quote-strip { grid-template-columns: 1fr; }
  .quote-strip .ccell { border-left: none; border-top: 1px solid var(--line); }
}

/* ---------- About page ---------- */
.about-hero {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.04;
  margin-bottom: 36px;
}
.about-hero .muted { color: var(--muted); }

.about-body {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 660px;
  margin-bottom: 28px;
}
.about-body strong { color: var(--ink); font-weight: 600; }
.about-body a {
  color: var(--ink);
  border-bottom: 1px solid var(--line-2);
  transition: border-color 220ms var(--ease);
}
.about-body a:hover { border-bottom-color: var(--ink); }
.about-body p { margin: 0 0 1em; }

.about-quote {
  border-left: 1.5px solid var(--ink);
  padding-left: 16px;
  font-style: italic;
  color: var(--muted);
  font-size: 15px;
  margin: 28px 0;
  max-width: 600px;
}

.about-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0 36px;
}
.about-tags .tag {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid;
}
.about-tags .tag[data-c="cyan"] { color: #0e7490; background: #ecfeff; border-color: #cffafe; }
.about-tags .tag[data-c="blue"] { color: #1d4ed8; background: #eff6ff; border-color: #dbeafe; }
.about-tags .tag[data-c="violet"] { color: #6d28d9; background: #f5f3ff; border-color: #ede9fe; }
.about-tags .tag[data-c="green"] { color: #047857; background: #ecfdf5; border-color: #d1fae5; }

[data-theme="dark"] .about-tags .tag[data-c="cyan"] { color: #67e8f9; background: rgba(6,182,212,0.10); border-color: rgba(103,232,249,0.25); }
[data-theme="dark"] .about-tags .tag[data-c="blue"] { color: #93c5fd; background: rgba(59,130,246,0.10); border-color: rgba(147,197,253,0.25); }
[data-theme="dark"] .about-tags .tag[data-c="violet"] { color: #c4b5fd; background: rgba(139,92,246,0.10); border-color: rgba(196,181,253,0.25); }
[data-theme="dark"] .about-tags .tag[data-c="green"] { color: #6ee7b7; background: rgba(16,185,129,0.10); border-color: rgba(110,231,183,0.25); }

.about-meta {
  display: grid;
  grid-template-columns: repeat(3, auto) 1fr;
  gap: 32px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 56px;
}
.about-meta .it {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
}
.about-meta .k {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.about-meta .v { color: var(--ink); }
.about-meta a.v {
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 1px;
  transition: border-color 220ms var(--ease);
}
.about-meta a.v:hover { border-bottom-color: var(--ink); }
@media (max-width: 760px) {
  .about-meta { grid-template-columns: 1fr; gap: 8px; }
}

.about-section {
  margin-bottom: 56px;
}
.about-section h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.about-section p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 1em;
  max-width: 720px;
}
.about-section p strong { color: var(--ink); font-weight: 600; }

.acc {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-card);
  overflow: hidden;
  margin-bottom: 56px;
}
.acc-row { border-top: 1px solid var(--line); }
.acc-row:first-child { border-top: none; }
.acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  padding: 20px 24px;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  font-family: inherit;
  transition: background-color 220ms var(--ease);
}
.acc-head:hover { background: var(--bg-2); }
.acc-head .pm {
  color: var(--soft);
  font-family: var(--mono);
  font-size: 14px;
  width: 14px;
  display: inline-grid;
  place-items: center;
}
.acc-body {
  padding: 0 24px 22px 48px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted);
}
.acc-body.closed { display: none; }

/* ---------- Components page ---------- */
.cp-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.cp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.cp-badge.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.cp-hero {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 16px;
}
.cp-lede {
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 22px;
  max-width: 620px;
}
.cp-checks {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}
.cp-checks .it {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--muted);
}
.cp-checks .it svg { width: 14px; height: 14px; color: var(--muted); }

.cp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.cp-card {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-card);
  align-items: flex-start;
  transition: border-color 220ms var(--ease), transform 220ms var(--ease);
  cursor: pointer;
}
.cp-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.cp-card .ic {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  flex-shrink: 0;
}
.cp-card .ic svg { width: 16px; height: 16px; }
.cp-card .title {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cp-card .new {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: #3b82f6;
  display: inline-block;
}
.cp-card .desc {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}
@media (max-width: 760px) {
  .cp-grid { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 28px var(--gutter);
  margin-top: 80px;
}
.foot-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.foot .copy {
  font-size: 13px;
  color: var(--muted);
}
.foot .foot-nav {
  display: flex;
  gap: 22px;
  font-size: 13px;
}
.foot .foot-nav a { color: var(--muted); transition: color 220ms var(--ease); }
.foot .foot-nav a:hover { color: var(--ink); }
.foot .foot-socials {
  display: flex;
  gap: 14px;
  color: var(--muted);
}
.foot .foot-socials a { transition: color 220ms var(--ease); }
.foot .foot-socials a:hover { color: var(--ink); }
.foot .foot-socials svg { width: 16px; height: 16px; }

/* ---------- Accessibility: skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  font-family: var(--mono);
  font-size: 12px;
}
.skip-link:focus { left: 0; }

/* ---------- Project detail (IRESS) ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
  transition: color 220ms var(--ease), gap 220ms var(--ease);
}
.back-link:hover { color: var(--ink); gap: 12px; }

.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin: 8px 0 40px;
}
.kpis .kpi { background: var(--bg-card); padding: 18px 18px; }
.kpis .kpi .v {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1;
}
.kpis .kpi .v .u { color: var(--accent); }
.kpis .kpi .l {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
}
@media (max-width: 640px) { .kpis { grid-template-columns: 1fr 1fr; } }

/* ---------- ETF Tableau dashboard (ported from capstone) ---------- */
.etf-demo {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  max-width: 100%;
  margin-bottom: 40px;
}
.etf-demo-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  gap: 20px;
  flex-wrap: wrap;
}
.etf-demo-head h4 {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.etf-demo-head .sub {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.etf-controls {
  display: flex;
  gap: 6px;
  background: var(--bg-2);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.etf-controls button {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 220ms var(--ease), color 220ms var(--ease);
}
.etf-controls button.active {
  background: var(--ink);
  color: var(--bg);
}

.etf-yearbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.etf-yearbar .lbl {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.etf-years {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.etf-years button {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 220ms var(--ease), color 220ms var(--ease), border-color 220ms var(--ease);
}
.etf-years button.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.etf-board { display: block; }
.etf-pane {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: auto;
  gap: 16px;
}
.etf-pane[data-pane="issuers"],
.etf-pane[data-pane="growth"] {
  grid-template-columns: 1fr;
}
.etf-pane[hidden] { display: none; }
.etf-panel {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  min-width: 0;
}
.etf-panel-wide { grid-column: 1 / -1; }
.etf-panel-head { margin-bottom: 10px; }
.etf-panel-title {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 2px;
}
.etf-panel-sub {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.etf-chart {
  width: 100%;
  height: 280px;
  position: relative;
}
.etf-chart-rank { height: 240px; }
.etf-chart-tall { height: 420px; }
.etf-chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.etf-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.etf-legend .lg-item { display: inline-flex; align-items: center; gap: 6px; }
.etf-legend .sw {
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: var(--ink);
}
.etf-legend .sw-a { background: var(--accent); }
.etf-legend .sw-b { background: var(--accent-2); }

.etf-readout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.etf-readout .r {
  border-right: 1px solid var(--line);
  padding-right: 16px;
}
.etf-readout .r:last-child { border-right: none; }
.etf-readout .r .k {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.etf-readout .r .v {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.etf-readout .r .v .pos { color: var(--accent); }

.reader-note {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  line-height: 1.6;
}
.reader-note code {
  font-family: var(--mono);
  font-size: 0.78em;
  background: var(--bg-2);
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid var(--line);
  color: var(--ink);
}
.lk-inline {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.lk-inline:hover { color: var(--accent); }

@media (max-width: 760px) {
  .etf-demo { padding: 18px; }
  .etf-pane { grid-template-columns: 1fr; }
  .etf-chart { height: 240px; }
  .etf-chart-rank { height: 280px; }
  .etf-chart-tall { height: 380px; }
  .etf-readout { grid-template-columns: 1fr 1fr; gap: 12px 0; }
  .etf-readout .r:nth-child(2) { border-right: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
