:root {
  color-scheme: dark;
  --bg: #0a0e16;
  --bg-elevated: #10151f;
  --bg-sunken: #070a10;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(34, 211, 238, 0.4);
  --text: #e6edf5;
  --text-muted: #8a95a8;
  --heading: #c6f4ff;
  --accent: #22d3ee;
  --accent-dim: rgba(34, 211, 238, 0.12);
  --grid-line: rgba(34, 211, 238, 0.07);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 12px;
  --header-h: 64px;
  --font-sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --content: 1080px;
}

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(34, 211, 238, 0.08), transparent 55%),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 28%, transparent 78%);
}

body > * {
  position: relative;
  z-index: 1;
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--heading);
  line-height: 1.15;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.5rem 0.8rem;
  background: var(--bg-elevated);
  color: var(--accent);
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
}

.header-inner,
.footer-inner,
.hero-inner,
.section-inner {
  width: min(var(--content), calc(100% - 2rem));
  margin: 0 auto;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand img {
  width: 28px;
  height: 28px;
}

.brand:hover {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.35rem 0;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.hero {
  padding: 4.5rem 0 3.25rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 4.75rem);
  margin: 0.35rem 0 1.25rem;
}

.tagline {
  color: var(--text-muted);
  font-size: 1.15rem;
}

.hero-copy {
  max-width: 42rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section {
  padding: 1rem 0 4.5rem;
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

.section-header {
  margin-bottom: 1.75rem;
}

.section-header h1,
.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.project-card:hover,
.project-card:focus-within {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.card-media {
  aspect-ratio: 16 / 10;
  background: var(--bg-sunken);
  overflow: hidden;
}

.card-media img,
.card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.4rem;
  padding: 1.25rem;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.16), transparent 42%),
    linear-gradient(320deg, #10151f, #070a10 70%);
}

.card-placeholder-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.card-placeholder-title {
  color: var(--heading);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 1.15rem;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.1rem 1.15rem 1.25rem;
  flex: 1 1 auto;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.card-title {
  font-size: 1.2rem;
}

.card-title a {
  color: inherit;
  text-decoration: none;
}

.card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card-summary {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  line-clamp: 4;
  overflow: hidden;
}

.card-more {
  margin-top: auto;
  padding-top: 0.35rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tag,
.tag-list .tag {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-dim);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  list-style: none;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 0;
}

.about-layout,
.page-layout,
.project-layout {
  display: grid;
  gap: 1.5rem;
}

.about-copy,
.page-layout .prose,
.project-copy {
  max-width: 46rem;
}

.prose {
  color: color-mix(in srgb, var(--text) 88%, var(--text-muted));
}

.prose > *:last-child {
  margin-bottom: 0;
}

.contact-links {
  margin-top: 0.5rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  list-style: none;
}

.social-links a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

.project-header h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-top: 0.35rem;
}

.project-header .eyebrow a {
  color: var(--accent);
  text-decoration: none;
}

.project-videos,
.carousel {
  margin-top: 0.5rem;
}

.media-video,
.carousel-slide {
  margin: 0;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.media-video video,
.carousel-slide img {
  width: 100%;
  height: auto;
  background: #000;
}

.media-video figcaption,
.carousel-slide figcaption {
  padding: 0.7rem 1rem 0.9rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.carousel-btn {
  appearance: none;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.carousel-btn:hover {
  border-color: var(--border-strong);
  color: var(--accent);
}

.carousel-dots {
  display: flex;
  gap: 0.4rem;
}

.carousel-dot {
  width: 0.65rem;
  height: 0.65rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: transparent;
  cursor: pointer;
}

.carousel-dot.is-active {
  background: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0 1.75rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-name {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-section,
.project-section {
  padding-top: 3rem;
}

@media (max-width: 700px) {
  .hero {
    padding-top: 2.75rem;
  }

  .header-inner {
    align-items: flex-start;
    padding: 0.85rem 0;
    height: auto;
  }

  .site-header {
    height: auto;
  }

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

  .card-summary {
    -webkit-line-clamp: 6;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .project-card:hover,
  .project-card:focus-within {
    transform: none;
  }
}
