:root {
  --bg: #f8f4ec;
  --surface: rgba(255, 252, 247, 0.9);
  --ink: #171413;
  --muted: #6f675e;
  --line: rgba(73, 59, 43, 0.16);
  --accent: #145c53;
  --accent-soft: #e2efe9;
  --shadow: 0 20px 50px rgba(36, 28, 19, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at top left, rgba(255, 240, 214, 0.95), transparent 28%),
    radial-gradient(circle at 85% 16%, rgba(224, 240, 233, 0.95), transparent 24%),
    linear-gradient(180deg, #fbf8f2 0%, var(--bg) 100%);
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: radial-gradient(#000 0.35px, transparent 0.35px);
  background-size: 4px 4px;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 1rem 1.2rem 0;
  backdrop-filter: blur(14px);
}

.site-header-inner,
.nav-mobile {
  width: min(1120px, calc(100% - 0rem));
  margin: 0 auto;
  border: 1px solid var(--line);
  background: rgba(248, 244, 236, 0.82);
  box-shadow: var(--shadow);
}

.site-header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
}

.brand,
.nav a,
.header-links a {
  text-decoration: none;
}

.brand {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav,
.header-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-left {
  justify-self: start;
}

.header-links {
  justify-self: end;
}

.nav a,
.header-links a,
.lang-toggle,
.social-links,
.eyebrow,
.site-footer,
.muted-line {
  font-family: "IBM Plex Mono", monospace;
}

.nav a,
.header-links a {
  font-size: 0.8rem;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
}

.lang-toggle span {
  color: var(--muted);
}

.lang-toggle a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.social-links {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.icon-link:hover {
  background: var(--accent-soft);
  border-color: rgba(20, 92, 83, 0.22);
}

.icon-link svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.nav-toggle,
.nav-mobile {
  display: none;
}

.nav-toggle {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
}

.home-main,
.page-main {
  width: min(980px, calc(100% - 2rem));
  margin: 0 auto;
}

.home-main {
  padding: 3.4rem 0 4rem;
}

.page-main {
  padding: 3rem 0 4rem;
}

.hero-split {
  display: grid;
  grid-template-columns: minmax(300px, 430px) minmax(0, 1fr);
  align-items: center;
  gap: 3rem;
}

.intro-stack,
.page-intro {
  text-align: center;
}

.intro-stack {
  max-width: 760px;
}

.hero-split .intro-stack {
  max-width: 620px;
  text-align: left;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  line-height: 1.06;
}

h1 {
  margin-top: 0.9rem;
  font-size: clamp(2.8rem, 7vw, 4.8rem);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

h3 {
  font-size: 1.28rem;
}

.intro-copy,
.support-copy {
  max-width: 700px;
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.hero-media {
  width: 100%;
}

.hero-media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.button-row {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.button-row-left {
  justify-content: flex-start;
}

.hero-split .intro-copy,
.hero-split .support-copy {
  max-width: 40rem;
  margin-left: 0;
  margin-right: 0;
}

.primary-button,
.learn-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  text-decoration: none;
}

.primary-button {
  border: 1px solid transparent;
  background: var(--accent);
  color: #f8fffd;
}

.carousel-section,
.stacked-cards,
.resume-layout {
  margin-top: 4rem;
}

.section-heading {
  margin-bottom: 1.25rem;
  text-align: center;
}

.section-heading h2 {
  margin-top: 0.45rem;
}

.project-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 360px);
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x proximity;
}

.carousel-card,
.detail-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.carousel-card {
  overflow: hidden;
  scroll-snap-align: start;
}

.carousel-card-media img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.carousel-card-body {
  padding: 1.1rem;
}

.carousel-card-body p {
  margin-top: 0.6rem;
  color: var(--muted);
}

.learn-more {
  margin-top: 1rem;
  border: 1px solid var(--line);
  background: #fff;
  width: fit-content;
}

.page-intro {
  max-width: 820px;
  margin: 0 auto;
}

.stacked-cards,
.resume-layout {
  display: grid;
  gap: 1rem;
}

.detail-card {
  padding: 1.25rem;
}

.detail-card p + p,
.resume-item + .resume-item {
  margin-top: 0.85rem;
}

.detail-card h2 {
  margin-bottom: 0.85rem;
}

.muted-line {
  color: var(--muted);
  font-size: 0.8rem;
}

.site-footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto 2rem;
  padding-top: 1.8rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

@media (max-width: 800px) {
  .site-header-inner {
    grid-template-columns: 1fr auto auto;
  }

  .nav-left,
  .header-links {
    display: none;
  }

  .brand {
    justify-self: start;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-mobile {
    margin-top: 0.5rem;
    padding: 0.8rem 1rem;
    border-radius: 18px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .nav-mobile.open {
    display: flex;
  }

  .hero-split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-split .intro-stack {
    max-width: 760px;
    text-align: center;
  }

  .hero-split .intro-copy,
  .hero-split .support-copy {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-split .button-row {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .home-main,
  .page-main,
  .site-footer {
    width: min(100% - 1rem, 1120px);
  }

  .site-header {
    padding-inline: 0.5rem;
  }

  .site-header-inner,
  .nav-mobile,
  .detail-card,
  .carousel-card,
  .hero-media img {
    border-radius: 18px;
  }

  .project-carousel {
    grid-auto-columns: minmax(240px, 88vw);
  }
}
