:root {
  --bg: #f5f1e8;
  --surface: rgba(255, 250, 242, 0.78);
  --surface-strong: #fffdf8;
  --text: #181614;
  --muted: #655f58;
  --line: rgba(24, 22, 20, 0.1);
  --accent: #0d7a6f;
  --accent-strong: #0a5c54;
  --accent-soft: #d6f1eb;
  --shadow: 0 22px 60px rgba(45, 36, 24, 0.08);
  --radius-lg: 32px;
  --radius-md: 22px;
  --radius-sm: 14px;
  --max-width: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(13, 122, 111, 0.18), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(191, 128, 45, 0.14), transparent 26%),
    linear-gradient(180deg, #faf7f1 0%, var(--bg) 100%);
}

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

.site-shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 1.25rem 0 5rem;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  width: 100%;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.84);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transition:
    border-radius 220ms ease,
    box-shadow 220ms ease,
    background-color 220ms ease,
    padding 220ms ease,
    width 220ms ease,
    background 220ms ease;
}

.topbar-placeholder {
  height: 5.75rem;
}

body.is-scrolled .topbar-inner {
  width: 100%;
  padding:
    0.9rem
    max(1rem, calc((100vw - var(--max-width)) / 2 + 1rem));
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 14px 40px rgba(45, 36, 24, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #1d4ed8);
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
}

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

.nav a {
  color: var(--muted);
  font-weight: 600;
}

.nav a.is-active,
.nav a:hover {
  color: var(--text);
}

.hero,
.section {
  margin-bottom: 2rem;
}

.hero {
  display: block;
}

.hero-copy,
.surface {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 3.25rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), transparent 45%),
    var(--surface);
}

.eyebrow {
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.hero h1,
.section-heading h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(3rem, 5.5vw, 5.2rem);
}

.hero-lede {
  max-width: 32ch;
  margin: 0.75rem 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.5rem, 2.4vw, 2.3rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--text);
}

.hero-summary {
  max-width: 62ch;
  margin: 1.25rem 0 0;
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  width: 100%;
  margin-top: 1.5rem;
}

.hero-highlights article {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.85);
}

.hero-highlights span {
  display: block;
  margin-bottom: 0.3rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.hero-highlights p {
  margin: 0;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.2rem;
  border-radius: 999px;
  font-weight: 700;
}

.button-primary {
  background: linear-gradient(135deg, var(--text), #2f2a25);
  color: #fff;
}

.button-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
}

.panel-label,
.timeline-meta span,
.project-period,
.contact-card span {
  color: var(--muted);
}

.section {
  padding: 2rem 0;
}

.section-heading {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  align-items: end;
}

.section-heading h2 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  max-width: none;
}

.section-subtitle {
  max-width: 58rem;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--muted);
}

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

.surface {
  padding: 1.6rem;
}

.surface p,
.surface li {
  line-height: 1.7;
  color: var(--muted);
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.4rem;
}

.timeline-meta p,
.timeline-content h3,
.project-card h3,
.skill-list h3,
.education-card h3 {
  margin-top: 0;
}

.timeline-content h3,
.project-card h3,
.skill-list h3,
.education-card h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.timeline-content ul,
.skill-list ul,
.education-card ul {
  margin: 0.75rem 0 0;
  padding-left: 1.15rem;
}

.tags {
  margin-bottom: 0;
  font-weight: 700;
  color: var(--accent-strong);
}

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

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

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

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

.contact-card strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.05rem;
}

@media (max-width: 980px) {
  .hero,
  .timeline-item,
  .project-grid,
  .contact-grid,
  .about-grid,
  .skills-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 2.4rem;
  }

  .topbar {
    width: 100%;
  }

  .topbar-inner {
    border-radius: 1.4rem;
    align-items: flex-start;
    flex-direction: column;
  }

  body.is-scrolled .topbar-inner {
    padding: 0.9rem 1rem;
  }
}

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

  .hero-highlights,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .surface,
  .hero-panel {
    border-radius: 1.5rem;
  }

  .nav {
    gap: 0.85rem;
  }
}
