/* =========================================================
   Isaac Banson Botwe — Portfolio
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --bg: #f6f8f6;
  --bg-alt: #edf2ee;
  --surface: #ffffff;
  --surface-2: #f1f5f2;
  --ink: #0d1714;
  --ink-2: #34443e;
  --muted: #5f706a;
  --line: #dce5df;
  --line-strong: #c3d1c9;

  --brand: #0e7a55;
  --brand-strong: #095c40;
  --brand-soft: #e0f1e8;
  --on-brand: #ffffff;
  --gold: #f2b632;
  --gold-ink: #845600;
  --gold-soft: #fcf1d4;
  --danger: #c2410c;

  --shadow-sm: 0 1px 2px rgba(13, 23, 20, .06), 0 1px 3px rgba(13, 23, 20, .05);
  --shadow: 0 12px 30px -14px rgba(13, 23, 20, .22);
  --shadow-lg: 0 30px 60px -24px rgba(13, 23, 20, .3);

  /* The hero and footer stay dark in both themes */
  --hero-bg: #07110d;
  --hero-ink: #f1f7f4;
  --hero-muted: #a3b8ae;
  --hero-brand: #34d399;

  --header-h: 72px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a110e;
    --bg-alt: #0d1612;
    --surface: #111c18;
    --surface-2: #17241f;
    --ink: #e8f0ec;
    --ink-2: #bccbc4;
    --muted: #8d9f97;
    --line: #22322b;
    --line-strong: #30453c;
    --brand: #34d399;
    --brand-strong: #6ee7b7;
    --brand-soft: rgba(52, 211, 153, .13);
    --on-brand: #04130d;
    --gold-ink: #f5c95e;
    --gold-soft: rgba(242, 182, 50, .13);
    --danger: #fb923c;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 14px 34px -14px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, .75);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0a110e;
  --bg-alt: #0d1612;
  --surface: #111c18;
  --surface-2: #17241f;
  --ink: #e8f0ec;
  --ink-2: #bccbc4;
  --muted: #8d9f97;
  --line: #22322b;
  --line-strong: #30453c;
  --brand: #34d399;
  --brand-strong: #6ee7b7;
  --brand-soft: rgba(52, 211, 153, .13);
  --on-brand: #04130d;
  --gold-ink: #f5c95e;
  --gold-soft: rgba(242, 182, 50, .13);
  --danger: #fb923c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 14px 34px -14px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, .75);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .3s, color .3s;
}

body:has(dialog[open]) { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); line-height: 1.15; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
strong { font-weight: 700; }

.mono { font-family: var(--font-mono); }
[hidden] { display: none !important; }

.container {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -80px;
  z-index: 300;
  padding: .6rem 1rem;
  border-radius: 10px;
  background: var(--gold);
  color: #1a1200;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--gold); color: #1a1200; }

.accent-text {
  color: var(--brand);
  background: linear-gradient(transparent 70%, var(--gold-soft) 70%);
  padding: 0 .08em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .72rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background-color .2s, color .2s, border-color .2s;
}
.btn i { font-size: 1.15em; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: 0 10px 22px -10px var(--brand);
}
.btn-primary:hover { background: var(--brand-strong); box-shadow: 0 14px 26px -10px var(--brand); }

.btn-soft {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-soft:hover { border-color: var(--brand); color: var(--brand); }

.btn-outline-light {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .28);
  color: #fff;
}
.btn-outline-light:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }

.hero .btn-primary { background: #12a372; color: #fff; box-shadow: 0 12px 30px -10px rgba(52, 211, 153, .6); }
.hero .btn-primary:hover { background: #34d399; color: #04130d; }

.btn-lg { padding: .92rem 1.55rem; font-size: 1rem; }
.btn-sm { padding: .5rem .9rem; font-size: .85rem; }
.btn-block { width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.75rem;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.25rem;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}
.text-link i { transition: transform .2s; }
.text-link:hover i { transform: translateX(4px); }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 120;
  height: 3px;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--hero-brand), var(--gold));
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  color: #fff;
  transition: background-color .3s, box-shadow .3s, color .3s;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 1px 0 var(--line);
  color: var(--ink);
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-right: auto;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0e7a55, #14a877);
  box-shadow: inset 0 -6px 0 var(--gold);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .98rem;
  padding-bottom: 4px;
}
.brand-text {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
}
.brand-text small {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: .68rem;
  opacity: .7;
}

.site-nav { display: flex; gap: .15rem; }
.site-nav a {
  padding: .5rem .8rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: .93rem;
  text-decoration: none;
  opacity: .8;
  transition: opacity .2s, background-color .2s, color .2s;
}
.site-nav a:hover { opacity: 1; background: rgba(127, 140, 134, .14); }
.site-nav a.is-active { opacity: 1; color: var(--brand); background: var(--brand-soft); }
.site-header:not(.is-scrolled) .site-nav a.is-active { color: var(--hero-brand); background: rgba(52, 211, 153, .1); }

