:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-strong: #eef6f3;
  --text: #172026;
  --muted: #64717b;
  --line: #dbe5e0;
  --accent: #116d6e;
  --accent-strong: #0b4c4d;
  --gold: #d9a441;
  --rose: #c45f6b;
  --shadow: 0 18px 50px rgba(23, 32, 38, 0.12);
}

body.dark {
  color-scheme: dark;
  --bg: #101619;
  --surface: #172026;
  --surface-strong: #1f302e;
  --text: #eef6f3;
  --muted: #a9b8b3;
  --line: #31413f;
  --accent: #5fd0c9;
  --accent-strong: #9ce6df;
  --gold: #f0c76c;
  --rose: #ee8e9a;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 5vw, 64px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 32px);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

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

.theme-toggle {
  display: grid;
  min-width: 58px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  min-height: calc(100vh - 79px);
  padding: clamp(48px, 8vw, 96px) clamp(18px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow,
.panel-label {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(3.25rem, 8vw, 7rem);
  line-height: 0.95;
}

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

h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
}

.hero-copy p,
.section p,
.profile-panel p {
  color: var(--muted);
  font-size: 1.05rem;
}

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

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
}

.button.primary {
  background: var(--accent);
  color: #ffffff;
}

.button.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
}

.profile-panel {
  display: grid;
  gap: 24px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.portrait {
  display: grid;
  min-height: 260px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 28% 22%, var(--gold) 0 12%, transparent 13%),
    radial-gradient(circle at 72% 34%, var(--rose) 0 10%, transparent 11%),
    linear-gradient(135deg, var(--accent), var(--surface-strong));
}

.portrait span {
  display: grid;
  width: 142px;
  height: 142px;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 3.5rem;
  font-weight: 900;
}

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

.metric-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  padding: 14px;
}

.metric-grid strong {
  display: block;
  color: var(--accent);
  font-size: 1.7rem;
  line-height: 1;
}

.metric-grid span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.section {
  padding: clamp(52px, 8vw, 92px) clamp(18px, 5vw, 64px);
}

.section-heading {
  max-width: 680px;
  margin-bottom: 30px;
}

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

.experience-card,
.achievement-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(23, 32, 38, 0.06);
}

.experience-card {
  padding: clamp(22px, 4vw, 32px);
}

.role-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  color: var(--muted);
}

.role-meta p {
  margin-bottom: 0;
}

.company {
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 900;
}

.experience-card ul {
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
  padding-left: 22px;
  color: var(--muted);
}

.experience-card li::marker {
  color: var(--accent);
}

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

.tech-tags span {
  border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent-strong);
  padding: 7px 10px;
  font-size: 0.84rem;
  font-weight: 800;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(280px, 1fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: start;
  background: var(--surface-strong);
  border-block: 1px solid var(--line);
}

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

.skill-group h3 {
  margin-bottom: 12px;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-list span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px 14px;
  color: var(--text);
  font-weight: 800;
}

.education-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(280px, 1fr);
  gap: clamp(28px, 5vw, 68px);
}

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

.achievement-grid article {
  padding: 22px;
}

.achievement-grid p {
  margin-bottom: 0;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
}

.contact-links {
  display: grid;
  gap: 10px;
  min-width: 220px;
}

.contact-links a {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  color: var(--accent);
  font-weight: 800;
}

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

  .hero {
    min-height: auto;
  }

  .role-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .achievement-grid {
    grid-template-columns: 1fr;
  }

  .contact-links {
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    overflow-x: auto;
  }

  h1 {
    font-size: 3rem;
  }

  .portrait {
    min-height: 230px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }
}
