:root {
  --bg: #ece7e2;
  --bg-deep: #ddd5ce;
  --panel: rgba(255, 255, 255, 0.58);
  --panel-strong: rgba(255, 255, 255, 0.74);
  --panel-dark: linear-gradient(180deg, #121116 0%, #0b0a0f 100%);
  --hero-panel:
    radial-gradient(circle at 18% 24%, rgba(153, 104, 255, 0.18), transparent 30%),
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.42), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 244, 239, 0.7));
  --quote-panel:
    radial-gradient(circle at 50% 0%, rgba(153, 104, 255, 0.2), transparent 34%),
    linear-gradient(180deg, #0f0e13 0%, #0a090d 100%);
  --text: #141218;
  --muted: #625a67;
  --line: rgba(20, 18, 24, 0.1);
  --primary: #8a5cff;
  --primary-strong: #6d42db;
  --primary-soft: #eadfff;
  --glow: rgba(138, 92, 255, 0.28);
  --shadow: 0 28px 80px rgba(30, 21, 46, 0.12);
  --shadow-strong: 0 34px 120px rgba(20, 12, 32, 0.18);
  --radius-xl: 36px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 999px;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 2%, rgba(142, 94, 255, 0.26), transparent 18%),
    radial-gradient(circle at 86% 14%, rgba(255, 255, 255, 0.74), transparent 20%),
    linear-gradient(180deg, #ece8ef 0%, #f4efe9 46%, #eae3db 100%);
}

body.modal-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.78), transparent 82%);
  opacity: 0.55;
}

.page-shell {
  width: min(var(--max-width), calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 40px;
}

.site-header,
.site-footer,
.hero-copy,
.about-grid,
.contact-grid,
.project-card,
.service-card,
.timeline-card,
.note-card,
.spotlight-card,
.quote-band,
.canva-shell,
.canva-project-card,
.stack-shell,
.stack-group-card {
  backdrop-filter: blur(16px);
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.44);
  box-shadow: var(--shadow);
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 20;
}

.brand,
.site-nav a,
.button,
.project-trigger,
.contact-links a,
.theme-toggle,
.hero-link-pill,
.stack-chip,
.constellation-chip {
  transition:
    transform 180ms ease,
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.brand {
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.2em;
  font-size: 0.82rem;
  font-weight: 700;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

.site-nav a:hover,
.contact-links a:hover {
  color: var(--primary-strong);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px 0;
  background: var(--text);
  border-radius: 999px;
}

.hero,
.section {
  margin-top: 28px;
}

.hero-marquee {
  overflow: hidden;
  padding: 12px 0;
  border-top: 1px solid rgba(20, 18, 24, 0.08);
  border-bottom: 1px solid rgba(20, 18, 24, 0.08);
}

.hero-marquee-track {
  display: flex;
  width: max-content;
  gap: 30px;
  animation: marqueeFlow 26s linear infinite;
}

.hero-marquee-track span {
  font-size: 0.86rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(320px, 0.68fr);
  gap: 22px;
  align-items: stretch;
}

.hero-copy,
.about-grid,
.contact-grid,
.project-card,
.service-card,
.timeline-card,
.note-card,
.spotlight-card,
.canva-shell,
.canva-project-card,
.stack-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  padding: 34px;
  background: var(--hero-panel);
}

.hero-copy:hover,
.hero-card:hover,
.project-card:hover,
.service-card:hover,
.timeline-card:hover,
.note-card:hover,
.canva-project-card:hover,
.stack-group-card:hover {
  transform: translateY(-2px);
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto -10% -24% auto;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(138, 92, 255, 0.2), transparent 68%);
  filter: blur(10px);
  pointer-events: none;
}

.hero-surface-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(12px);
}

.hero-surface-glow-one {
  width: 220px;
  height: 220px;
  right: -34px;
  top: 32px;
  background: radial-gradient(circle, rgba(138, 92, 255, 0.22), transparent 70%);
}

.hero-surface-glow-two {
  width: 180px;
  height: 180px;
  left: -40px;
  bottom: -30px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.72), transparent 70%);
}

.hero-topline,
.hero-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.hero-identity {
  display: grid;
  gap: 6px;
}

