:root {
  --accent: #d6336c;
  --accent-strong: #b02a4c;
  --accent-soft: rgba(214, 51, 108, 0.08);
  --gold: #f0a43c;
  --gold-strong: #d98c1f;
  --bg: #fffdfd;
  --bg-alt: #faf3f5;
  --surface: #ffffff;
  --text: #2a1620;
  --text-dim: #75606a;
  --border: rgba(176, 42, 76, 0.13);
  --hairline: rgba(176, 42, 76, 0.22);
  --shadow: 0 2px 14px rgba(160, 40, 70, 0.05);
  --nav-bg: rgba(255, 253, 253, 0.85);
  --grad-from: #a32638;
  --grad-to: #d6336c;
}
html[data-theme="dark"] {
  --accent: #e25b85;
  --accent-strong: #e25b85;
  --accent-soft: rgba(226, 91, 133, 0.10);
  --gold: #f4b04a;
  --gold-strong: #f0a43c;
  --bg: #191017;
  --bg-alt: #20141d;
  --surface: #271a24;
  --text: #f6eef2;
  --text-dim: #bfa6b1;
  --border: rgba(226, 91, 133, 0.16);
  --hairline: rgba(226, 91, 133, 0.30);
  --shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
  --nav-bg: rgba(25, 16, 23, 0.85);
  --grad-from: #8d2038;
  --grad-to: #c12a5e;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --accent: #e25b85;
    --accent-strong: #e25b85;
    --accent-soft: rgba(226, 91, 133, 0.10);
    --gold: #f4b04a;
    --gold-strong: #f0a43c;
    --bg: #191017;
    --bg-alt: #20141d;
    --surface: #271a24;
    --text: #f6eef2;
    --text-dim: #bfa6b1;
    --border: rgba(226, 91, 133, 0.16);
    --hairline: rgba(226, 91, 133, 0.30);
    --shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
    --nav-bg: rgba(25, 16, 23, 0.85);
    --grad-from: #8d2038;
    --grad-to: #c12a5e;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.65;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}
::selection { background: var(--accent-soft); }
a { color: var(--accent-strong); text-decoration: none; }
section { padding: 110px 24px; max-width: 1040px; margin-inline: auto; }

.sec-head { display: flex; align-items: baseline; gap: 20px; margin-block-end: 20px; }
.sec-num { font-size: 14px; font-weight: 500; color: var(--accent-strong); letter-spacing: 1px; }
h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 600; line-height: 1.15; letter-spacing: -0.8px; }
.section-sub { color: var(--text-dim); max-width: 560px; font-size: 16.5px; margin-block-end: 48px; }

/* Word reveal — gentle */
.words .w { display: inline-block; opacity: 0; transform: translateY(0.4em); transition: opacity 0.5s ease, transform 0.5s ease; }
.words.shown .w { opacity: 1; transform: none; }

/* Nav */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-block-end: 1px solid var(--hairline);
}
.nav-right { display: flex; align-items: center; }
.logo { font-weight: 700; font-size: 17px; color: var(--text); letter-spacing: -0.3px; }
.logo em { color: var(--accent-strong); font-style: normal; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  color: var(--text-dim); font-size: 14px; font-weight: 500;
  padding: 7px 14px; border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--accent-soft); }
#themeToggle {
  background: none; border: 1px solid var(--hairline); color: var(--text);
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 16px;
  display: grid; place-items: center; margin-inline-start: 10px;
  transition: background 0.2s;
}
#themeToggle:hover { background: var(--accent-soft); }
#menuBtn { display: none; background: none; border: none; color: var(--text); font-size: 23px; cursor: pointer; }

/* Hero — centred, airy */
header.hero {
  min-height: 92vh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
  padding: 140px 24px 80px;
  position: relative;
  overflow: hidden;
}
.orb {
  position: absolute; z-index: -1; border-radius: 50%;
  filter: blur(90px); pointer-events: none;
  animation: float 16s ease-in-out infinite alternate;
}
.orb.o1 { width: 560px; height: 560px; background: var(--accent-soft); top: -10%; inset-inline-start: 50%; transform: translateX(-50%); }
.orb.o2 { width: 320px; height: 320px; background: rgba(240, 164, 60, 0.10); bottom: 0; inset-inline-end: 8%; animation-delay: -8s; }
@keyframes float { from { transform: translate(0,0); } to { transform: translate(-30px, 26px); } }
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 500; color: var(--text-dim);
  border: 1px solid var(--hairline); border-radius: 4px;
  padding: 7px 16px; margin-block-end: 28px;
  background: var(--surface);
}
.tag::before { content: ""; width: 8px; height: 8px; background: var(--gold); }
.hero h1 {
  font-size: clamp(40px, 6.5vw, 72px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -2px;
  max-width: 17ch;
  margin-block-end: 22px;
}
.hero h1 .hl { color: var(--accent-strong); }
.hero p.lead { max-width: 540px; color: var(--text-dim); font-size: 17.5px; margin-block-end: 36px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-block; padding: 13px 28px; border-radius: 4px;
  font-family: inherit; font-weight: 600; font-size: 15px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s; cursor: pointer; border: none;
}
.btn.primary { background: linear-gradient(100deg, var(--grad-from), var(--grad-to)); color: #fff; box-shadow: 0 4px 18px rgba(214, 51, 108, 0.22); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--hairline); }
.btn:hover { transform: translateY(-2px); }
.btn.ghost:hover { border-color: var(--accent); background: var(--accent-soft); }

/* Stats — quiet hairline band */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  max-width: 1040px; margin-inline: auto;
  border-block: 1px solid var(--hairline);
}
.stat { padding: 56px 28px; border-inline-end: 1px solid var(--hairline); }
.stat:last-child { border-inline-end: none; }
.stat .num { font-size: clamp(40px, 4.5vw, 58px); font-weight: 700; letter-spacing: -1.5px; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.stat .num small { font-size: 0.42em; font-weight: 600; color: var(--accent-strong); vertical-align: 0.45em; letter-spacing: 0; }
.stat .lbl { margin-block-start: 8px; font-size: 13px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); }

/* About */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.about-grid .prose p { color: var(--text-dim); margin-block-end: 16px; font-size: 16.5px; }
.about-grid .prose strong { color: var(--text); font-weight: 600; }
.facts {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 6px;
  padding: 26px; box-shadow: var(--shadow);
}
.facts h3 { font-size: 12.5px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--accent-strong); margin-block-end: 14px; }
.facts ul { list-style: none; }
.facts li { padding: 9px 0; border-block-end: 1px solid var(--border); font-size: 14px; color: var(--text-dim); display: flex; justify-content: space-between; gap: 12px; }
.facts li:last-child { border: none; }
.facts li span:last-child { color: var(--text); font-weight: 600; text-align: end; }

