:root {
  --bg: #ffffff;
  --bg-alt: #f6f8fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #5b6474;
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --border: #e5e9f0;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 2px 4px rgba(15, 23, 42, 0.05), 0 16px 40px rgba(37, 99, 235, 0.12);
  --radius: 14px;
  --max: 1100px;
  --header-bg: rgba(255, 255, 255, 0.8);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --bg-alt: #0f1529;
    --surface: #131a31;
    --text: #e6e9f2;
    --muted: #9aa3b8;
    --accent: #60a5fa;
    --accent-2: #a78bfa;
    --accent-soft: rgba(96, 165, 250, 0.12);
    --border: #222b45;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(96, 165, 250, 0.15);
    --header-bg: rgba(11, 16, 32, 0.75);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.icon { width: 20px; height: 20px; flex: none; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; }
.nav a { color: var(--muted); font-size: 0.93rem; font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav .lang {
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 600;
  color: var(--text);
}
.nav .lang:hover { border-color: var(--accent); color: var(--accent); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 96px;
  background:
    radial-gradient(700px 360px at 85% 10%, rgba(124, 58, 237, 0.14), transparent 70%),
    radial-gradient(600px 400px at 0% 100%, rgba(37, 99, 235, 0.14), transparent 70%);
}
.hero::before {
  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 at center, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  opacity: 0.5;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 48px;
  align-items: center;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 6.5vw, 4rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { margin: 0 0 28px; font-size: 1.15rem; color: var(--muted); max-width: 46ch; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 12px 28px rgba(37, 99, 235, 0.32); }
.button-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}
.button-ghost:hover { border-color: var(--accent); box-shadow: none; }

.hero-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 28px 0 0;
}
.hero-tags li {
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
}

.code-card {
  border-radius: var(--radius);
  background: #0f172a;
  color: #cbd5e1;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transform: rotate(1.5deg);
}
.code-bar { display: flex; gap: 6px; padding: 12px 14px; background: rgba(255, 255, 255, 0.04); }
.code-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }
.code-bar i:nth-child(2) { background: #f59e0b; }
.code-bar i:nth-child(3) { background: #22c55e; }
.code-card pre {
  margin: 0;
  padding: 18px 20px 22px;
  font: 0.9rem/1.7 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  overflow-x: auto;
}
.code-card .k { color: #c084fc; }
.code-card .s { color: #86efac; }
.code-card .n { color: #fbbf24; }

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.section h2 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3.5vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.section-sub { margin: 0 0 36px; color: var(--muted); max-width: 60ch; }

.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; margin-top: 20px; }
.prose p { margin: 0 0 16px; max-width: 65ch; }
.stats { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.stats li {
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.stats strong {
  display: block;
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 800;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stats span { color: var(--muted); font-size: 0.95rem; }

/* Services */
.cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.card {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--accent); }
.card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}
.card-icon .icon { width: 22px; height: 22px; }
.card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px 32px; }
.skill-group h3 { margin: 0 0 10px; font-size: 0.95rem; color: var(--muted); font-weight: 600; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.chips li {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 500;
}

/* Experience */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  position: relative;
  padding: 0 0 28px 28px;
  border-left: 2px solid var(--border);
  margin-left: 6px;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 3px solid var(--accent);
}
.timeline li:first-child::before { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.timeline .period {
  display: inline-block;
  margin: 0 0 4px;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}
.timeline h3 { margin: 4px 0 6px; font-size: 1.08rem; }
.timeline li p:last-child { margin: 0; color: var(--muted); max-width: 70ch; }

.mini-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 40px 0 0; }
.mini-facts div, .facts div {
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
dt { color: var(--muted); font-size: 0.85rem; }
dd { margin: 2px 0 0; font-weight: 600; }

/* Company details */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin: 24px 0 0; }

/* Contact */
.contact-section { padding-top: 24px; }
.contact-card {
  padding: 48px;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(255, 255, 255, 0.18), transparent 70%),
    linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 30px 60px rgba(37, 99, 235, 0.25);
}
.contact-card .kicker { color: rgba(255, 255, 255, 0.8); }
.contact-card .section-sub { color: rgba(255, 255, 255, 0.85); margin-bottom: 28px; }
.contact-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.contact-links a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-weight: 600;
  word-break: break-word;
  transition: background 0.15s ease;
}
.contact-links a:hover { background: rgba(255, 255, 255, 0.22); text-decoration: none; }
.contact-links small { display: block; font-weight: 500; opacity: 0.75; font-size: 0.78rem; }

/* Footer */
.site-footer { padding: 28px 0; color: var(--muted); font-size: 0.88rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.site-footer p { margin: 0; }

/* Responsive */
@media (max-width: 860px) {
  .hero { padding: 56px 0 64px; }
  .hero-inner, .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .code-card { transform: none; }
  .section { padding: 64px 0; }
  .contact-card { padding: 32px 22px; }
}
@media (max-width: 560px) {
  .nav { gap: 4px 14px; }
  .nav a { font-size: 0.88rem; }
  .hero-visual { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .button { transition: none; }
}
