/* ===========================================================
   DataEng Atlas — styles
   =========================================================== */
:root {
  --bg: #0b1020;
  --bg-2: #11182d;
  --panel: #141c33;
  --panel-2: #1a2342;
  --border: #26304f;
  --text: #e6e9f5;
  --muted: #98a2c3;
  --faint: #6b7598;
  --accent: #6c8cff;
  --accent-2: #2dd4bf;
  --accent-soft: rgba(108, 140, 255, 0.14);
  --good: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --code-bg: #0a0f1e;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --sidebar-w: 260px;
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
[data-theme='light'] {
  --bg: #f5f7fc;
  --bg-2: #eef1f9;
  --panel: #ffffff;
  --panel-2: #f3f5fb;
  --border: #dde2ef;
  --text: #141a2e;
  --muted: #55607f;
  --faint: #8a93ae;
  --accent: #3f5ee8;
  --accent-2: #0d9488;
  --accent-soft: rgba(63, 94, 232, 0.1);
  --code-bg: #0f172a;
  --shadow: 0 10px 30px rgba(20, 30, 60, 0.1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.6em; }
h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 1.4rem; font-weight: 700; margin-top: 1.6em; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; }
ul { padding-left: 1.2em; }
li { margin: 0.25em 0; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--bg-2); border-right: 1px solid var(--border);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 18px 12px 30px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; color: var(--text); font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.brand-logo { font-size: 1.5rem; }
.brand-text b { color: var(--accent); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; font-size: 0.93rem;
}
.nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav a .count { margin-left: auto; font-size: 0.75rem; color: var(--faint); }
.nav-section-title { margin: 20px 12px 8px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); font-weight: 700; }
.nav-cats a { font-size: 0.86rem; padding: 6px 12px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 28px; background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.menu-btn { display: none; }
.search { position: relative; flex: 1; max-width: 640px; }
.search input {
  width: 100%; padding: 10px 14px 10px 38px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  font: inherit; font-size: 0.93rem; outline: none;
}
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 0.9rem; opacity: 0.7; }
.search-results {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); max-height: 60vh; overflow-y: auto; padding: 6px;
}
.search-results.open { display: block; }
.search-results a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.search-results a:hover, .search-results a.sel { background: var(--accent-soft); text-decoration: none; }
.search-results .sr-type { font-size: 0.7rem; text-transform: uppercase; color: var(--accent-2); font-weight: 700; letter-spacing: 0.06em; }
.search-results .sr-sub { font-size: 0.8rem; color: var(--muted); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; width: 38px; height: 38px; cursor: pointer; font-size: 1rem;
}
.icon-btn:hover { border-color: var(--accent); }
.streak { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 6px 12px; font-size: 0.9rem; }

.view { padding: 28px; max-width: 1180px; width: 100%; margin: 0 auto; outline: none; flex: 1; }
.footer { padding: 18px 28px; color: var(--faint); font-size: 0.8rem; border-top: 1px solid var(--border); text-align: center; }

/* ---------- Components ---------- */
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; transition: transform 0.15s ease, border-color 0.15s ease;
}
a.card { color: var(--text); display: block; }
a.card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.tag {
  display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); margin: 0 4px 4px 0;
}
.tag.lvl-Beginner { background: rgba(34,197,94,.14); color: var(--good); }
.tag.lvl-Intermediate { background: rgba(245,158,11,.14); color: var(--warn); }
.tag.lvl-Advanced { background: rgba(239,68,68,.14); color: var(--bad); }
.tag.new { background: rgba(45,212,191,.15); color: var(--accent-2); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--accent); color: #fff; border: none; border-radius: 10px;
  padding: 10px 16px; font: inherit; font-weight: 600; font-size: 0.92rem;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn.small { padding: 6px 12px; font-size: 0.83rem; }
.btn.done { background: var(--good); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 20px; }
.chip {
  border: 1px solid var(--border); background: var(--panel); color: var(--muted);
  padding: 6px 12px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 0.83rem;
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.progress { height: 8px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; transition: width 0.4s ease; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--muted); }

