:root {
  --bg: #0b0e14;
  --bg-alt: #11151f;
  --surface: #161b27;
  --surface-2: #1d2433;
  --border: #262d3d;
  --text: #e6e9ef;
  --muted: #9aa3b2;
  --muted-2: #6b7384;
  --accent: #6ea8fe;
  --accent-2: #7c5cff;
  --accent-grad: linear-gradient(120deg, #6ea8fe 0%, #7c5cff 100%);
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1080px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }

.accent {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(11, 14, 20, 0.6);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.nav.scrolled { background: rgba(11, 14, 20, 0.85); border-bottom-color: var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav__brand { font-weight: 800; font-size: 1.1rem; letter-spacing: .5px; display: flex; align-items: center; gap: 8px; }
.nav__brand-mark { font-family: "JetBrains Mono", monospace; color: var(--accent); font-size: .9rem; }
.nav__links { display: flex; gap: 28px; }
.nav__links a { color: var(--muted); font-size: .92rem; font-weight: 500; transition: color .2s; }
.nav__links a:hover { color: var(--text); }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 160px 0 100px; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 50% at 75% 10%, rgba(124, 92, 255, 0.18), transparent 70%),
    radial-gradient(55% 45% at 15% 30%, rgba(110, 168, 254, 0.16), transparent 70%);
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  opacity: .25;
}
.hero__inner { position: relative; z-index: 1; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .85rem; font-weight: 600; color: var(--accent);
  border: 1px solid var(--border); background: var(--surface);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 24px;
}
.hero__eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #41d18a; box-shadow: 0 0 0 4px rgba(65, 209, 138, .2); }
.hero__title { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; line-height: 1.05; letter-spacing: -1.5px; }
.hero__role { font-size: clamp(1.2rem, 3vw, 1.8rem); font-weight: 600; color: var(--muted); margin-top: 10px; }
.hero__lead { max-width: 620px; color: var(--muted); margin-top: 24px; font-size: 1.05rem; }
.hero__cta { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: var(--radius-sm); font-weight: 600; font-size: .95rem;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s; cursor: pointer; border: 1px solid transparent;
}
.btn--primary { background: var(--accent-grad); color: #0b0e14; box-shadow: 0 8px 24px rgba(124, 92, 255, .35); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(124, 92, 255, .45); }
.btn--ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn--ghost:hover { border-color: var(--accent); transform: translateY(-2px); }

.hero__stats { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; max-width: 760px; }
.hero__stats li { display: flex; flex-direction: column; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.hero__stats strong { font-size: 1.5rem; font-weight: 800; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero__stats span { font-size: .8rem; color: var(--muted-2); margin-top: 4px; }

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.section--alt { background: var(--bg-alt); }
.section__kicker { font-family: "JetBrains Mono", monospace; color: var(--accent); font-size: .85rem; font-weight: 500; letter-spacing: 1px; margin-bottom: 12px; }
.section__title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -1px; margin-bottom: 40px; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.checklist { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.checklist li { position: relative; padding-left: 32px; color: var(--muted); }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center;
  font-size: .75rem; font-weight: 700; color: #0b0e14; background: var(--accent-grad);
}
.about__card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.about__card h3 { font-size: 1.1rem; margin-bottom: 18px; }
.facts { display: flex; flex-direction: column; gap: 14px; }
.facts > div { display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.facts dt { font-size: .75rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: .5px; }
.facts dd { font-size: .95rem; color: var(--text); }
.about__principles-title { margin: 22px 0 14px; font-size: .95rem; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  font-family: "JetBrains Mono", monospace; font-size: .78rem; color: var(--accent);
  background: rgba(110, 168, 254, .08); border: 1px solid var(--border);
  padding: 5px 11px; border-radius: 7px;
}

/* ---------- Skills ---------- */
.stack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.stack-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: transform .2s, border-color .2s; }
.stack-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.stack-card h3 { font-size: 1rem; margin-bottom: 16px; color: var(--text); }

.skills-matrix__title { font-size: 1.4rem; margin-top: 64px; }
.skills-matrix__sub { color: var(--muted-2); font-size: .9rem; margin: 6px 0 28px; }
.skills-matrix { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.matrix-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.matrix-group > h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); margin-bottom: 18px; font-family: "JetBrains Mono", monospace; }
.skill-row { margin-bottom: 16px; }
.skill-row:last-child { margin-bottom: 0; }
.skill-row__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.skill-row__name { font-size: .92rem; font-weight: 500; }
.skill-row__meta { font-size: .75rem; color: var(--muted-2); font-family: "JetBrains Mono", monospace; }
.skill-bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.skill-bar__fill { height: 100%; background: var(--accent-grad); border-radius: 99px; width: 0; transition: width 1s cubic-bezier(.2,.8,.2,1); }

/* ---------- Timeline ---------- */
.timeline { position: relative; display: flex; flex-direction: column; gap: 28px; }
.timeline::before { content: ""; position: absolute; left: 36px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-left: 100px; }
.tl-date {
  position: absolute; left: 0; top: 0; z-index: 1;
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; background: var(--surface); border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(110,168,254,.12); font-family: "JetBrains Mono", monospace;
}
.tl-date__m { font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.tl-date__y { font-size: 1.05rem; font-weight: 700; color: var(--accent); line-height: 1.1; }
.tl-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; transition: border-color .2s; }
.tl-card:hover { border-color: var(--accent); }
.tl-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: baseline; }
.tl-title { font-size: 1.15rem; font-weight: 700; }
.tl-period { font-size: .8rem; color: var(--accent); font-family: "JetBrains Mono", monospace; white-space: nowrap; }
.tl-role { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.tl-team { color: var(--muted-2); font-size: .82rem; margin-top: 2px; }
.tl-summary { color: var(--muted); font-size: .92rem; margin-top: 12px; }
.tl-section-label { font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted-2); margin: 18px 0 8px; font-weight: 600; }
.tl-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.tl-list li { position: relative; padding-left: 18px; color: var(--muted); font-size: .9rem; }
.tl-list li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }
.tl-stack { margin-top: 18px; }

/* ---------- Contact ---------- */
.contact__lead { max-width: 560px; color: var(--muted); margin-bottom: 36px; font-size: 1.05rem; }
.contact__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.contact__card {
  display: flex; flex-direction: column; gap: 4px; padding: 26px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .2s, border-color .2s; position: relative; overflow: hidden;
}
.contact__card:hover { transform: translateY(-4px); border-color: var(--accent); }
.contact__icon {
  font-size: 1.4rem; width: 46px; height: 46px; display: grid; place-items: center;
  background: rgba(110,168,254,.1); border-radius: 12px; margin-bottom: 12px; font-weight: 700; color: var(--accent);
}
.contact__label { font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted-2); }
.contact__value { font-size: 1.05rem; font-weight: 600; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--muted-2); font-size: .85rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav__links {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--bg-alt); border-bottom: 1px solid var(--border);
    transform: translateY(-130%); transition: transform .3s; padding: 8px 0;
  }
  .nav__links.open { transform: none; }
  .nav__links a { padding: 14px 24px; }
  .nav__toggle { display: flex; }
  .nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle.open span:nth-child(2) { opacity: 0; }
  .nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .section { padding: 64px 0; }
  .hero { padding: 130px 0 70px; }
  .tl-period { white-space: normal; }
  .timeline::before { left: 30px; }
  .tl-item { padding-left: 80px; }
  .tl-date { width: 60px; height: 60px; }
  .tl-date__m { font-size: .62rem; }
  .tl-date__y { font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .skill-bar__fill { transition: none; }
}