.hero-role-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow,
.section-kicker,
.project-index,
.card-label,
.hero-overline,
.hero-card-kicker {
  margin: 0;
  color: var(--primary-strong);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-overline {
  position: relative;
  z-index: 1;
  margin-top: 22px;
}

.presence-pill,
.hero-sync-pill,
.filter-chip,
.category-badge,
.stack-chip,
.constellation-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(138, 92, 255, 0.16);
  border-radius: 999px;
}

.presence-pill,
.hero-sync-pill {
  background: rgba(255, 255, 255, 0.54);
  color: var(--primary-strong);
}

h1,
h2,
h3,
.card-title {
  margin: 0;
  line-height: 0.92;
}

h1,
h2 {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  letter-spacing: -0.04em;
}

h1 {
  position: relative;
  z-index: 1;
  max-width: 8ch;
  margin-top: 18px;
  font-size: clamp(4.2rem, 11vw, 8.4rem);
}

h2 {
  max-width: 11ch;
  font-size: clamp(2.8rem, 7vw, 5.2rem);
}

h3,
.card-title {
  font-size: 1.38rem;
  line-height: 1.05;
}

.hero-lead-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(250px, 0.82fr);
  gap: 18px;
  align-items: start;
  margin-top: 24px;
}

.hero-text,
.about-grid p,
.project-card p,
.contact-grid p,
.status-list,
.site-footer p,
.stack-group-card p,
.canva-shell-copy p,
.canva-project-card p,
.project-modal-description,
.project-modal-year,
.hero-pulse,
.card-text {
  color: var(--muted);
  line-height: 1.72;
  font-size: 0.99rem;
}

.hero-text {
  margin: 0;
  max-width: 60ch;
}

.hero-intent-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(20, 18, 24, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.hero-pulse {
  margin: 0;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button,
.theme-toggle,
.project-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.94rem;
}

.button:hover,
.theme-toggle:hover,
.brand:hover,
.hero-link-pill:hover,
.project-trigger:hover,
.stack-chip:hover,
.constellation-chip:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: #faf6ff;
  box-shadow: 0 14px 32px rgba(109, 66, 219, 0.22);
}

.button-primary:hover {
  box-shadow: 0 18px 38px rgba(109, 66, 219, 0.28);
}

.button-secondary,
.theme-toggle,
.project-modal-close {
  background: rgba(255, 255, 255, 0.54);
  color: var(--text);
  border-color: var(--line);
}

.hero-link-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.hero-link-pill {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid rgba(20, 18, 24, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.44);
  color: var(--text);
  text-decoration: none;
}