/* ---------- Home ---------- */
.hero {
  background: radial-gradient(1200px 400px at 10% -10%, rgba(108,140,255,.25), transparent),
              radial-gradient(800px 300px at 100% 0%, rgba(45,212,191,.18), transparent), var(--panel);
  border: 1px solid var(--border); border-radius: 20px; padding: 36px; margin-bottom: 24px;
}
.hero h1 { font-size: 2.4rem; }
.hero p { color: var(--muted); font-size: 1.05rem; max-width: 720px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 22px 0 6px; }
.stat { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.stat b { display: block; font-size: 1.6rem; font-weight: 800; }
.stat span { color: var(--muted); font-size: 0.82rem; }
.cat-card .cat-icon { font-size: 1.6rem; }
.cat-card h3 { margin: 8px 0 4px; }
.cat-card .progress { margin-top: 12px; }

/* ---------- Topic list ---------- */
.topic-item { display: flex; flex-direction: column; gap: 6px; }
.topic-item h3 { margin: 0; font-size: 1.02rem; }
.topic-item p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.topic-item .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.done-badge { color: var(--good); font-size: 0.8rem; font-weight: 700; margin-left: auto; }

/* ---------- Topic detail ---------- */
.topic-header { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.topic-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; }
.toc { position: sticky; top: 84px; align-self: start; }
.toc a { display: block; color: var(--muted); font-size: 0.86rem; padding: 4px 0; }
.section { margin-bottom: 28px; }
.section h2 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }
.lead { font-size: 1.08rem; color: var(--text); }
.callout {
  border-left: 4px solid var(--accent-2); background: var(--panel); border-radius: 0 12px 12px 0;
  padding: 14px 18px; margin: 14px 0;
}
.callout.warn { border-color: var(--warn); }
.callout.real { border-color: var(--accent); }
.kp-list { list-style: none; padding: 0; }
.kp-list li { padding: 8px 0 8px 30px; position: relative; border-bottom: 1px dashed var(--border); }
.kp-list li::before { content: '▸'; position: absolute; left: 8px; color: var(--accent); font-weight: 700; }
.compare { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 10px 0; }
.compare th, .compare td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.compare th { background: var(--panel-2); }