.nav-actions { display: flex; align-items: center; gap: .5rem; }
.site-header:not(.is-scrolled) .icon-btn {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .18);
  color: #fff;
}
.site-header:not(.is-scrolled) .icon-btn:hover { border-color: var(--hero-brand); color: var(--hero-brand); }

.theme-toggle .bx-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .bx-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .bx-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .bx-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .bx-moon { display: none; }
}

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + 48px) 0 150px;
  overflow: hidden;
  background: var(--hero-bg);
  color: var(--hero-ink);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(520px circle at var(--mx, 72%) var(--my, 32%), rgba(52, 211, 153, .15), transparent 65%),
    radial-gradient(900px 620px at 88% -12%, rgba(14, 122, 85, .6), transparent 62%),
    radial-gradient(700px 520px at -12% 112%, rgba(242, 182, 50, .17), transparent 60%),
    var(--hero-bg);
}
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 25%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 25%, transparent 80%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.6rem;
  padding: .4rem .95rem .4rem .75rem;
  border: 1px solid rgba(52, 211, 153, .32);
  border-radius: 999px;
  background: rgba(52, 211, 153, .1);
  color: #a7f3d0;
  font-size: .85rem;
  font-weight: 600;
}

.pulse {
  position: relative;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #34d399;
}
.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  from { transform: scale(1); opacity: .7; }
  to { transform: scale(3.2); opacity: 0; }
}

.hero-hello {
  margin-bottom: .4rem;
  color: var(--hero-muted);
  font-size: .95rem;
}

.hero-title {
  margin-bottom: 1.1rem;
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.035em;
}
.hero .accent-text {
  padding: 0;
  background: linear-gradient(90deg, #34d399, #f2b632);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-role {
  min-height: 2.9em;
  margin-bottom: 1rem;
  color: #dfe9e4;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-weight: 500;
  line-height: 1.45;
}
.typed {
  display: inline-block;
  min-width: 2px;
  padding-right: 4px;
  border-right: 2px solid #f2b632;
  color: #f2b632;
  font-family: var(--font-display);
  font-weight: 600;
  animation: caret 1s steps(1) infinite;
}
@keyframes caret {
  50% { border-color: transparent; }
}

.hero-lead {
  max-width: 36rem;
  margin-bottom: 2rem;
  color: var(--hero-muted);
  font-size: 1.06rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-bottom: 2rem;
}

.hero-social {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
}
.hero-social a,
.footer-social a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  color: #e6efeb;
  font-size: 1.25rem;
  text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.hero-social a:hover,
.footer-social a:hover {
  border-color: transparent;
  background: #34d399;
  color: #04130d;
  transform: translateY(-3px);
}
.hero-location {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-left: .4rem;
  color: var(--hero-muted);
  font-size: .9rem;
}

/* Portrait + floating cards */
.hero-visual {
  position: relative;
  justify-self: center;
  width: min(100%, 420px);
  perspective: 1100px;
}

.portrait-card {
  position: relative;
  padding: 10px;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(52, 211, 153, .55), rgba(242, 182, 50, .45) 60%, rgba(255, 255, 255, .08));
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .75);
  transform-style: preserve-3d;
  transition: transform .25s ease-out;
}
.portrait-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 20px;
}

.float-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: .65rem;
  max-width: 250px;
  padding: .6rem .85rem .6rem .6rem;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  background: rgba(9, 19, 15, .8);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .7);
  color: #fff;
  transform: translateZ(40px);
  animation: float 6s ease-in-out infinite;
}
.float-chip i {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(52, 211, 153, .15);
  color: #34d399;
  font-size: 1.3rem;
}
.float-chip small {
  display: block;
  color: var(--hero-muted);
  font-family: var(--font-mono);
  font-size: .68rem;
}
.float-chip strong {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.3;
}
.chip-now { top: 28px; left: -56px; }
.chip-lead { right: -44px; bottom: 132px; animation-delay: -3s; }
.chip-lead i { background: rgba(242, 182, 50, .16); color: #f2b632; }

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}

