:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #eef4fb;
  --ink: #0e1726;
  --muted: #5c6b7f;
  --line: #d9e2ee;
  --blue: #1769e0;
  --blue-dark: #0d47a1;
  --blue-soft: #dcecff;
  --shadow: 0 20px 55px rgba(14, 23, 38, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(247, 249, 252, 0.86);
  border-bottom: 1px solid rgba(217, 226, 238, 0.75);
  display: flex;
  justify-content: space-between;
  left: 0;
  padding: 18px clamp(18px, 4vw, 64px);
  position: sticky;
  right: 0;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-weight: 800;
  gap: 10px;
  letter-spacing: 0;
}

.brand-mark {
  align-items: center;
  background: var(--ink);
  border-radius: 50%;
  color: white;
  display: inline-flex;
  font-size: 0.78rem;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.nav-links {
  display: flex;
  gap: clamp(12px, 2.5vw, 30px);
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-links a {
  color: var(--muted);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--blue);
}

.section-shell,
.content-section,
.contact-section,
.project-main {
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(54px, 8vw, 110px) clamp(18px, 4vw, 34px);
}

.hero {
  align-items: start;
  display: grid;
  gap: clamp(34px, 6vw, 80px);
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
}

.eyebrow {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.05;
  margin: 0;
}

h1 {
  font-size: clamp(2.45rem, 6vw, 5.5rem);
  letter-spacing: 0;
  max-width: 900px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

h3 {
  font-size: 1.18rem;
}

.bio {
  color: var(--muted);
  font-size: 1.02rem;
  margin-top: 26px;
  max-width: 770px;
}

.bio p {
  margin: 0 0 16px;
}

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

.button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible {
  border-color: var(--blue);
  transform: translateY(-1px);
}

.button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.portrait-panel {
  background: linear-gradient(145deg, var(--surface-soft), var(--surface));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-top: 32px;
  overflow: hidden;
}

.portrait-panel img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
}

.stats-band {
  background: var(--ink);
  color: white;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(3, 1fr);
}

.stats-band div {
  background: rgba(255, 255, 255, 0.04);
  padding: clamp(24px, 5vw, 42px);
  text-align: center;
}

.stats-band strong {
  display: block;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
}

.stats-band span {
  color: #cbd5e1;
  display: block;
  font-weight: 600;
  margin-top: 8px;
}

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

.carousel-wrap {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.media-carousel {
  display: grid;
  gap: 16px;
  grid-auto-columns: minmax(250px, 310px);
  grid-auto-flow: column;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 4px 4px 18px;
  scroll-snap-type: inline mandatory;
}

.media-card,
.project-card,
.placeholder-project,
.detail-panel,
.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.media-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 20px;
  scroll-snap-align: start;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.media-card:hover,
.project-card:hover {
  border-color: rgba(23, 105, 224, 0.55);
  box-shadow: 0 16px 42px rgba(14, 23, 38, 0.1);
  transform: translateY(-3px);
}

.media-logo {
  align-items: center;
  background: var(--surface-soft);
  border-radius: 8px;
  display: flex;
  height: 74px;
  justify-content: center;
  margin-bottom: 18px;
  padding: 12px;
}

.media-logo img {
  max-height: 48px;
  object-fit: contain;
}

.media-card p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 10px 0 0;
}

.media-card span {
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
  margin-top: auto;
  padding-top: 20px;
}

.carousel-button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  font-size: 2rem;
  height: 44px;
  line-height: 1;
  width: 44px;
}

.carousel-button:hover,
.carousel-button:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
}

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

.project-card {
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.project-thumb {
  aspect-ratio: 16 / 10;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.project-thumb img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.project-card-body {
  padding: 20px;
}

.project-card-body p {
  color: var(--muted);
  margin: 10px 0 0;
}

.contact-section {
  align-items: start;
  display: grid;
  gap: clamp(28px, 5vw, 70px);
  grid-template-columns: 0.8fr 1fr;
}

.contact-copy p {
  color: var(--muted);
  max-width: 460px;
}

.contact-copy a {
  color: var(--blue);
  font-weight: 800;
}

.contact-form {
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  padding: clamp(20px, 4vw, 34px);
}

.contact-form label {
  display: grid;
  gap: 8px;
}

.contact-form span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  padding: 13px 14px;
  width: 100%;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(23, 105, 224, 0.12);
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 0.92rem;
  justify-content: space-between;
  padding: 26px clamp(18px, 4vw, 64px);
}

.project-hero {
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  grid-template-columns: minmax(0, 820px);
}

.project-hero p {
  color: var(--muted);
}

.project-visual-large {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.project-visual-large img {
  width: 100%;
}

.project-detail-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 44px;
}

.detail-panel {
  overflow: hidden;
}

.detail-panel img {
  background: white;
  width: 100%;
}

.detail-panel figcaption {
  color: var(--muted);
  font-size: 0.92rem;
  padding: 16px 18px 20px;
}

.citation {
  background: var(--surface);
  border-left: 4px solid var(--blue);
  color: var(--muted);
  margin-top: 34px;
  padding: 18px 20px;
}

.citation a,
.project-actions a {
  color: var(--blue);
}

.project-resources,
.project-videos,
.project-gallery {
  margin-top: clamp(42px, 7vw, 84px);
}

.resource-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.resource-link {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 64px;
  padding: 14px 16px;
}

.resource-link:hover,
.resource-link:focus-visible {
  border-color: var(--blue);
}

.resource-link span {
  font-weight: 800;
}

.resource-link small {
  background: var(--blue-soft);
  border-radius: 999px;
  color: var(--blue-dark);
  flex: 0 0 auto;
  font-weight: 800;
  padding: 5px 9px;
}

.video-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.video-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0;
  overflow: hidden;
}

.video-frame {
  aspect-ratio: 16 / 9;
  background: var(--ink);
}

.video-frame iframe {
  border: 0;
  height: 100%;
  width: 100%;
}

.video-card figcaption {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.92rem;
  font-weight: 800;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 16px 16px;
}

.video-card figcaption a {
  color: var(--blue);
  flex: 0 0 auto;
}

.project-gallery .detail-panel img {
  aspect-ratio: 16 / 10;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

@media (max-width: 900px) {
  .hero,
  .contact-section,
  .project-hero {
    grid-template-columns: 1fr;
  }

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

  .portrait-panel {
    margin-top: 0;
    max-width: 520px;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .nav-links {
    flex-wrap: wrap;
  }

  .stats-band,
  .projects-grid,
  .project-detail-grid,
  .video-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .carousel-wrap {
    grid-template-columns: 1fr;
  }

  .carousel-button {
    display: none;
  }

  .site-footer {
    flex-direction: column;
    gap: 8px;
  }
}