/* Statement */
.statement { padding: 100px 24px; max-width: 880px; margin-inline: auto; text-align: center; }
.statement p { font-size: clamp(26px, 3.6vw, 40px); font-weight: 600; line-height: 1.2; letter-spacing: -1px; }
.statement .hl { color: var(--accent-strong); }

/* Experience — clean list rows */
#experience { background: var(--bg-alt); max-width: none; }
#experience .inner { max-width: 1040px; margin-inline: auto; }
.xp-row {
  display: grid; grid-template-columns: 150px 1fr 1.3fr; gap: 24px; align-items: baseline;
  padding: 26px 18px;
  border-block-end: 1px solid var(--border);
  border-radius: 4px;
  transition: background 0.2s;
}
.xp-row:hover { background: var(--surface); }
.xp-when { font-size: 13.5px; font-weight: 600; color: var(--accent-strong); }
.xp-role h3 { font-size: 17.5px; font-weight: 600; }
.xp-role .org { font-size: 13px; font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-dim); }
.xp-desc { font-size: 14.5px; color: var(--text-dim); }

/* Skills */
.skill-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.skill-card {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 6px;
  padding: 28px; box-shadow: var(--shadow);
  transition: transform 0.2s, border-color 0.2s;
}
.skill-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.skill-card h3 { font-size: 13px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--accent-strong); margin-block-end: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 13px; font-weight: 500; color: var(--text-dim);
  background: var(--accent-soft); border-radius: 3px; padding: 5px 13px;
}

/* Certs */
.certs { display: flex; gap: 16px; flex-wrap: wrap; }
.cert {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 6px;
  padding: 16px 26px 16px 16px; box-shadow: var(--shadow);
}
.cert .badge {
  width: 38px; height: 38px; flex: none; border-radius: 4px;
  display: grid; place-items: center; font-size: 17px;
  background: linear-gradient(120deg, var(--gold-strong), var(--gold)); color: #2b1604;
}
.cert.pending .badge { background: transparent; border: 2px dashed var(--gold-strong); color: var(--gold-strong); }
.cert h3 { font-size: 15px; font-weight: 600; }
.cert .status { font-size: 11.5px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim); }

/* Contact — gradient panel */
.contact-panel {
  background: linear-gradient(115deg, var(--grad-from), var(--grad-to));
  border-radius: 8px;
  padding: 70px 40px;
  text-align: center;
  color: #fff;
}
.contact-panel h3 { font-size: clamp(24px, 3vw, 34px); font-weight: 600; letter-spacing: -0.6px; margin-block-end: 10px; }
.contact-panel p { color: rgba(255,255,255,0.85); max-width: 480px; margin: 0 auto 32px; }
.contact-panel .btn.gold { background: linear-gradient(100deg, var(--gold-strong), var(--gold)); color: #2b1604; }
.contact-panel .note { margin-block-start: 18px; font-size: 13.5px; color: rgba(255,255,255,0.75); }

footer {
  border-block-start: 1px solid var(--hairline);
  padding: 32px 24px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--text-dim); font-size: 13px;
  max-width: 1040px; margin-inline: auto;
}

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.shown { opacity: 1; transform: none; }

@media (max-width: 760px) {
  section { padding: 70px 20px; }
  .nav-links {
    position: fixed; top: 64px; inset-inline: 12px;
    flex-direction: column; align-items: stretch;
    background: var(--surface); border: 1px solid var(--hairline); border-radius: 6px;
    padding: 10px; box-shadow: var(--shadow); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; text-align: center; }
  #menuBtn { display: block; }
  .about-grid { grid-template-columns: 1fr; }
  .xp-row { grid-template-columns: 1fr; gap: 4px; }
  .stat { border-inline-end: none; border-block-end: 1px solid var(--hairline); padding: 32px 20px; }
  .stat:last-child { border-block-end: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
