/* =========================================================
   Sepia — visual foundation
   Palette: warm ink on cream, copper accents, soft gold glow
   ========================================================= */

/* ---------- Animated backdrop ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.7;
  mix-blend-mode: multiply;
  will-change: transform;
}

.orb-1 {
  width: 55vw;
  height: 55vw;
  left: -15vw;
  top: -15vw;
  background: radial-gradient(circle, #f0b657 0%, transparent 65%);
  animation: drift1 22s ease-in-out infinite alternate;
}

.orb-2 {
  width: 50vw;
  height: 50vw;
  right: -10vw;
  top: 20vh;
  background: radial-gradient(circle, #c85a3a 0%, transparent 65%);
  opacity: 0.45;
  animation: drift2 28s ease-in-out infinite alternate;
}

.orb-3 {
  width: 60vw;
  height: 60vw;
  left: 10vw;
  bottom: -25vw;
  background: radial-gradient(circle, #b46a2a 0%, transparent 65%);
  opacity: 0.55;
  animation: drift3 32s ease-in-out infinite alternate;
}

@keyframes drift1 {
  to {
    transform: translate(8vw, 10vh) scale(1.1);
  }
}
@keyframes drift2 {
  to {
    transform: translate(-10vw, -6vh) scale(1.15);
  }
}
@keyframes drift3 {
  to {
    transform: translate(6vw, -8vh) scale(0.95);
  }
}

.grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle at center,
    rgba(26, 18, 8, 0.18) 1px,
    transparent 1.6px
  );
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse at center, black 35%, transparent 85%);
  -webkit-mask-image: radial-gradient(
    ellipse at center,
    black 35%,
    transparent 85%
  );
  opacity: 0.55;
}

.noise {
  position: absolute;
  inset: -50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12  0 0 0 0 0.08  0 0 0 0 0.03  0 0 0 0.65 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.35;
  mix-blend-mode: multiply;
  animation: grain 1.2s steps(4) infinite;
}

@keyframes grain {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-4%, 2%);
  }
  50% {
    transform: translate(3%, -3%);
  }
  75% {
    transform: translate(-2%, 4%);
  }
  100% {
    transform: translate(2%, -2%);
  }
}

.spotlight {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(240, 182, 87, 0.35) 0%,
    transparent 60%
  );
  left: var(--sx, 50%);
  top: var(--sy, 50%);
  transform: translate(-50%, -50%);
  mix-blend-mode: overlay;
  transition: left 0.15s ease-out, top 0.15s ease-out;
  will-change: left, top;
}

/* ---------- MoonRadar visual (project-media children) ---------- */
.moon {
  position: absolute;
  width: 180px;
  height: 180px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 30%,
    #f6d79b 0%,
    #e0a855 35%,
    #8a5122 75%,
    #3a1f08 100%
  );
  box-shadow: 0 0 80px 10px rgba(240, 182, 87, 0.35),
    inset -20px -10px 50px rgba(0, 0, 0, 0.6);
  z-index: 2;
  animation: moonFloat 7s ease-in-out infinite;
}

.moon::before,
.moon::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
}
.moon::before {
  width: 22px;
  height: 22px;
  top: 30%;
  left: 30%;
  box-shadow: 40px 30px 0 -4px rgba(0, 0, 0, 0.15),
    -10px 50px 0 -6px rgba(0, 0, 0, 0.18),
    60px -10px 0 -8px rgba(0, 0, 0, 0.12);
}
.moon::after {
  width: 14px;
  height: 14px;
  top: 60%;
  left: 55%;
  box-shadow: -30px -20px 0 -2px rgba(0, 0, 0, 0.14);
}

@keyframes moonFloat {
  0%,
  100% {
    transform: translate(-50%, -50%);
  }
  50% {
    transform: translate(-50%, calc(-50% - 8px));
  }
}

.ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  border: 1px solid rgba(240, 182, 87, 0.22);
  transform: translate(-50%, -50%);
  z-index: 1;
}

.ring-a {
  width: 260px;
  height: 260px;
  animation: ringPulse 4s ease-out infinite;
}
.ring-b {
  width: 360px;
  height: 360px;
  animation: ringPulse 4s ease-out infinite 1.3s;
}
.ring-c {
  width: 460px;
  height: 460px;
  animation: ringPulse 4s ease-out infinite 2.6s;
}

@keyframes ringPulse {
  0% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(0.85);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.3);
  }
}

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px 2px rgba(240, 182, 87, 0.8);
  animation: twinkle 3s ease-in-out infinite;
}
.s1 {
  top: 15%;
  left: 20%;
  animation-delay: 0s;
}
.s2 {
  top: 25%;
  right: 18%;
  animation-delay: 0.6s;
}
.s3 {
  bottom: 20%;
  left: 25%;
  animation-delay: 1.1s;
}
.s4 {
  bottom: 30%;
  right: 22%;
  animation-delay: 1.7s;
}
.s5 {
  top: 50%;
  left: 12%;
  animation-delay: 2.2s;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.6);
  }
}

/* ---------- Marquee ---------- */
.marquee {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  overflow: hidden;
  border-top: 1px solid rgba(26, 18, 8, 0.12);
  background: rgba(244, 234, 213, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 10px 0;
  pointer-events: none;
}

.marquee-track {
  display: inline-flex;
  gap: 40px;
  white-space: nowrap;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sepia);
  animation: slide 30s linear infinite;
  padding-left: 40px;
}

.marquee-track span {
  display: inline-block;
}

