:root {
  --bg: #fafafa;
  --paper: #ffffff;
  --ink: #111111;
  --muted: #888888;
  --rule: #e0e0e0;
  --accent: #000000;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --paper: #181818;
    --ink: #eeeeee;
    --muted: #777777;
    --rule: #2a2a2a;
    --accent: #ffffff;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
h1 { font-size: 2rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.4rem; margin: 0 0 2rem; }
h3 { font-size: 1rem; margin: 0 0 0.25rem; font-weight: 500; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.meta { font-size: 0.8rem; margin-bottom: 0.5rem; }
a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
  transition: opacity 0.2s;
}
a:hover { opacity: 0.5; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Layout wrapper */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 3rem;
}
.nav-title {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}
.nav-title:hover { opacity: 0.5; }
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  text-decoration: none;
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); opacity: 1; }

/* Hero */
.hero {
  margin-bottom: 4rem;
}
.hero-video { margin-bottom: 1.5rem; }
.hero-text { max-width: 60ch; }
.hero-text h1 { font-size: 2.4rem; }
.hero-text p { font-size: 1.05rem; }

/* Embed container */
.embed-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: var(--paper);
}
.embed-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* Work grid */
.work {
  margin-bottom: 4rem;
}
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 640px) {
  .grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .grid { grid-template-columns: 1fr 1fr 1fr; }
}
.card {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1.5rem;
}
.card-body { padding: 1rem 0 0; }
.card-body p { font-size: 0.9rem; }

/* About */
.about {
  max-width: 60ch;
  margin-bottom: 4rem;
}

/* Contact */
.contact {
  max-width: 60ch;
  margin-bottom: 4rem;
}
.social-links {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}
.social-links a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
}
.social-links a:hover { color: var(--ink); opacity: 1; }
.sep { color: var(--muted); margin: 0 0.4rem; }

/* Footer */
footer {
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
footer p { margin: 0; }
footer .attribution { font-size: 0.75rem; opacity: 0.6; }

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