/* =========================================================
   ihsonnet/projects — styles
   Colours are tokens; dark theme overrides them below.
   ========================================================= */
:root {
  --bg: #f8fafd;
  --surface: #ffffff;
  --surface-2: #f3f6fb;
  --text: #141c2b;
  --text-2: #4d5869;
  --muted: #7a8494;
  --line: #e3e8f0;
  --accent: #4a78f5;
  --accent-soft: #eaf0ff;
  --tag-bg: #f2f5fc;
  --tag-line: #e0e6f2;
  --tag-text: #5a6a8c;
  --shadow: 0 1px 2px rgba(20, 30, 50, .04), 0 6px 18px rgba(20, 30, 50, .05);
  --shadow-hover: 0 2px 4px rgba(20, 30, 50, .05), 0 14px 32px rgba(20, 30, 50, .10);

  /* hero is dark in both themes */
  --hero-1: #07101c;
  --hero-2: #111b2a;
  --hero-text: #f4f7fc;
  --hero-sub: #8eaaff;
  --hero-muted: #b4bfcf;

  --blue: #4d8df5;
  --purple: #8161e9;
  --gold: #efa923;
  --green: #22a06b;
  --red: #e5484d;

  --shell: 1200px;
  --radius: 14px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", Consolas, ui-monospace, monospace;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0b111b;
  --surface: #121a27;
  --surface-2: #172131;
  --text: #e8edf5;
  --text-2: #b3bdcc;
  --muted: #8591a3;
  --line: #222d3e;
  --accent: #7a9bff;
  --accent-soft: #1b2742;
  --tag-bg: #19233a;
  --tag-line: #26324a;
  --tag-text: #a9b8d8;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 6px 18px rgba(0, 0, 0, .25);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .3), 0 16px 36px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s, color .25s;
}
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; }
.icon { width: 1em; height: 1em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.shell { width: min(100% - 48px, var(--shell)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- header ---------- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: 68px;
  color: var(--hero-text);
  transition: background-color .25s, box-shadow .25s, backdrop-filter .25s;
}
.topbar.scrolled, .topbar.solid {
  background: rgba(8, 15, 26, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06);
}
.nav-shell { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand-mark {
  position: relative; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; flex: none;
  color: #fff; font-size: 17px;
  background: linear-gradient(135deg, #5b8cff 0%, #7a5cf0 100%);
  box-shadow: 0 6px 18px rgba(91, 120, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .25s, box-shadow .25s;
}
.brand-mark .icon { stroke-width: 2.4; }
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.05); box-shadow: 0 8px 24px rgba(91, 120, 255, .5), inset 0 1px 0 rgba(255,255,255,.25); }
.brand-text { display: flex; align-items: baseline; font-family: var(--mono); font-size: 16px; letter-spacing: -.3px; white-space: nowrap; }
.brand-owner { color: #fff; font-weight: 600; }
.brand-slash { color: #5d6b85; margin: 0 5px; font-weight: 400; }
.brand-name {
  font-weight: 600;
  background: linear-gradient(90deg, #8eaaff, #b89bff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav { margin-left: auto; display: flex; align-items: center; gap: 28px; }
.nav a {
  position: relative; height: 68px; display: flex; align-items: center;
  color: rgba(255, 255, 255, .72); font-size: 14px; font-weight: 500; transition: color .2s;
}
.nav a:hover { color: #fff; }
.nav a.active { color: #86a3ff; }
.nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 18px;
  height: 2px; border-radius: 2px; background: #7b9bff;
}
.nav-right { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 10px; color: #e6ebf4; font-size: 18px; transition: background-color .2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .08); }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
.connect {
  height: 38px; display: inline-flex; align-items: center; gap: 8px;
  padding: 0 18px; border-radius: 999px;
  border: 1px solid #6c8eea; background: rgba(47, 71, 122, .2);
  color: #eef3ff; font-size: 14px; font-weight: 500; transition: background-color .2s, transform .2s;
}
.connect .icon { color: #84a4ff; }
.connect:hover { background: rgba(84, 120, 230, .3); }
.menu-btn { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  color: var(--hero-text);
  background:
    radial-gradient(circle at 50% 28%, rgba(67, 98, 157, .22), transparent 38%),
    linear-gradient(145deg, var(--hero-1), var(--hero-2));
}
.hero::before { /* faint stars */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .7;
  background-image:
    radial-gradient(circle at 10% 21%, rgba(255,255,255,.14) 0 1px, transparent 1.5px),
    radial-gradient(circle at 34% 31%, rgba(255,255,255,.08) 0 1px, transparent 1.5px),
    radial-gradient(circle at 63% 15%, rgba(255,255,255,.10) 0 1px, transparent 1.5px),
    radial-gradient(circle at 80% 40%, rgba(255,255,255,.08) 0 1px, transparent 1.5px);
  background-size: 270px 230px, 320px 250px, 350px 270px, 310px 245px;
}
.diamonds { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.diamonds i {
  position: absolute; transform: rotate(45deg);
  border: 1px solid rgba(255, 255, 255, .04); background: rgba(255, 255, 255, .025);
}
.diamonds i:nth-child(1) { width: 260px; height: 260px; right: -40px; top: 20px; }
.diamonds i:nth-child(2) { width: 170px; height: 170px; right: 200px; top: 110px; }
.diamonds i:nth-child(3) { width: 110px; height: 110px; right: 370px; top: 220px; }
.diamonds i:nth-child(4) { width: 320px; height: 320px; right: 80px; top: 280px; background: rgba(255,255,255,.012); }

.hero-home { min-height: 600px; display: flex; align-items: center; padding: 108px 0 72px; }
.hero-inner { width: min(100% - 32px, 760px); margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.avatar { width: 168px; height: 168px; border-radius: 50%; object-fit: cover; margin-bottom: 20px; filter: drop-shadow(0 12px 28px rgba(0,0,0,.35)); }
.hero h1 { margin: 0; font-size: clamp(32px, 5vw, 50px); line-height: 1.08; letter-spacing: -1.4px; font-weight: 750; }
.hero-headline { margin: 12px 0 0; color: var(--hero-sub); font-size: clamp(16px, 2.2vw, 20px); font-weight: 650; }
.hero-roles { margin: 10px 0 0; color: #d7dde7; font-size: 16px; }
.hero-roles b { color: #8f9bad; font-weight: 400; margin: 0 8px; }
.hero-tagline { margin: 12px 0 0; max-width: 540px; color: var(--hero-muted); font-size: 15px; }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.social {
  height: 42px; padding: 0 16px; display: inline-flex; align-items: center; gap: 9px;
  border-radius: 10px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04);
  color: #e8edf5; font-size: 14px; transition: background-color .2s, border-color .2s, transform .2s;
}
.social:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .26); transform: translateY(-2px); }
.social .icon { font-size: 17px; }
.scroll-down {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  color: #dfe6f1; font-size: 26px; animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* sub-page hero band */
.hero-page { padding: 120px 0 48px; }
.hero-page .crumbs { display: flex; gap: 8px; align-items: center; color: var(--hero-muted); font-size: 14px; margin-bottom: 14px; }
.hero-page .crumbs a:hover { color: #fff; }
.hero-page h1 { font-size: clamp(30px, 4.4vw, 44px); }
.hero-page .lead { margin: 12px 0 0; max-width: 640px; color: var(--hero-muted); font-size: 17px; }

/* ---------- sections ---------- */
main { padding: 56px 0 72px; }
.block + .block { margin-top: 64px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.section-title { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 26px; line-height: 1.2; letter-spacing: -.5px; font-weight: 700; }
.section-title::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%; flex: none;
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.view-all { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 14px; font-weight: 500; white-space: nowrap; }
.view-all .icon { transition: transform .2s; }
.view-all:hover .icon { transform: translateX(3px); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s, background-color .25s;
}
a.card:hover, .card.hoverable:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

/* ---------- projects ---------- */
.project-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.project-grid.wide { grid-template-columns: repeat(3, 1fr); }
.project-card { position: relative; display: flex; flex-direction: column; overflow: hidden; }
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.project-card:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.project-card h3 a { color: inherit; }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.stretched:focus-visible { outline: none; }
.project-foot .actions { display: inline-flex; align-items: center; gap: 6px; }
.project-foot .ext {
  position: relative; z-index: 2;
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px;
  color: var(--muted); font-size: 15px; transition: background-color .2s, color .2s;
}
.project-foot .ext:hover { background: var(--accent-soft); color: var(--accent); }
.project-foot .more { margin-left: 4px; }
.cover-logo { display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.cover-logo img { width: 100%; height: 100%; object-fit: contain; padding: 12% 10%; }
.project-body { flex: 1; display: flex; flex-direction: column; padding: 18px 18px 16px; }
.project-body h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -.2px; }
.project-body p { margin: 0 0 16px; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px;
  border: 1px solid var(--tag-line); background: var(--tag-bg); color: var(--tag-text);
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.project-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px;
}
.project-foot .meta { display: flex; gap: 14px; }
.project-foot .meta span, .project-foot .more { display: inline-flex; align-items: center; gap: 6px; }
.project-foot .more { color: var(--accent); font-weight: 500; }

/* covers — image or generated */
.cover { position: relative; aspect-ratio: 16 / 9.4; overflow: hidden; background: #0d1626; }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.project-card:hover .cover img, .project-card:hover .cover-art { transform: scale(1.04); }
.cover-art {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 20px; color: #fff; text-align: left; transition: transform .4s;
}
.cover-art .icon { font-size: 52px; stroke-width: 1.6; flex: none; }
.cover-art strong { font-size: 26px; line-height: 1.15; font-weight: 650; letter-spacing: -.4px; }
.cover-art strong.long { font-size: 21px; }
.cover-art em { font-style: normal; }
.cover-navy    { background: radial-gradient(circle at 30% 20%, #1d3463, transparent 60%), linear-gradient(135deg, #0b1630, #101d3c); }
.cover-navy .icon, .cover-navy em { color: #6f97ff; }
.cover-emerald { background: radial-gradient(circle at 70% 30%, #13453b, transparent 60%), linear-gradient(135deg, #07211d, #0c2e28); }
.cover-emerald .icon { color: #d7f5ea; }
.cover-crimson { background: radial-gradient(circle at 30% 30%, #4a1424, transparent 60%), linear-gradient(135deg, #1a0a12, #2b0f1b); }
.cover-crimson .icon { color: #ff7a93; }
.cover-indigo  { background: radial-gradient(circle at 70% 20%, #2c2a6b, transparent 60%), linear-gradient(135deg, #12112e, #1b1946); }
.cover-indigo .icon { color: #a99bff; }
.cover-space {
  background:
    radial-gradient(ellipse 85% 34% at 50% 104%, #0a1430 0 60%, #ff7a3d 64%, rgba(232, 106, 43, .35) 70%, transparent 82%),
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.5) 0 1px, transparent 1.5px),
    radial-gradient(circle at 75% 35%, rgba(255,255,255,.4) 0 1px, transparent 1.5px),
    #04070f;
  background-size: auto, auto, 90px 70px, 120px 90px, auto;
}
.cover-space strong { font-size: 40px; font-weight: 800; letter-spacing: -1px; }
.cover-space em { color: #ff6a2b; }

/* ---------- repositories ---------- */
.repo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.repo { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; padding: 14px 16px; }
.repo-icon {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  color: #fff; font-size: 20px; background: linear-gradient(145deg, #2b384c, #111925);
}
.repo-copy { min-width: 0; }
.repo-copy strong { display: block; font-size: 15px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo-copy small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo-copy small.none { font-style: italic; opacity: .75; }
.live-badge {
  display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text-2); font-size: 12.5px; font-weight: 500; white-space: nowrap;
}
.live-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(34, 160, 107, .5); animation: pulse 2s infinite; }
.live-badge.stale i { background: var(--gold); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(34, 160, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 160, 107, 0); } }
.lang { display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; color: var(--muted); font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--c, #adb6c5); }
.repo-meta { display: flex; gap: 16px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.repo-meta span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- organizations ---------- */
.org-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 20px; }
@media (max-width: 900px) { .org-grid { grid-template-columns: 1fr; } }
.org { position: relative; display: grid; grid-template-columns: 56px 1fr 18px; align-items: center; gap: 16px; padding: 18px; }
.org:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.org:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.org-logo { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); background: #fff; }
.org-copy { min-width: 0; display: flex; flex-direction: column; }
.org-copy strong { font-size: 16px; }
.org-copy strong a { color: inherit; }
.org-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.org-role, .org-private {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.org-role { color: var(--accent); background: var(--accent-soft); }
.org-private { color: var(--muted); border: 1px solid var(--line); background: var(--surface-2); }
.org-private .icon { font-size: 11px; }
.org-site { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 5px; color: var(--accent); }
.org-site:hover { text-decoration: underline; }
.org-desc { margin-top: 6px; color: var(--text-2); font-size: 13.5px; line-height: 1.45; }
.org-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; color: var(--muted); font-size: 12.5px; }
.org-meta span { display: inline-flex; align-items: center; gap: 5px; }
.org-go { color: var(--muted); font-size: 18px; transition: transform .2s, color .2s; }
.org:hover .org-go { color: var(--accent); transform: translate(2px, -2px); }

/* ---------- statistics ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { position: relative; min-height: 132px; padding: 18px; overflow: hidden; }
.stat-head { display: flex; align-items: center; gap: 12px; }
.stat-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; flex: none; }
.stat-head small { display: block; color: var(--muted); font-size: 13px; line-height: 1.2; }
.stat-head strong { display: block; font-size: 30px; line-height: 1.1; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.stat p { position: relative; z-index: 1; margin: 18px 0 0; color: var(--muted); font-size: 13px; max-width: 52%; line-height: 1.35; }
.spark { position: absolute; right: 12px; bottom: 14px; width: 46%; height: 58px; overflow: visible; }
.tone-blue   { --tone: var(--blue); }
.tone-purple { --tone: var(--purple); }
.tone-gold   { --tone: var(--gold); }
.stat-icon { color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); }
.spark path.line { stroke: var(--tone); fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark path.area { fill: var(--tone); opacity: .12; }

.languages h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
.lang-row { display: grid; grid-template-columns: 96px 1fr 36px; align-items: center; gap: 10px; color: var(--text-2); font-size: 12.5px; line-height: 1.9; }
.lang-row span { display: flex; align-items: center; gap: 7px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bar { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; background: var(--c); transform-origin: left; animation: grow .9s cubic-bezier(.2,.8,.2,1); }
@keyframes grow { from { transform: scaleX(0); } }
.lang-row em { font-style: normal; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1080px) { .skills-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .skills-grid { grid-template-columns: 1fr; } }
.skill { padding: 20px; }
.skill h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 16px; }
.skill h3 .icon { color: var(--accent); font-size: 20px; }
.skill .tags { margin: 0; }

/* ---------- achievements ---------- */
.achievement-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.achievement { display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: center; padding: 22px; }
.ach-icon {
  width: 72px; height: 72px; border-radius: 18px; display: grid; place-items: center;
  font-size: 34px; color: var(--tone); background: color-mix(in srgb, var(--tone) 13%, transparent);
  overflow: hidden;
}
.ach-icon img { width: 100%; height: 100%; object-fit: contain; }
.achievement h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.3; }
.achievement p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.achievement .date { display: block; margin-top: 10px; color: var(--accent); font-size: 13px; font-weight: 600; }
.ach-link { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-weight: 500; transition: color .2s; }
.ach-link:hover { color: var(--accent); }

/* ---------- about + contact (one section) ---------- */
.about {
  display: grid; grid-template-columns: 1.45fr 1fr;
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface);
  overflow: hidden;
}
.about-main { padding: 48px; }
.about-title {
  margin: 0 0 22px !important; max-width: 560px;
  color: var(--text) !important; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.25;
  letter-spacing: -.8px; font-weight: 650;
}
.about-main p { margin: 0 0 14px; color: var(--text-2); max-width: 620px; }
.about-meta { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.about-meta dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.about-meta dd { margin: 4px 0 0; font-size: 14.5px; font-weight: 500; }

.about-contact { padding: 48px 44px; border-left: 1px solid var(--line); background: var(--surface-2); display: flex; flex-direction: column; }
.eyebrow { margin: 0 0 12px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.contact-email {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-size: clamp(19px, 2vw, 23px); font-weight: 650; letter-spacing: -.5px;
  color: var(--text); word-break: break-all;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 0 2px no-repeat;
  padding-bottom: 2px; transition: background-size .3s, color .2s;
}
.contact-email .icon { color: var(--accent); transition: transform .2s; flex: none; }
.contact-email:hover { color: var(--accent); background-size: 100% 2px; }
.contact-email:hover .icon { transform: translate(2px, -2px); }
.availability { display: flex; align-items: center; gap: 9px; margin: 14px 0 0; color: var(--text-2); font-size: 14px; }
.availability i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; animation: pulse 2s infinite; }
.link-list { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--line); }
.link-list a {
  display: grid; grid-template-columns: 18px auto 1fr 16px; align-items: center; gap: 12px;
  padding: 14px 2px; border-bottom: 1px solid var(--line);
  font-size: 14.5px; font-weight: 500; color: var(--text); transition: color .2s, padding .2s;
}
.link-list .icon { color: var(--muted); font-size: 17px; transition: color .2s, transform .2s; }
.link-list small { color: var(--muted); font-size: 13px; font-weight: 400; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-list a:hover { color: var(--accent); padding-left: 6px; }
.link-list a:hover .icon { color: var(--accent); }
.link-list a:hover .go { transform: translate(2px, -2px); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 10px; font-weight: 600; font-size: 14px;
  transition: background-color .2s, transform .2s, border-color .2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }

/* ---------- projects page ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.search {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; min-width: min(100%, 300px);
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted);
}
.search input { flex: 1; border: 0; outline: 0; background: none; color: var(--text); font: inherit; font-size: 15px; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 500; transition: all .2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.empty { padding: 48px; text-align: center; color: var(--muted); }

/* ---------- project details ---------- */
.detail-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.detail-hero .cover { border-radius: var(--radius); border: 1px solid rgba(255,255,255,.08); box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 20px; color: var(--hero-muted); font-size: 14px; }
.detail-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero .tags { margin-top: 20px; }
.hero .tag { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #cfd8ea; }
.hero .btn-row { margin-top: 26px; }
.hero .btn-ghost { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.16); color: #eef2f8; }
.hero .btn-ghost:hover { border-color: #86a3ff; color: #fff; }
.status { display: inline-flex; align-items: center; gap: 7px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--green)); }

.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.detail-section { padding: 28px; }
.detail-section + .detail-section { margin-top: 20px; }
.detail-section h2 { margin: 0 0 14px; font-size: 20px; letter-spacing: -.3px; }
.detail-section p { margin: 0 0 14px; color: var(--text-2); }
.detail-section p:last-child { margin-bottom: 0; }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.features li { display: flex; gap: 12px; color: var(--text-2); }
.features li .icon { color: var(--green); margin-top: 4px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.gallery img { width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.aside { position: sticky; top: 88px; display: grid; gap: 20px; }
.facts { padding: 22px; }
.facts h3 { margin: 0 0 12px; font-size: 15px; }
.facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; font-weight: 500; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.pager a { padding: 18px 20px; }
.pager small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.pager strong { display: block; margin-top: 4px; font-size: 16px; }
.pager .next { text-align: right; }
.pager .next small { justify-content: flex-end; }

/* ---------- footer ---------- */
footer { background: linear-gradient(180deg, #0b1421, #0d1725); color: #aab3c0; font-size: 14px; }
.footer-shell { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0; }
.footer-shell .heart { color: #e45184; }
.footer-shell .loc { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- loading / reveal ---------- */
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--radius); min-height: 120px; }
@keyframes shimmer { to { background-position: -200% 0; } }
/* only hide when JS runs (theme.js adds .js), so no-JS visitors and crawlers see everything */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.error-box { padding: 24px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid.wide { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .achievement-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .aside { position: static; }
}
@media (max-width: 900px) {
  .menu-btn { display: grid; }
  .nav {
    position: fixed; top: 68px; left: 0; right: 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 16px;
    background: rgba(8, 15, 26, .97); backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,.06);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .2s;
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { height: 48px; border-bottom: 1px solid rgba(255,255,255,.05); }
  .nav a.active::after { display: none; }
  .nav-right { margin-left: auto; }
  .repo-grid { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about-contact { border-left: 0; border-top: 1px solid var(--line); }
  .about-main, .about-contact { padding: 32px 24px; }
  .detail-hero { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 620px) {
  .shell { width: min(100% - 32px, var(--shell)); }
  .brand { gap: 9px; }
  .brand-mark { width: 30px; height: 30px; font-size: 15px; border-radius: 9px; }
  .brand-text { font-size: 14px; }
  .brand-slash { margin: 0 3px; }
  .nav-right { gap: 4px; }
  .connect span { display: none; }
  .connect { width: 38px; padding: 0; justify-content: center; }
  .hero-home { min-height: 0; padding: 96px 0 72px; }
  .avatar { width: 132px; height: 132px; }
  .hero-roles b { margin: 0 4px; }
  .social { flex: 1 1 calc(50% - 10px); justify-content: center; }
  .project-grid, .project-grid.wide, .stats-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 22px; }
  .repo { grid-template-columns: 40px 1fr; }
  .repo-icon { width: 40px; height: 40px; }
  .repo-meta { grid-column: 2; }
  .achievement { grid-template-columns: 56px 1fr; padding: 18px; }
  .ach-icon { width: 56px; height: 56px; font-size: 26px; }
  .footer-shell { flex-direction: column; align-items: flex-start; }
  .pager { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
}