@keyframes slide {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Hide marquee on small screens */
@media (max-width: 600px) {
  .marquee {
    display: none;
  }
}


:root {
  --cream: #f4ead5;
  --cream-2: #ebdfc3;
  --paper: #f8f1df;
  --ink: #1a1208;
  --ink-2: #2a1d0d;
  --sepia: #5b3a1a;
  --copper: #b46a2a;
  --gold: #d99a3f;
  --amber: #f0b657;
  --rose: #c85a3a;
  --shadow: 0 30px 80px -30px rgba(26, 18, 8, 0.45);
  --radius: 22px;
  --radius-sm: 12px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Fraunces", "Times New Roman", serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  position: relative;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

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

::selection {
  background: var(--ink);
  color: var(--amber);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 56px);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  background: linear-gradient(
    to bottom,
    rgba(244, 234, 213, 0.8),
    rgba(244, 234, 213, 0)
  );
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1;
}

.brand-word {
  display: inline-block;
  line-height: 1;
}

.brand-mark {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: var(--copper);
  display: block;
  animation: spin 22s linear infinite;
  transform-origin: 50% 50%;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.nav-links a {
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.nav-links a:hover {
  opacity: 1;
}

.nav-links .pill {
  opacity: 1;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-links .pill:hover {
  transform: translateY(-1px);
  background: var(--sepia);
}

/* ---------- Layout ---------- */
main {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px);
}

section {
  padding: clamp(56px, 9vh, 112px) 0;
}

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(108px, 15vh, 160px);
  padding-bottom: clamp(48px, 8vh, 88px);
  max-width: 980px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(26, 18, 8, 0.2);
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 4px rgba(200, 90, 58, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(200, 90, 58, 0.18);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(200, 90, 58, 0.06);
  }
}

.headline {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: clamp(42px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 20px 0 22px;
  color: var(--ink);
}

.headline em {
  font-style: italic;
  font-weight: 300;
  background: linear-gradient(
    100deg,
    var(--copper) 0%,
    var(--gold) 45%,
    var(--rose) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 100%;
  animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.lede {
  max-width: 560px;
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.5;
  color: var(--ink-2);
  opacity: 0.88;
  margin: 0 0 28px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.2s ease, background 0.25s ease,
    box-shadow 0.25s ease, color 0.25s ease;
  will-change: transform;
}

.btn .arrow {
  transition: transform 0.25s ease;
}

.btn:hover .arrow {
  transform: translateX(4px);
}

.btn.primary {
  background: var(--ink);
  color: var(--cream);
  box-shadow: var(--shadow);
}

.btn.primary:hover {
  background: var(--sepia);
  transform: translateY(-2px);
}

.btn.ghost {
  border: 1px solid rgba(26, 18, 8, 0.25);
  color: var(--ink);
}

.btn.ghost:hover {
  background: rgba(26, 18, 8, 0.06);
  transform: translateY(-2px);
}

.btn.large {
  padding: 22px 32px;
  font-size: 14px;
}

/* ---------- Section heads ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.label {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sepia);
  opacity: 0.8;
}

.section-head h2 {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: clamp(32px, 5vw, 64px);
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
  flex: 1;
  text-align: right;
  min-width: 280px;
}

/* ---------- Projects ---------- */
.projects {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.project {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: linear-gradient(
    135deg,
    rgba(26, 18, 8, 0.96) 0%,
    rgba(58, 35, 12, 0.96) 100%
  );
  color: var(--cream);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.4s ease;
  isolation: isolate;
}

.project.featured::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mx, 50%) var(--my, 50%),
    rgba(240, 182, 87, 0.18),
    transparent 55%
  );
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s ease;
}

.project:hover {
  transform: translateY(-6px);
  box-shadow: 0 40px 100px -30px rgba(26, 18, 8, 0.6);
}

.project-media {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background: radial-gradient(
      ellipse at 30% 40%,
      rgba(217, 154, 63, 0.18),
      transparent 60%
    ),
    radial-gradient(
      ellipse at 70% 80%,
      rgba(200, 90, 58, 0.14),
      transparent 60%
    ),
    #120a03;
  z-index: 1;
}

.project-body {
  position: relative;
  padding: clamp(28px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  z-index: 1;
}

.project-meta {
  display: flex;
  gap: 8px;
}

.tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--amber);
  color: var(--ink);
  font-weight: 500;
}

.tag.soft {
  background: rgba(244, 234, 213, 0.12);
  color: var(--cream);
  border: 1px solid rgba(244, 234, 213, 0.2);
}

.project-title {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: clamp(40px, 5.5vw, 80px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 24px 0 16px;
  background: linear-gradient(
    180deg,
    var(--cream) 0%,
    var(--amber) 110%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-desc {
  font-size: 18px;
  line-height: 1.55;
  max-width: 44ch;
  color: rgba(244, 234, 213, 0.82);
  margin: 0;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  padding-top: 24px;
  border-top: 1px solid rgba(244, 234, 213, 0.12);
  margin-top: 12px;
}

.project-link .arrow {
  transition: transform 0.25s ease;
}

.project:hover .project-link .arrow {
  transform: translate(4px, -4px);
}

/* ---------- Teaser (Project 02 — classified) ---------- */
.project.teaser {
  background: linear-gradient(
    135deg,
    #0d0803 0%,
    #2a1808 55%,
    #0d0803 100%
  );
  color: var(--cream);
}

.project.teaser::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    500px circle at var(--mx, 50%) var(--my, 50%),
    rgba(200, 90, 58, 0.22),
    transparent 55%
  );
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s ease;
}

.teaser-media {
  background: radial-gradient(
      ellipse at 50% 50%,
      rgba(180, 106, 42, 0.22),
      transparent 70%
    ),
    #0a0502;
  position: relative;
}

.teaser-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(244, 234, 213, 0.04) 0,
    rgba(244, 234, 213, 0.04) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 4;
  mix-blend-mode: overlay;
}

.data-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle at center,
    rgba(240, 182, 87, 0.18) 1px,
    transparent 1.6px
  );
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(
    ellipse at center,
    black 30%,
    transparent 80%
  );
  z-index: 1;
}

.scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 60%;
  top: -20%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(240, 182, 87, 0.12) 45%,
    rgba(240, 182, 87, 0.35) 50%,
    rgba(240, 182, 87, 0.12) 55%,
    transparent 100%
  );
  z-index: 2;
  animation: scan 4.5s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  mix-blend-mode: screen;
}

@keyframes scan {
  0% {
    transform: translateY(-50%);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateY(180%);
    opacity: 0;
  }
}

.diamond {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 140px;
  height: 140px;
  transform: translate(-50%, -50%) rotate(45deg);
  z-index: 3;
  animation: diamondFloat 6s ease-in-out infinite;
}

.diamond-core {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(240, 182, 87, 0.9),
    rgba(180, 106, 42, 0.6),
    rgba(200, 90, 58, 0.9)
  );
  border: 1px solid rgba(244, 234, 213, 0.4);
  box-shadow: 0 0 40px rgba(240, 182, 87, 0.45),
    inset 0 0 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.diamond-core::after {
  content: "";
  position: absolute;
  inset: 14%;
  border: 1px solid rgba(244, 234, 213, 0.25);
}

.diamond-ring {
  position: absolute;
  inset: -24px;
  border: 1px dashed rgba(240, 182, 87, 0.35);
  animation: diamondSpin 14s linear infinite;
}

@keyframes diamondSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes diamondFloat {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(45deg);
  }
  50% {
    transform: translate(-50%, calc(-50% - 6px)) rotate(45deg);
  }
}

.glyphs {
  position: absolute;
  inset: 0;
  z-index: 2;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(240, 182, 87, 0.55);
  pointer-events: none;
}
.glyphs span {
  position: absolute;
  display: inline-block;
  animation: flicker 3.8s ease-in-out infinite;
}
.glyphs span:nth-child(1)  { top: 10%; left: 12%; animation-delay: 0s; }
.glyphs span:nth-child(2)  { top: 18%; right: 14%; animation-delay: 0.3s; }
.glyphs span:nth-child(3)  { top: 30%; left: 8%;  animation-delay: 0.6s; }
.glyphs span:nth-child(4)  { top: 38%; right: 10%; animation-delay: 0.9s; }
.glyphs span:nth-child(5)  { bottom: 38%; left: 18%; animation-delay: 1.2s; }
.glyphs span:nth-child(6)  { bottom: 30%; right: 20%; animation-delay: 1.5s; }
.glyphs span:nth-child(7)  { bottom: 18%; left: 12%; animation-delay: 1.8s; }
.glyphs span:nth-child(8)  { bottom: 10%; right: 14%; animation-delay: 2.1s; }
.glyphs span:nth-child(9)  { top: 50%; left: 4%;  animation-delay: 0.4s; }
.glyphs span:nth-child(10) { top: 50%; right: 4%;  animation-delay: 1.6s; }
.glyphs span:nth-child(11) { top: 6%;  left: 46%;  animation-delay: 2.4s; }
.glyphs span:nth-child(12) { bottom: 6%; left: 46%; animation-delay: 0.7s; }
.glyphs span:nth-child(13) { top: 24%; left: 46%;  animation-delay: 1.9s; }
.glyphs span:nth-child(14) { bottom: 22%; right: 44%; animation-delay: 2.7s; }

@keyframes flicker {
  0%, 100% { opacity: 0.15; transform: translateY(0); }
  45% { opacity: 0.9; }
  55% { opacity: 0.2; }
}

.teaser-label {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(240, 182, 87, 0.35);
  border-radius: 999px;
  background: rgba(10, 5, 2, 0.5);
  backdrop-filter: blur(4px);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}

.blip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px 2px rgba(240, 182, 87, 0.8);
  animation: pulse 1.4s ease-in-out infinite;
}