/* ---------- Code ---------- */
.code-block { position: relative; margin: 12px 0 18px; border-radius: 12px; overflow: hidden; border: 1px solid #1e2742; }
.code-head { display: flex; justify-content: space-between; align-items: center; background: #121a31; padding: 8px 14px; font-size: 0.78rem; color: #9aa6cc; font-family: var(--mono); }
.copy-btn { background: transparent; border: 1px solid #2a3660; color: #c7d0ee; border-radius: 6px; padding: 2px 10px; cursor: pointer; font-size: 0.75rem; }
.copy-btn:hover { border-color: var(--accent); }
pre.code {
  margin: 0; padding: 16px; background: var(--code-bg); color: #dbe3ff; overflow-x: auto;
  font-family: var(--mono); font-size: 0.84rem; line-height: 1.6; tab-size: 4;
}
.tok-k { color: #c792ea; font-weight: 600; }
.tok-s { color: #c3e88d; }
.tok-c { color: #6b7aa6; font-style: italic; }
.tok-n { color: #f78c6c; }
.tok-f { color: #82aaff; }

/* ---------- System design ---------- */
.sd-card .sd-company { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--accent-2); }
.sd-card h3 { margin: 6px 0; }
.sd-scale { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 16px 0; }
.sd-scale div { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.sd-scale b { display: block; font-size: 1.1rem; color: var(--accent); }
.sd-scale span { font-size: 0.8rem; color: var(--muted); }
.arch { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 18px; overflow-x: auto; }
.arch-flow { display: flex; align-items: stretch; gap: 0; min-width: max-content; }
.arch-layer { display: flex; flex-direction: column; gap: 8px; min-width: 150px; max-width: 190px; }
.arch-layer-title { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); font-weight: 700; text-align: center; margin-bottom: 2px; }
.arch-node {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px;
  font-size: 0.82rem; text-align: center; cursor: default; transition: all 0.15s;
}
.arch-node b { display: block; font-size: 0.85rem; }
.arch-node span { color: var(--muted); font-size: 0.72rem; }
.arch-node:hover { border-color: var(--accent); transform: scale(1.03); }
.arch-layer:nth-child(4n+1) .arch-node { border-top: 3px solid #6c8cff; }
.arch-layer:nth-child(4n+3) .arch-node { border-top: 3px solid #2dd4bf; }
.arch-layer:nth-child(4n+5) .arch-node { border-top: 3px solid #f59e0b; }
.arch-layer:nth-child(4n+7) .arch-node { border-top: 3px solid #e879f9; }
.arch-arrow { display: flex; align-items: center; justify-content: center; padding: 0 10px; color: var(--accent); font-size: 1.4rem; }
.flow-steps { counter-reset: step; list-style: none; padding: 0; }
.flow-steps li { counter-increment: step; position: relative; padding: 10px 0 10px 44px; border-bottom: 1px dashed var(--border); }
.flow-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 10px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; font-size: 0.85rem;
}
.decision { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.decision b { display: block; margin-bottom: 4px; }
.decision p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ---------- Flashcards ---------- */
.fc-wrap { max-width: 760px; margin: 0 auto; }
.fc-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.fc-modes { display: flex; gap: 6px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 4px; }
.fc-modes button { background: transparent; border: none; color: var(--muted); padding: 7px 14px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 0.86rem; font-weight: 600; }
.fc-modes button.active { background: var(--accent); color: #fff; }
.fc-stage { perspective: 1400px; margin: 18px 0; touch-action: pan-y; user-select: none; }
.fc-card {
  position: relative; width: 100%; min-height: 340px; cursor: pointer;
  transform-style: preserve-3d; transition: transform 0.55s cubic-bezier(.2,.8,.2,1);
}
.fc-card.flipped { transform: rotateY(180deg); }
.fc-card.swipe-left { animation: swipeL 0.35s forwards; }
.fc-card.swipe-right { animation: swipeR 0.35s forwards; }
.fc-card.enter { animation: enter 0.35s; }
@keyframes swipeL { to { transform: translateX(-120%) rotate(-12deg); opacity: 0; } }
@keyframes swipeR { to { transform: translateX(120%) rotate(12deg); opacity: 0; } }
@keyframes enter { from { transform: translateY(20px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }
.fc-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 20px; padding: 32px; display: flex; flex-direction: column;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.fc-front { background: linear-gradient(145deg, var(--panel), var(--panel-2)); }
.fc-back { background: linear-gradient(145deg, var(--panel-2), var(--panel)); transform: rotateY(180deg); border-color: var(--accent); }
.fc-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; color: var(--accent-2); display: flex; justify-content: space-between; }
.fc-q { font-size: 1.45rem; font-weight: 700; margin: auto 0; text-align: center; line-height: 1.4; }
.fc-a { font-size: 1.05rem; margin: auto 0; line-height: 1.65; overflow-y: auto; }
.fc-hint { text-align: center; font-size: 0.8rem; color: var(--faint); }
.fc-controls { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.rate-btn { flex: 1; min-width: 110px; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); color: var(--text); cursor: pointer; font: inherit; font-weight: 700; }
.rate-btn small { display: block; font-weight: 500; color: var(--muted); font-size: 0.72rem; }
.rate-btn.again:hover { border-color: var(--bad); background: rgba(239,68,68,.1); }
.rate-btn.hard:hover { border-color: var(--warn); background: rgba(245,158,11,.1); }
.rate-btn.good:hover { border-color: var(--accent); background: var(--accent-soft); }
.rate-btn.easy:hover { border-color: var(--good); background: rgba(34,197,94,.1); }
.kbd { font-family: var(--mono); font-size: 0.72rem; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--panel-2); color: var(--muted); }
.fc-type { display: flex; gap: 8px; margin: 10px 0; }
.fc-type textarea { flex: 1; min-height: 70px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); color: var(--text); padding: 10px 12px; font: inherit; resize: vertical; }
.fc-your { margin-top: 12px; font-size: 0.88rem; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 10px; }
.boxes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 14px 0; }
.boxes div { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 8px; text-align: center; font-size: 0.75rem; color: var(--muted); }
.boxes b { display: block; font-size: 1.2rem; color: var(--text); }
.fc-done { text-align: center; padding: 50px 20px; }
.fc-done .big { font-size: 4rem; }
.confetti { position: fixed; top: -10px; width: 10px; height: 14px; z-index: 100; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.match-tile { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px; min-height: 90px; cursor: pointer; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; text-align: center; transition: all 0.15s; }
.match-tile:hover { border-color: var(--accent); }
.match-tile.sel { border-color: var(--accent); background: var(--accent-soft); }
.match-tile.ok { border-color: var(--good); background: rgba(34,197,94,.12); opacity: 0.45; pointer-events: none; }
.match-tile.bad { animation: shake 0.35s; border-color: var(--bad); }
.match-tile.term { font-weight: 700; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ---------- Quiz ---------- */
.quiz-q { font-size: 1.2rem; font-weight: 700; margin: 10px 0 18px; }
.quiz-opt { display: block; width: 100%; text-align: left; margin-bottom: 10px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; }
.quiz-opt:hover:not(:disabled) { border-color: var(--accent); }
.quiz-opt.correct { border-color: var(--good); background: rgba(34,197,94,.12); }
.quiz-opt.wrong { border-color: var(--bad); background: rgba(239,68,68,.12); }
.quiz-opt:disabled { cursor: default; }

/* ---------- Roadmap ---------- */
.roadmap { position: relative; padding-left: 34px; }
.roadmap::before { content: ''; position: absolute; left: 12px; top: 0; bottom: 0; width: 3px; background: linear-gradient(var(--accent), var(--accent-2)); border-radius: 3px; }
.rm-stage { position: relative; margin-bottom: 26px; }
.rm-stage::before { content: ''; position: absolute; left: -29px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.rm-stage.complete::before { background: var(--good); border-color: var(--good); }
.rm-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rm-links a { font-size: 0.82rem; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--border); color: var(--text); background: var(--panel-2); }
.rm-links a.done { border-color: var(--good); color: var(--good); }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px); background: var(--panel); border: 1px solid var(--accent); color: var(--text); padding: 10px 18px; border-radius: 12px; box-shadow: var(--shadow); transition: transform 0.3s; z-index: 50; font-size: 0.9rem; }
.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .topic-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
}
@media (max-width: 820px) {
  .sidebar { position: fixed; left: 0; z-index: 40; transform: translateX(-100%); transition: transform 0.25s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-block; }
  .topbar { padding: 10px 14px; }
  .view { padding: 18px 14px; }
  .hero { padding: 24px; }
  .hero h1 { font-size: 1.8rem; }
  .fc-q { font-size: 1.15rem; }
  .fc-face { padding: 22px; }
  .streak { display: none; }
}

/* ---------- Installable app ---------- */
.install-btn { width: auto; padding: 0 12px; font-size: 13px; font-weight: 600; gap: 6px; white-space: nowrap; }
.install-btn[hidden], .offline-badge[hidden] { display: none !important; }
.offline-badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(251, 191, 36, .15); color: #fbbf24; border: 1px solid rgba(251, 191, 36, .35); }
.install-hint { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); display: none; align-items: flex-end; justify-content: center; z-index: 200; padding: 16px; }
.install-hint.show { display: flex; }
.install-card { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; max-width: 420px; width: 100%; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.install-card h3 { margin: 0 0 10px; }
.install-card ol { margin: 0 0 10px; padding-left: 20px; line-height: 1.9; }
.ios-share { display: inline-block; padding: 0 6px; border: 1px solid var(--border); border-radius: 6px; }
@media (display-mode: standalone) {
  .topbar { padding-top: max(10px, env(safe-area-inset-top)); }
  .footer { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
}
@media (max-width: 520px) { .install-btn .install-label { display: none; } }

/* ---------- About me ---------- */
.about-hero { display: flex; gap: 24px; align-items: center; padding: 28px; background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--panel); }
.about-avatar { flex: 0 0 auto; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; font-size: 2.4rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 10px 30px rgba(108, 140, 255, .35); overflow: hidden; }
.about-avatar img { width: 100%; height: 100%; object-fit: cover; }
.about-head h1 { margin: 2px 0 8px; }
.about-kicker { color: var(--accent-2); font-weight: 700; font-size: .9rem; }
.about-facts { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: .93rem; margin-bottom: 10px; }
.about-tagline { font-size: 1.05rem; margin: 0 0 16px; }
.about-bio p { margin: 0 0 10px; line-height: 1.7; }
.about-bio p:last-child { margin-bottom: 0; }
.about-bio .btn-row { margin-top: 14px; }
.about-chips { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 620px) { .about-hero { flex-direction: column; text-align: center; } .about-facts, .about-hero .btn-row { justify-content: center; } }
.about-avatar.sm { width: 72px; height: 72px; font-size: 1.5rem; box-shadow: none; }
.about-certs { margin-bottom: 10px; }
.cert { display: inline-block; font-size: .85rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: rgba(251, 191, 36, .12); color: #f59e0b; border: 1px solid rgba(251, 191, 36, .35); }
.about-stats { margin-top: 16px; }
.about-stats .stat span { line-height: 1.4; }
.timeline { display: grid; gap: 14px; border-left: 2px solid var(--border); padding-left: 18px; margin-left: 6px; }
.tl-item { position: relative; }
.tl-item::before { content: ''; position: absolute; left: -26px; top: 22px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tl-org { color: var(--accent-2); font-weight: 600; }
.tl-when { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.tl-item ul { margin: 10px 0 12px; padding-left: 20px; line-height: 1.65; }
.skill-groups { display: grid; gap: 12px; }
.skill-row { display: grid; grid-template-columns: 170px 1fr; gap: 12px; align-items: center; }
.skill-label { font-weight: 600; color: var(--muted); font-size: .9rem; }
.author-card { display: flex; gap: 18px; align-items: flex-start; }
.author-text p { margin: 8px 0 12px; }
@media (max-width: 620px) { .skill-row { grid-template-columns: 1fr; gap: 6px; } .author-card { flex-direction: column; } }