.code-card {
  position: absolute;
  left: -84px;
  bottom: -46px;
  width: 310px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  background: rgba(8, 17, 13, .94);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8);
  font-family: var(--font-mono);
  font-size: .72rem;
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: .55rem .8rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.code-bar span { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.code-bar span:nth-child(2) { background: #febc2e; }
.code-bar span:nth-child(3) { background: #28c840; }
.code-bar em { margin-left: auto; color: var(--hero-muted); font-style: normal; font-size: .68rem; }
.code-card pre {
  margin: 0;
  padding: .8rem .95rem .9rem;
  overflow: hidden;
  color: #dbe7e1;
  line-height: 1.65;
  white-space: pre;
}
.c-kw { color: #34d399; }
.c-str { color: #f2b632; }
.c-type { color: #7dd3fc; }
.c-caret {
  display: inline-block;
  width: 7px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -2px;
  background: #34d399;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 96px;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-radius: 14px;
  translate: -50% 0;
}
.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: #fff;
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue {
  0% { transform: translateY(0); opacity: 1; }
  80% { transform: translateY(14px); opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- Stats ---------- */
.stats {
  position: relative;
  z-index: 2;
  margin-top: -64px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--line);
  box-shadow: var(--shadow-lg);
}
.stat {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: .95rem;
  padding: 1.45rem 1.4rem;
  background: var(--surface);
}
.stat i {
  display: grid;
  place-items: center;
  grid-row: span 2;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.5rem;
}
.stat strong {
  font-family: var(--font-display);
  font-size: 2.1rem;
  line-height: 1;
  letter-spacing: -.03em;
}
.stat > span {
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.35;
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  padding: 2.4rem 0 .4rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 45s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 2.2rem;
  padding-right: 2.2rem;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
}
.marquee-track span::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--gold);
  transform: rotate(45deg);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(4.5rem, 9vw, 7rem) 0; }
.section-alt { background: var(--bg-alt); }

.section-head {
  max-width: 740px;
  margin-bottom: 2.4rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .9rem;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.eyebrow span {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 22px;
  padding: 0 .4rem;
  border-radius: 6px;
  background: var(--gold-soft);
  color: var(--gold-ink);
}

.section-title {
  margin-bottom: 1rem;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 700;
}

.lead,
.section-lead {
  color: var(--ink-2);
  font-size: 1.08rem;
}
.section-lead { margin: 0; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.about-media {
  position: sticky;
  top: calc(var(--header-h) + 28px);
}
.about-photo {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}
.about-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 20%;
}
/* Kente-inspired stripe */
.about-photo::after,
.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  background: repeating-linear-gradient(90deg,
      #f2b632 0 34px, #0e7a55 34px 68px, #0d1714 68px 76px, #c8372d 76px 96px);
}
.about-photo::after { bottom: 0; }

.about-badge {
  position: absolute;
  right: -22px;
  bottom: 44px;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .8rem 1.1rem .8rem .8rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: float 7s ease-in-out infinite;
}
.about-badge i { color: var(--gold); font-size: 2rem; }
.about-badge strong { display: block; font-family: var(--font-display); line-height: 1.2; }
.about-badge small { color: var(--muted); font-size: .78rem; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
  margin: 1.8rem 0 0;
}
.facts > div {
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color .2s, transform .2s;
}
.facts > div:hover { border-color: var(--brand); transform: translateY(-2px); }
.facts dt {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .2rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.facts dt i { color: var(--brand); font-size: 1rem; }
.facts dd { margin: 0; font-weight: 600; font-size: .95rem; line-height: 1.4; }
.facts dd.ok { color: var(--brand); }

/* Value cards */
.value-head { margin: clamp(3.5rem, 7vw, 5rem) 0 1.5rem; }
.value-head h3,
.lifecycle-head h3,
.sub-head h3 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); }

.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.value-card {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.value-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(320px circle at var(--cx, 50%) var(--cy, 0%), var(--brand-soft), transparent 70%);
  opacity: 0;
  transition: opacity .3s;
}
.value-card > * { position: relative; }
.value-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.value-card:hover::before { opacity: 1; }
.value-card h4 { margin-bottom: .5rem; font-size: 1.1rem; }
.value-card p { margin: 0; color: var(--ink-2); font-size: .93rem; }

.value-icon,
.skill-icon,
.project-icon,
.edu-icon {
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand);
}
.value-icon { width: 50px; height: 50px; margin-bottom: 1rem; font-size: 1.5rem; }
.value-icon.gold,
.skill-icon.gold,
.project-icon.gold,
.edu-icon.gold { background: var(--gold-soft); color: var(--gold-ink); }

/* Lifecycle */
.lifecycle {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding: clamp(1.4rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}
.lifecycle-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .4rem 1.5rem;
  margin-bottom: 1.75rem;
}
.lifecycle-head p { margin: 0; color: var(--muted); font-size: .9rem; }

.lifecycle-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: .5rem;
  --step: 0;
}
.lifecycle-steps::before,
.lifecycle-steps::after {
  content: "";
  position: absolute;
  left: calc(100% / 12);
  top: 27px;
  height: 3px;
  border-radius: 3px;
}
.lifecycle-steps::before { right: calc(100% / 12); background: var(--line); }
.lifecycle-steps::after {
  width: calc((100% - 100% / 6) * var(--step) / 5);
  background: linear-gradient(90deg, var(--brand), var(--gold));
  transition: width .5s ease;
}
.lifecycle-steps button {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  padding: 0 .2rem .2rem;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: color .25s;
}
.lifecycle-steps button i {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  font-size: 1.5rem;
  transition: background-color .3s, border-color .3s, color .3s, box-shadow .3s, transform .3s;
}
.lifecycle-steps button:hover { color: var(--ink); }
.lifecycle-steps button:hover i { border-color: var(--brand); }
.lifecycle-steps button.is-done i { border-color: var(--brand); color: var(--brand); }
.lifecycle-steps button[aria-selected="true"] { color: var(--ink); }
.lifecycle-steps button[aria-selected="true"] i {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: 0 0 0 6px var(--brand-soft);
  transform: scale(1.06);
}
.lifecycle-panel {
  min-height: 112px;
  margin-top: 1.6rem;
  padding: 1.2rem 1.4rem;
  border-left: 4px solid var(--gold);
  border-radius: 14px;
  background: var(--surface-2);
}
.stage + .stage { margin-top: 1rem; }
.stage h4 { margin-bottom: .35rem; font-size: 1.05rem; }
.stage p { margin: 0; color: var(--ink-2); }
.js .stage { display: none; }
.js .stage.is-active { display: block; margin: 0; animation: fade-up .4s ease; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Filters ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2rem;
}
.filter-bar.compact { margin: 0; }
.chip-btn {
  padding: .5rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.chip-btn:hover { border-color: var(--brand); color: var(--brand); }
.chip-btn.is-active,
.chip-btn.is-active:hover { border-color: var(--ink); background: var(--ink); color: var(--bg); }

.is-hidden { display: none !important; }

/* ---------- Experience timeline ---------- */
.timeline {
  position: relative;
  list-style: none;
  padding-left: 2.25rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--brand), var(--gold) 55%, var(--line));
}
.tl-item { position: relative; }
.tl-item + .tl-item { margin-top: 1.25rem; }

.tl-dot {
  position: absolute;
  left: calc(-2.25rem + 2px);
  top: 30px;
  width: 16px;
  height: 16px;
  border: 3px solid var(--brand);
  border-radius: 50%;
  background: var(--bg-alt);
}
.tl-dot.is-current { background: var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); }
.tl-item[data-cat="education"] .tl-dot { border-color: var(--gold); }

.tl-card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  transition: box-shadow .3s, border-color .3s;
}
.tl-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }

