:root {
  --bg: #f4f1ea;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: #fffdf8;
  --text: #1d2a28;
  --muted: #5f6d69;
  --line: rgba(29, 42, 40, 0.12);
  --accent: #1d7a68;
  --accent-soft: #d9f1ea;
  --accent-warm: #f2b880;
  --shadow: 0 24px 60px rgba(20, 35, 33, 0.08);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(29, 122, 104, 0.14), transparent 28%),
    radial-gradient(circle at 90% 15%, rgba(242, 184, 128, 0.28), transparent 22%),
    linear-gradient(180deg, #f7f3ec 0%, #f0ece4 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.15)),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 54px,
      rgba(29, 42, 40, 0.02) 54px,
      rgba(29, 42, 40, 0.02) 55px
    );
  opacity: 0.8;
}

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

p,
li {
  line-height: 1.65;
}

.page-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding-bottom: 56px;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 28px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

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

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  font-size: 0.95rem;
  color: var(--muted);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.menu-toggle span {
  position: absolute;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
  transition: transform 180ms ease, opacity 180ms ease, top 180ms ease;
}

.menu-toggle span:nth-child(1) {
  transform: translateY(-6px);
}

.menu-toggle span:nth-child(2) {
  transform: translateY(0);
}

.menu-toggle span:nth-child(3) {
  transform: translateY(6px);
}

.menu-toggle {
  position: relative;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: rotate(-45deg);
}

.site-nav a {
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.section {
  padding: 34px 0;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: stretch;
  padding-top: 34px;
}

.hero-copy,
.hero-panel,
.timeline-card,
.project-card,
.skill-block,
.education-card,
.contact-card,
.spotlight-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-panel,
.contact-card {
  padding: 34px;
}

.hero-copy::before,
.hero-panel::before,
.timeline-card::before,
.project-card::before,
.skill-block::before,
.education-card::before,
.contact-card::before,
.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%), rgba(255, 255, 255, 0.68), transparent 34%);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.hero-copy:hover::before,
.hero-panel:hover::before,
.timeline-card:hover::before,
.project-card:hover::before,
.skill-block:hover::before,
.education-card:hover::before,
.contact-card:hover::before,
.spotlight-card:hover::before {
  opacity: 1;
}

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

h1,
h2,
h3 {
  margin: 0;
}

h1,
h2 {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.03em;
}

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

h2 {
  font-size: clamp(2rem, 4vw, 3.7rem);
  max-width: 14ch;
}

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

.accent {
  color: var(--accent);
  font-style: italic;
}

.hero-text,
.section-heading p:last-child,
.project-card p,
.timeline-content p,
.contact-card p {
  max-width: 62ch;
}

.hero-text {
  margin: 20px 0 28px;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-actions,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 500;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

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

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

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

.panel-card {
  margin-bottom: 18px;
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  border: 1px solid var(--line);
}

.panel-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.status-card h2 {
  max-width: none;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  margin-bottom: 14px;
}

.mini-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.metrics-grid,
.about-grid,
.skills-grid,
.project-grid {
  display: grid;
  gap: 18px;
}

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

.metric-card {
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
}

.metric-value {
  display: block;
  font-family: "Instrument Serif", serif;
  font-size: 2.4rem;
  margin-bottom: 8px;
}

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

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

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

.spotlight-card,
.skill-block,
.education-card {
  padding: 24px;
}

.spotlight-card p,
.skill-block p,
.education-card p {
  margin: 0;
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 20px;
}

.timeline-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  padding: 24px;
}

.role {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.company,
.duration,
.theme,
.details,
.school {
  margin: 0;
  color: var(--muted);
}

.company {
  margin-top: 4px;
}

.duration {
  margin-top: 14px;
  font-size: 0.94rem;
}

.theme {
  margin-bottom: 10px;
  color: var(--accent);
  font-weight: 500;
}

.timeline-content ul,
.project-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

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

.filter-chip {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.filter-chip:hover,
.filter-chip:focus-visible,
.filter-chip.is-active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
  transform: translateY(-1px);
}

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

.project-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  transition: transform 220ms ease, opacity 220ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-tag {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
}

.project-card a {
  margin-top: auto;
  font-weight: 700;
}

.project-card.is-hidden {
  opacity: 0.18;
  transform: scale(0.98);
}

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

.education-section,
.contact-section {
  padding-bottom: 10px;
}

.degree {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.contact-card h2 {
  margin-bottom: 18px;
}

.contact-card p {
  color: var(--muted);
  margin: 0 0 20px;
}

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

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

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

  .timeline-card {
    gap: 18px;
  }
}

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

  .section {
    padding: 24px 0;
  }

  .site-header {
    top: 10px;
    border-radius: 24px;
    align-items: center;
    flex-wrap: wrap;
    flex-direction: row;
    margin: 12px 0 20px;
    padding: 14px;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .site-nav {
    width: 100%;
    display: none;
    flex-direction: column;
    gap: 12px;
    justify-content: flex-start;
    font-size: 0.9rem;
    padding-top: 12px;
  }

  .site-header.is-menu-open .site-nav {
    display: flex;
  }

  .hero {
    gap: 18px;
    padding-top: 8px;
  }

  .hero-copy,
  .hero-panel,
  .timeline-card,
  .project-card,
  .skill-block,
  .education-card,
  .contact-card,
  .spotlight-card {
    padding: 22px;
  }

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

  h1 {
    max-width: 9ch;
  }

  h2 {
    max-width: 100%;
  }

  .hero-text,
  .section-heading p:last-child,
  .project-card p,
  .timeline-content p,
  .contact-card p {
    max-width: 100%;
  }

  .hero-actions,
  .contact-links {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
  }

  .filter-chip {
    flex: 0 0 auto;
  }

  .timeline-content ul,
  .project-card ul,
  .mini-list {
    padding-left: 16px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .page-shell {
    width: min(calc(100% - 16px), var(--max-width));
  }

  .site-header {
    border-radius: 20px;
  }

  .brand {
    width: 38px;
    height: 38px;
    font-size: 0.92rem;
  }

  .hero-copy,
  .hero-panel,
  .timeline-card,
  .project-card,
  .skill-block,
  .education-card,
  .contact-card,
  .spotlight-card {
    padding: 18px;
    border-radius: 20px;
  }

  .panel-card,
  .metric-card {
    padding: 18px;
  }

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

  h1 {
    font-size: clamp(2.6rem, 14vw, 4rem);
    max-width: 100%;
  }

  h2 {
    font-size: clamp(1.8rem, 10vw, 2.6rem);
  }

  .site-nav a,
  .filter-chip,
  .button {
    font-size: 0.92rem;
  }
}
