/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --bg: #08080a;
  --surface: #0f0f12;
  --surface-2: #15151a;
  --line: #222228;
  --line-2: #2d2d35;
  --text: #ecebe6;
  --muted: #a3a09a;
  --dim: #66645f;

  --accent: #ff5a1f;
  --accent-2: #ffb07a;
  --accent-rgb: 255, 90, 31;
  --on-accent: #0b0b0b;

  --crit: #ff4d5e;
  --high: #ff9f43;

  --accent-soft: color-mix(in oklab, var(--accent) 14%, transparent);
  --accent-line: color-mix(in oklab, var(--accent) 45%, transparent);

  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --r: 16px;
  --gutter: 24px;
  --maxw: 1040px;

  color-scheme: dark;
}
[data-theme="cipher"]   { --accent: #ffd60a; --accent-2: #fff0a3; --accent-rgb: 255, 214, 10; }
[data-theme="phosphor"] { --accent: #3dff8b; --accent-2: #b8ffd4; --accent-rgb: 61, 255, 139; }
[data-theme="ice"]      { --accent: #63c5ff; --accent-2: #c9ebff; --accent-rgb: 99, 197, 255; }

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  font-feature-settings: "calt" 1, "zero" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--on-accent); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
code { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

.t-accent { color: var(--accent); }
.t-dim { color: var(--dim); }
.small { font-size: 13px; }

.ic { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.125em; }
.ic--lg { width: 22px; height: 22px; color: var(--accent); }

/* ==========================================================================
   Background field
   ========================================================================== */
#field { position: fixed; inset: 0; z-index: -2; width: 100%; height: 100%; pointer-events: none; transition: opacity .6s; }
.no-field #field { opacity: 0; }
.vignette {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 20% -10%, color-mix(in oklab, var(--accent) 9%, transparent), transparent 60%),
    radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,.65) 100%);
}

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.nav.is-stuck {
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav__brand { display: inline-flex; align-items: center; font-weight: 600; font-size: 15px; }
.nav__tilde { color: var(--accent); }
.nav__who { color: var(--muted); margin-left: 1px; transition: color .2s; }
.nav__brand:hover .nav__who { color: var(--text); }
.caret { display: inline-block; width: 9px; height: 18px; margin-left: 4px; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.nav__links { display: flex; align-items: center; gap: 28px; font-size: 13.5px; }
.nav__links a { color: var(--muted); position: relative; transition: color .2s; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1px; background: var(--accent); transition: right .25s; }
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after, .nav__links a.is-active::after { right: 0; }
.nav__links a.is-active { color: var(--text); }
.nav__theme { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line-2); display: grid; place-items: center; transition: border-color .2s; }
.nav__theme:hover { border-color: var(--accent-line); }
.nav__theme .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; padding-top: clamp(64px, 12vh, 128px); padding-bottom: 72px; }
.hud { position: absolute; inset: 28px var(--gutter) 20px; pointer-events: none; }
.hud__c { position: absolute; width: 14px; height: 14px; border-color: var(--line-2); border-style: solid; border-width: 0; }
.hud__c--tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.hud__c--tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.hud__c--bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.hud__c--br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.hud__meta { position: absolute; font-size: 10.5px; letter-spacing: .12em; color: var(--dim); white-space: nowrap; }
.hud__meta--tl { top: -3px; left: 24px; }
.hud__meta--tr { top: -3px; right: 24px; }
.hud__meta--bl { bottom: -4px; left: 24px; display: inline-flex; align-items: center; gap: 8px; }
.hud__meta--br { bottom: -4px; right: 24px; }
.blip { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .6); animation: blip 2s infinite; }
@keyframes blip { 70% { box-shadow: 0 0 0 7px rgba(var(--accent-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); } }

.hero > :not(.hud) { position: relative; margin-left: clamp(0px, 3vw, 40px); max-width: 780px; }
.hero > .hero__title, .hero > .strip { max-width: none; }
.hero__kicker { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.hero__title {
  margin: 0 0 22px;
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.hero__name { color: var(--accent); white-space: nowrap; text-shadow: 0 0 32px rgba(var(--accent-rgb), .28); cursor: default; }
.hero__name .g { color: var(--accent-2); opacity: .75; }
.hero__lede { margin: 0 0 26px; font-size: clamp(15px, 1.55vw, 17px); line-height: 1.8; color: #cfccc5; }
.about__body { max-width: 780px; }
.about__body p { margin: 0 0 16px; font-size: clamp(15px, 1.55vw, 17px); line-height: 1.8; color: #cfccc5; }
.about + .section { padding-top: 40px; }

.ilink { color: var(--accent); border-bottom: 1px dashed var(--accent-line); transition: border-color .2s, background .2s; padding-bottom: 1px; }
.ilink:hover { border-bottom-style: solid; border-bottom-color: var(--accent); background: var(--accent-soft); }
.ilink--sm { font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }

.hero__links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: 13.5px; color: var(--muted); margin-bottom: 44px; }
.hero__links a { display: inline-flex; align-items: center; gap: 7px; transition: color .2s; }
.hero__links a:hover { color: var(--accent); }
.hero__links .sep { color: var(--line-2); }
.hero__more { color: var(--text); }

.strip { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; font-size: 13px; }
.strip li { display: inline-flex; align-items: center; gap: 9px; color: var(--text); }
.strip li em { font-style: normal; color: var(--dim); font-size: 12px; }
.strip .slash { color: var(--accent); font-size: 18px; }
.mono-badge {
  display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px;
  border-radius: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line);
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding-top: 56px; padding-bottom: 40px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.sec-head h2 { display: flex; align-items: center; gap: 14px; margin: 0; font-size: clamp(1.45rem, 2.6vw, 1.9rem); letter-spacing: -0.03em; font-weight: 700; }
.sec-note { font-size: 12.5px; color: var(--dim); }

/* ==========================================================================
   Projects
   ========================================================================== */
.grid-proj { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.proj {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .35s, box-shadow .35s;
}
.proj:hover {
  transform: translateY(-4px);
  border-color: var(--accent-line);
  box-shadow: 0 18px 50px -24px rgba(var(--accent-rgb), .45), 0 0 0 1px rgba(var(--accent-rgb), .06);
}
.proj__preview {
  position: relative;
  height: 252px;
  padding: 22px 22px 0;
  overflow: hidden;
  background-color: #0b0b0e;
  background-image: radial-gradient(rgba(var(--accent-rgb), .22) 1px, transparent 1.2px);
  background-size: 14px 14px;
  border-bottom: 1px solid var(--line);
}
.proj__preview::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(8,8,10,.55));
}
.proj__preview--stars { background-image: radial-gradient(rgba(255,255,255,.45) .8px, transparent 1.2px), radial-gradient(rgba(var(--accent-rgb), .25) 1px, transparent 1.2px); background-size: 37px 41px, 14px 14px; background-position: 7px 11px, 0 0; }
.proj__preview--alert { background-image: radial-gradient(rgba(255, 77, 94, .22) 1px, transparent 1.2px); }

.win {
  position: relative; height: 100%;
  background: #0c0c0f;
  border: 1px solid var(--line-2);
  border-bottom: 0;
  border-radius: 11px 11px 0 0;
  overflow: hidden;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
  box-shadow: 0 -10px 40px -10px rgba(0,0,0,.6);
}
.proj:hover .win { transform: translateY(-6px); }
.win__bar {
  display: flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  border-bottom: 1px solid var(--line);
  font-size: 10.5px; color: var(--dim);
  background: #111115;
}
.win__bar i { width: 9px; height: 9px; border-radius: 50%; background: #2c2c33; }
.proj:hover .win__bar i:nth-child(1) { background: #ff5f57; }
.proj:hover .win__bar i:nth-child(2) { background: #febc2e; }
.proj:hover .win__bar i:nth-child(3) { background: #28c840; }
.win__bar span { margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win__bar .url { padding: 2px 10px; border-radius: 6px; background: #18181d; color: var(--muted); }
.win__bar b { margin-left: auto; font-weight: 500; color: var(--dim); }
.win__bar b.live { color: var(--accent); display: inline-flex; align-items: center; gap: 5px; }
.win__bar b.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.win--web img { width: 100%; height: calc(100% - 30px); object-fit: cover; object-position: top; filter: saturate(.9) brightness(.92); transition: filter .4s, transform .8s cubic-bezier(.2,.7,.2,1); }
.proj:hover .win--web img { filter: none; transform: scale(1.025); }

.term {
  margin: 0; padding: 12px 14px;
  font-size: 11.5px; line-height: 1.55;
  color: #d8d6d0;
  white-space: pre; overflow: hidden;
  font-family: var(--mono);
  font-variant-ligatures: none;
}
.term .t-p { color: var(--accent); }
.term .t-cmd { color: var(--text); }
.term .t-dim { color: #6d6b66; }
.term .t-hl { color: var(--accent); font-weight: 600; }
.term .t-ok { color: var(--accent-2); }
.term .t-crit { color: var(--crit); font-weight: 600; }
.term .t-high { color: var(--high); }
.term .cur { display: inline-block; width: 7px; height: 13px; background: var(--accent); vertical-align: -2px; animation: blink 1s steps(1) infinite; }

.proj__body { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px 22px; flex: 1; }
.proj__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.proj__top h3 { margin: 0; font-size: 1.3rem; letter-spacing: -0.03em; }
.proj__top h3 a { transition: color .2s; }
.proj__top h3 a:hover { color: var(--accent); }
.proj__kind { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.proj__body p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.proj__body .proj__stat { color: var(--text); font-size: 12.5px; padding: 9px 12px; border-left: 2px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; }
.proj__stat span { color: var(--accent); margin-right: 4px; }

.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 11.5px; padding: 3px 9px; border: 1px solid var(--line-2); border-radius: 6px; color: var(--muted); background: rgba(255,255,255,.015); transition: border-color .2s, color .2s; }
.tags li::before { content: "#"; color: var(--accent); margin-right: 1px; }
.proj:hover .tags li { border-color: color-mix(in oklab, var(--accent) 25%, var(--line-2)); }
.tags--tight li { font-size: 11px; padding: 2px 8px; }

.proj__links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: auto; padding-top: 4px; font-size: 13px; }
.proj__links a { display: inline-flex; align-items: center; gap: 5px; color: var(--text); transition: color .2s; }
.proj__links a .ic { color: var(--accent); transition: transform .2s; }
.proj__links a:hover { color: var(--accent); }
.proj__links a:hover .ic { transform: translate(2px, -2px); }

.copy { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; padding: 5px 10px; border: 1px dashed var(--line-2); border-radius: 8px; font-size: 11.5px; color: var(--muted); transition: border-color .2s, color .2s; }
.copy:hover { border-color: var(--accent); color: var(--text); }
.copy .ic { color: var(--accent); }

/* ==========================================================================
   Experience log
   ========================================================================== */
.log { list-style: none; margin: 0; padding: 0; position: relative; }
.log::before { content: ""; position: absolute; left: 172px; top: 10px; bottom: 10px; width: 1px; background: linear-gradient(var(--accent-line), var(--line) 30%, transparent); }
.log__item { display: grid; grid-template-columns: 150px 1fr; gap: 44px; padding: 0 0 30px; position: relative; }
.log__item::before { content: ""; position: absolute; left: 168px; top: 8px; width: 9px; height: 9px; border-radius: 2px; background: var(--bg); border: 1px solid var(--accent); transform: rotate(45deg); }
.log__item:first-child::before { background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.log__when { font-size: 12.5px; color: var(--dim); padding-top: 3px; text-align: right; font-variant-numeric: tabular-nums; }
.log__what h3 { margin: 0 0 8px; font-size: 1.02rem; letter-spacing: -0.02em; }
.log__what h3 span { color: var(--muted); font-weight: 400; }
.log__what ul { margin: 0; padding: 0; list-style: none; }
.log__what li { position: relative; padding-left: 18px; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; line-height: 1.65; }
.log__what li::before { content: "›"; position: absolute; left: 2px; color: var(--accent); }
.log__what code { color: var(--accent-2); font-size: 12.5px; }

/* ==========================================================================
   Bento
   ========================================================================== */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.tile {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 20px 20px;
  overflow: hidden;
  transition: border-color .3s;
}
.tile:hover { border-color: var(--line-2); }
.tile__h { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; }
.tile__h > .ic { color: var(--accent); width: 16px; height: 16px; }
.tile__tag { margin-left: auto; font-size: 11px; font-weight: 400; color: var(--accent); }
.tile p { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.65; }

.tile--theme   { grid-column: span 5; }
.tile--connect { grid-column: span 3; display: flex; flex-direction: column; }
.tile--geo     { grid-column: span 4; grid-row: span 2; display: flex; flex-direction: column; }
.tile--sec     { grid-column: span 3; display: flex; flex-direction: column; }
.tile--commits { grid-column: span 5; display: flex; flex-direction: column; }
.tile--riff    { grid-column: span 8; }
.tile--stack   { grid-column: span 4; }

/* theme */
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.themes button {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 6px 10px; border-radius: 10px; font-size: 11.5px; color: var(--muted);
  border: 1px solid var(--line); background: var(--surface-2);
  transition: border-color .2s, color .2s, background .2s;
}
.themes button i { width: 26px; height: 26px; border-radius: 7px; background: var(--sw); box-shadow: 0 0 0 0 var(--sw); transition: box-shadow .3s; }
.themes button:hover { color: var(--text); border-color: var(--line-2); }
.themes button[aria-checked="true"] { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
.themes button[aria-checked="true"] i { box-shadow: 0 0 18px -2px var(--sw); }
.toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle__box { width: 30px; height: 16px; border-radius: 99px; border: 1px solid var(--line-2); position: relative; transition: background .2s, border-color .2s; }
.toggle__box::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--dim); transition: transform .2s, background .2s; }
.toggle input:checked + .toggle__box { border-color: var(--accent); background: var(--accent-soft); }
.toggle input:checked + .toggle__box::after { transform: translateX(14px); background: var(--accent); }
.toggle input:focus-visible + .toggle__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle b { color: var(--accent); font-weight: 500; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 10px 16px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent);
  font-size: 13px; font-weight: 700;
  transition: transform .15s, box-shadow .25s, filter .2s;
}
.btn:hover { box-shadow: 0 8px 28px -8px rgba(var(--accent-rgb), .7); filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.tile--connect .btn { margin-top: auto; }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); font-weight: 500; }
.btn--ghost:hover { border-color: var(--accent); box-shadow: none; }
.btn--lg { padding: 14px 20px; font-size: 14px; }

/* geo */
.geo { position: relative; flex: 1; min-height: 220px; margin: -4px -6px 8px; }
.geo canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.geo__foot { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* security */
.big { font-size: 2.3rem; font-weight: 800; letter-spacing: -0.05em; line-height: 1; margin-bottom: 6px; }
.tile--sec .tags { margin-bottom: 14px; }
.tile--sec .ilink { margin-top: auto; align-self: flex-start; }

/* commits */
.commits { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.commits li { display: flex; gap: 10px; align-items: baseline; font-size: 12.5px; min-width: 0; }
.commits a { display: contents; }
.c-repo { flex: none; color: var(--accent); }
.c-repo::after { content: ":"; color: var(--dim); }
.c-msg { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.commits a:hover .c-msg { color: var(--accent-2); }
.c-when { flex: none; color: var(--dim); font-size: 11px; }
.langbar { display: flex; height: 7px; border-radius: 99px; overflow: hidden; background: var(--line); gap: 2px; margin-bottom: 10px; }
.langbar span { height: 100%; transition: flex-grow .8s cubic-bezier(.2,.7,.2,1); }
.langkey { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--muted); }
.langkey li { display: inline-flex; align-items: center; gap: 6px; }
.langkey i { width: 7px; height: 7px; border-radius: 50%; }
.langkey b { font-weight: 400; color: var(--dim); }
.tile--commits .ilink { margin-top: auto; align-self: flex-start; }

/* riff */
.tile__h .eq { margin-left: auto; width: 120px; height: 22px; }
.riff { border: 1px solid var(--line); border-radius: 10px; background: #0b0b0e; margin-bottom: 14px; }
.riff__scroll { overflow-x: auto; padding: 14px 16px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.riff__tab { font-variant-ligatures: none; position: relative; font-size: 12.5px; line-height: 1.5; white-space: pre; width: max-content; color: #5d5b57; }
.riff__tab .s { color: var(--muted); }
.riff__tab .n { color: var(--text); font-weight: 700; transition: color .15s, text-shadow .15s; }
.riff__tab .n.hit { color: var(--accent); text-shadow: 0 0 10px var(--accent); }
.riff__head { position: absolute; top: -4px; bottom: -4px; width: 2px; left: 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); opacity: 0; transition: opacity .2s; will-change: transform; }
.riff__head.on { opacity: 1; }
.riff__ctrl { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn--play.is-playing { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* stack */
.yml { margin: 0; font-size: 12px; line-height: 1.85; color: var(--muted); white-space: pre-wrap; }
.yml .k { color: var(--accent); }
.yml .c { color: var(--dim); }

/* ==========================================================================
   Contact + footer
   ========================================================================== */
.contact { padding-top: 96px; padding-bottom: 72px; }
.contact__k { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.contact__title { margin: 0 0 18px; font-size: clamp(2.2rem, 7vw, 4.8rem); line-height: 1; letter-spacing: -0.055em; font-weight: 800; }
.contact__lede { margin: 0 0 30px; max-width: 560px; color: var(--muted); }
.contact__row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.contact__socials { display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 13.5px; }
.contact__socials a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); transition: color .2s; }
.contact__socials a:hover { color: var(--accent); }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 22px; padding-bottom: 34px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 16px; border-radius: 10px; font-size: 12.5px;
  background: var(--surface-2); border: 1px solid var(--accent-line); color: var(--text);
  transition: opacity .25s, transform .25s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   Reveal
   ========================================================================== */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .tile--theme   { grid-column: span 7; }
  .tile--connect { grid-column: span 5; }
  .tile--geo     { grid-column: span 6; grid-row: span 1; }
  .tile--sec     { grid-column: span 6; }
  .tile--commits { grid-column: span 12; }
  .tile--riff    { grid-column: span 12; }
  .tile--stack   { grid-column: span 12; }
}
@media (max-width: 820px) {
  .grid-proj { grid-template-columns: 1fr; }
  .nav__links { gap: 18px; }
  .log::before { left: 8px; }
  .log__item { grid-template-columns: 1fr; gap: 4px; padding-left: 32px; }
  .log__item::before { left: 4px; }
  .log__when { text-align: left; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 14px; }
  .nav__links a:not([href="#about"]):not([href="#work"]):not([href="#contact"]) { display: none; }
  .hud { display: none; }
  .hero { padding-top: 48px; }
  .hero > :not(.hud) { margin-left: 0; }
  .hero__links .sep { display: none; }
  .strip .slash { display: none; }
  .strip { flex-direction: column; align-items: flex-start; }
  .proj__preview { height: 200px; padding: 16px 16px 0; }
  .proj__body { padding: 18px 16px 18px; }
  .copy { margin-left: 0; }
  .bento > .tile { grid-column: span 12; }
  .themes { grid-template-columns: repeat(2, 1fr); }
  .sec-head { flex-wrap: wrap; }
  .sec-note { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