.tl-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: start;
}
.org-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: linear-gradient(135deg, #0e7a55, #14a877);
  color: #fff;
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 700;
}
.tl-item[data-cat="education"] .org-mark { background: linear-gradient(135deg, #d4940c, #f2b632); color: #2a1c00; }

.tl-title h3 { margin-bottom: .2rem; font-size: 1.22rem; }
.tl-org { margin: 0; color: var(--brand); font-weight: 600; }
.tl-org span { color: var(--muted); font-weight: 500; }

.tl-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .35rem;
  text-align: right;
}
.tl-meta time {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: .8rem;
  white-space: nowrap;
}
.duration {
  padding: .12rem .6rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
}
.duration:empty { display: none; }

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .2rem .65rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: .75rem;
  font-weight: 700;
}
.badge-live .pulse { width: 7px; height: 7px; background: var(--brand); }

.promo {
  display: flex;
  gap: .85rem;
  margin-top: 1.1rem;
  padding: .9rem 1rem;
  border: 1px dashed color-mix(in srgb, var(--gold) 70%, transparent);
  border-radius: 14px;
  background: var(--gold-soft);
}
.promo > i { color: var(--gold-ink); font-size: 1.6rem; }
.promo strong { font-family: var(--font-display); }
.promo-date { margin-left: .3rem; color: var(--gold-ink); font-family: var(--font-mono); font-size: .75rem; white-space: nowrap; }
.promo p { margin: .2rem 0 0; color: var(--ink-2); font-size: .9rem; }

.tl-points {
  list-style: none;
  display: grid;
  gap: .55rem;
  margin-top: 1.1rem;
}
.tl-points li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--ink-2);
  font-size: .95rem;
}
.tl-points li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: .6em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--brand);
  transform: rotate(45deg);
}
.tl-points strong { color: var(--ink); font-weight: 600; }
.tl-points li.is-extra { display: none; }
.tl-card.is-open .tl-points li.is-extra { display: block; animation: fade-up .35s ease; }

.more-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-top: .8rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
}
.more-btn i { font-size: 1.2rem; transition: transform .3s; }
.tl-card.is-open .more-btn i { transform: rotate(180deg); }

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: 1.1rem;
}
.tags li,
.tags span {
  padding: .22rem .6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 500;
  line-height: 1.5;
}

