:root {
  --bg: #0b0b0c;
  --bg-2: #121214;
  --card: rgba(var(--fg-rgb), 0.025);
  --card-hover: rgba(var(--fg-rgb), 0.045);
  --ink: #ededef;
  --ink-2: #a3a3aa;
  --muted: #6e6e76;
  --line: rgba(var(--fg-rgb), 0.08);
  --line-2: rgba(var(--fg-rgb), 0.14);
  --accent: #d4f36b;
  --accent-rgb: 212, 243, 107;
  --accent-ink: #0b0b0c;
  --accent-fill: #d4f36b;
  --fg-rgb: 255, 255, 255;
  --tile: #161618;
  --violet: #b9a6ff;
  --sans: "Geist", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
b, strong { color: var(--ink); font-weight: 500; }

::selection { background: var(--accent-fill); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: fixed; left: 1rem; top: -4rem; z-index: 100;
  padding: 0.6rem 1rem; border-radius: 10px;
  background: var(--accent-fill); color: var(--accent-ink); font-weight: 600;
}
.skip:focus { top: 1rem; }

/* ---------- Ambient ---------- */
.spotlight {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(600px circle at var(--mx, 20%) var(--my, 10%), rgba(var(--accent-rgb), 0.055), transparent 70%),
    radial-gradient(900px circle at 0% 0%, rgba(185, 166, 255, 0.05), transparent 60%);
}
.noise {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Layout ---------- */
.layout {
  position: relative; z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: clamp(3rem, 6vw, 6rem);
}

.side {
  position: sticky; top: 0;
  height: 100vh;
  height: 100dvh;
  padding: clamp(4rem, 9vh, 6.5rem) 0 clamp(2.5rem, 6vh, 4rem);
  display: flex; flex-direction: column; justify-content: space-between;
}

.main { padding: clamp(4rem, 9vh, 6.5rem) 0 2rem; }

/* ---------- Identity ---------- */
.me { display: flex; align-items: center; gap: 1rem; }
.avatar {
  position: relative;
  width: 104px; height: 104px;
  flex-shrink: 0;
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, var(--accent), rgba(var(--accent-rgb), 0.1) 40%, var(--violet) 70%, var(--accent));
}
.avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--bg);
  transition: transform 0.6s var(--ease);
}
.avatar:hover img { transform: scale(1.06) rotate(-2deg); }

.where {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--mono); font-size: 0.78rem;
  color: var(--ink-2);
}
.where time { color: var(--ink); }
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.6);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.5); }
  80%, 100% { box-shadow: 0 0 0 9px rgba(var(--accent-rgb), 0); }
}

