:root {
  color-scheme: light;
  --bg: #f7f3ec;
  --bg-soft: #fffaf2;
  --text: #1d2722;
  --muted: #637069;
  --line: rgba(29, 39, 34, 0.14);
  --accent: #0f6b5f;
  --accent-strong: #06483f;
  --accent-warm: #b84f37;
  --accent-gold: #c6922c;
  --surface: rgba(255, 250, 242, 0.86);
  --shadow: 0 22px 70px rgba(30, 40, 35, 0.16);
}

body.dark {
  color-scheme: dark;
  --bg: #101412;
  --bg-soft: #181f1b;
  --text: #f3efe5;
  --muted: #b7c0b8;
  --line: rgba(243, 239, 229, 0.16);
  --accent: #4eb7a4;
  --accent-strong: #9edbcf;
  --accent-warm: #e47f62;
  --accent-gold: #e8bd5a;
  --surface: rgba(24, 31, 27, 0.86);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.ambient-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark,
.portrait {
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.94rem;
  transition: color 0.2s ease;
}

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

.header-actions {
  display: flex;
  gap: 8px;
}

.icon-button {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.icon-button:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.hero {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: stretch;
  padding: clamp(48px, 8vw, 96px) clamp(18px, 4vw, 56px);
}

.hero-content {
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-copy {
  margin: 0 0 28px;
  max-width: 54ch;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  box-shadow: var(--shadow);
}

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

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.profile-panel {
  display: grid;
  gap: 22px;
  align-content: start;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.portrait {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  font-size: 1.6rem;
  font-weight: 800;
}

.panel-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.panel-value {
  margin: 0;
  font-weight: 700;
}

.section {
  padding: clamp(48px, 7vw, 88px) clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  letter-spacing: -0.03em;
}

.section-heading p:not(.eyebrow) {
  margin: 14px 0 0;
  max-width: 52ch;
  color: var(--muted);
}

.lead {
  max-width: 68ch;
  margin: 28px 0 0;
  font-size: 1.12rem;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) 1.2fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.sticky-heading {
  position: sticky;
  top: 96px;
}

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

.timeline-item {
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.timeline-item:hover,
.timeline-item:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  outline: none;
}

.timeline-item h3 {
  margin: 8px 0 10px;
  font-size: 1.15rem;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
}

.year {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
}

.skill-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.filter-button {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-button.is-active,
.filter-button:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

.skill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.skill-chip {
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 700;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.skill-chip.is-hidden {
  display: none;
}

.education-card {
  margin-top: 28px;
  max-width: 420px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.education-card h3 {
  margin: 0 0 8px;
}

.education-card p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: center;
  padding: 28px clamp(18px, 4vw, 56px) 48px;
  border-top: 1px solid var(--line);
}

.back-top {
  font-weight: 700;
  text-decoration: none;
  color: var(--accent);
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .hero,
  .split {
    grid-template-columns: 1fr;
  }

  .sticky-heading {
    position: static;
  }
}

@media (max-width: 560px) {
  .brand span:not(.brand-mark) {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
