:root {
  --navy: #10233f;
  --blue: #2463eb;
  --blue-dark: #1749b8;
  --sky: #eaf1ff;
  --ink: #172033;
  --muted: #5d687b;
  --line: #dce3ee;
  --paper: #ffffff;
  --background: #f7f9fc;
  --max-width: 1120px;
  --shadow: 0 18px 45px rgba(16, 35, 63, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--navy); line-height: 1.15; }
h1 { max-width: 850px; margin-bottom: 1.5rem; font-size: clamp(2.65rem, 6vw, 5.4rem); letter-spacing: -0.055em; }
h2 { margin-bottom: 1rem; font-size: clamp(1.75rem, 3vw, 2.65rem); letter-spacing: -0.035em; }
h3 { margin-bottom: 0.65rem; font-size: 1.15rem; }
p { margin-bottom: 1rem; }

.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: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid rgba(220, 227, 238, 0.9);
  background: rgba(247, 249, 252, 0.94);
  backdrop-filter: blur(12px);
}

.nav-wrap {
  display: flex;
  width: min(calc(100% - 2rem), var(--max-width));
  min-height: 76px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: grid;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: white;
  background: var(--navy);
  place-items: center;
  font-weight: 800;
  text-decoration: none;
}

.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav a { padding: 0.65rem 0.85rem; border-radius: 8px; color: var(--muted); font-size: 0.94rem; font-weight: 650; text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a.active { color: var(--blue-dark); background: var(--sky); }
.nav-toggle { display: none; }

.section { width: min(calc(100% - 2rem), var(--max-width)); margin: 0 auto; padding: 6.5rem 0; }
.compact-section { padding-top: 3rem; }
.page-intro { padding-bottom: 4.5rem; }
.page-intro h1 { font-size: clamp(2.5rem, 5.5vw, 4.8rem); }
.eyebrow { margin-bottom: 0.75rem; color: var(--blue-dark); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.lead { max-width: 760px; color: var(--muted); font-size: clamp(1.08rem, 2vw, 1.35rem); }

.hero { display: grid; min-height: calc(100vh - 76px); grid-template-columns: 1.25fr 0.75fr; align-items: center; gap: 4rem; }
.hero-copy { padding-bottom: 2rem; }
.hero-art { width: min(100%, 470px); justify-self: end; }
.button-row { display: flex; margin-top: 2rem; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.button { display: inline-flex; padding: 0.85rem 1.2rem; border: 1px solid var(--blue); border-radius: 10px; color: white; background: var(--blue); align-items: center; justify-content: center; font-weight: 750; text-decoration: none; transition: transform 160ms ease, background 160ms ease; }
.button:hover, .button:focus-visible { background: var(--blue-dark); transform: translateY(-2px); }
.button.secondary { color: var(--blue-dark); background: white; }
.text-link { color: var(--blue-dark); font-weight: 750; text-decoration: none; }
.text-link:hover, .text-link:focus-visible { text-decoration: underline; }

.card-grid { display: grid; margin-top: 2.25rem; gap: 1rem; }
.three-column { grid-template-columns: repeat(3, 1fr); }
.card { padding: 1.75rem; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: var(--shadow); }
.card p { margin-bottom: 0; color: var(--muted); }
.callout { display: flex; margin-bottom: 5rem; padding: 3rem; border-radius: 22px; background: var(--navy); align-items: center; justify-content: space-between; gap: 2rem; }
.callout h2, .callout p { color: white; }
.callout .eyebrow { color: #9dbbff; }
.callout > div { max-width: 760px; }

.split-section { display: grid; padding-top: 2rem; grid-template-columns: 1.2fr 0.8fr; gap: 4rem; align-items: center; }
.accent-panel { padding: 2.25rem; border-radius: 20px; background: var(--sky); }
.accent-panel p { margin-bottom: 0; color: var(--muted); }
.skill-groups { display: grid; margin-top: 2rem; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.skill-groups > div { padding: 1.4rem; border-top: 3px solid var(--blue); background: var(--paper); }
.skill-groups p { margin-bottom: 0; color: var(--muted); }

.visual-intro { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 4rem; align-items: center; }
.visual-intro img { width: min(100%, 360px); justify-self: end; }
.timeline { padding-top: 1rem; }
.timeline-item { display: grid; padding: 3rem 0; border-top: 1px solid var(--line); grid-template-columns: 0.35fr 1fr; gap: 3rem; }
.timeline-item:last-child { border-bottom: 1px solid var(--line); }
.timeline-meta { color: var(--muted); font-size: 0.92rem; }
.timeline-meta p { margin-bottom: 0.2rem; }
.timeline-item ul { margin: 1.5rem 0 0; padding-left: 1.2rem; color: var(--muted); }
.timeline-item li + li { margin-top: 0.65rem; }

.project-list { padding-top: 1rem; }
.project-card { display: grid; padding: 3rem 0; border-top: 1px solid var(--line); grid-template-columns: 0.25fr 1fr; gap: 3rem; scroll-margin-top: 100px; }
.project-card:last-child { border-bottom: 1px solid var(--line); }
.project-card > div:last-child { max-width: 800px; }
.project-card > div:last-child > p:not(.eyebrow, .tag-list) { color: var(--muted); font-size: 1.08rem; }
.project-number { margin-bottom: 0.35rem; color: var(--blue); font-size: 2rem; font-weight: 850; }
.project-date { color: var(--muted); font-size: 0.88rem; }
.tag-list { display: flex; margin: 1.5rem 0 0; gap: 0.5rem; flex-wrap: wrap; }
.tag-list span { padding: 0.35rem 0.65rem; border-radius: 999px; color: var(--blue-dark); background: var(--sky); font-size: 0.8rem; font-weight: 700; }

.contact-main, .error-main { display: grid; width: min(calc(100% - 2rem), var(--max-width)); min-height: calc(100vh - 158px); margin: 0 auto; padding: 5rem 0; place-items: center; }
.contact-card, .error-card { width: min(100%, 820px); padding: clamp(2rem, 6vw, 5rem); border: 1px solid var(--line); border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); }
.contact-card h1, .error-card h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
.email-link { display: inline-block; margin: 1.25rem 0 2rem; color: var(--blue-dark); font-size: clamp(1.15rem, 3vw, 1.75rem); font-weight: 800; text-underline-offset: 0.25rem; }
.contact-note { margin-bottom: 0; color: var(--muted); font-size: 0.9rem; }
.error-card { text-align: center; }
.error-code { margin-bottom: 0; color: var(--blue); font-size: clamp(5rem, 18vw, 10rem); font-weight: 900; line-height: 0.9; letter-spacing: -0.08em; }
.error-card h1 { margin-top: 1.25rem; }
.error-card .button { margin-top: 1rem; }

.site-footer { display: flex; width: min(calc(100% - 2rem), var(--max-width)); min-height: 82px; margin: 0 auto; border-top: 1px solid var(--line); color: var(--muted); align-items: center; justify-content: space-between; gap: 1rem; font-size: 0.9rem; }
.site-footer p { margin-bottom: 0; }
.site-footer a { color: var(--blue-dark); }

@media (max-width: 780px) {
  .nav-toggle { display: inline-flex; padding: 0.55rem 0.75rem; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); background: white; font: inherit; font-size: 0.9rem; font-weight: 750; cursor: pointer; }
  .site-nav { position: absolute; display: none; top: calc(100% + 1px); right: 0; left: 0; padding: 0.75rem 1rem 1rem; border-bottom: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); flex-direction: column; align-items: stretch; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.8rem; }
  .section { padding: 4.5rem 0; }
  .hero { min-height: auto; padding-top: 4.5rem; grid-template-columns: 1fr; gap: 1rem; }
  .hero-art { width: min(80%, 350px); justify-self: center; }
  .three-column, .split-section, .skill-groups, .visual-intro { grid-template-columns: 1fr; }
  .split-section, .visual-intro { gap: 2rem; }
  .visual-intro img { width: min(75%, 300px); justify-self: center; }
  .callout { padding: 2rem; align-items: flex-start; flex-direction: column; }
  .timeline-item, .project-card { grid-template-columns: 1fr; gap: 1rem; }
  .project-number { display: inline; margin-right: 0.75rem; }
  .project-date { display: inline; }
  .site-footer { padding: 1.25rem 0; align-items: flex-start; flex-direction: column; justify-content: center; }
}

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