.name {
  margin-top: 1.8rem;
  color: var(--ink);
  font-size: clamp(2.4rem, 4.3vw, 3.35rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
}
.title {
  margin-top: 0.9rem;
  color: var(--ink);
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.title span { color: var(--accent); padding: 0 0.15em; }
.tagline {
  margin-top: 0.9rem;
  max-width: 23rem;
  font-size: 1.02rem;
}

.toc {
  display: flex; flex-wrap: wrap; gap: 0.2rem 1.2rem;
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.toc a {
  position: relative;
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 0;
  font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}
.toc-line {
  width: 0.5rem; height: 1px;
  background: currentColor;
  transition: width 0.35s var(--ease), background 0.3s;
}
.toc a:hover,
.toc a.is-active { color: var(--ink); }
.toc a:hover .toc-line,
.toc a.is-active .toc-line { width: 1.4rem; }
.toc a.is-active .toc-line { background: var(--accent); }

/* what I do */
.whatido { margin-top: 1.4rem; max-width: 30rem; }
.wid-h { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.whatido ul { display: grid; gap: 0.3rem; margin-top: 0.5rem; }
.whatido li { position: relative; padding-left: 1.1rem; font-size: 0.92rem; line-height: 1.5; }
.whatido li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }

/* certifications */
.certs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 1.6rem; max-width: 30rem; }
.cert {
  position: relative;
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.65rem 1.6rem 0.65rem 0.75rem;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: linear-gradient(160deg, rgba(var(--fg-rgb), 0.05), rgba(var(--fg-rgb), 0.015));
  overflow: hidden;
  transition: border-color 0.3s, transform 0.35s var(--ease);
}
.cert::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(160px 80px at 0% 0%, var(--brand-glow), transparent 70%);
  pointer-events: none;
}
.cert:hover { transform: translateY(-2px); border-color: var(--brand-line); }
.cert-snow { --brand: #29b5e8; --brand-glow: rgba(41, 181, 232, 0.16); --brand-line: rgba(41, 181, 232, 0.5); }
.cert-dbx { --brand: #ff3621; --brand-glow: rgba(255, 54, 33, 0.14); --brand-line: rgba(255, 54, 33, 0.5); }
.cert-logo {
  display: grid; place-items: center;
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent);
}
.cert-logo svg { width: 20px; height: 20px; fill: var(--brand); }
.cert-text { display: grid; line-height: 1.25; min-width: 0; }
.cert-text b { font-size: 0.92rem; font-weight: 600; }
.cert-text small { font-size: 0.74rem; color: var(--ink-2); }
.cert-check { position: absolute; top: 7px; right: 7px; width: 14px; height: 14px; fill: var(--accent); }

/* skill chips with logos */
.stack,
.skills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.stack { margin-top: 1rem; max-width: 30rem; }
.skill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.3rem 0.65rem 0.3rem 0.5rem;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(var(--fg-rgb), 0.03);
  color: var(--ink);
  font-size: 0.82rem; font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}
.skill:hover { border-color: var(--line-2); background: rgba(var(--fg-rgb), 0.06); transform: translateY(-1px); }
.si { width: 15px; height: 15px; flex-shrink: 0; fill: var(--ink-2); color: var(--ink-2); }
.si-aws { fill: #ff9900; }
.si-azure { fill: #3a9bf0; }
.si-databricks { fill: #ff3621; }
.si-snowflake { fill: #29b5e8; }
.si-spark { fill: #e25a1c; }
.si-python { fill: #ffd43b; }
.si-db { color: var(--accent); }
.si-genai { fill: var(--violet); }
.si-dbt { fill: #ff694b; }
.si-mcp, .si-openai, .si-apple, .si-electron { fill: var(--ink); }
.si-claude { fill: #d97757; }
.si-ts { fill: #3178c6; }
.si-react { fill: #61dafb; }

.side-bottom { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  height: 2.75rem; padding: 0 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 500 0.92rem/1 var(--sans);
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
}
.btn:active { transform: scale(0.97); }
.btn-lg { height: 3.2rem; padding: 0 1.5rem; font-size: 1rem; }
.btn-primary {
  background: var(--accent-fill); color: var(--accent-ink);
  box-shadow: 0 8px 30px rgba(var(--accent-rgb), 0.18);
}
.btn-primary:hover { box-shadow: 0 10px 40px rgba(var(--accent-rgb), 0.35); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: rgba(var(--fg-rgb), 0.3); background: rgba(var(--fg-rgb), 0.04); }

/* ---------- Sections ---------- */
.section { padding-bottom: clamp(5rem, 10vw, 8rem); scroll-margin-top: 5rem; }
.label {
  display: flex; align-items: center; gap: 0.8rem;
  margin-bottom: 2rem;
  font-family: var(--mono); font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink);
}
.label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.prose p + p { margin-top: 1.1rem; }
.prose .lead {
  margin-bottom: 1.6rem;
  color: var(--ink);
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.025em;
}
.prose em { font-style: normal; color: var(--accent); }
.prose a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(var(--accent-rgb), 0.5);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.25s, color 0.25s;
}
.prose a:hover { color: var(--accent); text-decoration-color: var(--accent); }

.facts {
  margin-top: 2.4rem;
  display: grid; grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.facts div { padding: 1rem 1.2rem; }
.facts div:nth-child(odd) { border-right: 1px solid var(--line); }
.facts div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
.facts dt {
  font-family: var(--mono); font-size: 0.7rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.facts dd { margin-top: 0.15rem; color: var(--ink); font-weight: 500; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.chips li {
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  font-family: var(--mono); font-size: 0.72rem;
  line-height: 1.6;
}

/* experience rows */
.list { display: grid; gap: 0.4rem; }
.row {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.2rem;
  padding: 1.3rem 1.3rem 1.4rem;
  margin: 0 -1.3rem;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: background 0.35s, border-color 0.35s, opacity 0.35s;
}
.row-when {
  padding-top: 0.2rem;
  font-family: var(--mono); font-size: 0.74rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
}
.row h3,
.project h3 {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
  transition: color 0.3s;
}
.row-body > p { margin-top: 0.45rem; }

@media (hover: hover) {
  .row:hover,
  .project:hover { background: var(--card-hover); border-color: var(--line); }
  .row:hover h3,
  .project:hover h3 { color: var(--accent); }
  .list:hover .row:not(:hover),
  .projects:hover .project:not(:hover) { opacity: 0.5; }
}

.more {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 1.6rem;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.45);
  padding-bottom: 2px;
  transition: color 0.25s, border-color 0.25s;
}
.more span { transition: transform 0.3s var(--ease); }
.more:hover { color: var(--accent); border-color: var(--accent); }
.more:hover span { transform: translateX(4px); }

/* ---------- Work ---------- */
.feature {
  position: relative;
  display: block;
  padding: 1.8rem;
  border-radius: 22px;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(var(--accent-rgb), 0.1), transparent 70%),
    radial-gradient(400px 200px at 0% 100%, rgba(185, 166, 255, 0.08), transparent 70%),
    var(--bg-2);
  overflow: hidden;
  transition: transform 0.45s var(--ease), border-color 0.35s, box-shadow 0.45s;
}
.feature:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(var(--accent-rgb), 0.08);
}
.feature-top { display: flex; align-items: center; gap: 1.1rem; }
.feature h3 {
  margin-top: 0.3rem;
  color: var(--ink);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.arrow { display: inline-block; color: var(--muted); font-weight: 400; transition: transform 0.35s var(--ease), color 0.3s; }
.feature:hover .arrow { transform: translate(3px, -3px); color: var(--accent); }
.feature > p { margin-top: 1.1rem; }
.kicker {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
}

.app-icon {
  width: 52px; height: 52px;
  flex-shrink: 0;
  padding: 3px;
  border-radius: 14px;
  background: var(--tile);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.app-icon-lg { width: 76px; height: 76px; padding: 4px; border-radius: 19px; }
.app-glyph {
  display: grid; place-items: center;
  background: var(--tile);
  border: 1px solid var(--line-2);
}
.app-glyph svg {
  width: 24px; height: 24px;
  fill: none; stroke: var(--violet); stroke-width: 1.6; stroke-linecap: round;
}

.status {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.status-live { color: #86efac; border-color: rgba(134, 239, 172, 0.35); }
.status-live::before { background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.status-test { color: var(--accent); border-color: rgba(var(--accent-rgb), 0.35); }
.status-test::before { background: var(--accent); }
.status-lab { color: var(--violet); border-color: rgba(185, 166, 255, 0.35); }
.status-lab::before { background: var(--violet); }

.projects { display: grid; gap: 0.4rem; margin-top: 1.4rem; }
.project {
  display: grid; grid-template-columns: auto 1fr; gap: 1.2rem;
  padding: 1.3rem;
  margin: 0 -1.3rem;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: background 0.35s, border-color 0.35s, opacity 0.35s;
}
.project-head { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.project-body > p { margin-top: 0.4rem; }

.note {
  margin-top: 1.4rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.note a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(var(--accent-rgb), 0.5); text-underline-offset: 4px; }
.note a:hover { color: var(--accent); }

/* ---------- Skills ---------- */
.skill-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
.skill-group {
  padding: 1.1rem 1.15rem 1.2rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  transition: border-color 0.3s;
}
.skill-group-wide { grid-column: 1 / -1; }
.skill-group:hover { border-color: var(--line-2); }
.skill-group h3 {
  margin-bottom: 0.8rem;
  font-family: var(--mono); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}

.principles { display: grid; gap: 0.9rem; margin-top: 2.2rem; counter-reset: p; }
.principles li {
  position: relative;
  padding-left: 2.6rem;
  counter-increment: p;
}
.principles li::before {
  content: "0" counter(p);
  position: absolute; left: 0; top: 0.15rem;
  font-family: var(--mono); font-size: 0.75rem;
  color: var(--accent);
}

/* ---------- Now ---------- */
.now {
  padding: 1.5rem 1.6rem;
  border-radius: 18px;
  border: 1px dashed var(--line-2);
}
.now-date { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.now-list { display: grid; gap: 0.55rem; margin-top: 0.9rem; }
.now-list li { position: relative; padding-left: 1.4rem; }
.now-list li::before {
  content: ""; position: absolute; left: 0; top: 0.68em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.6);
}
.now-list a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(var(--accent-rgb), 0.5); text-underline-offset: 4px; }

/* ---------- Contact ---------- */
.contact-card {
  position: relative;
  padding: clamp(2rem, 5vw, 3rem);
  border-radius: 24px;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(420px 260px at 85% 120%, rgba(var(--accent-rgb), 0.16), transparent 70%),
    radial-gradient(380px 240px at 0% -20%, rgba(185, 166, 255, 0.1), transparent 70%),
    var(--bg-2);
  overflow: hidden;
}
.contact-card h2 {
  color: var(--ink);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}
.contact-card p { margin-top: 1rem; max-width: 30rem; font-size: 1.05rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.8rem; }

.footer {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 0 0 3rem;
  font-size: 0.85rem; color: var(--muted);
}
.footer a:hover { color: var(--ink); }


/* ---------- Light theme ---------- */
:root[data-theme="light"] {
  --bg: #f4f4f1;
  --bg-2: #ffffff;
  --card: #ffffff;
  --card-hover: #ffffff;
  --ink: #09090b;
  --ink-2: #3b3b42;
  --muted: #64646c;
  --line: rgba(9, 9, 11, 0.1);
  --line-2: rgba(9, 9, 11, 0.16);
  --accent: #3d6b00;
  --accent-rgb: 101, 163, 13;
  --accent-fill: #c6f135;
  --violet: #5b3fd1;
  --fg-rgb: 9, 9, 11;
  --tile: #ffffff;
  color-scheme: light;
}
:root[data-theme="light"] body { background: radial-gradient(1200px 600px at 100% 0%, rgba(198, 241, 53, 0.18), transparent 60%), radial-gradient(900px 500px at 0% 100%, rgba(91, 63, 209, 0.07), transparent 60%), var(--bg); background-attachment: fixed; }
:root[data-theme="light"] .spotlight { background: radial-gradient(600px circle at var(--mx, 20%) var(--my, 10%), rgba(101, 163, 13, 0.07), transparent 70%); }
:root[data-theme="light"] .noise { opacity: 0.025; }
:root[data-theme="light"] .si-python { fill: #3776ab; }
:root[data-theme="light"] .si-aws { fill: #d97706; }
:root[data-theme="light"] .si-db { color: #3d6b00; }
:root[data-theme="light"] .skill,
:root[data-theme="light"] .cert,
:root[data-theme="light"] .skill-group,
:root[data-theme="light"] .facts,
:root[data-theme="light"] .now,
:root[data-theme="light"] .theme-toggle { background: #ffffff; box-shadow: 0 1px 2px rgba(9, 9, 11, 0.05), 0 4px 14px rgba(9, 9, 11, 0.04); }
:root[data-theme="light"] .cert-snow { background: linear-gradient(135deg, #eaf8fd, #ffffff 60%); border-color: rgba(41, 181, 232, 0.35); }
:root[data-theme="light"] .cert-dbx { background: linear-gradient(135deg, #fff0ed, #ffffff 60%); border-color: rgba(255, 54, 33, 0.3); }
:root[data-theme="light"] .feature { background: radial-gradient(500px 220px at 100% 0%, rgba(198, 241, 53, 0.35), transparent 70%), radial-gradient(400px 200px at 0% 100%, rgba(91, 63, 209, 0.08), transparent 70%), #ffffff; }
:root[data-theme="light"] .contact-card { background: radial-gradient(420px 260px at 85% 120%, rgba(198, 241, 53, 0.45), transparent 70%), radial-gradient(380px 240px at 0% -20%, rgba(91, 63, 209, 0.1), transparent 70%), #ffffff; }
:root[data-theme="light"] .feature,
:root[data-theme="light"] .contact-card { box-shadow: 0 1px 2px rgba(9, 9, 11, 0.05), 0 18px 50px rgba(9, 9, 11, 0.08); }
:root[data-theme="light"] .app-icon { box-shadow: 0 1px 2px rgba(9, 9, 11, 0.06), 0 8px 20px rgba(9, 9, 11, 0.08); }
:root[data-theme="light"] .chips li { background: rgba(198, 241, 53, 0.35); color: #2f5200; }
:root[data-theme="light"] .status-test { background: rgba(198, 241, 53, 0.3); border-color: rgba(61, 107, 0, 0.3); }
:root[data-theme="light"] .status-live { color: #15803d; background: #ecfdf3; border-color: rgba(21, 128, 61, 0.3); }
:root[data-theme="light"] .status-lab { background: #f1edff; }
:root[data-theme="light"] .btn-primary { box-shadow: 0 1px 0 rgba(9, 9, 11, 0.12), 0 8px 24px rgba(101, 163, 13, 0.3); }
:root[data-theme="light"] .btn-ghost { background: #ffffff; }
:root[data-theme="light"] .avatar { background: conic-gradient(from 200deg, #84cc16, rgba(132, 204, 22, 0.15) 40%, #7c5cf0 70%, #84cc16); }
:root[data-theme="light"] .label,
:root[data-theme="light"] .wid-h { color: var(--ink); }
:root[data-theme="light"] .pulse { background: #65a30d; }

/* theme toggle */
.theme-toggle {
  margin-left: auto;
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
.theme-toggle:hover { border-color: rgba(var(--accent-rgb), 0.6); transform: rotate(20deg); }
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }

/* ---------- Reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .layout { grid-template-columns: 1fr; gap: 0; max-width: 720px; }
  .side { position: relative; height: auto; padding: 4.5rem 0 4rem; }
  .toc { display: none; }
  .side-bottom { margin-top: 2rem; }
  .main { padding-top: 0; }
  .label {
    position: sticky; top: 0; z-index: 5;
    margin: 0 calc(-1 * var(--gutter)) 1.6rem;
    padding: 1rem var(--gutter);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
  .section { scroll-margin-top: 0; }
}

@media (max-width: 640px) {
  .name { font-size: clamp(2.3rem, 11vw, 2.75rem); }
  .avatar { width: 88px; height: 88px; }
  .row { grid-template-columns: 1fr; gap: 0.3rem; margin: 0; padding: 1rem 0; }
  .project { margin: 0; padding: 1rem 0; gap: 1rem; }
  .app-icon { width: 46px; height: 46px; border-radius: 12px; }
  .feature { padding: 1.4rem; }
  .app-icon-lg { width: 64px; height: 64px; border-radius: 16px; }
  .feature h3 { font-size: 1.4rem; }
  .skill-grid { grid-template-columns: 1fr; }
  .facts div { padding: 0.85rem 1rem; }
  .side-bottom .btn { flex: 1 1 auto; }
  .contact-actions .btn { flex: 1 1 100%; }
}

@media (min-width: 1024px) and (max-width: 1180px) {
  .certs { grid-template-columns: 1fr; }
}

@media (min-width: 1024px) and (max-height: 880px) {
  .side { padding-top: 3rem; padding-bottom: 2rem; }
  .avatar { width: 88px; height: 88px; }
  .name { margin-top: 1.1rem; }
  .tagline { display: none; }
}
@media (min-width: 1024px) and (max-height: 720px) {
  .toc { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
}
