:root {
  color-scheme: light;
  --navy: #132333;
  --muted: #52606d;
  --gold: #c4a361;
  --paper: #f7f8fa;
  --line: #dce1e6;
  --white: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--navy);
  background: var(--paper);
  line-height: 1.6;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; }
a { color: inherit; text-underline-offset: 0.25em; }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #806021; outline-offset: 5px; }
.site-header :focus-visible, .skip-link:focus-visible { outline-color: var(--gold); }
.container { max-width: 1200px; margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 3rem); }
.accent { color: var(--gold); }
.skip-link { position: absolute; z-index: 10; top: 0.75rem; left: 1rem; padding: 0.75rem 1rem; background: var(--navy); color: var(--white); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
.site-header { background: var(--navy); color: var(--white); }
.header-inner { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.04em; text-decoration: none; white-space: nowrap; }
nav ul { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; list-style: none; padding: 0; margin: 0; }
nav a { display: block; padding-block: 0.8rem; font-size: 0.9rem; text-decoration: none; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current="page"] { border-color: var(--gold); }
.menu-toggle { min-height: 44px; padding: 0.4rem 0.9rem; color: var(--white); background: transparent; border: 1px solid var(--gold); border-radius: 4px; cursor: pointer; }
.hero { padding-block: clamp(4rem, 9vw, 7.5rem); max-width: 850px; }
.eyebrow { margin: 0 0 1.25rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.eyebrow::before { content: ""; display: inline-block; width: 2rem; height: 2px; background: var(--gold); vertical-align: middle; margin-right: 0.75rem; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(3rem, 7vw, 5.5rem); line-height: 1.1; letter-spacing: -0.055em; margin-bottom: 1.5rem; overflow-wrap: break-word; }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.2; letter-spacing: -0.035em; }
h3 { font-size: 1.2rem; line-height: 1.4; }
.intro { font-size: clamp(1.2rem, 2.5vw, 1.65rem); line-height: 1.5; max-width: 42rem; margin-bottom: 1rem; }
.hero-description, .content-note { color: var(--muted); max-width: 36rem; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.75rem; margin-top: 2rem; }
.button { display: inline-flex; gap: 2rem; align-items: center; padding: 0.85rem 1.25rem; background: var(--navy); color: var(--white); border-radius: 4px; text-decoration: none; font-weight: 600; }
.button:hover { background: #294156; }
.text-link { display: inline-block; padding-block: 0.7rem; font-weight: 600; }
.overview { border-top: 1px solid var(--line); padding-block: 2.75rem 5rem; }
.section-heading { margin-bottom: 2rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.card { display: block; padding: 1.75rem; background: var(--white); border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.card:hover { border-color: #806021; }
.card-number { display: block; margin-bottom: 2rem; color: var(--muted); font-size: 0.8rem; }
.card h3 { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.card p { color: var(--muted); margin-bottom: 0; }
.page-hero h1 { font-size: clamp(2.75rem, 6vw, 4.5rem); }
.content-note { margin-block: 2rem 0.5rem; }
.site-footer { border-top: 1px solid var(--line); background: var(--white); font-size: 0.8rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; padding-block: 1.75rem; }
.footer-inner p { margin: 0; }

@media (max-width: 960px) {
  .header-inner { flex-wrap: wrap; gap: 0.5rem 1rem; padding-block: 1rem; min-height: 80px; }
  nav { width: 100%; }
  nav ul { gap: 0.25rem 1.25rem; }
  .card-grid { grid-template-columns: 1fr; }
  .card-number { margin-bottom: 1rem; }
}

@media (prefers-reduced-motion: no-preference) {
  a { transition: background-color 150ms ease, border-color 150ms ease; }
}

/* Homepage portrait layout; other page heroes retain their existing styles. */
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) 200px; align-items: center; gap: 3rem; max-width: none; }
.home-hero-content { min-width: 0; }
.home-hero-portrait { width: 200px; max-width: 100%; aspect-ratio: 3 / 4; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--white); color: var(--muted); font-size: 0.85rem; }
.home-hero-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }

@media (max-width: 960px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
}

/* Technology tags on the Projects page. */
.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; max-width: 42rem; padding: 0; margin: 1.5rem 0 0; list-style: none; }
.project-tags li { padding: 0.25rem 0.65rem; border: 1px solid var(--line); border-radius: 4px; background: var(--white); color: var(--navy); font-size: 0.8rem; }
