:root {
  --bg: #0b1220;
  --bg-soft: #111b2f;
  --panel: #f9fbff;
  --ink: #18253d;
  --muted: #506283;
  --line: #d9e2f0;
  --primary: #1a66ff;
  --primary-strong: #0f4fcf;
  --ok: #0b8f5f;
  --shadow: 0 22px 48px rgba(9, 20, 43, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Source Sans 3", "Noto Sans SC", sans-serif;
  color: var(--panel);
  background: radial-gradient(circle at 20% -10%, #21417a 0, transparent 42%),
    radial-gradient(circle at 90% 0%, #2e1f66 0, transparent 32%),
    var(--bg);
  line-height: 1.55;
}

.noise {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 0.8px, transparent 0.8px);
  background-size: 3px 3px;
  pointer-events: none;
}

.topbar,
.layout {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  padding: 34px 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.eyebrow {
  margin: 0;
  color: #9ab0d8;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 700;
}

.name {
  margin: 6px 0 0;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #d6e3ff;
  user-select: none;
}

.lang-switch input {
  appearance: none;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.14);
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-switch input::after {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: all 0.2s ease;
}

.lang-switch input:checked {
  background: rgba(26, 102, 255, 0.85);
}

.lang-switch input:checked::after {
  left: 24px;
}

.layout {
  display: grid;
  gap: 16px;
  padding-bottom: 52px;
}

.panel {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.hero {
  background: linear-gradient(120deg, #f9fbff 0%, #edf3ff 100%);
}

.hero-tag {
  margin: 0;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  font-weight: 700;
}

h2,
h3,
.name {
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  letter-spacing: -0.01em;
}

h2 {
  margin: 8px 0 12px;
  font-size: clamp(1.7rem, 4.5vw, 2.8rem);
  line-height: 1.16;
}

h3 {
  margin: 0 0 12px;
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
}

.hero-summary,
#focus-body,
#contact-body,
.timeline p,
.card p,
.bullets,
.skill-row {
  color: var(--muted);
}

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

.btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 10px 15px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn:hover {
  transform: translateY(-1px);
}

.toast {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--ok);
  font-weight: 600;
}

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

.stat {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(220, 230, 255, 0.28);
  border-radius: 12px;
  padding: 14px;
}

.stat .k {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}

.stat .v {
  font-size: 0.9rem;
  color: #bcd1f3;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: baseline;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.timeline .item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.timeline h4 {
  margin: 0 0 6px;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 1.02rem;
}

.timeline .meta {
  margin: 0 0 6px;
  font-size: 0.9rem;
  color: #60749a;
}

.timeline ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.card h4 {
  margin: 0 0 6px;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.bullets {
  margin: 0;
  padding-left: 18px;
}

.skill-groups {
  display: grid;
  gap: 10px;
}

.skill-row {
  border-bottom: 1px dashed var(--line);
  padding-bottom: 8px;
}

.skill-row strong {
  color: var(--ink);
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-grid,
  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar,
  .layout {
    width: min(1080px, calc(100% - 24px));
  }

  .panel {
    padding: 18px;
  }
}
