:root {
  --ink: #111827;
  --ink-soft: #374151;
  --paper: #f8fafc;
  --panel: #ffffff;
  --line: #d9e1ea;
  --teal: #0f766e;
  --teal-dark: #134e4a;
  --red: #b43d33;
  --gold: #c58a1d;
  --navy: #172033;
  --shadow: 0 24px 80px rgba(17, 24, 39, 0.16);
  --radius: 8px;
  --content: min(1120px, calc(100% - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  transform: translateY(-140%);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 10px 14px;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(248, 250, 252, 0.94);
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.12);
  backdrop-filter: blur(14px);
}

.nav {
  width: var(--content);
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

.is-scrolled .brand,
.nav-links a {
  color: var(--ink);
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.84rem;
}

.is-scrolled .brand-mark {
  border-color: var(--line);
  background: var(--ink);
  color: #fff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  border-radius: var(--radius);
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  outline: none;
}

.is-scrolled .nav-links a:hover,
.is-scrolled .nav-links a:focus-visible {
  background: #eef2f7;
  color: var(--ink);
}

.nav-links .nav-cta {
  margin-left: 8px;
  background: #fff;
  color: var(--ink);
}

.is-scrolled .nav-links .nav-cta {
  background: var(--teal);
  color: #fff;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #fff;
}

.is-scrolled .nav-toggle {
  border-color: var(--line);
  background: #fff;
}

.is-scrolled .nav-toggle span:not(.sr-only) {
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--ink);
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(8, 13, 23, 0.84) 0%, rgba(8, 13, 23, 0.66) 42%, rgba(8, 13, 23, 0.26) 100%),
    linear-gradient(0deg, rgba(8, 13, 23, 0.72) 0%, rgba(8, 13, 23, 0.04) 40%);
}

.hero-content {
  position: relative;
  width: var(--content);
  margin: 0 auto;
  padding: 138px 0 96px;
  color: #fff;
}

.eyebrow,
.section-kicker,
.card-label,
.timeline-date {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #8de2d4;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(3.3rem, 11vw, 8.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  max-width: 820px;
  font-size: clamp(2rem, 4vw, 4.15rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  line-height: 1.24;
}

.hero-copy {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

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

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 12px 18px;
  text-decoration: none;
  font-weight: 800;
}

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

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--teal-dark);
}

.button-secondary {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.contact-section .button-secondary {
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
}

.hero-panel {
  position: absolute;
  right: max(20px, calc((100% - 1120px) / 2));
  bottom: 28px;
  width: min(320px, calc(100% - 40px));
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: var(--radius);
  padding: 18px;
  color: #fff;
  background: rgba(12, 18, 31, 0.64);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero-panel span,
.hero-panel small {
  display: block;
  color: rgba(255, 255, 255, 0.72);
}

.hero-panel strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 1.25rem;
}

.section {
  width: var(--content);
  margin: 0 auto;
  padding: 96px 0;
}

.band {
  width: 100%;
  padding-right: max(20px, calc((100% - 1120px) / 2));
  padding-left: max(20px, calc((100% - 1120px) / 2));
  background: #fff;
}

.section-heading,
.intro-grid,
.split-section,
.resume-section,
.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 48px;
  align-items: start;
}

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

.section-heading p,
.intro-grid p,
.split-section p,
.contact-section p {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.profile-facts {
  display: grid;
  gap: 12px;
  margin: 0;
}

.profile-facts div,
.feature-card,
.skill-panel,
.timeline-item,
.project-card,
.highlight-list article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.profile-facts div {
  padding: 18px;
}

.profile-facts dt {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-facts dd {
  margin: 4px 0 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.feature-grid,
.project-grid,
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card,
.skill-panel {
  padding: 24px;
}

.feature-card p,
.skill-panel li,
.timeline-item p,
.project-body p {
  color: var(--ink-soft);
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 22px;
  padding: 22px;
}

.timeline-date {
  margin: 4px 0 0;
}

.project-card {
  overflow: hidden;
}

.project-media {
  display: grid;
  min-height: 160px;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.94), rgba(23, 32, 51, 0.96)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 8px, transparent 8px 16px);
  color: #fff;
  font-weight: 900;
}

.project-media.accent-red {
  background:
    linear-gradient(135deg, rgba(180, 61, 51, 0.94), rgba(23, 32, 51, 0.96)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 8px, transparent 8px 16px);
}

.project-media.accent-gold {
  background:
    linear-gradient(135deg, rgba(197, 138, 29, 0.94), rgba(23, 32, 51, 0.96)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 8px, transparent 8px 16px);
}

.project-body {
  padding: 22px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

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

.skill-panel ul {
  margin: 0;
  padding-left: 19px;
}

.highlight-list {
  display: grid;
  gap: 12px;
}

.highlight-list article {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
}

.highlight-list span {
  color: var(--red);
  font-weight: 900;
}

.highlight-list h3 {
  margin: 0;
  font-size: 1rem;
}

.contact-section {
  align-items: center;
}

.site-footer {
  width: var(--content);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--ink-soft);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 860px) {
  :root {
    --content: min(100% - 28px, 1120px);
  }

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

  .nav-links {
    position: absolute;
    top: 64px;
    right: 14px;
    left: 14px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

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

  .nav-links a,
  .nav-links .nav-cta {
    margin-left: 0;
    color: var(--ink);
    background: transparent;
  }

  .nav-links a:hover,
  .nav-links a:focus-visible,
  .is-scrolled .nav-links a:hover,
  .is-scrolled .nav-links a:focus-visible {
    background: #eef2f7;
    color: var(--ink);
  }

  .hero {
    min-height: 92vh;
  }

  .hero-content {
    padding: 118px 0 160px;
  }

  .hero-panel {
    right: 14px;
    bottom: 18px;
  }

  .section,
  .band {
    padding-top: 68px;
    padding-bottom: 68px;
  }

  .section-heading,
  .intro-grid,
  .split-section,
  .resume-section,
  .contact-section,
  .feature-grid,
  .project-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .brand span:last-child {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

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

  .button {
    width: 100%;
  }

  h1 {
    font-size: 3.1rem;
  }

  h2 {
    font-size: 2.1rem;
  }

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