/* ---------- Skills ---------- */
.skill-finder {
  display: flex;
  align-items: center;
  max-width: 700px;
  padding: .3rem .4rem .3rem 1rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s;
}
.skill-finder:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.skill-finder label { display: grid; color: var(--muted); font-size: 1.35rem; }
.skill-finder input {
  flex: 1;
  min-width: 0;
  padding: .78rem .7rem;
  border: 0;
  outline: none;
  background: none;
  font-size: 1rem;
}
.skill-finder input::placeholder { color: var(--muted); opacity: .8; }
.skill-finder input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.finder-clear { width: 36px; height: 36px; border: 0; background: var(--surface-2); }

.finder-examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  margin-top: .9rem;
  color: var(--muted);
  font-size: .85rem;
}
.finder-examples button {
  padding: .3rem .75rem;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.finder-examples button:hover { border-style: solid; border-color: var(--brand); color: var(--brand); }

.finder-result {
  max-width: 700px;
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  font-size: .93rem;
  animation: fade-up .3s ease;
}
.finder-result[hidden] { display: none; }
.finder-single { display: flex; align-items: flex-start; gap: .5rem; margin: 0; font-weight: 600; }
.finder-single i { margin-top: .1em; font-size: 1.25rem; }
.finder-single.hit i { color: var(--brand); }
.finder-single.miss { color: var(--ink-2); font-weight: 500; }
.finder-single.miss i { color: var(--gold-ink); }

.score { display: flex; align-items: center; gap: 1rem; margin-bottom: .8rem; }
.score-ring {
  display: grid;
  place-items: center;
  flex: none;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: conic-gradient(var(--brand) calc(var(--pct, 0) * 1%), var(--line) 0);
}
.score-ring span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface);
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 700;
}
.score strong { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.score small { color: var(--muted); }
.score a { color: var(--brand); font-weight: 600; }

.result-list { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; }
.result-list li {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .22rem .6rem;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 600;
}
.result-list .hit { background: var(--brand-soft); color: var(--brand); }
.result-list .miss { background: var(--surface-2); color: var(--muted); }

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 2.25rem;
}
.skill-card {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  transition: border-color .3s, box-shadow .3s;
}
.skill-card:hover { box-shadow: var(--shadow); }
.skill-card header { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.skill-card h3 { font-size: 1.02rem; }
.skill-count {
  margin-left: auto;
  padding: .1rem .55rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
}
.skill-icon { width: 42px; height: 42px; border-radius: 12px; font-size: 1.3rem; }

.skill-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; }
.skill-chips li {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .36rem .7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.3;
  transition: opacity .25s, background-color .25s, color .25s, border-color .25s, transform .25s, box-shadow .25s;
}
.skill-chips li i { color: var(--brand); font-size: 1.05rem; }
.skill-chips li:hover { border-color: var(--brand); color: var(--ink); transform: translateY(-2px); }

.skill-grid.is-searching .skill-chips li { opacity: .38; }
.skill-grid.is-searching .skill-card.has-match { border-color: var(--brand); }
.skill-grid .skill-chips li.is-match {
  opacity: 1;
  border-color: var(--brand);
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: 0 8px 18px -8px var(--brand);
  transform: translateY(-2px);
}
.skill-chips li.is-match i { color: inherit; }

/* ---------- Projects ---------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
.project-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.project-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s ease;
}
.project-card:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: var(--shadow-lg); }
.project-card:hover::after { transform: scaleX(1); }

.project-open {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  width: 100%;
  height: 100%;
  padding: 1.5rem;
  border: 0;
  border-radius: 22px;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.project-top { display: flex; align-items: center; gap: .75rem; }
.project-icon { width: 50px; height: 50px; font-size: 1.5rem; }
.project-kicker {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  line-height: 1.4;
}
.project-name {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.015em;
}
.project-sum { color: var(--ink-2); font-size: .93rem; }
.project-open .tags { margin-top: auto; padding-top: .2rem; }
.project-more {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--brand);
  font-size: .9rem;
  font-weight: 600;
}
.project-more i { font-size: 1.2rem; transition: transform .25s; }
.project-card:hover .project-more i { transform: translateX(4px); }

.project-details { padding: 0 1.5rem 1.5rem; font-size: .93rem; }
.js .project-details { display: none; }
.project-details h4,
.modal-body h4 { margin: 1.2rem 0 .5rem; font-size: 1rem; }
.project-details ul,
.modal-body ul { list-style: none; display: grid; gap: .45rem; }
.project-details li,
.modal-body li { position: relative; padding-left: 1.6rem; color: var(--ink-2); }
.project-details li::before,
.modal-body li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: .05em;
  display: grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: .7rem;
  font-weight: 700;
}
.pd-role {
  margin: 0;
  padding: .8rem 1rem;
  border-radius: 12px;
  background: var(--gold-soft);
  color: var(--ink);
  font-size: .92rem;
}

/* Sub-section headings inside Projects */
.sub-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: clamp(3.5rem, 7vw, 5rem) 0 1.5rem;
}
.sub-head.is-first { margin-top: 0; }