.hero-link-pill span {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-link-pill strong {
  font-size: 0.92rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.hero-tech-ribbon {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tech-ribbon-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(20, 18, 24, 0.05);
  border: 1px solid rgba(20, 18, 24, 0.08);
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-metrics {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.metric-pill {
  display: inline-grid;
  gap: 3px;
  min-width: 160px;
  padding: 15px 16px;
  border: 1px solid rgba(20, 18, 24, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.44);
}

.metric-value {
  font-size: 1.16rem;
  font-weight: 700;
}

.metric-label {
  font-size: 0.84rem;
  color: var(--muted);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  background: var(--panel-dark);
  box-shadow: var(--shadow-strong);
  color: #f4eefb;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -10% auto auto 56%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(138, 92, 255, 0.32), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

.hero-card-kicker {
  position: relative;
  z-index: 1;
  margin-bottom: 16px;
  color: #c7adff;
}

.profile-photo {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.orbital-ring {
  position: absolute;
  border: 1px solid rgba(199, 173, 255, 0.24);
  border-radius: 50%;
  pointer-events: none;
}

.orbital-ring-one {
  width: 220px;
  height: 220px;
  right: -72px;
  top: -54px;
  animation: floatSpin 18s linear infinite;
}

.orbital-ring-two {
  width: 142px;
  height: 142px;
  right: 22px;
  top: 28px;
  animation: floatSpinReverse 13s linear infinite;
}

.hero-card .card-label,
.hero-card .project-index,
.hero-card .hero-sync-pill,
.hero-card .hero-board-card span,
.hero-card .mini-card,
.hero-card .status-list,
.hero-card .card-text {
  position: relative;
  z-index: 1;
}

.hero-card .card-title,
.hero-card strong,
.hero-card li {
  color: #f5f1fb;
}

.hero-card .card-text,
.hero-card .status-list,
.hero-card .hero-board-card span,
.hero-card .mini-card {
  color: #cbbde0;
}

.hero-sync-pill,
.hero-board-card,
.mini-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.hero-board {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.hero-board-card {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
}

.hero-board-card strong {
  font-size: 0.95rem;
  line-height: 1.45;
}

.status-list {
  position: relative;
  z-index: 1;
  margin: 20px 0 0;
  padding-left: 18px;
}

.mini-card-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.mini-card {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}

.section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.section-heading-split {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.52fr);
  align-items: end;
  gap: 20px;
}

.section-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 60ch;
}

.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding: 28px;
  background: var(--panel);
}

.stack-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.82fr);
  gap: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.52);
}

.stack-constellation {
  position: relative;
  overflow: hidden;
  min-height: 460px;
  padding: 28px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 18%, rgba(162, 121, 255, 0.26), transparent 26%),
    radial-gradient(circle at 50% 56%, rgba(162, 121, 255, 0.2), transparent 22%),
    linear-gradient(180deg, #15131b 0%, #0d0c11 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.stack-constellation::before {
  content: "";
  position: absolute;
  inset: auto 10% 8% 10%;
  height: 120px;
  background: radial-gradient(circle at 50% 10%, rgba(162, 121, 255, 0.44), transparent 66%);
  filter: blur(14px);
}

.stack-constellation-core {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(320px, 100%);
  margin: 0 auto 34px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

.stack-constellation-core span {
  color: #c9b4ff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.stack-constellation-core strong {
  color: #f3eefb;
  line-height: 1.4;
  font-size: 1rem;
}

.stack-constellation-grid {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.constellation-chip {
  background: rgba(255, 255, 255, 0.05);
  color: #f5f0fb;
  border-color: rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.constellation-chip.is-mid {
  background: rgba(138, 92, 255, 0.12);
}

.constellation-chip.is-large {
  background: rgba(138, 92, 255, 0.18);
  border-color: rgba(200, 179, 255, 0.2);
}

.stack-groups {
  display: grid;
  gap: 16px;
}

.stack-group-card {
  display: grid;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.56);
}

.stack-pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stack-chip {
  min-height: 36px;
  padding: 0 12px;
  background: rgba(138, 92, 255, 0.08);
  color: var(--text);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stack-chip:hover,
.constellation-chip:hover {
  border-color: rgba(138, 92, 255, 0.28);
  box-shadow: 0 10px 24px rgba(138, 92, 255, 0.14);
}

.service-grid,
.timeline-grid,
.notes-grid,
.canva-grid,
.project-grid {
  display: grid;
  gap: 18px;
}

.service-grid,
.timeline-grid,
.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.notes-grid,
.canva-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.service-card,
.timeline-card,
.note-card,
.canva-project-card,
.project-card,
.spotlight-card,
.canva-shell {
  background: var(--panel);
}

.service-card,
.timeline-card,
.note-card,
.project-card,
.spotlight-card,
.canva-project-card,
.stack-group-card {
  display: grid;
  gap: 14px;
  padding: 24px;
  align-content: start;
}

.service-card,
.timeline-card,
.note-card,
.canva-project-card,
.project-card {
  min-height: 240px;
}

.project-card {
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: auto -30px -70px auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(138, 92, 255, 0.16), transparent 72%);
}

.project-card.is-active {
  border-color: rgba(138, 92, 255, 0.22);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(138, 92, 255, 0.08) inset;
}

.card-topline,
.spotlight-meta,
.spotlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.project-statline,
.spotlight-meta {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.filter-chip,
.category-badge {
  background: rgba(255, 255, 255, 0.54);
  color: var(--text);
  font: inherit;
}

.filter-chip {
  cursor: pointer;
}

.filter-chip.is-active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: #faf6ff;
  border-color: transparent;
}

.spotlight-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin-bottom: 18px;
  padding: 26px;
  background:
    radial-gradient(circle at 82% 18%, rgba(138, 92, 255, 0.14), transparent 18%),
    rgba(255, 255, 255, 0.64);
}

.spotlight-copy {
  display: grid;
  gap: 14px;
}

.project-trigger {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary-strong);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.project-trigger::after {
  content: " →";
}

.canva-shell {
  display: grid;
  gap: 22px;
  padding: 26px;
}

.canva-shell-copy {
  display: grid;
  gap: 10px;
}

.quote-band {
  padding: 46px 30px;
  text-align: center;
  background: var(--quote-panel);
  color: #faf6ff;
  box-shadow: var(--shadow-strong);
}

.quote-band p {
  margin: 0;
  font-family: "Instrument Serif", serif;
  font-size: clamp(2.1rem, 4.6vw, 3.8rem);
  line-height: 1.05;
}

.contact-links {
  display: grid;
  gap: 14px;
  align-content: start;
}

.contact-links a {
  display: grid;
  gap: 5px;
  color: var(--text);
  text-decoration: none;
}

.contact-links span {
  color: var(--muted);
  font-weight: 400;
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.project-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 8, 12, 0.68);
  backdrop-filter: blur(12px);
}

.project-modal-dialog {
  position: relative;
  width: min(700px, 100%);
  display: grid;
  gap: 14px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  background:
    radial-gradient(circle at 86% 10%, rgba(138, 92, 255, 0.2), transparent 20%),
    linear-gradient(180deg, #17151d 0%, #0c0b10 100%);
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.38);
  transform: translateY(10px) scale(0.985);
  transition:
    transform 220ms ease,
    opacity 220ms ease;
  opacity: 0;
}

.project-modal.is-open .project-modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.project-modal-close {
  justify-self: end;
}

.project-modal .project-index,
.project-modal-year,
.project-modal-description,
.project-modal h3 {
  color: #f5eefc;
}

.project-modal-year,
.project-modal-description {
  color: #cfbfdf;
}

.project-modal-link[hidden] {
  display: none;
}

.site-footer {
  margin-top: 28px;
}

.site-footer p {
  margin: 0;
}

.theme-toggle {
  min-width: 126px;
}

.noscript-shell {
  width: min(720px, calc(100% - 32px));
  margin: 48px auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

#hero-heading,
#quote-rotator,
#hero-pulse {
  transition: opacity 180ms ease;
}

#hero-heading.is-swapping,
#quote-rotator.is-swapping,
#hero-pulse.is-swapping {
  opacity: 0.45;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 720ms ease,
    transform 720ms ease;
}

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

