:root {
  color-scheme: light;
  --bg: #f7f3ed;
  --surface: #ffffff;
  --surface-strong: #101113;
  --text: #17191c;
  --muted: #62676f;
  --line: rgba(23, 25, 28, 0.12);
  --accent: #147d73;
  --accent-strong: #0d5f58;
  --accent-soft: rgba(20, 125, 115, 0.12);
  --shadow: 0 22px 60px rgba(25, 31, 36, 0.13);
  --radius: 8px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111315;
  --surface: #191d20;
  --surface-strong: #f6f0e8;
  --text: #f3f0eb;
  --muted: #b8b0a6;
  --line: rgba(246, 240, 232, 0.14);
  --accent: #57c7b8;
  --accent-strong: #8ee3d8;
  --accent-soft: rgba(87, 199, 184, 0.16);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, var(--accent-soft), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: 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: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0;
  transition: padding 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
  width: min(1120px, calc(100% - 1rem));
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand {
  font-weight: 800;
  font-size: 1.05rem;
}

.brand span,
.eyebrow,
.project-tag {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
}

.site-nav a {
  transition: color 160ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.theme-toggle,
.nav-toggle,
.filter-button,
.button {
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.theme-toggle,
.filter-button {
  min-height: 2.35rem;
  padding: 0 0.85rem;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
}

.nav-toggle span {
  display: block;
  width: 1.1rem;
  height: 2px;
  margin: 0.25rem auto;
  background: var(--text);
}

.section {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 5.5rem 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(22rem, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  min-height: auto;
  padding-top: 4rem;
  padding-bottom: 4.5rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 10ch;
  margin-bottom: 1.25rem;
  font-size: clamp(3rem, 6.2vw, 5.8rem);
  line-height: 0.98;
}

h2 {
  max-width: 12ch;
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.02;
}

h3 {
  margin-bottom: 0.65rem;
  font-size: 1.1rem;
}

.hero-text,
.page-hero p,
.content-stack p {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.1rem;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover,
.project-card:hover,
.skill-card:hover,
.experience-card:hover,
.project-row:hover {
  transform: translateY(-3px);
}

.button.primary {
  background: var(--surface-strong);
  color: var(--bg);
  box-shadow: var(--shadow);
}

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

.hero-panel,
.skill-card,
.experience-card,
.project-card,
.project-row,
.resume-frame {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.hero-experience {
  align-self: center;
  padding: 1.1rem;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-timeline {
  position: relative;
  display: grid;
  gap: 0.7rem;
}

.hero-timeline::before {
  position: absolute;
  top: 1.4rem;
  bottom: 1.4rem;
  left: 0.55rem;
  width: 2px;
  background: var(--line);
  content: "";
}

.hero-company:hover {
  background: var(--accent-soft);
}

.current-company {
  background: rgba(255, 193, 7, 0.14);
}

.hero-company {
  display: flex;
  gap: 0.9rem;
  padding: 0.85rem;
  border-radius: var(--radius);
  transition: background 180ms ease;
}

.company-marker {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.25rem;
  background: var(--surface);
  border: 3px solid var(--accent);
  border-radius: 999px;
}

.current-company .company-marker {
  border-color: #ffc107;
  box-shadow: 0 0 0 5px rgba(255, 193, 7, 0.2);
}

.company-content {
  min-width: 0;
}

.company-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.company-title-row mark {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0 0.6rem;
  background: #ffc107;
  border: 1px solid rgba(153, 99, 0, 0.24);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.24);
  color: #312100;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-company h3 {
  max-width: none;
  margin: 0 0 0.15rem;
  font-size: 1.08rem;
  line-height: 1.15;
}

.hero-company p {
  margin-bottom: 0.1rem;
  color: var(--muted);
  font-weight: 700;
}

.hero-company strong {
  color: var(--accent-strong);
  font-size: 0.88rem;
}

.metric {
  padding: 1.15rem;
  border-radius: var(--radius);
  background: var(--bg);
}

.metric strong {
  display: block;
  font-size: 1.6rem;
  line-height: 1.1;
}

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

.two-column {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 3rem;
}

.section-heading {
  margin-bottom: 2rem;
}

.content-stack p:last-child,
.project-card p,
.skill-card p,
.experience-card p,
.project-row p {
  margin-bottom: 0;
  color: var(--muted);
}

.skill-grid,
.experience-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

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

.experience-grid {
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.skill-card,
.experience-card,
.project-card {
  min-height: 13rem;
  padding: 1.35rem;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.experience-card {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 1.5rem;
  min-height: 0;
}

.experience-index {
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  background: var(--accent-soft);
  border-radius: 999px;
  color: var(--accent-strong);
  font-weight: 800;
}

.experience-topline {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 0.75rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 0.65rem;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.experience-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.experience-title-row h3 {
  margin-bottom: 0;
}

.experience-body {
  display: flex;
  flex-direction: column;
}

.experience-role {
  margin-bottom: 0.2rem;
  color: var(--text);
  font-weight: 800;
}

.experience-meta {
  margin-bottom: 1rem;
  color: var(--accent-strong);
  font-size: 0.94rem;
  font-weight: 800;
}

.experience-card ul {
  columns: 2;
  column-gap: 2rem;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.experience-card li {
  break-inside: avoid;
  margin-bottom: 0.6rem;
}

.project-card {
  display: flex;
  flex-direction: column;
}

.project-card a {
  margin-top: auto;
  padding-top: 1.25rem;
  color: var(--accent-strong);
  font-weight: 800;
}

.project-tag {
  display: inline-flex;
  margin-bottom: 0.8rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
}

.contact-link {
  width: 100%;
  color: var(--accent-strong);
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 800;
}

.page-hero {
  padding-bottom: 2rem;
}

.page-hero h1 {
  max-width: none;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}

.filter-button.is-active {
  background: var(--surface-strong);
  color: var(--bg);
}

.project-list {
  display: grid;
  gap: 1rem;
  padding-top: 1rem;
}

.project-row {
  display: grid;
  grid-template-columns: minmax(12rem, 0.6fr) minmax(0, 1fr) minmax(14rem, 0.6fr);
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem;
  transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.project-row.is-hidden {
  display: none;
}

.project-row h2 {
  max-width: none;
  font-size: 1.45rem;
}

.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.inline-list li {
  padding: 0.35rem 0.6rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 700;
}

.note,
.project-proof {
  color: var(--muted);
}

.note {
  padding: 1rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
  color: var(--accent-strong);
  font-weight: 700;
}

.project-proof {
  margin-top: 0.75rem;
  font-size: 0.94rem;
}

.resume-frame {
  padding: 0.75rem;
}

.resume-frame object {
  display: block;
  width: 100%;
  height: min(78vh, 900px);
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  background: var(--surface);
}

.site-footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 620ms ease, transform 620ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: 4.5rem 1rem auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

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

  .hero,
  .two-column,
  .contact-section,
  .experience-card,
  .project-row {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 4rem 0;
  }

  .hero {
    min-height: auto;
    padding-top: 3.25rem;
    padding-bottom: 3.25rem;
  }

  h1 {
    font-size: clamp(2.8rem, 14vw, 4.25rem);
  }

  .skill-grid,
  .experience-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .hero-experience {
    padding: 0.9rem;
  }

  .company-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .experience-topline {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .experience-card ul {
    columns: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
