:root {
  color-scheme: light;
  --bg: #f5f2ec;
  --ink: #191b1f;
  --muted: #61666f;
  --line: #ddd6ca;
  --panel: #fffdf8;
  --panel-strong: #ebe4d8;
  --accent: #0e6f68;
  --accent-2: #b84f2a;
  --accent-3: #324b7a;
  --shadow: 0 18px 50px rgba(33, 31, 27, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background:
    linear-gradient(110deg, rgba(14, 111, 104, 0.12), transparent 38%),
    linear-gradient(250deg, rgba(184, 79, 42, 0.12), transparent 42%),
    var(--bg);
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  backdrop-filter: blur(18px);
}

.brand,
.nav,
.hero-actions,
.contact-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--ink);
  font-size: 13px;
}

.nav {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a,
.button,
.contact-links a {
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  background: rgba(255, 253, 248, 0.72);
  font-weight: 700;
  font-size: 14px;
}

.nav-cta {
  color: #fff !important;
  background: var(--accent) !important;
  border-color: var(--accent) !important;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.72fr);
  gap: 44px;
  align-items: center;
  padding: 56px 0 36px;
}

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

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

.name-line {
  margin: 0 0 8px;
  color: var(--accent-3);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1;
}

h1 {
  font-size: clamp(40px, 7vw, 78px);
  max-width: 900px;
}

h2 {
  font-size: clamp(30px, 5vw, 56px);
  max-width: 820px;
}

.intro {
  margin: 22px 0 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
}

.hero-actions {
  margin-top: 28px;
  gap: 12px;
  flex-wrap: wrap;
}

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

/* ── Snapshot panel (right side) ── */

.snapshot-panel,
.project-card,
.contact,
.work-grid p,
.skill-layout {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: var(--shadow);
}

.snapshot-panel {
  padding: 20px;
}

.panel-header {
  margin-bottom: 18px;
}

.panel-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.snapshot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.snapshot-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(245, 242, 236, 0.5);
  border: 1px solid var(--line);
}

.snapshot-tag {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  color: #fff;
}

.tag-accent {
  background: var(--accent);
}

.tag-warm {
  background: var(--accent-2);
}

.tag-teal {
  background: #1a7a6e;
}

.tag-blue {
  background: var(--accent-3);
}

.snapshot-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Proof strip ── */

.proof-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.72);
  font-size: 13px;
}

.proof-strip-label {
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
}

.proof-strip-tag {
  font-weight: 700;
  color: var(--accent-3);
}

.proof-strip-sep {
  color: var(--line);
}

/* ── Sections ── */

.section {
  padding: 76px 0;
}

.section-heading {
  margin-bottom: 24px;
}

.skill-layout {
  padding: 18px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
}

.skill-groups,
.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-groups {
  align-content: flex-start;
}

.skill-group {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  color: var(--ink);
  background: var(--panel);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.skill-group.is-active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.skill-cloud {
  align-content: flex-start;
}

.skill-cloud span {
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

.skill-cloud span.is-highlighted {
  color: var(--ink);
  border-color: rgba(14, 111, 104, 0.55);
  background: rgba(14, 111, 104, 0.1);
}

.project-grid {
  display: grid;
  gap: 16px;
}

.project-card {
  overflow: hidden;
}

.project-card.is-muted {
  opacity: 0.42;
}

.project-toggle {
  width: 100%;
  min-height: 82px;
  padding: 20px;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  text-align: left;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.project-toggle span {
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 900;
}

.project-toggle small {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 800;
}

.project-body {
  display: none;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  padding: 0 20px 20px;
}

.project-card.is-open .project-body {
  display: grid;
}

.project-body dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.project-body dl div {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.project-body dt {
  margin-bottom: 5px;
  color: var(--accent-3);
}

.project-body dd {
  color: var(--muted);
  line-height: 1.55;
}

.visual {
  min-height: 220px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  overflow: hidden;
}

.visual-signal,
.visual-plot,
.visual-embeddings,
.visual-product,
.visual-infra {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.visual-signal {
  align-content: center;
}

.visual-signal span {
  height: 22px;
  border-radius: 999px;
  background: var(--accent);
}

.visual-signal span:nth-child(2) { width: 72%; background: var(--accent-2); }
.visual-signal span:nth-child(3) { width: 88%; background: var(--accent-3); }
.visual-signal span:nth-child(4) { width: 54%; }

.visual-plot {
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
}

.visual-plot span {
  border-radius: 8px 8px 0 0;
  background: linear-gradient(var(--accent-2), var(--accent));
}

.visual-plot span:nth-child(1) { height: 45%; }
.visual-plot span:nth-child(2) { height: 82%; }
.visual-plot span:nth-child(3) { height: 62%; }
.visual-plot span:nth-child(4) { height: 92%; }
.visual-plot span:nth-child(5) { height: 55%; }

.visual-embeddings {
  grid-template-columns: repeat(3, 1fr);
}

.visual-embeddings span {
  border-radius: 8px;
  background: radial-gradient(circle at 30% 25%, #fff, rgba(50, 75, 122, 0.72));
}

.visual-infra {
  align-content: center;
}

.visual-infra span {
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 900;
  text-align: center;
}

.visual-product {
  grid-template-columns: 1fr;
  align-content: center;
}

.visual-product span {
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.visual-product span:nth-child(2) {
  width: 72%;
}

.visual-product span:nth-child(3) {
  width: 48%;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.work-grid p {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.work-grid strong {
  display: block;
  color: var(--ink);
  margin-bottom: 8px;
}

.contact {
  margin-bottom: 72px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

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

.contact-links {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 920px) {
  .site-header,
  .hero,
  .contact {
    align-items: flex-start;
  }

  .site-header,
  .hero,
  .skill-layout,
  .project-card.is-open .project-body,
  .contact {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

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

  .project-toggle {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  main,
  .site-header {
    width: min(100% - 24px, 1180px);
  }

  .nav {
    display: none;
  }

  .hero-actions,
  .contact-links {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .button,
  .contact-links a {
    text-align: center;
  }

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