/* =====================================================================
   THEME — light is the default; dark applies when <html data-theme="dark">
   Orange theme. To retune it, change the --accent* / --grad* lines in each block.
   ===================================================================== */
:root {
  --bg: #fffaf5;
  --bg-2: #fff1e3;
  --surface: #ffffff;
  --surface-2: #fff3e7;
  --border: rgba(70,35,10,.10);
  --border-strong: rgba(70,35,10,.20);
  --text: #201409;
  --text-soft: #4b392c;
  --muted: #7a6554;
  --dim: #82705f;

  --accent: #f97316;
  --accent-ink: #b73b0a;            /* orange used for text on light backgrounds */
  --accent-soft: rgba(249,115,22,.12);
  --accent-ring: rgba(249,115,22,.30);
  --on-accent: #1e1006;             /* text on orange buttons */
  --grad: linear-gradient(135deg, #ffab45 0%, #fb8a1e 48%, #f9700f 100%);
  --grad-text: linear-gradient(120deg, #b73b0a 0%, #d4520a 55%, #e8670c 100%);

  --nav-bg: rgba(255,250,245,.80);
  --menu-bg: rgba(255,250,245,.98);
  --shadow-sm: 0 1px 2px rgba(70,35,10,.05), 0 2px 8px -2px rgba(70,35,10,.07);
  --shadow: 0 1px 2px rgba(70,35,10,.05), 0 14px 34px -14px rgba(70,35,10,.22);
  --glow-1: rgba(255,138,40,.24);
  --glow-2: rgba(255,196,64,.18);
  --backdrop: rgba(40,20,8,.52);
  --star: #f5a20b;
  --danger: #d93a4a;

  /* code block stays dark in both themes */
  --code-bg: #1b120b;
  --code-border: rgba(255,255,255,.08);
  --code-text: #f1e3d5;
  --code-c: #8c7867;
  --code-k: #ffb066;
  --code-s: #ffd98c;
  --code-f: #9be9b5;

  --container: 1120px;
  --nav-h: 66px;
  --radius: 16px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
:root[data-theme="dark"] {
  --bg: #130d08;
  --bg-2: #190f09;
  --surface: #1f150e;
  --surface-2: #2b1d13;
  --border: rgba(255,235,220,.09);
  --border-strong: rgba(255,235,220,.20);
  --text: #fdf3ea;
  --text-soft: #e7d4c4;
  --muted: #b49e8c;
  --dim: #806c5c;

  --accent: #ff8a3d;
  --accent-ink: #ffa866;
  --accent-soft: rgba(255,138,61,.15);
  --accent-ring: rgba(255,138,61,.36);
  --on-accent: #1e1006;
  --grad: linear-gradient(135deg, #ffb04d 0%, #ff8524 48%, #f96a14 100%);
  --grad-text: linear-gradient(120deg, #ffbe7a 0%, #ff8f45 55%, #ff6f2c 100%);

  --nav-bg: rgba(19,13,8,.80);
  --menu-bg: rgba(19,13,8,.98);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.35);
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 16px 36px -14px rgba(0,0,0,.65);
  --glow-1: rgba(255,120,30,.30);
  --glow-2: rgba(255,176,50,.17);
  --backdrop: rgba(10,6,3,.84);
  --danger: #ff8593;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + var(--nav-h));
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--accent-ring); }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* smooth colour fade for ~0.3s when the theme is switched */
html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, fill .3s ease, stroke .3s ease, box-shadow .3s ease !important;
}

.ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico-fill { width: 20px; height: 20px; fill: currentColor; stroke: none; flex: none; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  height: var(--nav-h);
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--container);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.logo { font-weight: 700; font-size: 18px; letter-spacing: -.02em; justify-self: start; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--muted); padding: 8px 14px; border-radius: 999px; transition: color .15s, background-color .15s; }
.nav-links a:hover { color: var(--text); background: var(--accent-soft); }
.nav-links a.active { color: var(--accent-ink); background: var(--accent-soft); }
.nav-right { justify-self: end; display: flex; align-items: center; gap: 12px; }
.icon-link { display: inline-flex; color: var(--muted); transition: color .15s; }
.icon-link:hover { color: var(--text); }
.menu-btn { display: none; background: none; border: 0; padding: 4px; cursor: pointer; color: var(--text-soft); }
.menu-btn .ico { width: 22px; height: 22px; }

/* theme toggle (top right) */
.theme-toggle {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none;
  border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-soft); cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, color .15s, background-color .15s, transform .15s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent-ink); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle .ico { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border-radius: 12px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .2s, filter .2s;
}
.btn .ico { transition: transform .2s; }
.btn:hover .ico { transform: translateX(3px); }
.btn-primary { background: var(--grad); color: var(--on-accent); box-shadow: 0 8px 22px -10px var(--accent); }
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 12px 28px -10px var(--accent); }
.btn-outline { border-color: var(--border-strong); color: var(--text); background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 500; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 13px; border-radius: 10px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 90% at 12% 0%, var(--glow-1), transparent 62%),
    radial-gradient(50% 80% at 95% 10%, var(--glow-2), transparent 62%);
}
.hero-bg {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(68%, 960px);
  background: url("images/hero.jpg") right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 42%);
  mask-image: linear-gradient(90deg, transparent 0, #000 42%);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: var(--container); margin: 0 auto;
  padding: clamp(64px, 9vw, 112px) 24px clamp(72px, 10vw, 120px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 48px;
  animation: rise .7s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero h1 { font-size: clamp(40px, 6.4vw, 66px); line-height: 1.08; letter-spacing: -.035em; font-weight: 700; margin-bottom: 22px; }
.hero h1 .grad {
  display: inline-block; padding-bottom: .08em;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.hero p { max-width: 560px; font-size: 17px; line-height: 1.6; color: var(--muted); }
.hero .l2 { display: block; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* Hero photo: no frame or outline, the edges fade out into the background.
   Drop your image at images/avatar.jpg. Tweak the fade with the two % stops below. */
.hero-avatar {
  position: relative; justify-self: end;
  width: clamp(250px, 30vw, 390px); aspect-ratio: 4 / 5;
  -webkit-mask-image:
    linear-gradient(to right,  transparent 0, #000 22%, #000 78%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 16%, #000 76%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right,  transparent 0, #000 22%, #000 78%, transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 16%, #000 76%, transparent 100%);
  mask-composite: intersect;
}
.avatar-frame { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.avatar-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.avatar-frame .ph { width: 26%; height: 26%; stroke-width: 1.2; color: var(--dim); }
/* shown only while there's no photo yet: a soft blob so you can see where it goes */
.avatar-frame:has(.ph:only-child) { background: var(--surface-2); }
/* optional circle version: add class "round" to .hero-avatar */
.hero-avatar.round {
  aspect-ratio: 1 / 1;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 52%, transparent 71%);
  -webkit-mask-composite: source-over;
  mask-image: radial-gradient(circle at 50% 50%, #000 52%, transparent 71%);
  mask-composite: add;
}

/* ---------- Stats ---------- */
.stats { border-bottom: 1px solid var(--border); background: var(--surface); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { position: relative; text-align: center; padding: 50px 12px; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 28%; bottom: 28%; width: 1px; background: var(--border); }
.stat-num {
  display: inline-block;
  font-size: 36px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.stat-label { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.page { border-top: 1px solid var(--border); padding: 104px 0; }
#about { background: var(--bg-2); }
.page-title { font-size: clamp(34px, 5vw, 46px); line-height: 1.1; font-weight: 700; letter-spacing: -.035em; }
.page-sub { margin-top: 14px; color: var(--muted); font-size: 16px; }

/* ---------- Featured ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
.section-head h2 { font-size: 28px; font-weight: 700; letter-spacing: -.03em; }
.link-more { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); transition: color .15s; }
.link-more:hover { color: var(--accent-ink); }
.link-more .ico { width: 13px; height: 13px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, transform .25s, box-shadow .25s;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-4px); box-shadow: var(--shadow); }
.card-img { aspect-ratio: 2.06 / 1; overflow: hidden; background: var(--surface-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-img img { transform: scale(1.05); }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.card-desc { font-size: 14px; color: var(--muted); line-height: 1.55; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag { font-size: 12px; font-weight: 500; line-height: 1; padding: 7px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.card .tags { margin-top: auto; padding-top: 10px; }

/* ---------- Open source band ---------- */
.os-band { padding-top: 24px; }
.os-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center;
  padding-top: 64px; border-top: 1px solid var(--border);
}
.os-left { display: flex; align-items: center; gap: 32px; }
.hex { width: 104px; height: auto; flex: none; filter: drop-shadow(0 14px 22px var(--accent-ring)); }
.hex-body { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1.5; }
.hex-top { fill: var(--accent); opacity: .55; }
.hex-left { fill: var(--accent); opacity: .85; }
.hex-right { fill: var(--accent); opacity: 1; }
.os-left h2 { font-size: 28px; font-weight: 700; letter-spacing: -.03em; }
.os-left p { margin: 8px 0 22px; color: var(--muted); font-size: 15px; }
.code-box {
  position: relative;
  background: var(--code-bg); border: 1px solid var(--code-border); border-radius: var(--radius);
  padding: 26px 28px 48px; box-shadow: var(--shadow);
}
.code-box pre { margin: 0; overflow-x: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.8; color: var(--code-text); }
.code-box .c { color: var(--code-c); }
.code-box .k { color: var(--code-k); }
.code-box .s { color: var(--code-s); }
.code-box .f { color: var(--code-f); }
.code-box .lang { position: absolute; right: 22px; bottom: 16px; font-family: var(--mono); font-size: 12px; color: var(--code-c); }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 32px 0 12px; }
.pill {
  height: 36px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-soft);
  font-size: 13px; font-weight: 500; transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s;
}
.pill:hover { border-color: var(--accent); color: var(--accent-ink); }
.pill.active { background: var(--grad); border-color: transparent; color: var(--on-accent); font-weight: 600; box-shadow: 0 8px 20px -10px var(--accent); }

.enter { animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Project rows ---------- */
.rows { margin-top: 8px; }
.row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 32px;
  padding: 28px 0;
}
.row:not([hidden]) ~ .row:not([hidden]) { border-top: 1px solid var(--border); }
.row-img { width: 176px; aspect-ratio: 1.3 / 1; border-radius: 14px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow-sm); transition: box-shadow .3s; }
.row-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.row:hover .row-img { box-shadow: var(--shadow); }
.row:hover .row-img img { transform: scale(1.05); }
.row-title { font-size: 18px; font-weight: 650; letter-spacing: -.01em; transition: color .2s; }
.row:hover .row-title { color: var(--accent-ink); }
.row-desc { margin-top: 6px; font-size: 14px; color: var(--muted); max-width: 560px; }
.row .tags { margin-top: 14px; }
.row-arrow { color: var(--dim); transition: transform .2s, color .2s; }
.row-arrow .ico { width: 20px; height: 20px; }
.row:hover .row-arrow { transform: translateX(5px); color: var(--accent-ink); }

/* ---------- Open source list ---------- */
.repos { display: grid; gap: 14px; margin-top: 16px; }
.repo {
  position: relative;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px;
  padding: 20px 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .25s, transform .25s;
}
.repo:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.repo-icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent-ink);
}
.repo-icon .ico { width: 24px; height: 24px; stroke-width: 1.7; }
.repo-body { min-width: 0; }
.repo-name { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.repo-name a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.repo-name a:focus-visible { outline: none; }
.repo:has(.repo-name a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.repo-desc { margin-top: 4px; font-size: 14px; color: var(--muted); }
.repo-meta { display: flex; gap: 18px; margin-top: 12px; font-size: 13px; color: var(--dim); }
.repo-meta span { display: inline-flex; align-items: center; gap: 6px; }
.repo-meta .ico { width: 14px; height: 14px; }
.repo-meta span:first-child .ico { color: var(--star); }
.repo-actions { position: relative; z-index: 2; display: flex; align-items: center; gap: 22px; }
.preview-btn .ico { width: 11px; height: 11px; fill: currentColor; stroke: none; }
.preview-btn:hover .ico { transform: none; }
.repo:hover .row-arrow { transform: translateX(5px); color: var(--accent-ink); }

/* ---------- Preview modal ---------- */
html.modal-open { overflow: hidden; }
.modal {
  width: min(880px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); overflow: auto;
  padding: 0; border: 1px solid var(--border-strong); border-radius: 18px;
  background: var(--surface); color: var(--text); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5);
}
.modal::backdrop { background: var(--backdrop); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.modal[open] { animation: pop .2s ease both; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 14px 14px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; font-weight: 650; }
.modal-close { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--text-soft); cursor: pointer; transition: background-color .15s, color .15s; }
.modal-close:hover { background: var(--accent-soft); color: var(--accent-ink); }
.modal-close .ico { width: 18px; height: 18px; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; }
.player video, .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player .empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; font-size: 14px; color: #a8adc8; }
.player .empty .ico { width: 46px; height: 46px; stroke-width: 1.3; color: var(--accent); }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px 16px 22px; border-top: 1px solid var(--border); }
.modal-foot p { font-size: 14px; color: var(--muted); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 260px; gap: 16px 56px; margin-top: 8px; }
.about-copy { grid-column: 1; }
.about-lead { margin-top: 20px; font-size: 17px; color: var(--text-soft); }
.about-text { margin-top: 20px; max-width: 560px; color: var(--muted); font-size: 15px; line-height: 1.75; }
.about-photo {
  grid-column: 2; grid-row: 1; align-self: start; margin-top: 8px; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border-strong); aspect-ratio: 1.07 / 1; background: var(--surface-2);
  box-shadow: 10px 10px 0 var(--accent-soft), var(--shadow);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.facts { grid-column: 1 / -1; list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.facts li { display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--text-soft); }
.facts .ico { width: 36px; height: 36px; padding: 9px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- Contact ---------- */
.form { max-width: 760px; margin-top: 36px; display: grid; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text-soft); }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
  font-size: 14px; box-shadow: var(--shadow-sm); transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:hover, .field textarea:hover { border-color: var(--dim); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.field .err { border-color: var(--danger); }
.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-status { font-size: 13px; color: var(--muted); min-height: 1.4em; }
.form-status.bad { color: var(--danger); }
.socials { display: flex; justify-content: center; gap: 14px; margin-top: 72px; }
.socials a {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-soft); box-shadow: var(--shadow-sm);
  transition: color .15s, transform .15s, border-color .15s, background-color .15s;
}
.socials a:hover { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.socials .ico-fill { width: 22px; height: 22px; }

.footer { text-align: center; padding: 28px 24px 40px; font-size: 12px; color: var(--dim); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-avatar { order: -1; justify-self: start; width: clamp(120px, 32vw, 180px); }
  .cards { grid-template-columns: 1fr 1fr; }
  .os-inner { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}
@media (max-width: 760px) {
  .nav-inner { grid-template-columns: 1fr auto; }
  .menu-btn { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 6px 24px 14px;
    background: var(--menu-bg); border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 0; font-size: 15px; border-radius: 0; background: none; border-bottom: 1px solid var(--border); }
  .nav-links a:hover { background: none; }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links a.active { background: none; }
  :root:not([data-theme="dark"]) .hero-bg { opacity: .32; }
  .hero-bg { width: 100%; opacity: .5; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 90%); mask-image: linear-gradient(90deg, transparent 0, #000 90%); }
  .stat { padding: 36px 6px; }
  .stat-num { font-size: 28px; }
  .stat-label { font-size: 12.5px; }
  .section { padding: 64px 0; }
  .page { padding: 76px 0; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { grid-column: 1; grid-row: auto; order: 3; max-width: 340px; margin-right: 10px; }
  .facts { order: 4; }
}
@media (max-width: 620px) {
  .cards { grid-template-columns: 1fr; }
  .row { grid-template-columns: 96px 1fr auto; gap: 16px; align-items: start; padding: 22px 0; }
  .row-img { width: 96px; border-radius: 12px; }
  .row-arrow { align-self: center; }
  .os-left { flex-direction: column; align-items: flex-start; gap: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .repo { grid-template-columns: auto minmax(0, 1fr); padding: 16px; gap: 14px; }
  .repo-actions { grid-column: 2; }
  .repo-actions .row-arrow { display: none; }
  .modal-foot { flex-direction: column; align-items: flex-start; }
  .repo-icon { width: 44px; height: 44px; }
  .section-head { align-items: center; }
  .section-head h2, .os-left h2 { font-size: 24px; }
  .socials { margin-top: 56px; }
}
@media (max-width: 520px) {
  .nav-right { gap: 10px; }
  .nav-right .icon-link { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after,
  html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after { animation: none !important; transition: none !important; }
}