/* Portfolio — Núria Gabàs. Visual language of portfolio v3 (referencia-diseno/), as a static, accessible site. */

/* ---------- Fonts (self-hosted, OFL; latin subset; swap = non-blocking) ---------- */
@font-face { font-family: 'Outfit'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url('/assets/fonts/outfit-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-display: swap; font-weight: 100 1000;
  src: url('/assets/fonts/dm-sans-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Mono'; font-style: normal; font-display: swap; font-weight: 400;
  src: url('/assets/fonts/dm-mono-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens (v3) ---------- */
:root {
  --ink: #26242E; --ink-2: #5A5865;
  --ink-3: #6B6976;        /* v3 uses #7A7885; darkened to pass WCAG AA (5.4:1 on white) */
  --card: #FFFFFF; --line: #E3E4EA; --line-2: #EDEDF2; --mute: #F3F3F7;
  --plum: #4A2D52; --pa: #4A2D52;
  --ok: #1F6B58; --ok-soft: #DDF0EA;   /* v3 #2C8470, darkened for AA */ --warn: #8A5A10; --warn-soft: #F6EBCB; --info: #4F5AA8; --info-soft: #E3E5F5;
  --page: linear-gradient(155deg, #E1E8E4 0%, #E7E7F0 55%, #EEE7EC 100%);
  --b1: #D3DDD7; --b2: #DEE1EE; --b3: #EBE6EF;
  --on-band: #26242E; --on-band-2: rgba(38, 36, 46, 0.75);
  --shadow: 0 1px 2px rgba(38, 36, 46, .04), 0 12px 30px rgba(38, 36, 46, .08);
  --font-display: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #EEEDF3; --ink-2: #B9B7C4; --ink-3: #8E8C9A;
    --card: #1D1C25; --line: #34333F; --line-2: #292832; --mute: #2A2933;
    --plum: #7A5486; --pa: #C9A6D0;
    --ok: #7FCDB6; --ok-soft: #1F332D; --warn: #E2B866; --warn-soft: #3A301A; --info: #A3ACE6; --info-soft: #262A47;
    --page: #0E0D13;
    --b1: #27322E; --b2: #292C3D; --b3: #30283A;
    --on-band: #EEEDF3; --on-band-2: rgba(238, 237, 243, 0.78);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 30px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #EEEDF3; --ink-2: #B9B7C4; --ink-3: #8E8C9A;
  --card: #1D1C25; --line: #34333F; --line-2: #292832; --mute: #2A2933;
  --plum: #7A5486; --pa: #C9A6D0;
  --ok: #7FCDB6; --ok-soft: #1F332D; --warn: #E2B866; --warn-soft: #3A301A; --info: #A3ACE6; --info-soft: #262A47;
  --page: #0E0D13; --b1: #27322E; --b2: #292C3D; --b3: #30283A;
  --on-band: #EEEDF3; --on-band-2: rgba(238, 237, 243, 0.78);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 30px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body { background: var(--page); background-attachment: fixed; color: var(--ink); font: 15px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 500; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 38px; line-height: 1.1; letter-spacing: -.02em; }
h2 { font-size: 20px; line-height: 1.2; }
h3 { font-size: 16px; line-height: 1.3; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
strong, b { font-weight: 600; }
:focus-visible { outline: 2px solid var(--pa); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 50; background: var(--ink); color: var(--card); padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); margin: 18px; min-height: calc(100vh - 36px); border-radius: 28px; background: var(--card); overflow: clip; box-shadow: 0 24px 70px rgba(38, 36, 46, .14); }
.side { background: var(--card); border-right: 1px solid var(--line-2); min-width: 0; }
.side-in { position: sticky; top: 0; display: flex; flex-direction: column; gap: 4px; padding: 22px 14px; max-height: calc(100vh - 36px); overflow-y: auto; }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; padding: 0 8px 18px; }
.logo { width: 36px; height: 30px; border-radius: 58% 42% 52% 48% / 62% 55% 45% 38%; background: linear-gradient(135deg, #F7A06A, #EE7C47); flex: none; }
.bn { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -.02em; }
.main-nav ul, .side-cases ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.navl { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--ink-3); font-weight: 500; text-decoration: none; }
.navl svg { width: 19px; height: 19px; flex: none; }
.navl:hover { background: var(--mute); color: var(--ink); }
.navl[aria-current="page"] { background: #26242E; color: #FFFFFF; }
.navl[aria-current="true"] { background: var(--mute); color: var(--ink); }
.side-sec { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); padding: 20px 12px 6px; }
.side-cases .navl { font-size: 13.5px; padding: 8px 12px; line-height: 1.3; }
.side-panel { display: flex; flex-direction: column; gap: 4px; }
.me { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.me-top { display: flex; gap: 11px; align-items: center; }
.av { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; background: var(--mute); }
.mn { font-weight: 600; line-height: 1.2; }
.me-role { font-size: 12px; color: var(--ink-3); line-height: 1.3; }
.me-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.menu-btn { display: none; }

main { display: flex; flex-direction: column; min-width: 0; }
.band { position: relative; overflow: hidden; padding: 30px 40px 70px; color: var(--on-band); background: linear-gradient(115deg, var(--b1) 0%, var(--b2) 55%, var(--b3) 100%); }
.band > .art { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(255, 255, 255, .8); stroke-width: 1.3; opacity: .6; pointer-events: none; }
.band > :not(.art) { position: relative; z-index: 1; }
.band-accent { background: linear-gradient(110deg, var(--base) 0%, var(--light) 52%, #ECE7EE 100%); }
.sheet { position: relative; flex: 1; margin-top: -34px; background: var(--card); border-radius: 34px 0 0 0; padding: 34px 40px 48px; min-width: 0; }

/* ---------- Controls ---------- */
.acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 8px 15px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 12px; font-weight: 500; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.btn:hover { background: var(--mute); }
.btn.primary { background: var(--plum); color: #FFFFFF; border-color: transparent; text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; font-weight: 600; padding: 10px 18px; }
.btn.primary:hover { opacity: .9; background: var(--plum); }
.btn.sm { min-height: 30px; padding: 4px 11px; font-size: 12.5px; border-radius: 10px; }
.band .btn:not(.primary) { background: rgba(255, 255, 255, .7); border-color: transparent; color: #26242E; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--mute); color: var(--ink-2); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.info { background: var(--info-soft); color: var(--info); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; }

/* ---------- Band content ---------- */
.greet { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.greet > div:first-child { flex: 1 1 420px; min-width: 0; }
.greet h1 { max-width: 30ch; }
.greet p { margin-top: 8px; color: var(--on-band-2); font-size: 16px; max-width: 78ch; }
.crumbs { font-size: 13px; color: var(--on-band-2); margin-bottom: 14px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs li + li::before { content: '/'; margin-right: 8px; }
.crumbs a { font-weight: 600; text-decoration: none; color: var(--on-band); }
.crumbs a:hover { text-decoration: underline; }

/* ---------- Sections & cards ---------- */
.sec { margin: 30px 0 14px; font-size: 21px; }
section:first-child > .sec:first-child { margin-top: 0; }
.sec-sub { font-family: var(--font-body); font-size: 12.5px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.card { background: var(--card); border-radius: 22px; padding: 20px; border: 1px solid var(--line-2); box-shadow: 0 1px 2px rgba(27, 27, 47, .03); min-width: 0; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.more-row { margin-top: 28px; }

/* Figure cards */
.figs { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.tile-k { display: flex; flex-direction: column; gap: 2px; }
.tile-k .v { font: 500 28px/1.1 var(--font-display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tile-k .k { font-size: 12.5px; color: var(--ink-3); line-height: 1.4; }
.tile-k .k-link { margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.tile-k .k-link:hover { text-decoration: underline; color: var(--ink); }

/* ---------- Project tiles (coloured cards) ---------- */
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 190px; padding: 18px 18px 16px; border-radius: 16px; background: var(--base); color: #26242E; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(38, 36, 46, .14); }
.tile:focus-within { outline: 2px solid var(--pa); outline-offset: 3px; }
.tile > * { position: relative; z-index: 1; }
.tile > .art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; fill: none; stroke: var(--dark); stroke-width: 1.2; opacity: .28; pointer-events: none; }
.t-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cl { font-size: 12.5px; font-weight: 500; }
.tr { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; background: #26242E; color: #FFFFFF; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.badge-line { background: #FFFFFF; color: #4A2D52; border: 1px solid #4A2D52; }
.aibadge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: #FFE2C2; color: #7A3410; border: 1px solid #F2B77C; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.chev { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, .55); font-size: 18px; line-height: 1; flex: none; }
.t-title { font: 500 23px/1.15 var(--font-display); letter-spacing: -.01em; color: #26242E; }
.card-link { text-decoration: none; color: inherit; }
.card-link::after { content: ''; position: absolute; inset: 0; z-index: 2; }
.card-link:focus-visible { outline: none; }
.t-sum { margin-top: 6px; font-size: 13.5px; color: rgba(38, 36, 46, .82); }
.t-bot { display: flex; flex-direction: column; gap: 9px; }
.kv { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.kv:empty { display: none; }
.t-foot { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; }
.tchip { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 8px; background: rgba(255, 255, 255, .6); font-size: 11.5px; font-weight: 500; color: #26242E; }
.nx { border-top: 1px solid rgba(38, 36, 46, .16); color: rgba(38, 36, 46, .82); padding-top: 9px; font-size: 12.5px; }

/* ---------- Project header (inside the band) ---------- */
.phead { display: flex; flex-direction: column; gap: 18px; min-height: 150px; }
.phead .row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.row-r { display: flex; gap: 6px; flex-wrap: wrap; }
.phead h1 { color: var(--on-band); max-width: 26ch; }
.phead p { color: var(--on-band-2); max-width: 60ch; margin-top: 8px; font-size: 15.5px; }
.cchip { display: inline-flex; align-items: center; gap: 6px; background: rgba(252, 248, 241, .82); border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 600; color: #26242E; }

/* ---------- Tabs ---------- */
.ptabs ul { list-style: none; display: flex; gap: 4px; overflow-x: auto; padding: 0 0 22px; }
.ptab { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 12px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-weight: 500; white-space: nowrap; }
.ptab:hover { background: var(--mute); color: var(--ink); }
.ptab[aria-current="page"] { background: #26242E; color: #FFFFFF; }

/* ---------- Layout grids ---------- */
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 14px; }
.mt-s { margin-top: 8px; }
.cs-main, .cs-side, .stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.vh { margin-bottom: 18px; }
.h1s { font-size: 26px; line-height: 1.1; font-weight: 600; }
.vh .sub { color: var(--ink-2); margin-top: 6px; }
.muted { color: var(--ink-2); }
.s { font-size: 13.5px; }
.note { margin-top: 8px; font-size: 12.5px; color: var(--ink-3); }
.link-row { list-style: none; margin-bottom: 14px; }

/* ---------- Cards content ---------- */
.card-title { font-size: 20px; margin-bottom: 12px; }
.card-title-s { font: 600 15px/1.3 var(--font-body); letter-spacing: 0; margin-bottom: 6px; }
.cs .cs-h { font: 600 15px var(--font-body); letter-spacing: 0; margin: 18px 0 6px; }
.cs .cs-h:first-child { margin-top: 0; }
.cs p + p { margin-top: 8px; }
.hl { padding-left: 20px; }
.hl li { margin: 5px 0; line-height: 1.5; }
.hl.s li { margin: 3px 0; }
.gl { margin: 0; display: flex; flex-direction: column; }
.gl > div { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.gl > div:last-child { border-bottom: 0; }
.gl dt { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.gl dd { margin: 3px 0 0; line-height: 1.45; }
.skill-chips { gap: 6px; }
.quote { margin: 16px 0 0; padding: 16px 18px; border-left: 4px solid var(--base); background: var(--mute); border-radius: 0 14px 14px 0; }
.quote blockquote { margin: 0; font: 500 17px/1.4 var(--font-display); }
.quote blockquote p::before { content: '“'; }
.quote blockquote p::after { content: '”'; }
.quote figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.also { margin-top: 16px; }
.notice { margin-bottom: 16px; padding: 12px 16px; border: 1.5px dashed var(--ink-3); border-radius: 14px; background: var(--mute); }
.mc-k { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.kp { padding: 5px 11px; border-radius: 10px; background: var(--mute); font-size: 13px; }

/* Where each piece stands (03) */
.st-list { display: flex; flex-direction: column; gap: 14px; }
.st-item { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; }
.st-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.st-h h3 { font-size: 16px; }
.fig { margin: 14px -16px -14px; padding: 14px 16px; border-radius: 0 0 14px 14px; background: var(--mute); }
.fig-t { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.fig figcaption { margin-top: 8px; font-size: 12.5px; color: var(--ink-2); }
.cmp-row { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) 4.5rem; gap: 10px; align-items: center; font-size: 13px; padding: 3px 0; }
.cmp-bar { height: 12px; border-radius: 99px; background: var(--card); overflow: hidden; }
.cmp-bar i { display: block; height: 100%; min-width: 4px; border-radius: 99px; background: #9E92CB; }
.cmp-v { font-weight: 600; }

/* Plan & delivery */
.waves { list-style: none; display: flex; flex-direction: column; }
.wv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.wv:last-child { border-bottom: 0; }
.wv-n { font-weight: 600; }
.plbar { list-style: none; display: flex; gap: 4px; height: 62px; }
.plbar .seg { flex-basis: 0; min-width: 62px; display: flex; flex-direction: column; justify-content: space-between; padding: 9px 10px; border-radius: 10px; color: #26242E; overflow: hidden; }
.plbar .seg span, .plbar .seg small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plbar .seg span { font-weight: 600; font-size: 13px; }
.plbar .seg small { font-size: 12px; }
.tabbody > * + * { margin-top: 16px; }
.tabbody > section > .sec { margin-top: 30px; }
.sheet > section + section > .sec { margin-top: 34px; }
.flow { list-style: none; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 26px; align-items: stretch; }
.dgrid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.dgrid.inits { align-items: start; }
.dt { position: relative; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--ac); border-radius: 14px; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dt-h { display: flex; align-items: center; gap: 10px; }
.dt-t { font: 600 15px/1.25 var(--font-body); letter-spacing: 0; flex: 1; }
.dt-n { font: 600 12px var(--font-body); width: 26px; height: 26px; border-radius: 50%; background: color-mix(in srgb, var(--ac) 45%, var(--card)); color: var(--ink); display: inline-grid; place-items: center; flex: none; }
.dt > p { font-size: 13.5px; color: var(--ink-2); }
.dt-c { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.dt-c li { background: color-mix(in srgb, var(--ac) 22%, var(--card)); border-radius: 999px; padding: 5px 11px; font-size: 13px; line-height: 1.3; }
.dt-l { list-style: none; display: flex; flex-direction: column; }
.ini2 { padding: 10px 0; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 3px; }
.ini2:first-child { border-top: 0; padding-top: 0; }
.ini2 b { font-size: 13.5px; line-height: 1.3; }
.ini2 small { font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.flow .dt:not(:last-child)::after { content: '→'; position: absolute; right: -20px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--ink-3); }

/* How I ran it */
.scroll { overflow-x: auto; position: relative; }
.scroll:focus-visible { outline: 2px solid var(--pa); }
.tbl { width: 100%; border-collapse: collapse; position: relative; }
.tbl th { font-size: 12px; font-weight: 600; color: var(--ink-3); text-align: left; padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tbody th { font-size: 13.5px; font-weight: 500; color: var(--ink); white-space: normal; min-width: 13rem; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; white-space: nowrap; }
.tbl tbody tr:last-child > * { border-bottom: 0; }
.tbl .c { text-align: center; }
.rc { display: inline-grid; place-items: center; min-width: 34px; height: 26px; padding: 0 4px; border-radius: 8px; font: 500 12.5px var(--font-mono); text-decoration: none; border: 1px solid transparent; }
.rc-a { background: #26242E; color: #FFFFFF; }
.rc-r { background: var(--info-soft); color: var(--info); }
.rc-c { background: var(--mute); color: var(--ink-2); }
.rc-i { border-color: var(--line); color: var(--ink-2); }
.rc-none { color: var(--ink-3); background: var(--mute); opacity: .7; }
.raci-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; font-size: 12.5px; color: var(--ink-2); }
.rk-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.rk-h h4 { font: 600 15px/1.3 var(--font-body); letter-spacing: 0; }
.dcard dl { margin: 0; }
.dcard dl > div { margin-top: 10px; }
.dcard dt { font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.dcard dd { margin: 2px 0 0; }

/* About */
.gwho { display: flex; align-items: center; gap: 24px; flex: 1 1 520px; min-width: 0; }
.portrait { width: 150px; height: 180px; border-radius: 30px; object-fit: cover; object-position: 50% 18%; flex: none; }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.list { list-style: none; display: flex; flex-direction: column; }
.li { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.li:last-child { border-bottom: 0; }
.li .t { flex: 1; min-width: 0; }
.li.tl { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 14px; align-items: start; padding: 12px 0; }
.tl-d { font: 400 12px var(--font-mono); color: var(--ink-3); padding-top: 3px; }
.tl-t { font: 400 15px/1.4 var(--font-body); letter-spacing: 0; }
.tl-p { margin-top: 6px; line-height: 1.5; font-size: 14px; }
.gl-row { flex-direction: row; flex-wrap: wrap; gap: 0 28px; }
.gl-row > div { flex: 1 1 200px; border-bottom: 0; padding: 6px 0; }
.card > p + p { margin-top: 8px; }

/* CTA */
.cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 34px; background: var(--mute); border-color: transparent; }
.cta h2 { font-size: 18px; }
.cta p { margin-top: 4px; font-size: 13.5px; }

/* Home subtitle under the h1 */
.greet .h1-sub { margin-top: 6px; font: 400 22px/1.3 var(--font-display); letter-spacing: -.01em; color: var(--on-band); max-width: 40ch; }
.greet .h1-sub + p { margin-top: 14px; }

.greet .h1-sub .remote { font-weight: 600; }

/* Compact tiles (related projects) */
.wall-sm { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tile-sm { min-height: 0; gap: 10px; padding: 14px 14px 12px; border-radius: 14px; }
.tile-sm .t-title { font-size: 17px; }
.tile-sm .t-sum { font-size: 12.5px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-sm .t-bot, .tile-sm .badge, .tile-sm .aibadge { display: none; }
.tile-sm .cl { font-size: 12px; }
.tile-sm .chev { width: 22px; height: 22px; font-size: 16px; }

/* ---------- Footer ---------- */
.site-foot { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-3); display: flex; flex-direction: column; gap: 4px; }

/* ---------- Dark mode specifics ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .band > .art { stroke: rgba(255, 255, 255, .14); opacity: 1; }
  :root:not([data-theme="light"]) .band-accent { background: linear-gradient(110deg, color-mix(in srgb, var(--base) 34%, #15141B) 0%, var(--b2) 60%, var(--b3) 100%); }
  :root:not([data-theme="light"]) .band .btn:not(.primary) { background: rgba(255, 255, 255, .12); color: #EEEDF3; }
  :root:not([data-theme="light"]) .navl[aria-current="page"] { background: #EEEDF3; color: #14131A; }
  :root:not([data-theme="light"]) .cchip { background: rgba(255, 255, 255, .12); color: #EEEDF3; }
  :root:not([data-theme="light"]) .ptab[aria-current="page"] { background: #EEEDF3; color: #14131A; }
  :root:not([data-theme="light"]) .rc-a { background: #EEEDF3; color: #14131A; }
}

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .app { margin: 0; border-radius: 0; min-height: 100vh; box-shadow: none; grid-template-columns: minmax(0, 1fr); }
  .side { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .side-in { position: static; max-height: none; padding: 12px 16px 10px; }
  .brand { padding: 4px 4px 8px; }
  .menu-btn:not([hidden]) { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: 600 14px var(--font-body); cursor: pointer; }
  .menu-btn[aria-expanded="true"] .menu-open, .menu-btn[aria-expanded="false"] .menu-close { display: none; }
  .main-nav ul { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .main-nav .navl { padding: 8px 10px; gap: 6px; font-size: 14px; }
  .main-nav .navl svg { display: none; }
  .js .side-panel:not([data-open]) { display: none; }
  .side-panel { padding-bottom: 8px; }
  .band { padding: 22px 18px 56px; }
  .sheet { padding: 26px 18px 40px; border-radius: 26px 26px 0 0; }
  h1, .greet h1 { font-size: 30px; }
  .greet .h1-sub { font-size: 18px; }
  .wall { grid-template-columns: minmax(0, 1fr); }
  .figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g2, .g-21, .g3 { grid-template-columns: minmax(0, 1fr); }
  .flow, .dgrid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .flow .dt:not(:last-child)::after { content: '↓'; right: auto; left: 50%; top: auto; bottom: -21px; transform: translateX(-50%); }
  .wv { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .plbar { flex-direction: column; height: auto; }
  .plbar .seg { flex-grow: 0 !important; flex-basis: auto; min-height: 48px; flex-direction: row; align-items: center; }
  .cmp-row { grid-template-columns: 7rem minmax(0, 1fr) 3.5rem; }
}
@media (min-width: 861px) and (max-width: 1150px) {
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow .dt::after { display: none; }
}

@media (max-width: 640px) {
  .gwho { flex-direction: column; align-items: flex-start; gap: 14px; }
  .portrait { width: 120px; height: 144px; }
  .li.tl { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .tile:hover { transform: none; }
}
