:root {
  --bg: #f7f1e6;
  --surface: rgba(255, 252, 247, 0.8);
  --surface-strong: #fffaf1;
  --text: #182126;
  --muted: #4b5a63;
  --line: rgba(24, 33, 38, 0.12);
  --accent: #045c72;
  --highlight: #c9791f;
  --shadow: 0 18px 48px rgba(40, 44, 52, 0.1);
  --max-width: 1180px;
  --radius: 30px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(201, 121, 31, 0.14), transparent 30%),
    radial-gradient(circle at 85% 12%, rgba(4, 92, 114, 0.12), transparent 24%),
    linear-gradient(180deg, #faf4ea 0%, #efe5d5 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(24, 33, 38, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 33, 38, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.32), transparent 85%);
}

.page-shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding-bottom: 3rem;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(250, 244, 234, 0.78);
  backdrop-filter: blur(16px);
}

.wordmark,
.site-nav a,
.button,
.contact-links a {
  text-decoration: none;
  color: inherit;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--text);
  color: #f8f3ea;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
}

.section {
  padding: 5.5rem 0 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  gap: 1.5rem;
  align-items: stretch;
  padding-top: 4rem;
}

.hero-copy,
.hero-panel,
.contact-card,
.project-card,
.timeline-card,
.skill-card {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: clamp(2rem, 5vw, 4.25rem);
  border-radius: calc(var(--radius) + 8px);
  background: rgba(255, 250, 242, 0.7);
}

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

.panel-card,
.metric-card,
.contact-card,
.project-card,
.timeline-card,
.skill-card {
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(10px);
  min-width: 0;
}

.panel-card {
  padding: 1.5rem;
}

.eyebrow,
.panel-label,
.project-tag {
  margin: 0 0 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  line-height: 1.02;
}

h1 {
  font-size: clamp(3.15rem, 7vw, 5.7rem);
  max-width: 11ch;
}

h2 {
  font-size: clamp(2.2rem, 4vw, 3.35rem);
  max-width: 16ch;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.12;
}

p,
li {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.intro {
  max-width: 58ch;
  margin: 1.5rem 0 0;
  font-size: 1.08rem;
}

.hero-actions,
.contact-links,
.hero-badges,
.badge-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 2rem;
}

.hero-badges {
  margin-top: 1.5rem;
}

.hero-badges span,
.badge-grid span {
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--text);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
}

.button-primary {
  background: var(--text);
  color: #fff8ef;
}

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

.focus-list,
.project-meta {
  margin: 0;
  padding-left: 1.2rem;
}

.metric-grid,
.project-grid,
.skills-grid {
  display: grid;
  gap: 1rem;
}

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

.metric-card {
  padding: 1.25rem;
  text-align: left;
  min-height: 8.5rem;
}

.metric-value,
.timeline-index {
  display: inline-block;
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  color: var(--highlight);
}

.metric-value {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
}

.section-heading {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 1.5rem;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

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

.project-card,
.skill-card,
.timeline-card,
.contact-card {
  padding: 1.6rem;
}

.feature {
  grid-column: span 2;
  background:
    linear-gradient(135deg, rgba(4, 92, 114, 0.1), rgba(213, 139, 49, 0.08)),
    var(--surface-strong);
}

.project-card p:last-child,
.timeline-card p:last-child,
.skill-card p:last-child {
  margin-bottom: 0;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1rem;
  align-items: start;
}

.timeline-index {
  font-size: 2.5rem;
  line-height: 1;
}

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

.contact-section {
  padding-bottom: 2rem;
}

.contact-card {
  background:
    radial-gradient(circle at top left, rgba(4, 92, 114, 0.18), transparent 30%),
    var(--surface-strong);
}

.contact-links {
  margin-top: 1.5rem;
}

.contact-links a {
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  overflow-wrap: anywhere;
}

.site-footer {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  gap: 1rem;
  flex-wrap: wrap;
}

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
}

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

@media (max-width: 1080px) {
  .hero,
  .metric-grid,
  .badge-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 960px) {
  .hero,
  .two-column,
  .project-grid,
  .skills-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .feature {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 1rem), var(--max-width));
  }

  .site-header {
    border-radius: 26px;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.9rem;
  }

  .section {
    padding-top: 3.5rem;
  }

  .hero {
    padding-top: 2rem;
  }

  h1 {
    font-size: clamp(2.7rem, 16vw, 4.3rem);
  }

  h2 {
    max-width: none;
  }

  .timeline-card {
    grid-template-columns: 1fr;
  }

  .hero-badges,
  .contact-links {
    flex-direction: column;
    align-items: stretch;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
