/* ==========================================================================
   Design tokens — one font family (Inter), one accent, one gradient used
   exactly once (hero role highlight). Dark is the default theme; toggling
   data-theme="light" on <html> swaps the palette below.
   ========================================================================== */

:root {
  --bg: #0b0d12;
  --bg-alt: #0e1015;
  --surface: #14161d;
  --border: #232630;
  --text: #eceef2;
  --muted: #9aa0ac;
  --muted-2: #6b707c;
  --accent: #8b9bff;
  --accent-grad: linear-gradient(120deg, #6ea8fe 0%, #9b7bff 100%);
  --maxw: 900px;
}

:root[data-theme="light"] {
  --bg: #fbfbfa;
  --bg-alt: #f3f3f1;
  --surface: #ffffff;
  --border: #e4e3df;
  --text: #1b1c1f;
  --muted: #5a5d66;
  --muted-2: #85888f;
  --accent: #4a5ae0;
  --accent-grad: linear-gradient(120deg, #4a5ae0 0%, #7c5cff 100%);
}

* { 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.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .2s ease, color .2s ease;
}

.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(10px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.nav__brand { font-weight: 700; font-size: 1rem; letter-spacing: .5px; }
.nav__links { display: flex; gap: 28px; }
.nav__links a { color: var(--muted); font-size: .9rem; font-weight: 500; transition: color .2s; }
.nav__links a:hover { color: var(--text); }
.nav__tools { display: flex; align-items: center; gap: 14px; }

.lang-switch { display: flex; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.lang-switch button {
  font: inherit; font-size: .74rem; font-weight: 600; letter-spacing: .5px;
  padding: 5px 9px; background: none; border: 0; color: var(--muted-2); cursor: pointer;
  transition: color .2s, background .2s;
}
.lang-switch button.is-active { color: var(--bg); background: var(--text); }

.theme-toggle {
  font-size: 1rem; line-height: 1; background: none; border: 1px solid var(--border);
  border-radius: 7px; width: 30px; height: 30px; display: grid; place-items: center;
  cursor: pointer; color: var(--text);
}

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

/* ---------- Hero ---------- */
.hero { padding: 150px 0 90px; }
.hero__inner { display: flex; justify-content: space-between; align-items: center; gap: 48px; }
.hero__main { flex: 1 1 auto; min-width: 0; }
.hero__eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 500; color: var(--muted);
  letter-spacing: .3px; margin-bottom: 22px;
}
.hero__title { font-size: clamp(2.1rem, 5.5vw, 3.4rem); font-weight: 700; line-height: 1.1; letter-spacing: -1px; }
.hero__role { font-size: clamp(1.1rem, 2.6vw, 1.5rem); font-weight: 500; color: var(--muted); margin-top: 8px; }
.hero__lead { max-width: 620px; color: var(--muted); margin-top: 22px; font-size: 1rem; }
.hero__cta { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: 8px; font-weight: 600; font-size: .92rem;
  transition: transform .15s, border-color .2s, opacity .2s; cursor: pointer; border: 1px solid transparent;
}
.btn--primary { background: var(--text); color: var(--bg); }
.btn--primary:hover { transform: translateY(-2px); opacity: .88; }
.btn--ghost { border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); transform: translateY(-2px); }

.hero__contacts { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.hero-contact {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border);
  font-size: .85rem; font-weight: 500; color: var(--muted); transition: border-color .2s, color .2s, transform .15s;
}
.hero-contact:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }
.hero-contact__icon { font-size: 1rem; line-height: 1; }

.hero__stats {
  list-style: none; display: flex; flex-direction: column; gap: 26px;
  flex: 0 0 auto; padding-left: 40px; border-left: 1px solid var(--border);
}
.hero__stats li { display: flex; flex-direction: column; gap: 4px; }
.hero__stats strong { font-size: 1.4rem; font-weight: 700; }
.hero__stats span { font-size: .8rem; color: var(--muted-2); white-space: nowrap; }

/* ---------- Sections ---------- */
.section { padding: 76px 0; border-top: 1px solid var(--border); }
.section--alt { background: var(--bg-alt); }
.section__kicker { color: var(--muted-2); font-size: .8rem; font-weight: 600; letter-spacing: 1px; margin-bottom: 10px; }
.section__title { font-size: clamp(1.5rem, 3.4vw, 2rem); font-weight: 700; letter-spacing: -.5px; margin-bottom: 36px; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.checklist { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.checklist li { position: relative; padding-left: 22px; color: var(--muted); font-size: .95rem; }
.checklist li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }

.about__card { border: 1px solid var(--border); border-radius: 12px; padding: 26px; }
.about__card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 18px; }
.facts { display: flex; flex-direction: column; gap: 12px; }
.facts > div { display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--border); padding-bottom: 11px; }
.facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { font-size: .72rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: .5px; }
.facts dd { font-size: .92rem; }
.about__principles-title { margin: 22px 0 12px; font-size: .88rem; font-weight: 600; color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.tags span {
  font-size: .8rem; color: var(--muted);
  padding: 3px 0; border-bottom: 1px solid var(--border);
}

/* ---------- Skills — single block, plain chapters ---------- */
.stack-block { display: flex; flex-direction: column; gap: 30px; }
.stack-chapter h3 {
  font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .8px;
  color: var(--muted-2); margin-bottom: 14px;
}

/* ---------- Timeline ---------- */
.timeline { position: relative; display: flex; flex-direction: column; gap: 8px; }
.tl-item { position: relative; padding: 32px 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 110px 1fr; gap: 24px; }
.tl-item:last-child { border-bottom: 0; }
.tl-date { display: flex; flex-direction: column; padding-top: 2px; }
.tl-date__m { font-size: .78rem; color: var(--muted-2); }
.tl-date__y { font-size: 1.2rem; font-weight: 700; }
.tl-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; align-items: baseline; }
.tl-title { font-size: 1.1rem; font-weight: 700; }
.tl-period { font-size: .78rem; color: var(--muted-2); 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: 14px; }
.tl-section-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .8px; color: var(--muted-2); margin: 18px 0 8px; font-weight: 600; }
.tl-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.tl-list li { position: relative; padding-left: 16px; color: var(--muted); font-size: .9rem; }
.tl-list li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }
.tl-stack { margin-top: 18px; }