/* Live work gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.shot {
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.shot:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-lg); }
.shot-open {
  position: relative;
  display: block;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  cursor: zoom-in;
}
.shot-open::after {
  content: "\ec90"; /* bx-zoom-in */
  font-family: "boxicons";
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(7, 17, 13, .75);
  color: #fff;
  font-size: 1.2rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s, transform .25s;
}
.shot:hover .shot-open::after,
.shot-open:focus-visible::after { opacity: 1; transform: none; }
.shot img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top;
  transition: transform .6s ease;
}
.shot:hover img { transform: scale(1.04); }
.shot-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .28rem .7rem;
  border-radius: 999px;
  background: rgba(7, 17, 13, .8);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #a7f3d0;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.shot-badge .pulse { width: 7px; height: 7px; }
.shot figcaption {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: .3rem;
  padding: 1.1rem 1.25rem 1.25rem;
}
.shot-kicker {
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.shot figcaption strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
}
.shot-desc { color: var(--ink-2); font-size: .9rem; }
.shot-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: .3rem;
  margin-top: auto;
  padding-top: .65rem;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 500;
  text-decoration: none;
}
.shot-link:hover { text-decoration: underline; }

/* ---------- Education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}
.edu-card {
  position: relative;
  overflow: hidden;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  transition: transform .3s, box-shadow .3s;
}
.edu-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.edu-card:not(.side)::before {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(var(--brand-soft), transparent 70%);
}
.edu-card > * { position: relative; }
.edu-year {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  padding: .25rem .65rem;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-ink);
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 500;
}
.edu-icon { width: 54px; height: 54px; margin-bottom: 1.1rem; font-size: 1.65rem; }
.edu-card h3 { margin-bottom: .4rem; font-size: 1.2rem; line-height: 1.3; }
.edu-card.side p { color: var(--ink-2); }
.edu-major { margin: 0 0 .7rem; color: var(--brand); font-weight: 600; }
.edu-school { display: flex; align-items: center; gap: .4rem; margin: 0; color: var(--muted); font-size: .92rem; }

.lang-list { list-style: none; display: grid; gap: .8rem; margin-top: 1rem; }
.lang-list li {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: end;
  gap: 1rem;
  font-weight: 600;
}
.level {
  position: relative;
  padding-bottom: 12px;
  color: var(--muted);
  font-size: .75rem;
  text-align: right;
}
.level::before,
.level::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 6px;
  border-radius: 6px;
}
.level::before { right: 0; background: var(--surface-2); }
.level::after {
  width: var(--lvl);
  background: linear-gradient(90deg, var(--brand), var(--gold));
  transition: width 1.1s cubic-bezier(.2, .7, .2, 1) .2s;
}
.reveal:not(.is-visible) .level::after { width: 0; }

/* ---------- Contact ---------- */
.contact { background: var(--bg-alt); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-list { list-style: none; display: grid; gap: .7rem; margin-top: 1.8rem; }
.contact-list li {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .8rem .9rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  transition: border-color .2s;
}
.contact-list li:hover { border-color: var(--line-strong); }
.c-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.3rem;
}
.contact-list li > div { flex: 1; min-width: 0; }
.contact-list small {
  display: block;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.contact-list a,
.contact-list div > span {
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact-list a:hover { color: var(--brand); }
.copy-btn { width: 36px; height: 36px; font-size: 1.05rem; }
.copy-btn.is-copied { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }

.contact-form {
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.contact-form h3 { margin-bottom: 1.25rem; font-size: 1.35rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field label { color: var(--ink-2); font-size: .85rem; font-weight: 600; }
.opt { color: var(--muted); font-weight: 400; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .75rem .9rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 124px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.field-error { display: none; color: var(--danger); font-size: .78rem; font-weight: 600; }
.field.has-error input,
.field.has-error textarea { border-color: var(--danger); }
.field.has-error .field-error { display: block; }
.form-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  margin: .8rem 0 0;
  color: var(--muted);
  font-size: .8rem;
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  padding: 2.6rem 0 2.4rem;
  background: var(--hero-bg);
  color: #cfdcd6;
}
.site-footer::before { top: 0; height: 6px; }
.footer-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.footer-brand { display: flex; align-items: center; gap: .8rem; }
.footer-brand strong { display: block; color: #fff; font-family: var(--font-display); }
.footer-brand small { color: #8fa39a; }
.footer-social { list-style: none; display: flex; gap: .5rem; }
.footer-copy { margin: 0; color: #8fa39a; font-size: .85rem; }
.footer-copy a { color: #f2b632; text-decoration: none; }
.footer-copy a:hover { text-decoration: underline; }

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: var(--shadow);
  font-size: 1.5rem;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s, visibility .3s, transform .3s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { transform: translateY(-3px); }

/* ---------- Dialogs ---------- */
dialog { color: var(--ink); }
dialog::backdrop {
  background: rgba(4, 10, 8, .66);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.modal {
  width: min(640px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .55);
}
.modal[open] { animation: pop .32s cubic-bezier(.2, .9, .3, 1.15); }
@keyframes pop {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.modal-inner { position: relative; padding: clamp(1.4rem, 4vw, 2rem); }
.modal-close { position: absolute; top: 1rem; right: 1rem; }
.modal-kicker {
  margin: 0 0 .4rem;
  color: var(--brand);
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.modal h3 { margin-bottom: .6rem; padding-right: 2.8rem; font-size: 1.6rem; }
.modal-sum { margin-bottom: 0; color: var(--ink-2); }
.modal-tags { margin: 1rem 0 1.25rem; }
.modal-body .pd-role { margin-bottom: .2rem; }
.modal-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }

.lightbox {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(4, 10, 8, .94);
  color: #fff;
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
.lightbox figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .9rem;
  max-width: min(1100px, calc(100% - 150px));
  margin: 0;
}
.lightbox img {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  max-height: calc(100dvh - 150px);
  border-radius: 12px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
}
.lightbox figcaption { text-align: center; font-size: .95rem; }
.lightbox figcaption strong { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.lightbox figcaption span { color: #a3b8ae; }
.lightbox figcaption em { display: block; margin-top: .2rem; color: #7d9189; font-family: var(--font-mono); font-size: .75rem; font-style: normal; }
.lightbox .icon-btn {
  width: 48px;
  height: 48px;
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 1.6rem;
}
.lightbox .icon-btn:hover { border-color: #34d399; background: #34d399; color: #04130d; }
.lb-close { position: absolute; top: 16px; right: 16px; }
.lb-nav { position: absolute; top: 50%; translate: 0 -50%; }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

/* Contact form states */
.contact-form { position: relative; }
.hp-field {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.btn.is-busy { opacity: .85; pointer-events: none; }
.bx-spin { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-status {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin-top: 1rem;
  padding: .9rem 1rem;
  border-radius: 12px;
  font-size: .9rem;
  animation: fade-up .3s ease;
}
.form-status[hidden] { display: none; }
.form-status > i { flex: none; margin-top: .05rem; font-size: 1.35rem; }
.form-status strong { display: block; font-weight: 700; }
.form-status p { margin: .15rem 0 0; color: var(--ink-2); }
.form-status.is-success { background: var(--brand-soft); color: var(--brand); }
.form-status.is-error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.form-status.is-info { background: var(--gold-soft); color: var(--gold-ink); }

/* ---------- CV viewer (view only) ---------- */
.cv-viewer {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(6, 12, 10, .97);
  color: #fff;
}
.cv-viewer::backdrop { background: transparent; }
.cv-viewer[open] { display: flex; flex-direction: column; animation: fade .25s ease; }
.cv-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem clamp(1rem, 3vw, 1.5rem);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  background: #07110d;
}
.cv-title { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.cv-title > i { color: #34d399; font-size: 1.6rem; }
.cv-title strong { display: block; font-family: var(--font-display); line-height: 1.2; }
.cv-title small { color: #a3b8ae; font-size: .78rem; }
.cv-tools { display: flex; align-items: center; gap: .4rem; }
.cv-zoom { min-width: 3.4rem; color: #cfdcd6; font-family: var(--font-mono); font-size: .8rem; text-align: center; }
.cv-viewer .icon-btn { border-color: rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .08); color: #fff; }
.cv-viewer .icon-btn:hover { border-color: #34d399; background: #34d399; color: #04130d; }
.cv-pages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow: auto;
  padding: clamp(1rem, 3vw, 2rem);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.cv-pages img {
  width: calc(min(900px, 100%) * var(--cv-zoom, 1));
  max-width: none;
  margin-inline: auto;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .8);
  pointer-events: none;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 400;
  max-width: calc(100% - 32px);
  padding: .7rem 1.1rem;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-lg);
  font-size: .9rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  translate: -50% 16px;
  transition: opacity .25s, translate .25s;
}
.toast.is-visible { opacity: 1; translate: -50% 0; }

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  translate: 0 26px;
  transition: opacity .7s cubic-bezier(.2, .7, .2, 1), translate .7s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--d, 0s);
}
.js .reveal.is-visible { opacity: 1; translate: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .chip-now { left: -24px; }
  .chip-lead { right: -18px; }
  .code-card { left: -36px; }
}

@media (max-width: 920px) {
  .nav-toggle { display: inline-grid; }
  .site-nav {
    position: fixed;
    top: calc(var(--header-h) - 4px);
    left: 16px;
    right: 16px;
    flex-direction: column;
    gap: .2rem;
    padding: .6rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    color: var(--ink);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .site-nav a { padding: .8rem 1rem; border-radius: 12px; font-size: 1rem; opacity: 1; }
  .site-header:not(.is-scrolled) .site-nav a.is-active { color: var(--brand); background: var(--brand-soft); }

  .hero { padding-bottom: 130px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { width: min(100%, 380px); margin-top: 1.5rem; }
  .scroll-cue { display: none; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .about-grid { grid-template-columns: 1fr; }
  .about-media { position: relative; top: auto; width: min(100%, 420px); }

  .lifecycle-steps { grid-template-columns: repeat(3, 1fr); row-gap: 1.3rem; }
  .lifecycle-steps::before,
  .lifecycle-steps::after { display: none; }

  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { width: calc(100% - 32px); }
  .brand-text small { display: none; }
  .nav-cv span { display: none; }
  .nav-cv { width: 40px; height: 40px; padding: 0; }

  .hero { padding-top: calc(var(--header-h) + 28px); }
  .hero-cta .btn { flex: 1 1 100%; }
  .hero-location { flex-basis: 100%; margin: .35rem 0 0; }
  .float-chip { max-width: 190px; padding: .45rem .65rem .45rem .45rem; transform: none; }
  .float-chip i { width: 32px; height: 32px; font-size: 1.1rem; }
  .float-chip strong { font-size: .74rem; }
  .chip-now { top: 16px; left: -10px; }
  .chip-lead { right: -10px; bottom: 36px; }
  .code-card {
    position: relative;
    left: auto;
    bottom: auto;
    width: calc(100% - 28px);
    margin: -28px auto 0;
  }

  .stat { grid-template-columns: 1fr; align-content: start; padding: 1.1rem; }
  .stat i { grid-row: auto; width: 40px; height: 40px; margin-bottom: .6rem; font-size: 1.25rem; }
  .stat strong { font-size: 1.7rem; }

  .about-badge { right: 10px; bottom: 26px; }
  .facts { grid-template-columns: 1fr; }
  .value-grid,
  .project-grid,
  .gallery,
  .edu-grid { grid-template-columns: 1fr; }
  .btn-row .btn { flex: 1 1 auto; }
  .gallery { grid-template-columns: 1fr; }
  .cv-title small, .cv-zoom { display: none; }

  .lifecycle-steps button i { width: 48px; height: 48px; font-size: 1.3rem; }
  .lifecycle-steps button { font-size: .78rem; }

  .timeline { padding-left: 1.6rem; }
  .tl-dot { left: calc(-1.6rem + 2px); top: 24px; }
  .tl-card { padding: 1.15rem; }
  .tl-head { grid-template-columns: auto 1fr; gap: .8rem; }
  .org-mark { width: 44px; height: 44px; border-radius: 12px; font-size: .78rem; }
  .tl-title h3 { font-size: 1.08rem; }
  .tl-meta {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem .6rem;
    text-align: left;
  }
  .promo { flex-direction: column; gap: .4rem; }
  .promo-date { display: block; margin: .15rem 0 0; }

  .contact-list li { gap: .7rem; padding: .7rem; }
  .contact-list a,
  .contact-list div > span { font-size: .9rem; }
  .field-row { grid-template-columns: 1fr; }
  .footer-wrap { flex-direction: column; align-items: flex-start; }

  .lightbox figure { max-width: calc(100% - 24px); }
  .lightbox img { max-height: calc(100dvh - 200px); }
  .lb-nav { top: auto; bottom: 20px; translate: none; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
}

@media (max-width: 360px) {
  .stats-grid { grid-template-columns: 1fr; }
  .lifecycle-steps { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; translate: none; }
}

@media print {
  .site-header, .scroll-progress, .skip-link, .hero-bg, .scroll-cue, .marquee, .code-card,
  .float-chip, .contact-form, .filter-bar, .skill-finder, .finder-examples, .finder-result,
  .lifecycle-steps, .more-btn, .back-to-top, .toast, .btn-row, .hero-cta, .copy-btn, dialog { display: none !important; }
  body { background: #fff; color: #000; }
  .hero { min-height: auto; padding: 0 0 1rem; background: #fff; color: #000; }
  .hero-role, .hero-lead, .hero-hello, .status-pill { color: #333; }
  .stats { margin: 0; }
  .section { padding: 1.5rem 0; }
  .js .reveal { opacity: 1; translate: none; }
  .js .stage, .tl-points li.is-extra, .is-hidden { display: block !important; }
  .about-media { position: static; }
  .tl-card, .skill-card, .project-card, .edu-card { break-inside: avoid; box-shadow: none; }
}
