:root {
  --bg: #f3efe6;
  --paper: rgba(255, 252, 247, 0.82);
  --paper-strong: rgba(255, 252, 247, 0.94);
  --text: #1f1d1a;
  --muted: #605a50;
  --line: rgba(31, 29, 26, 0.12);
  --accent: #b5512d;
  --accent-deep: #7e3418;
  --teal: #1d6d67;
  --gold: #c79a3b;
  --shadow: 0 24px 70px rgba(63, 45, 24, 0.12);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 999px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 16%, rgba(197, 154, 59, 0.16), transparent 22%),
    radial-gradient(circle at 88% 14%, rgba(29, 109, 103, 0.16), transparent 21%),
    radial-gradient(circle at 82% 72%, rgba(181, 81, 45, 0.12), transparent 20%),
    linear-gradient(180deg, #f6f2ea 0%, #eee7db 100%);
}

a,
button,
input {
  font: inherit;
}

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

.site-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 40px;
}

.topbar,
.card,
.hero-copy,
.hero-panel,
.footer {
  backdrop-filter: blur(18px);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  position: sticky;
  top: 14px;
  z-index: 10;
}

.brand {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, rgba(181, 81, 45, 0.12), rgba(29, 109, 103, 0.18));
}

.topnav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.topnav a {
  color: var(--muted);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr);
  gap: 22px;
  margin-top: 24px;
}

.hero-copy,
.hero-panel,
.card,
.footer {
  border-radius: var(--radius-xl);
}

.hero-copy {
  padding: 42px;
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(181, 81, 45, 0.16), transparent 68%);
  pointer-events: none;
}

.hero-panel {
  padding: 28px;
  align-self: stretch;
}

.eyebrow,
.panel-label,
.project-type {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--accent-deep);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Source Serif 4", serif;
  line-height: 1.04;
}

h1 {
  font-size: clamp(3.4rem, 10vw, 5.8rem);
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  max-width: 12ch;
}

h3 {
  font-size: 1.5rem;
}

.hero-lead {
  margin: 18px 0 12px;
  max-width: 28ch;
  font-size: clamp(1.15rem, 2.6vw, 1.65rem);
  line-height: 1.35;
}

.hero-summary,
.footer-copy,
.project-card p,
.statement-card p,
.spotlight-panel p,
.signal-list article p,
.skill-card p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-summary {
  max-width: 62ch;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover,
.chip:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #d27d3d 100%);
  color: #fffdf8;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.66);
  border-color: var(--line);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.hero-meta li {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  color: var(--muted);
}

.signal-list {
  display: grid;
  gap: 14px;
}

.signal-list article {
  padding: 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 247, 236, 0.76));
  border: 1px solid rgba(31, 29, 26, 0.08);
}

.signal-list span {
  display: inline-block;
  margin-bottom: 8px;
  font-weight: 700;
}

.section {
  margin-top: 24px;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.split-heading {
  gap: 18px;
}

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

.card {
  padding: 26px;
}

.statement-card p:first-child {
  margin-top: 0;
}

.statement-card p:last-child {
  margin-bottom: 0;
}

.metrics-card {
  display: grid;
  gap: 16px;
  align-content: start;
}

.metric {
  padding: 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(140deg, rgba(29, 109, 103, 0.08), rgba(181, 81, 45, 0.08));
  border: 1px solid rgba(31, 29, 26, 0.08);
}

.metric strong {
  display: block;
  margin-bottom: 8px;
  font-size: 2rem;
  font-family: "Source Serif 4", serif;
}

.timeline,
.project-grid {
  display: grid;
  gap: 18px;
}

.timeline-item ul,
.project-card ul {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.timeline-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.timeline-top p {
  margin: 6px 0 0;
  color: var(--muted);
}

.timeline-top span {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.chip.active {
  background: var(--text);
  color: #fffdf8;
  border-color: var(--text);
}

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

.project-card {
  transition: opacity 180ms ease, transform 180ms ease;
}

.project-media {
  margin: -26px -26px 18px;
  overflow: hidden;
  border-radius: 24px 24px 18px 18px;
  background: rgba(31, 29, 26, 0.05);
  border-bottom: 1px solid rgba(31, 29, 26, 0.08);
}

.project-media img {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.split-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  background: rgba(31, 29, 26, 0.08);
}

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

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

.skill-card {
  min-height: 100%;
  background: var(--paper-strong);
}

.spotlight-panel {
  display: grid;
  gap: 12px;
  padding: 30px;
  background:
    radial-gradient(circle at top right, rgba(199, 154, 59, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(29, 109, 103, 0.1), rgba(181, 81, 45, 0.1)),
    var(--paper-strong);
}

.footer {
  margin: 24px 0 10px;
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.contact-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  justify-items: start;
}

.contact-panel a,
.contact-panel span {
  color: var(--muted);
}

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

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

@media (max-width: 1040px) {
  .hero,
  .project-grid,
  .about-grid,
  .skills-grid,
  .footer {
    grid-template-columns: 1fr;
  }

  .footer {
    display: grid;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(100% - 16px, 100%);
    padding-top: 10px;
  }

  .topbar,
  .hero-copy,
  .hero-panel,
  .card,
  .footer {
    padding: 18px;
    border-radius: 22px;
  }

  .topbar,
  .timeline-top {
    flex-direction: column;
    align-items: start;
  }

  .topnav {
    gap: 12px;
  }

  .hero-meta,
  .hero-actions,
  .filter-bar {
    width: 100%;
  }

  .button,
  .chip {
    width: 100%;
  }

  .project-media {
    margin: -18px -18px 16px;
    border-radius: 22px 22px 16px 16px;
  }

  .project-media img {
    height: 210px;
  }

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

  h2 {
    max-width: none;
  }
}
