:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-subtle: #eef3f8;
  --text: #172033;
  --muted: #637083;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --hero: #0f172a;
  --hero-soft: #1e293b;
  --line: #d9e1ec;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.09);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 82px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(217, 225, 236, 0.8);
  backdrop-filter: blur(14px);
}

.nav {
  width: min(1120px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-weight: 750;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--primary);
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.lang-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  padding: 6px 4px;
}

.lang-button:hover,
.lang-button:focus-visible,
.lang-button.is-active {
  color: var(--primary);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  border-radius: 999px;
}

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

.hero {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.28), transparent 36%),
    linear-gradient(135deg, var(--hero), var(--hero-soft));
  color: #f8fafc;
  padding: 96px 0 84px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 48px;
  align-items: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #93c5fd;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(3rem, 8vw, 5.6rem);
  line-height: 0.96;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.18rem;
  line-height: 1.3;
}

.headline {
  margin-bottom: 10px;
  color: #dbeafe;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 650;
}

.subheadline {
  max-width: 680px;
  color: #cbd5e1;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius);
  font-weight: 750;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.32);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--primary-dark);
}

.button.secondary {
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: #e2e8f0;
}

.hero-card {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.avatar {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 50%;
  background: #dbeafe;
  color: var(--hero);
  font-size: 1.5rem;
  font-weight: 800;
}

dl {
  margin: 0;
}

.hero-card div {
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

dt {
  color: #bfdbfe;
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

dd {
  margin: 4px 0 0;
  color: #f8fafc;
}

.section {
  padding: 84px 0;
  background: var(--surface);
}

.section.subtle {
  background: var(--surface-subtle);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 56px;
  align-items: start;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.lead {
  color: var(--muted);
  font-size: 1.12rem;
}

.muted {
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.timeline-date,
.card-meta {
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 750;
}

.card-grid,
.project-grid,
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

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

.card,
.skill-group {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card-org {
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 650;
}

ul {
  margin: 0;
  padding-left: 20px;
}

li + li {
  margin-top: 8px;
}

.tech-stack {
  margin: 22px 0 0;
  color: var(--primary-dark);
  font-weight: 750;
}

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

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tags span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #cfe0f6;
  border-radius: 999px;
  background: #f8fbff;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 650;
}

.language-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.language-list div {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.language-list strong,
.language-list span {
  display: block;
}

.language-list span {
  margin-top: 4px;
  color: var(--muted);
}

.contact-section {
  background: var(--hero);
  color: #f8fafc;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 48px;
  align-items: center;
}

.contact-section .lead {
  color: #cbd5e1;
}

.contact-card {
  display: grid;
  gap: 12px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.contact-card a,
.contact-card span {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-weight: 650;
}

.contact-card a:hover,
.contact-card a:focus-visible {
  color: #93c5fd;
}

.contact-card :last-child {
  border-bottom: 0;
}

.footer {
  padding: 26px 0;
  background: #0b1120;
  color: #94a3b8;
  text-align: center;
}

.footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .hero-grid,
  .section-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .project-grid,
  .skills-grid,
  .language-list {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .container,
  .nav {
    width: min(100% - 28px, 1120px);
  }

  .nav {
    min-height: 64px;
    gap: 12px;
  }

  .brand {
    flex: 1;
  }

  .nav-toggle {
    display: block;
    order: 3;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 14px;
    right: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .language-switch {
    order: 2;
  }

  .nav-links a {
    padding: 12px;
    border-radius: 6px;
  }

  .nav-links a:hover,
  .nav-links a:focus-visible {
    background: var(--surface-subtle);
  }

  .hero {
    padding: 72px 0 64px;
  }

  .section {
    padding: 64px 0;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
