:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --surface: #ffffff;
  --surface-alt: #fafafa;
  --text: #111111;
  --text-soft: #4a4a4a;
  --muted: #6b6b6b;
  --line: #d7d7d7;
  --line-strong: #111111;
  --accent: #111111;
  --max-width: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

img {
  display: block;
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--accent);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.75rem 1rem;
  background: #ffffff;
  color: #111111;
  border: 1px solid #111111;
  z-index: 1000;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 0;
}

.site-brand {
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

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

.site-nav a:hover,
.site-nav a:focus-visible,
.site-brand:hover,
.site-brand:focus-visible,
.text-link:hover,
.text-link:focus-visible {
  text-decoration: underline;
}

.resume-link {
  padding: 0.7rem 1rem;
  border: 1px solid var(--line-strong);
}

.nav-toggle {
  display: none;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 1.1rem;
  height: 1px;
  margin: 0.28rem auto;
  background: #111111;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.hero {
  padding: 4.5rem 0 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 1.5rem;
}

.hero-copy,
.hero-card,
.card,
.feature-card {
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.hero-copy {
  padding: clamp(1.75rem, 4vw, 3rem);
}

.hero-card {
  padding: 1.5rem;
  background: var(--surface-alt);
}

.eyebrow,
.section-label,
.card-tag,
.hero-card-label {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(2.7rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 700;
}

.hero-text {
  margin: 1.4rem 0 0;
  max-width: 40rem;
  color: var(--text-soft);
  font-size: 1.03rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.8rem 1.2rem;
  border: 1px solid var(--line-strong);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.button-primary {
  background: #111111;
  color: #ffffff;
}

.button-secondary {
  background: #ffffff;
  color: #111111;
}

.button-primary:hover {
  background-color: #ffffff;
  color: #111111;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
}

.button-secondary:hover {
  background-color: #111111;
  color: #ffffff;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
}

.hero-card ul {
  margin: 0;
  padding-left: 1.1rem;
}

.hero-card li {
  margin-bottom: 0.75rem;
  color: var(--text-soft);
}

.section {
  padding: 4rem 0 0;
}

.section-alt {
  padding-bottom: 0;
}

.section-heading,
.section-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 1.5rem 2rem;
  align-items: start;
}

.section-heading {
  margin-bottom: 1.75rem;
}

.section h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.experience-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.experience-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.4rem;
  background: #fff;
  border: 1px solid #000;
}

.experience-topline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.experience-topline h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.experience-date {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-soft);
  white-space: nowrap;
}

.experience-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--text-soft);
}

.experience-org {
  display: inline-block;
  margin: 0;
  color: var(--text);
}

.experience-content .text-link {
  margin-top: 0;
}

.experience-content p {
  margin: 0;
}

.experience-points {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-soft);
}

.experience-points li {
  margin-bottom: 0.65rem;
}

.section-intro,
.stacked-copy p,
.card p,
.feature-card p,
.contact-list a,
.pill {
  color: var(--text-soft);
}

.stacked-copy p,
.card p,
.feature-card p,
.section-intro,
.contact-list a,
.hero-card li {
  font-size: 1rem;
}

.stacked-copy p,
.card p,
.feature-card p {
  margin: 0 0 1rem;
}

.card-grid,
.feature-grid {
  display: grid;
  gap: 1rem;
}

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

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

.card-link {
  display: flex;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.card,
.feature-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  padding: 1.4rem;
  text-decoration: none;
  color: inherit;
  background: #ffffff;
  border: 1px solid #000;
  overflow: hidden;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
}

.feature-card img,
.feature-card > .feature-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 500px;
  max-height: 500px;
  margin: 0 auto;
}

.feature-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.4rem;
  height: 100%;
}

.feature-card-body p {
  margin: 0;
}

.card h3,
.feature-card h3,
.project-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

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

.text-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  margin-top: auto;
}

.card-link:hover .card,
.card-link:focus-visible .card {
  background-color: #f2f2f2;
  color: #000;
  border-color: #000;
  transform: translateY(-2px);
}

.card-link:hover .text-link,
.card-link:focus-visible .text-link {
  color: #000;
}

.card-link:focus-visible {
  outline: none;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: #111111;
  font-size: 0.93rem;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.contact-list a {
  color: var(--text);
  text-decoration: none;
  width: fit-content;
}

.contact-list a:hover {
  text-decoration: underline, bold;
}

.section#contact {
  margin-bottom: 4rem;
}

.section + .section {
  border-top: 1px solid var(--line);
  margin-top: 4rem;
}

@media (max-width: 900px) {
  .hero-grid,
  .section-heading,
  .section-grid,
  .card-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 12ch;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--line-strong);
  }

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

  .site-nav a,
  .resume-link {
    width: 100%;
    padding: 0.95rem 1rem;
    border-top: 1px solid var(--line);
  }

  .resume-link {
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    background: #ffffff;
  }

  .hero {
    padding-top: 3rem;
  }
}

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

  .experience-topline {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .experience-date {
    white-space: normal;
  }

  .hero-copy,
  .hero-card,
  .card,
  .feature-card {
    padding: 1.2rem;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 12vw, 3.6rem);
  }
}
