:root {
  --background: #e8eaed;
  --foreground: #142635;
  --muted: #4c5a67;
  --surface: #f4f6f8;
  --border: #b9c4cc;
  --accent: #63b9d7;
  --accent-dark: #1f3443;
  --accent-warm: #d8a34a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Anchor target clears sticky header when jumping from home (e.g. Skills link). */
#skills {
  scroll-margin-top: 5rem;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Source Sans 3", "Segoe UI", Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  line-height: 1.08;
  letter-spacing: 0.015em;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent-warm);
  text-underline-offset: 0.24rem;
  text-decoration-thickness: 2px;
  font-weight: 700;
}

a:hover {
  text-decoration-color: #be8e3f;
}

.container {
  width: min(1120px, 100% - 3rem);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(185, 196, 204, 0.9);
  background: rgba(232, 234, 237, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 14px rgba(20, 38, 53, 0.05);
}

.site-footer {
  border-top: 1px solid rgba(185, 196, 204, 0.9);
  background: rgba(232, 234, 237, 0.95);
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.2rem 0;
}

.footer-copy {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.82rem 0;
}

.brand {
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--foreground);
  text-decoration-color: var(--accent-warm);
}

.nav-links a.active {
  color: var(--foreground);
  text-decoration: underline;
  text-decoration-color: var(--accent-warm);
  text-underline-offset: 0.34rem;
  text-decoration-thickness: 2.5px;
  font-weight: 700;
}

.btn {
  text-decoration: none;
}

.hero,
.section {
  padding: 4.6rem 0;
}

.hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h1 {
  font-size: clamp(2rem, 3.9vw, 3.35rem);
  max-width: 30ch;
}

h1 {
  font-size: clamp(1.75rem, 3.35vw, 3rem);
  margin-top: 1.2rem;
  max-width: 34ch;
}

.about-headline {
  font-size: clamp(1.68rem, 3.45vw, 3.1rem);
  max-width: 30ch;
}

h2 {
  font-size: clamp(1.45rem, 2.45vw, 2.25rem);
}

h3 {
  font-size: clamp(1.28rem, 2.05vw, 1.82rem);
}

.eyebrow {
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.18em;
  font-size: 0.68rem;
  font-weight: 700;
}

.lead,
.body {
  margin-top: 1rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 70ch;
}

.lead {
  font-size: clamp(0.95rem, 1.45vw, 1.24rem);
  max-width: 40ch;
}

.body {
  font-size: 0.93rem;
}

.pill-wrap,
.tag-wrap,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
}

.pill-wrap {
  margin-top: 1.25rem;
}

.pill {
  border: 1px solid #aebac3;
  background: #eef2f5;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.pill.strong {
  background: #d7ecf5;
  border-color: #9fb0bd;
  padding: 0.6rem 1rem;
  font-size: 0.75rem;
}

.button-row {
  margin-top: 1.45rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.15;
  padding: 0.78rem 1.55rem;
  min-height: 2.8rem;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

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

.btn-primary {
  border: 1px solid #10202d;
  background: #10202d;
  color: #fff;
  box-shadow: 0 10px 24px rgba(16, 32, 45, 0.28);
}

.btn-primary:hover {
  border-color: #0a1822;
  background: #0a1822;
}

.btn-secondary {
  border: 2px solid #1f3443;
  background: #d7ecf5;
  color: #1f3443;
}

.btn-secondary:hover {
  background: #c3e3f0;
}

.strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.split {
  display: grid;
  gap: 2.4rem;
  padding: 3.7rem 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 2rem;
}

.card {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 1.6rem;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 16px 34px rgba(20, 38, 53, 0.15);
}

.card h2,
.card h3 {
  max-width: 19ch;
}

.card .tag-wrap {
  margin-top: 0.95rem;
}

.tag {
  background: #d7ecf5;
  color: var(--accent-dark);
  border-radius: 0.42rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.66rem;
  font-weight: 700;
}

.tag.outlined {
  border: 1px solid #9fb0bd;
}

.card .btn {
  margin-top: 1.25rem;
}

.inline-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--accent-dark);
}

.spacer-top {
  margin-top: 1.25rem;
}

.about-grid {
  display: grid;
  gap: 2.1rem;
  align-items: start;
  grid-template-columns: 340px minmax(0, 1fr);
}

.photo-card {
  border-radius: 1rem;
  border: 1px solid rgba(185, 196, 204, 0.75);
  background: rgba(244, 246, 248, 0.52);
  box-shadow: 0 8px 20px rgba(20, 38, 53, 0.08);
  backdrop-filter: blur(3px);
  padding: 0.7rem;
}

.photo-card img {
  display: block;
  width: 100%;
  border-radius: 0.9rem;
  background: rgba(244, 246, 248, 0.7);
  border: 1px solid rgba(185, 196, 204, 0.55);
  padding: 0.35rem;
}

.copy-stack {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.narrow {
  max-width: 780px;
}

.image-grid {
  margin-top: 1.8rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.image-frame {
  border-radius: 0.9rem;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 38, 53, 0.12);
  padding: 0.45rem;
}

.image-frame img {
  width: 100%;
  border-radius: 0.7rem;
}

.info-block {
  margin-top: 1.5rem;
}

.project-detail h1 {
  max-width: 20ch;
}

.project-detail .body {
  max-width: 64ch;
}

.project-detail .info-block {
  margin-top: 1.9rem;
}

.project-detail .button-row {
  margin-top: 0.95rem;
}

.project-detail .info-block .btn {
  font-size: 0.72rem;
  min-height: 2.35rem;
  padding: 0.56rem 1.05rem;
  border-width: 1.5px;
}

.project-detail .tag-wrap {
  margin-top: 2.35rem;
}

.list {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.7;
}

.triple {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.35rem;
  padding: 3.5rem 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 560ms ease-out both;
}

@media (max-width: 900px) {
  .container {
    width: min(1120px, 100% - 1.6rem);
  }

  .split,
  .triple,
  .card-grid,
  .about-grid,
  .image-grid {
    grid-template-columns: 1fr;
  }

  .nav-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero,
  .section {
    padding: 3.5rem 0;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    max-width: 26ch;
  }
}
