@font-face { font-family: 'CommitMono'; src: url('fonts/CommitMono-400-Regular.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'CommitMono'; src: url('fonts/CommitMono-400-Italic.otf') format('opentype'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'CommitMono'; src: url('fonts/CommitMono-700-Regular.otf') format('opentype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'CommitMono'; src: url('fonts/CommitMono-700-Italic.otf') format('opentype'); font-weight: 700; font-style: italic; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #fcf9f5;
  --surface: #ffffff;
  --ink:     #231f20;
  --radius:  8px;
  --gap:     24px;
  --pad-x:   48px;
  --pad-top: 50px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'CommitMono', monospace;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  font-feature-settings: 'calt' 1, 'liga' 1, 'cv10' 1, 'ss01' 1, 'ss02' 1, 'ss03' 1, 'ss04' 1, 'ss05' 1;
  -webkit-font-smoothing: antialiased;
}

a       { color: var(--ink); }
a:hover { opacity: 0.6; }
img     { display: block; max-width: 100%; height: auto; }

.site-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--pad-top);
  padding-bottom: 24px;
  border-bottom: 3px solid var(--ink);
  flex-shrink: 0;
}

.logo-link { display: block; flex-shrink: 0; line-height: 0; }
.site-logo { height: 40px; width: auto; }

.site-nav {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-dot  { user-select: none; padding: 0 10px; }

.nav-link { text-decoration: underline; text-underline-offset: 3px; }
.nav-link:hover { opacity: 0.6; }
.nav-link.is-active { font-weight: 700; text-decoration: none; cursor: default; pointer-events: none; }

.hamburger {
  display: none;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 28px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  padding: 4px;
  user-select: none;
}

.mobile-nav { display: none; flex-direction: column; gap: 2px; padding: 16px 0; border-bottom: 3px solid var(--ink); }
.mobile-nav.is-open { display: flex; }

.mobile-nav-link { font-size: 18px; text-transform: uppercase; text-decoration: underline; text-underline-offset: 3px; padding: 8px 0; }
.mobile-nav-link.is-active { font-weight: 700; text-decoration: none; pointer-events: none; }

.page-intro {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.5;
  text-transform: uppercase;
  text-align: center;
  padding: 64px 0 24px;
  max-width: 960px;
  margin: 0 auto;
}

.sections-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 40px 0 64px;
}

.section-row { display: flex; gap: 40px; align-items: flex-start; }
.section-row--full .section-card { flex: 1; }
.section-row--pair .section-card { flex: 1 1 0; min-width: 0; }

.empty-state { font-size: 14px; text-transform: uppercase; opacity: 0.5; padding: var(--gap) 0; }

.section-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--gap);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.section-title { font-size: 16px; font-weight: 700; text-transform: uppercase; text-align: center; }

.section-image {
  width: 100%;
  aspect-ratio: 1170 / 660;
}

.section-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.vectors-page .section-title { display: none; }

.vectors-page .section-image { width: 100%; }

.vectors-page .section-image svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: var(--ink);
  background: var(--surface);
  border-radius: calc(var(--radius) - 4px);
}

.carousel { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }

.carousel-viewport { overflow: hidden; width: 100%; aspect-ratio: 1170 / 660; }

.carousel-track { display: flex; height: 100%; will-change: transform; transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1); }

.carousel-slide { flex: 0 0 100%; height: 100%; display: flex; justify-content: center; align-items: center; }

.carousel-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity 0.3s;
}

.carousel-slide img[data-src] { opacity: 0; }

.vector-slide-inner,
.vector-slide-inner svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1170 / 660;
  fill: var(--ink);
  background: var(--surface);
  border-radius: var(--radius);
}

.carousel-title { font-size: 16px; font-weight: 700; text-transform: uppercase; text-align: center; }

.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 12px; }

.carousel-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  padding: 4px 0;
  flex-shrink: 0;
  user-select: none;
  transition: opacity 0.15s;
}
.carousel-btn:hover  { opacity: 0.5; }
.carousel-btn:active { opacity: 0.3; }

.carousel-pagination { display: flex; align-items: center; gap: 6px; }

.carousel-dot {
  display: block;
  height: 8px;
  width: 8px;
  border-radius: 99px;
  background: var(--ink);
  opacity: 0.25;
  flex-shrink: 0;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}
.carousel-dot.is-active { width: 28px; opacity: 1; }

.section-notes { font-size: 14px; text-transform: uppercase; text-align: center; max-width: 720px; }
.section-notes p { margin-bottom: 8px; }
.section-notes p:last-child { margin-bottom: 0; }
.section-notes a { text-decoration: underline; }

.vectors-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 40px 0 64px;
}

.vector-carousel { width: 100%; }

.vector-hero svg,
.vector-item svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1170 / 660;
  fill: var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
}

.vectors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.vector-item {
  flex: 1 1 calc((100% - 80px) / 3);
  min-width: 0;
}

.about-page { flex: 1; display: flex; flex-direction: column; gap: var(--gap); padding: var(--gap) 0; }

.about-card { align-items: stretch; flex-direction: row; gap: var(--gap); }

.about-image { flex: 0 0 calc(33.333% - var(--gap) / 2); }
.about-image img { width: 100%; height: auto; border-radius: calc(var(--radius) - 4px); }

.about-body { flex: 0 0 calc(66.666% - var(--gap) / 2); display: flex; align-items: flex-start; }

.about-content { font-size: 16px; text-transform: uppercase; }
.about-content p         { margin-bottom: 12px; }
.about-content p:last-child { margin-bottom: 0; }
.about-content a         { text-decoration: underline; }
.about-content strong    { font-weight: 700; }
.about-content em        { font-style: italic; }

.site-footer {
  flex-shrink: 0;
  border-top: 3px solid var(--ink);
  padding: 24px 0;
  font-size: 14px;
  text-transform: uppercase;
  text-align: center;
}

@media (max-width: 768px) {
  :root { --pad-x: 20px; --pad-top: 32px; }

  .site-logo { height: 36px; }
  .site-nav  { display: none; }
  .hamburger { display: block; }

  .page-intro { font-size: 16px; padding: 32px 0; }

  .section-row  { flex-direction: column; }
  .section-card { padding: 16px; gap: 12px; }

  .vectors-grid { gap: 12px; }
  .vector-item  { flex: 1 1 calc((100% - 12px) / 2); }

  .about-card  { flex-direction: column; }
  .about-image,
  .about-body  { flex: none; width: 100%; }
}

@media (max-width: 480px) {
  .page-intro { font-size: 14px; }
}