/* ---------- Contact — three plain rows ---------- */
.contact__lead { max-width: 560px; color: var(--muted); margin-bottom: 36px; font-size: 1rem; }
.contact-rows { display: flex; flex-direction: column; }
.contact-row {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 18px;
  padding: 20px 0; border-bottom: 1px solid var(--border); transition: opacity .2s;
}
.contact-row:last-child { border-bottom: 0; }
.contact-row:hover { opacity: .7; }
.contact-row__icon { font-size: 1.2rem; }
.contact-row__main { display: flex; flex-direction: column; gap: 2px; }
.contact-row__name { font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted-2); }
.contact-row__link { font-size: 1.02rem; font-weight: 600; }
.contact-row__desc { font-size: .85rem; color: var(--muted); text-align: right; max-width: 260px; }

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

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

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .hero__inner { flex-direction: column; align-items: stretch; gap: 36px; }
  .hero__stats {
    flex-direction: row; flex-wrap: wrap; gap: 32px;
    padding-left: 0; padding-top: 28px; border-left: 0; border-top: 1px solid var(--border);
  }
}
@media (max-width: 640px) {
  .nav__links {
    position: fixed; inset: 60px 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: 56px 0; }
  .hero { padding: 120px 0 60px; }
  .hero__stats { gap: 24px; }
  .tl-item { grid-template-columns: 1fr; gap: 6px; }
  .tl-date { flex-direction: row; gap: 6px; align-items: baseline; }
  .contact-row { grid-template-columns: 32px 1fr; }
  .contact-row__desc { grid-column: 2; text-align: left; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
