:root {
  --color-bg: #f3f3f1;
  --color-surface: #ffffff;
  --color-surface-muted: #e7e7e4;
  --color-text: #121212;
  --color-text-soft: #4a4a4a;
  --color-border: #c8c8c4;
  --color-inverse: #050505;
  --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.08);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-72: 72px;
  --space-96: 96px;
  --max-width: 1180px;
  --font-heading: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --font-body: "Avenir Next", "Helvetica Neue", Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.75), transparent 42%),
    radial-gradient(circle at bottom right, rgba(18, 18, 18, 0.08), transparent 35%),
    linear-gradient(180deg, #fafaf8 0%, #efefec 100%);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
}

body.is-locked {
  overflow: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle at center, black 25%, transparent 95%);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.password-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: var(--space-24);
  background: rgba(5, 5, 5, 0.84);
  backdrop-filter: blur(20px);
  transition: opacity 240ms ease, visibility 240ms ease;
}

.password-gate.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.gate-panel {
  width: min(100%, 480px);
  padding: clamp(28px, 5vw, 44px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04)),
    rgba(0, 0, 0, 0.54);
  color: #f6f6f4;
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.35);
}

.gate-panel h1 {
  margin: 0 0 var(--space-16);
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1.05;
}

.gate-copy {
  margin: 0 0 var(--space-24);
  color: rgba(255, 255, 255, 0.74);
}

.gate-form {
  display: grid;
  gap: var(--space-12);
}

.gate-form input,
.gate-form button,
.button {
  min-height: 54px;
  border-radius: 999px;
  font: inherit;
}

.gate-form input {
  width: 100%;
  padding: 0 var(--space-16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.gate-form input::placeholder {
  color: rgba(255, 255, 255, 0.48);
}

.gate-form input:focus,
.gate-form button:focus,
.button:focus,
.site-header nav a:focus,
.brand:focus {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.gate-form button,
.button-primary {
  border: 1px solid #ffffff;
  background: #ffffff;
  color: #050505;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.gate-form button:hover,
.button-primary:hover {
  transform: translateY(-1px);
  background: #dbdbd7;
}

.gate-feedback {
  min-height: 1.5rem;
  margin: var(--space-12) 0 0;
  color: #ffffff;
}

.gate-feedback.is-error {
  color: #f2cbcb;
}

main {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding-bottom: var(--space-96);
  opacity: 1;
  transition: opacity 240ms ease, transform 240ms ease;
}

body.is-locked main {
  opacity: 0.08;
  transform: scale(0.985);
  pointer-events: none;
  user-select: none;
}

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

.brand,
.site-header nav a {
  color: var(--color-text);
  text-decoration: none;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-16);
}

.site-header nav a {
  color: var(--color-text-soft);
}

.section {
  padding: var(--space-96) 0 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.95fr);
  gap: var(--space-32);
  align-items: end;
  min-height: calc(100vh - 140px);
}

.hero h1,
.section-heading h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.hero h1 {
  max-width: 10ch;
  font-size: clamp(3.4rem, 9vw, 7rem);
  line-height: 0.92;
}

.hero h1 span {
  display: block;
  color: rgba(18, 18, 18, 0.65);
}

.eyebrow,
.card-label,
.resume-label,
.panel-label {
  margin: 0 0 var(--space-12);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-text {
  max-width: 36rem;
  margin: var(--space-24) 0 0;
  color: var(--color-text-soft);
  font-size: 1.125rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-12);
  margin-top: var(--space-32);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.button-secondary {
  border: 1px solid rgba(18, 18, 18, 0.14);
  background: rgba(255, 255, 255, 0.6);
  color: var(--color-text);
}

.button-secondary:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.92);
}

.hero-panel,
.about-card,
.card,
.contact-panel {
  border: 1px solid rgba(18, 18, 18, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
}

.hero-panel {
  padding: var(--space-32);
}

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

.focus-list li + li {
  margin-top: var(--space-12);
}

.section-heading {
  display: grid;
  gap: var(--space-12);
  max-width: 48rem;
  margin-bottom: var(--space-32);
}

.section-heading h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.98;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-24);
}

.intro-grid .section-heading,
.large-card {
  grid-column: span 2;
}

.about-card,
.card,
.contact-panel {
  padding: var(--space-32);
}

.about-card h3,
.card h3,
.timeline h3 {
  margin: 0 0 var(--space-12);
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.1;
}

.about-card p:last-child,
.card p:last-child,
.contact-panel p:last-child {
  margin-bottom: 0;
}

.cards {
  display: grid;
  gap: var(--space-24);
}

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

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

.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
}

.card-meta {
  display: inline-block;
  margin-top: auto;
  padding-top: var(--space-24);
  color: var(--color-text-soft);
}

.resume-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr 0.9fr;
  gap: var(--space-24);
}

.resume-column {
  padding: var(--space-32);
  border: 1px solid rgba(18, 18, 18, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
}

.resume-copy {
  margin: 0;
  color: var(--color-text-soft);
}

.timeline {
  display: grid;
  gap: var(--space-24);
}

.timeline article {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: var(--space-16);
}

.timeline span {
  color: var(--color-text-soft);
  font-weight: 600;
}

.timeline p,
.skill-list {
  margin: 0;
  color: var(--color-text-soft);
}

.skill-list {
  padding-left: 1.2rem;
}

.skill-list li + li {
  margin-top: var(--space-8);
}

.contact-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-24);
}

@media (max-width: 980px) {
  .hero,
  .resume-grid,
  .three-column {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: var(--space-72);
  }
}

@media (max-width: 760px) {
  main {
    width: min(calc(100% - 24px), var(--max-width));
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    border-radius: 28px;
  }

  .site-header nav {
    width: 100%;
    gap: var(--space-12);
  }

  .site-header nav a {
    padding-right: var(--space-8);
  }

  .intro-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .intro-grid .section-heading,
  .large-card {
    grid-column: span 1;
  }

  .section {
    padding-top: var(--space-72);
  }

  .about-card,
  .card,
  .contact-panel,
  .resume-column,
  .hero-panel {
    padding: var(--space-24);
  }

  .contact-panel {
    align-items: flex-start;
  }
}