.spotlight-flash {
  animation: spotlightPulse 700ms ease;
}

body.mood-night {
  --bg: #0d0c10;
  --bg-deep: #07070a;
  --panel: rgba(18, 17, 24, 0.72);
  --panel-strong: rgba(22, 20, 28, 0.82);
  --hero-panel:
    radial-gradient(circle at 18% 24%, rgba(153, 104, 255, 0.22), transparent 30%),
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.06), transparent 24%),
    linear-gradient(180deg, rgba(19, 18, 24, 0.96), rgba(8, 8, 11, 0.96));
  --quote-panel:
    radial-gradient(circle at 50% 0%, rgba(153, 104, 255, 0.26), transparent 34%),
    linear-gradient(180deg, #13111a 0%, #09080d 100%);
  --text: #f5eefc;
  --muted: #c8bad8;
  --line: rgba(255, 255, 255, 0.09);
  --primary: #a279ff;
  --primary-strong: #c7adff;
  --primary-soft: rgba(162, 121, 255, 0.18);
  --glow: rgba(162, 121, 255, 0.34);
  --shadow: 0 32px 90px rgba(0, 0, 0, 0.34);
  --shadow-strong: 0 40px 140px rgba(0, 0, 0, 0.52);
  background:
    radial-gradient(circle at 18% 2%, rgba(162, 121, 255, 0.18), transparent 18%),
    linear-gradient(180deg, #100f14 0%, #09090c 48%, #050507 100%);
}

body.mood-night::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
}

body.mood-night .site-header,
body.mood-night .site-footer,
body.mood-night .stack-shell,
body.mood-night .about-grid,
body.mood-night .contact-grid,
body.mood-night .project-card,
body.mood-night .service-card,
body.mood-night .timeline-card,
body.mood-night .note-card,
body.mood-night .spotlight-card,
body.mood-night .canva-shell,
body.mood-night .canva-project-card,
body.mood-night .stack-group-card,
body.mood-night .metric-pill,
body.mood-night .hero-link-pill,
body.mood-night .hero-intent-card,
body.mood-night .button-secondary,
body.mood-night .theme-toggle,
body.mood-night .filter-chip,
body.mood-night .category-badge {
  background-color: rgba(18, 17, 24, 0.72);
}

body.mood-night .site-header,
body.mood-night .site-footer {
  background: rgba(10, 10, 14, 0.84);
}