.tag.glow {
  background: transparent;
  border: 1px solid var(--amber);
  color: var(--amber);
  box-shadow: 0 0 14px rgba(240, 182, 87, 0.3),
    inset 0 0 14px rgba(240, 182, 87, 0.15);
  animation: tagGlow 2.6s ease-in-out infinite;
}

@keyframes tagGlow {
  0%, 100% { box-shadow: 0 0 14px rgba(240, 182, 87, 0.3), inset 0 0 14px rgba(240, 182, 87, 0.15); }
  50%      { box-shadow: 0 0 24px rgba(240, 182, 87, 0.55), inset 0 0 20px rgba(240, 182, 87, 0.25); }
}

/* Scramble title — the live span cycles through random letters,
   while a hidden slug reserves the final text's footprint so the
   card never reflows mid-animation. */
.project.teaser .project-title {
  font-variant-ligatures: none;
  contain: layout;
  -webkit-text-fill-color: initial;
}

.project.teaser .project-title.scramble {
  position: relative;
  display: inline-block;
  vertical-align: top;
}

.scramble-live {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  background: linear-gradient(180deg, var(--cream) 0%, var(--copper) 110%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.scramble-slug {
  visibility: hidden;
  white-space: nowrap;
}

/* Redacted bars inside body copy */
.redact {
  display: inline;
  background: linear-gradient(
    to right,
    rgba(244, 234, 213, 0.85),
    rgba(240, 182, 87, 0.85)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
  filter: blur(0.4px);
}

/* ---------- Principles ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pillar {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(26, 18, 8, 0.1);
  border-radius: var(--radius);
  padding: 32px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.3s ease, background 0.3s ease;
}

.pillar:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.6);
}

.pillar-num {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 300;
  font-size: 32px;
  color: var(--copper);
  letter-spacing: -0.02em;
}

.pillar h4 {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 22px;
  margin: 10px 0 10px;
  letter-spacing: -0.01em;
}

.pillar p {
  margin: 0;
  color: var(--ink-2);
  opacity: 0.85;
  font-size: 16px;
  line-height: 1.55;
}

/* ---------- Contact ---------- */
.contact {
  text-align: center;
}

.contact-inner {
  max-width: 900px;
  margin: 0 auto;
}

.contact h2 {
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 40px;
}

.contact h2 em {
  font-style: italic;
  font-weight: 300;
  background: linear-gradient(
    100deg,
    var(--copper),
    var(--gold),
    var(--rose)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- Footer ---------- */
.foot {
  position: relative;
  z-index: 2;
  padding: 32px clamp(20px, 5vw, 56px) 80px;
  border-top: 1px solid rgba(26, 18, 8, 0.12);
  max-width: var(--max);
  margin: 0 auto;
}

/* Keep the fixed marquee from covering content at the bottom of the page. */
body {
  padding-bottom: 44px;
}

.foot-row {
  display: flex;
  justify-content: space-between;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.hero.reveal {
  transform: translateY(40px);
}

.pillars .pillar.reveal {
  transition-delay: 0.05s;
}
.pillars .pillar:nth-child(2).reveal {
  transition-delay: 0.15s;
}
.pillars .pillar:nth-child(3).reveal {
  transition-delay: 0.25s;
}

.reduced-motion .reveal,
.reduced-motion .reveal.in {
  opacity: 1;
  transform: none;
  transition: none;
}

.reduced-motion .orb,
.reduced-motion .moon,
.reduced-motion .ring,
.reduced-motion .star,
.reduced-motion .brand-mark,
.reduced-motion .headline em,
.reduced-motion .marquee-track,
.reduced-motion .noise {
  animation: none !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-links a:not(.pill) {
    display: none;
  }
  .project {
    grid-template-columns: 1fr;
  }
  .project-media {
    min-height: 320px;
  }
  .section-head h2 {
    text-align: left;
  }
  .pillars {
    grid-template-columns: 1fr;
  }
}
