:root {
  --ink: #17211b;
  --muted: #5f6f65;
  --paper: #f8f7f1;
  --white: #ffffff;
  --green: #12372a;
  --green-2: #1f6f52;
  --gold: #d7a44a;
  --blue: #315b7a;
  --line: rgba(23, 33, 27, 0.14);
  --shadow: 0 24px 70px rgba(18, 55, 42, 0.16);
  --radius: 8px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.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;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(calc(100% - 32px), var(--max));
  margin: 16px auto 0;
  padding: 10px 12px;
  color: var(--white);
  transition:
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 45px rgba(23, 33, 27, 0.12);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(23, 33, 27, 0.08);
  border-radius: var(--radius);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--white);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0 0.85rem;
  border-radius: var(--radius);
  text-decoration: none;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.16);
}

.site-header.is-scrolled .site-nav a:hover,
.site-header.is-open .site-nav a:hover {
  background: rgba(18, 55, 42, 0.08);
}

.nav-contact {
  border: 1px solid currentColor;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  color: currentColor;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: var(--radius);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 500px);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  min-height: 88vh;
  padding: 118px max(24px, calc((100vw - var(--max)) / 2)) 56px;
  color: var(--white);
  background:
    linear-gradient(110deg, rgba(12, 31, 25, 0.96) 0%, rgba(18, 55, 42, 0.9) 42%, rgba(49, 91, 122, 0.88) 100%),
    #12372a;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 160px;
  background: linear-gradient(0deg, rgba(248, 247, 241, 0.12), transparent);
  pointer-events: none;
}

.hero-copy,
.hero-portrait {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(3.4rem, 8vw, 7rem);
  line-height: 0.86;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 660px;
  margin: 1.5rem 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  overflow-wrap: break-word;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0 1.05rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 850;
  text-decoration: none;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

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

.button.primary {
  color: var(--green);
  background: var(--gold);
}

.button.secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.button.secondary.light {
  color: var(--white);
}

.hero-portrait {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 480px;
}

.hero-portrait img {
  width: 100%;
  height: min(68vh, 650px);
  min-height: 430px;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  filter: grayscale(0.08) contrast(1.04);
}

.section {
  padding: clamp(4rem, 8vw, 7rem) max(24px, calc((100vw - var(--max)) / 2));
}

.intro-band {
  background: var(--white);
}

.section-heading {
  display: grid;
  grid-template-columns: 0.9fr 1.5fr;
  gap: clamp(1.6rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: 2.6rem;
}

.section-heading.narrow {
  display: block;
  max-width: 760px;
}

.profile-heading {
  display: block;
  max-width: 1040px;
}

.profile-heading h2 {
  max-width: 1040px;
}

.section h2,
.contact-section h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4.5vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.4rem, 5vw, 4rem);
  align-items: start;
}

.intro-grid > p,
.section-copy {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.stats div {
  min-height: 132px;
  padding: 1.15rem;
  background: var(--paper);
}

.stats strong {
  display: block;
  color: var(--green);
  font-size: 1.5rem;
  line-height: 1;
}

.stats span {
  display: block;
  margin-top: 0.75rem;
  color: var(--muted);
  font-weight: 700;
}

.timeline {
  display: grid;
  gap: 1rem;
  margin-top: 2.3rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(1rem, 4vw, 4rem);
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
}

.timeline-date {
  color: var(--blue);
  font-weight: 900;
}

.timeline-item h3,
.project-card h3,
.credential-card h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.25;
}

.timeline-item p {
  margin: 0.25rem 0 1rem;
  color: var(--muted);
  font-weight: 700;
}

.timeline-item ul,
.clean-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.projects-band {
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(18, 55, 42, 0.98), rgba(49, 91, 122, 0.95)),
    var(--green);
}

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

.project-card,
.credential-card {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 1.3rem;
}

.project-card p {
  margin: 1rem 0;
  color: rgba(255, 255, 255, 0.76);
}

.project-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 1.5rem;
  color: var(--green);
  background: var(--gold);
  border-radius: var(--radius);
}

.project-icon svg {
  width: 1.55rem;
  height: 1.55rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
}

.tag-row span {
  padding: 0.35rem 0.55rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.split-section {
  display: grid;
  grid-template-columns: 0.9fr 1.3fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.credentials-section {
  grid-template-columns: 1fr;
}

.credentials-heading {
  max-width: 1040px;
}

.credentials-heading .section-copy {
  max-width: 720px;
  margin-top: 1.2rem;
}

.credential-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.credential-card {
  min-height: 300px;
  padding: 1.4rem;
  color: var(--ink);
  border-color: var(--line);
  background: var(--white);
  box-shadow: 0 16px 45px rgba(23, 33, 27, 0.08);
}

.credential-card h3 {
  margin-bottom: 1rem;
}

.skills-band {
  background: var(--white);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.skills-grid article {
  min-height: 190px;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.skills-grid h3 {
  margin: 0 0 0.8rem;
  color: var(--green);
  font-size: 1rem;
  line-height: 1.25;
}

.skills-grid p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.contact-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(3rem, 6vw, 5rem) max(24px, calc((100vw - var(--max)) / 2));
  color: var(--white);
  background: var(--ink);
}

.contact-section h2 {
  max-width: 780px;
}

.contact-actions {
  justify-content: flex-end;
  min-width: min(100%, 360px);
  margin-top: 0;
}

.contact-actions .button {
  width: 100%;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem max(24px, calc((100vw - var(--max)) / 2));
  color: var(--muted);
  background: var(--paper);
  font-size: 0.92rem;
  font-weight: 700;
}

@media (max-width: 900px) {
  .site-header {
    width: min(calc(100% - 24px), var(--max));
    margin-top: 12px;
  }

  .nav-toggle {
    display: grid;
  }

  .site-nav {
    position: absolute;
    inset: calc(100% + 8px) 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(23, 33, 27, 0.16);
  }

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

  .site-nav a {
    width: 100%;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 110px;
  }

  .hero h1 {
    font-size: clamp(3.2rem, 14vw, 5.4rem);
  }

  .hero-portrait {
    min-height: auto;
  }

  .hero-portrait img {
    height: auto;
    max-height: 620px;
    min-height: 0;
  }

  .section-heading,
  .intro-grid,
  .split-section {
    grid-template-columns: 1fr;
  }

  .project-grid,
  .credential-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 0;
  }

  .contact-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .brand span {
    display: none;
  }

  .eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 11vw, 3.8rem);
  }

  .hero-lede {
    font-size: 1rem;
  }

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

  .button {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
  }

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

  .timeline-item {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
