/* =========================
   THEME TOKENS
   ========================= */
:root {
  --bg: #000000;
  --bg-accent: #050506;
  --txt: #f9fafb;
  --muted: #9ca3af;

  --card: rgba(10, 10, 11, 0.96);
  --border: rgba(239, 68, 68, 0.35);

  --brand: #ef4444;      /* main red */
  --brand-soft: #f97373; /* lighter red accent */

  --shadow-soft: 0 14px 36px rgba(0, 0, 0, 0.7);
  --radius-lg: 18px;
  --radius-md: 12px;

  --fz-base: clamp(15px, 1.4vw, 17px);
  --fz-h1: clamp(36px, 5vw, 56px);
  --fz-h2: clamp(22px, 3vw, 30px);
}

/* Light theme */
:root[data-theme="light"] {
  --bg: #f9fafb;
  --bg-accent: #ffffff;
  --txt: #020617;
  --muted: #6b7280;

  --card: #ffffff;
  --border: rgba(239, 68, 68, 0.35);
  --shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.15);
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font: var(--fz-base)/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial,
    sans-serif;

  /* Pure black / light base with subtle red glows, fixed so it scrolls smoothly */
  background:
    radial-gradient(900px at 15% 0%, rgba(239, 68, 68, 0.14), transparent 70%),
    radial-gradient(900px at 85% 20%, rgba(239, 68, 68, 0.10), transparent 70%),
    radial-gradient(1200px at 50% 130%, rgba(239, 68, 68, 0.08), transparent 75%),
    var(--bg);

  background-attachment: fixed;
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px;
}

/* Sections */
.section {
  padding: 3rem 1rem;
}

.section--alt {
  background: linear-gradient(
      to bottom right,
      color-mix(in srgb, var(--bg-accent) 96%, #000 4%),
      color-mix(in srgb, var(--bg-accent) 92%, #000 8%)
    );
  border-block: 1px solid rgba(31, 41, 55, 0.7);
}

.section__title {
  font-size: var(--fz-h2);
  margin: 0 0 0.75rem;
}

.section__subtitle {
  font-size: 1.05rem;
  margin: 2.25rem 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.lead {
  color: var(--muted);
  max-width: 46rem;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

/* =========================
   HEADER / NAVIGATION
   ========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg-accent) 88%, transparent);
  border-bottom: 1px solid rgba(239, 68, 68, 0.35);
}

.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
}

.brand {
  text-decoration: none;
  color: var(--txt);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.6);
  background: radial-gradient(
      circle at 0 0,
      rgba(239, 68, 68, 0.28),
      transparent 55%
    );
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav__menu {
  list-style: none;
  display: flex;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
}

.nav__menu a,
.theme {
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--txt);
  border: 1px solid transparent;
  background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease,
    color 0.15s ease;
}

.nav__menu a:hover,
.theme:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.5);
}

.nav__menu a.active {
  border-color: rgba(239, 68, 68, 0.9);
  background: rgba(239, 68, 68, 0.2);
}

.pill {
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.85) !important;
}

/* Mobile nav */
.nav__toggle {
  display: none;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.6);
  color: var(--txt);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
}

@media (max-width: 768px) {
  .nav__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav__menu {
    position: absolute;
    top: 62px;
    right: 1rem;
    flex-direction: column;
    align-items: flex-start;
    background: var(--bg-accent);
    border-radius: 16px;
    border: 1px solid rgba(239, 68, 68, 0.6);
    padding: 0.6rem;
    min-width: 180px;
    box-shadow: var(--shadow-soft);
    display: none;
  }

  .nav__menu.open {
    display: flex;
  }
}

/* =========================
   HERO
   ========================= */
.hero {
  padding: 4rem 1rem 3rem;
}

.hero__grid {
  display: grid;
  gap: 2.4rem;
}

@media (min-width: 860px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
    align-items: center;
  }
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  color: var(--brand-soft);
  margin: 0 0 0.5rem;
}

.hero__title {
  font-size: var(--fz-h1);
  margin: 0 0 0.5rem;
}

.hero__tag {
  font-weight: 600;
  color: #fee2e2;
  margin: 0 0 1rem;
}

.hero__blurb {
  margin: 0 0 1.4rem;
  color: var(--muted);
}

.hero__meta {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.92rem;
}

.hero__meta span {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 27, 31, 0.8);
  background: var(--card);
  color: var(--muted);
}

/* Hero photo + chips */
.hero__photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}

.hero__photo img {
  border-radius: var(--radius-lg);
}

/* Rectangular red outline around headshot */
.photo-frame {
  position: relative;
  display: inline-block;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.photo-ring {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(239, 68, 68, 0.75);
  pointer-events: none;
  box-sizing: border-box;
}

.hero__chips {
  display: grid;
  gap: 0.5rem;
  width: 100%;
  max-width: 360px;
}

.chip {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(239, 68, 68, 0.55);
  background: var(--card);
  font-size: 0.86rem;
}

.chip__label {
  font-weight: 600;
}

.chip__value {
  color: var(--muted);
}

/* Hero metrics */
.hero__metrics {
  padding-top: 0.5rem;
}

.metrics__row {
  display: grid;
  gap: 0.6rem;
}

@media (min-width: 720px) {
  .metrics__row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.metric {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px dashed rgba(239, 68, 68, 0.6);
  background: var(--card);
  width: fit-content;
}

.metric span {
  color: #fee2e2;
  font-weight: 700;
  margin-right: 0.4rem;
}

/* =========================
   GRID & CARDS
   ========================= */
.grid {
  display: grid;
  gap: 1rem;
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.1rem 1.05rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

/* red halo on hover */
.card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
    circle at 0 0,
    rgba(239, 68, 68, 0.28),
    transparent 60%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.card:hover::before {
  opacity: 0.45;
}

.project h3 {
  margin: 0 0 0.4rem;
  font-size: 1.08rem;
}

.card__pill {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-soft);
}

.card__pill--outline {
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.75);
}

.card__footer {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

/* Lists & tags */
.bullets {
  margin: 0.2rem 0 0 1.1rem;
  padding: 0;
}

.bullets li {
  margin: 0.1rem 0;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.tag {
  font-size: 0.85rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.6);
  background: var(--card);
}

/* =========================
   LINKS & BUTTONS
   ========================= */
.link {
  color: var(--brand-soft);
  text-decoration: none;
  font-weight: 600;
}

.link:hover {
  text-decoration: underline;
}

.link--inline {
  font-weight: 500;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.05rem;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.55);
  background: var(--card);
  color: var(--txt);
  text-decoration: none;
  font-size: 0.95rem;
  transition: transform 0.08s ease, box-shadow 0.18s ease,
    border-color 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.8);
  border-color: rgba(239, 68, 68, 0.9);
  background: color-mix(in srgb, var(--card) 80%, rgba(239, 68, 68, 0.16) 20%);
}

.btn--primary {
  border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-soft));
  color: #020617;
  font-weight: 700;
  box-shadow: 0 18px 40px rgba(239, 68, 68, 0.55);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

/* =========================
   FOOTER
   ========================= */
.site-footer {
  border-top: 1px solid rgba(239, 68, 68, 0.4);
  background: var(--bg-accent);
  padding: 1rem 1rem 1.4rem;
}

.foot__grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.foot__links {
  display: flex;
  gap: 1rem;
}

.foot__links a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}

.foot__links a:hover {
  color: var(--brand-soft);
}

/* =========================
   ACCESSIBILITY & MOTION
   ========================= */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
