/* Design tokens */
:root {
  --bg: #0b0b0c;
  --bg-elev: #121214;
  --text: #e9e9ec;
  --muted: #b6b6bf;
  --card: #111113;
  --border: #1e1e22;
  --accent: #0fc3d1;
  --accent-700: #6ed1db;
  --accent-400: #c4f3f7;
  --accent-200: #f1fbfc;
  --aura-1: 184deg;
  --aura-2: 200deg;
  --radius: 16px;
  --radius-pill: 9999px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.15), 0 6px 18px rgba(0, 0, 0, 0.2);

  --font-sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  --fs-900: clamp(32px, 5vw, 72px);
  --fs-800: clamp(24px, 4vw, 40px);
  --fs-700: clamp(20px, 2.5vw, 28px);
  --fs-600: clamp(18px, 2vw, 22px);
  --fs-500: 16px;
}

html[data-theme="light"] {
  --bg: #ffffff;
  --bg-elev: #fafafa;
  --text: #0c0c0d;
  --muted: #53535f;
  --card: #ffffff;
  --border: #e9e9ef;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 6px 16px rgba(0, 0, 0, 0.08);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Reset-ish */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Aura layer */
.aura {
  position: fixed;
  inset: -20vmax;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
      35vmax 35vmax at var(--mx, 50%) var(--my, 50%),
      hsl(var(--aura-1) 100% 62% / 0.16) 0%,
      transparent 60%
    ),
    radial-gradient(
      45vmax 45vmax at calc(100% - var(--mx, 50%)) calc(100% - var(--my, 50%)),
      hsl(var(--aura-2) 100% 62% / 0.1) 0%,
      transparent 60%
    );
  filter: blur(12px) saturate(120%);
  transition: opacity 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
  .aura {
    display: none;
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(120%) blur(8px);
  background: color-mix(in hsl, var(--bg), transparent 20%);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent-400), var(--accent));
  box-shadow: 0 0 16px var(--accent-400);
}

.brand-name {
  letter-spacing: 0.2px;
}

.nav {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.nav-link {
  text-decoration: none;
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
}

.nav-link:hover {
  border-color: color-mix(in hsl, var(--text), transparent 70%);
}

.actions {
  display: flex;
  justify-content: end;
}

.icon-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: var(--radius-pill);
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}

.icon-btn:hover {
  border-color: color-mix(in hsl, var(--accent), transparent 60%);
}

/* Layout */
.content {
  position: relative;
  z-index: 1;
}

.full-viewport {
  min-height: 100svh;
  display: grid;
  align-items: center;
}

.section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-head h2 {
  font-size: var(--fs-800);
  margin: 0 0 6px 0;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-body .eyebrow {
  color: var(--accent-200);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.headline {
  font-size: var(--fs-900);
  line-height: 1.04;
  margin: 8px 0 12px 0;
}

.subhead {
  font-size: var(--fs-600);
  color: var(--muted);
  max-width: 60ch;
}

.cta-row {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.hero-media {
  height: min(60vh, 520px);
  border-radius: var(--radius);
  background: radial-gradient(120% 140% at 0% 0%, var(--accent-400) 0%, transparent 55%),
    radial-gradient(140% 120% at 100% 100%, var(--accent) 0%, transparent 55%),
    conic-gradient(
      from 180deg at 50% 50%,
      color-mix(in oklab, var(--accent), white 40%),
      color-mix(in oklab, var(--accent-700), black 10%),
      color-mix(in oklab, var(--accent-400), white 20%),
      color-mix(in oklab, var(--accent), black 5%)
    );
  filter: saturate(110%) blur(0.2px);
  box-shadow: var(--shadow);
}

/* Buttons */
.btn {
  display: inline-block;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  transition:
    transform 0.08s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
  will-change: transform;
}

.btn.primary {
  background: color-mix(in hsl, var(--accent), transparent 10%);
  color: white;
  border-color: color-mix(in hsl, var(--accent), black 10%);
  box-shadow: 0 6px 18px color-mix(in hsl, var(--accent), transparent 65%);
}

.btn.primary:hover {
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
  color: var(--text);
}

.btn.ghost:hover {
  border-color: color-mix(in hsl, var(--text), transparent 70%);
}

/* Grid and cards */
.grid.projects {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(12, 1fr);
}

.card {
  grid-column: span 6;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: clip;
  box-shadow: var(--shadow-soft);
  position: relative;
}

.card-media {
  aspect-ratio: 16 / 9;
  background: #111;
  background-image: var(--img);
  background-size: cover;
  background-position: center;
}

.card-body {
  padding: 14px 14px 18px 14px;
}

.card h3 {
  margin: 6px 0 4px 0;
  font-size: var(--fs-700);
}

.card p {
  margin: 0;
  color: var(--muted);
}

.tags {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.tags span {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  color: var(--muted);
}

.card-link {
  position: absolute;
  inset: 0;
  text-indent: -9999px;
}

/* Posts */
.list.posts {
  list-style: none;
  padding: 0;
  margin: 18px 0 0 0;
}

.post-item + .post-item {
  border-top: 1px solid var(--border);
}

.post-link {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 16px 0;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.post-link:hover .post-title {
  color: var(--accent-200);
}

.post-title {
  font-size: var(--fs-600);
}

.post-meta {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* About */
.about.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Contact */
.contact {
  max-width: 640px;
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

label {
  font-size: 14px;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
}

input:focus,
textarea:focus {
  outline: 2px solid color-mix(in hsl, var(--accent), transparent 65%);
  outline-offset: 1px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
}

.small-link {
  color: inherit;
  text-decoration: none;
}

.small-link:hover {
  color: var(--text);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .grid.projects .card {
    grid-column: span 12;
  }

  .about.two-col {
    grid-template-columns: 1fr;
  }
}

/* Utilities */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
}
