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

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #666666;
  --border: #e5e5e5;
  --accent: #1a1a1a;
  --max-width: 1100px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.65;
}

/* NAV */
header {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.01em;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav ul a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.15s;
}

nav ul a:hover {
  color: var(--text);
}

/* HERO */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
}

.hero p {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400;
  line-height: 1.3;
  max-width: 700px;
  color: var(--text);
}

/* HERO VIDEO */
.hero-video-wrap {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 2.5rem;
}

.hero-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* PROJECTS */
#projects {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem 6rem;
}

.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.project-reverse {
  direction: rtl;
}

.project-reverse > * {
  direction: ltr;
}

.project-text h2 {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.project-text p {
  color: #333;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.project-text a {
  color: var(--text);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-text a:hover {
  opacity: 0.6;
}

/* Stats list */
.stats {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: #f8f8f8;
  border-radius: 8px;
}

.stats li {
  font-size: 0.85rem;
  color: var(--muted);
}

.stats li strong {
  display: block;
  font-size: 1.4rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.personal-note {
  font-style: italic;
  color: var(--muted) !important;
  font-size: 0.88rem !important;
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  margin-top: 1.5rem !important;
}

/* Blockquote */
blockquote {
  border-left: 3px solid var(--text);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #444;
  font-size: 0.95rem;
}

cite {
  display: block;
  font-style: normal;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.tag {
  display: inline-block;
  font-size: 0.75rem !important;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted) !important;
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  margin-top: 0.5rem !important;
}

/* Media area */
.project-media {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
}

.project-media.yt-link {
  aspect-ratio: 16/9;
  background: #000;
  position: relative;
}

.project-media.yt-link a {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.project-media.yt-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.project-media.yt-link a:hover img {
  opacity: 0.6;
}

.project-media-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.secondary-video-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.secondary-video-link:hover {
  opacity: 0.6;
}

.play-btn {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 99px;
  pointer-events: none;
}

.anthem-player {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: #f8f8f8;
  border-radius: 8px;
}

.anthem-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem !important;
}

.anthem-player audio {
  width: 100%;
}

.photo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  max-width: 480px;
}

.photo-pair img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.photo-pair img:last-child {
  aspect-ratio: 4/3;
  align-self: center;
}

.video-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.video-gallery video {
  width: 100%;
  border-radius: 6px;
  display: block;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-media.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
}

.synoptophore-media {
  aspect-ratio: 9/16;
  max-height: 560px;
  justify-self: center;
}

.synoptophore-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.f1-media {
  aspect-ratio: 9/16;
  max-height: 600px;
  justify-self: center;
  background: #0057b8;
}

.f1-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ABOUT */
#about {
  background: #f8f8f8;
  padding: 6rem 2rem;
}

.headshot {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin-bottom: 2rem;
}

.about-inner {
  max-width: 680px;
  margin: 0 auto;
}

#about h2 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
}

#about p {
  font-size: 1.05rem;
  color: #333;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

/* FOOTER */
footer {
  padding: 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .project,
  .project-reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 2rem;
    padding: 3rem 0;
  }

  .project-media {
    order: -1;
  }

  .f1-media {
    aspect-ratio: 9/16;
    max-height: 400px;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  nav ul {
    gap: 1.25rem;
  }
}
