:root {
  --ink: #17211f;
  --muted: #61706b;
  --paper: #f7f4ec;
  --surface: #fffdf8;
  --line: rgba(23, 33, 31, 0.13);
  --teal: #0f766e;
  --teal-dark: #0a514c;
  --amber: #c97c28;
  --blue: #315e95;
  --rose: #b55d5d;
  --shadow: 0 24px 80px rgba(25, 39, 36, 0.16);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

body.nav-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

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

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

.skip-link,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  z-index: 20;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  clip: auto;
  padding: 10px 14px;
  color: var(--surface);
  background: var(--ink);
}

.site-header {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 16px clamp(18px, 4vw, 56px);
  color: var(--surface);
  transition: background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.site-header.scrolled {
  color: var(--ink);
  background: rgba(247, 244, 236, 0.9);
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.site-nav,
.hero-actions,
.contact-card,
.button,
.view-switch,
.skill-tags,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.site-nav {
  gap: 8px;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 700;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.site-header.scrolled .site-nav a:hover,
.site-header.scrolled .site-nav a:focus-visible {
  background: rgba(23, 33, 31, 0.08);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: inherit;
  background: transparent;
}

.nav-toggle svg,
.button svg,
.contact-card svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.hero {
  position: relative;
  min-height: 92svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  padding: 132px clamp(18px, 5vw, 72px) clamp(34px, 6vw, 74px);
  overflow: hidden;
  color: var(--surface);
}

.hero-image,
.hero-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center;
  transform: scale(1.01);
}

.hero-scrim {
  background:
    linear-gradient(90deg, rgba(12, 19, 18, 0.92) 0%, rgba(12, 19, 18, 0.72) 42%, rgba(12, 19, 18, 0.18) 100%),
    linear-gradient(0deg, rgba(12, 19, 18, 0.82) 0%, rgba(12, 19, 18, 0) 48%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  color: #f1c27c;
}

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

h1 {
  margin-bottom: 22px;
  max-width: 10ch;
  font-size: clamp(3rem, 8vw, 7.2rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.16rem;
}

.hero-copy {
  max-width: 660px;
  color: rgba(255, 253, 248, 0.8);
  font-size: clamp(1rem, 1.7vw, 1.22rem);
  line-height: 1.7;
}

.hero-tagline {
  max-width: 720px;
  color: #fff7e6;
  font-size: clamp(1.45rem, 3.1vw, 2.8rem);
  font-weight: 800;
  line-height: 1.06;
}

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

.button {
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: var(--radius);
  font-weight: 800;
}

.button.primary {
  color: #09201d;
  background: #f0c06f;
}

.button.secondary {
  color: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.08);
}

.button:hover,
.button:focus-visible,
.contact-card:hover,
.contact-card:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.signal-panel {
  position: absolute;
  z-index: 1;
  right: clamp(18px, 5vw, 72px);
  bottom: clamp(24px, 5vw, 72px);
  display: grid;
  width: min(360px, calc(100% - 36px));
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.signal-panel div {
  padding: 18px;
  background: rgba(4, 14, 13, 0.44);
}

.metric,
.label {
  display: block;
}

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

.label {
  margin-top: 6px;
  color: rgba(255, 253, 248, 0.68);
  font-size: 0.74rem;
  line-height: 1.35;
}

.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(64px, 10vw, 124px) 0;
}

.intro {
  border-bottom: 1px solid var(--line);
}

.intro-grid,
.section-heading,
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
}

.intro-grid p,
.section-note,
.contact-copy p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.section-kicker {
  color: var(--teal);
}

.view-switch {
  justify-self: end;
  gap: 4px;
  min-height: 44px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.64);
}

.view-switch button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.view-switch button.active {
  color: var(--surface);
  background: var(--ink);
}

.skills-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.skill-card,
.project-card,
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 36px rgba(25, 39, 36, 0.06);
}

.skill-card {
  min-height: 220px;
  padding: 22px;
  transition: opacity 160ms ease, transform 160ms ease;
}

.skill-card.dimmed {
  opacity: 0.34;
}

.skill-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 50%;
  color: var(--surface);
  background: var(--teal);
}

.skill-icon svg {
  width: 20px;
  height: 20px;
}

.skill-card:nth-child(2) .skill-icon,
.project-card:nth-child(2) .project-accent {
  background: var(--amber);
}

.skill-card:nth-child(3) .skill-icon,
.project-card:nth-child(3) .project-accent {
  background: var(--blue);
}

.skill-card:nth-child(4) .skill-icon {
  background: var(--rose);
}

.skill-card p,
.project-card p {
  color: var(--muted);
  line-height: 1.65;
}

.skill-tags {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.skill-tags span,
.project-meta span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.project-card {
  position: relative;
  min-height: 360px;
  padding: 24px;
  overflow: hidden;
}

.project-accent {
  width: 46px;
  height: 4px;
  margin-bottom: 72px;
  border-radius: 999px;
  background: var(--teal);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.contact {
  width: min(1180px, calc(100% - 36px));
  margin-bottom: 42px;
  padding: clamp(42px, 7vw, 72px);
  border-radius: var(--radius);
  color: var(--surface);
  background: #182521;
}

.contact .section-kicker,
.contact-copy p {
  color: #f1c27c;
}

.contact-copy p {
  max-width: 660px;
}

.contact code {
  color: #fff7e6;
}

.contact-actions {
  display: grid;
  gap: 12px;
}

.contact-card {
  width: 100%;
  min-height: 82px;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease;
}

.contact-card span {
  flex: 1;
}

.contact-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.site-footer {
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .hero {
    min-height: 900px;
    align-items: center;
    padding-top: 110px;
  }

  .hero-scrim {
    background:
      linear-gradient(90deg, rgba(12, 19, 18, 0.92), rgba(12, 19, 18, 0.54)),
      linear-gradient(0deg, rgba(12, 19, 18, 0.88) 0%, rgba(12, 19, 18, 0) 58%);
  }

  .signal-panel {
    right: auto;
    left: 18px;
  }

  .intro-grid,
  .section-heading,
  .contact {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .view-switch {
    justify-self: start;
  }

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

@media (max-width: 720px) {
  .site-header {
    min-height: 66px;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .site-nav {
    position: fixed;
    inset: 66px 12px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    background: rgba(255, 253, 248, 0.96);
    box-shadow: var(--shadow);
  }

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

  .site-nav a {
    border-radius: var(--radius);
  }

  .hero {
    min-height: 820px;
    padding-left: 18px;
    padding-right: 18px;
  }

  h1 {
    max-width: 10ch;
    font-size: clamp(2.8rem, 15vw, 4.4rem);
  }

  h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .signal-panel {
    grid-template-columns: 1fr;
    bottom: 18px;
  }

  .signal-panel div {
    padding: 14px 16px;
  }

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

  .project-card {
    min-height: auto;
  }

  .project-accent {
    margin-bottom: 42px;
  }

  .contact {
    width: calc(100% - 24px);
    padding: 28px 18px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

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