body.mood-night .hero-link-pill,
body.mood-night .hero-intent-card,
body.mood-night .metric-pill,
body.mood-night .tech-ribbon-chip,
body.mood-night .filter-chip,
body.mood-night .category-badge,
body.mood-night .site-nav a,
body.mood-night .nav-toggle {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

body.mood-night .site-nav a:hover,
body.mood-night .button-secondary:hover,
body.mood-night .theme-toggle:hover,
body.mood-night .nav-toggle:hover,
body.mood-night .hero-link-pill:hover {
  background: rgba(255, 255, 255, 0.07);
}

body.mood-night .hero-card {
  border-color: rgba(255, 255, 255, 0.08);
}

body.mood-night .hero-role-line,
body.mood-night .metric-label,
body.mood-night .section-copy,
body.mood-night .contact-links span,
body.mood-night .hero-text,
body.mood-night .about-grid p,
body.mood-night .project-card p,
body.mood-night .contact-grid p,
body.mood-night .status-list,
body.mood-night .stack-group-card p,
body.mood-night .canva-shell-copy p,
body.mood-night .canva-project-card p,
body.mood-night .project-statline,
body.mood-night .spotlight-meta,
body.mood-night .project-modal-year,
body.mood-night .project-modal-description,
body.mood-night .hero-pulse,
body.mood-night .card-text {
  color: var(--muted);
}

body.mood-night .tech-ribbon-chip,
body.mood-night .stack-chip {
  background: rgba(162, 121, 255, 0.1);
  border-color: rgba(162, 121, 255, 0.16);
}

body.mood-night .quote-band {
  box-shadow: var(--shadow-strong);
}

body.mood-night .project-card.is-active {
  border-color: rgba(162, 121, 255, 0.26);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(162, 121, 255, 0.1) inset;
}

body.mood-night .project-modal-backdrop {
  background: rgba(2, 2, 4, 0.76);
}

@media (max-width: 1080px) {
  .hero,
  .stack-shell,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section-heading-split,
  .spotlight-card {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .service-grid,
  .timeline-grid,
  .project-grid,
  .notes-grid,
  .canva-grid {
    grid-template-columns: 1fr;
  }

  .hero-lead-grid,
  .hero-link-row {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 10ch;
    font-size: clamp(3.5rem, 16vw, 6.4rem);
  }

  h2 {
    max-width: 12ch;
  }

  .stack-constellation {
    min-height: 380px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 18px, var(--max-width));
    padding-top: 14px;
  }

  .site-header,
  .site-footer {
    padding: 14px 16px;
  }

  .site-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
  }

  .site-nav {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    gap: 10px;
    padding-top: 10px;
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.34);
  }

  .hero-copy,
  .hero-card,
  .about-grid,
  .contact-grid,
  .service-card,
  .timeline-card,
  .note-card,
  .project-card,
  .spotlight-card,
  .quote-band,
  .canva-shell,
  .canva-project-card,
  .project-modal-dialog,
  .stack-shell,
  .stack-group-card,
  .stack-constellation {
    padding: 20px;
    border-radius: 24px;
  }

  .hero-marquee-track span {
    font-size: 0.76rem;
  }

  .hero-copy::after {
    width: 220px;
    height: 220px;
  }

  .hero-actions {
    display: grid;
  }

  .button,
  .theme-toggle {
    width: 100%;
  }

  .metric-pill {
    width: 100%;
  }

  .hero-tech-ribbon,
  .hero-metrics,
  .stack-pill-grid,
  .stack-constellation-grid {
    gap: 8px;
  }

  .mini-card-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes marqueeFlow {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes floatSpin {
  from {
    transform: rotate(0deg) translateZ(0);
  }

  to {
    transform: rotate(360deg) translateZ(0);
  }
}

@keyframes floatSpinReverse {
  from {
    transform: rotate(360deg) translateZ(0);
  }

  to {
    transform: rotate(0deg) translateZ(0);
  }
}

@keyframes spotlightPulse {
  0% {
    transform: translateY(0);
    box-shadow:
      var(--shadow),
      0 0 0 0 rgba(138, 92, 255, 0.12);
  }

  50% {
    transform: translateY(-2px);
    box-shadow:
      0 30px 90px rgba(27, 18, 39, 0.16),
      0 0 0 12px rgba(138, 92, 255, 0.08);
  }

  100% {
    transform: translateY(0);
    box-shadow:
      var(--shadow),
      0 0 0 0 rgba(138, 92, 255, 0);
  }
}

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

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