/* ============================================
   CUSTOM PROPERTIES
   ============================================ */
:root {
  --bg:      #110A07;
  --surface: #2B1410;
  --text:    #FFFFFF;
  --accent:  #A78BDA;
  --hot:     #C4AAEF;
  --deep:    #1A0C09;

  --f-display: 'Fraunces', serif;
  --f-accent:  'Cormorant Garamond', serif;
  --f-body:    'Space Grotesk', sans-serif;

  --ease-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

/* ============================================
   RESET
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  overflow-x: hidden;
  cursor: none;
}

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

/* ============================================
   NOISE
   ============================================ */
.noise {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 300px 300px;
  animation: noise-anim 0.4s steps(2) infinite;
}
@keyframes noise-anim {
  0%   { background-position: 0 0; }
  25%  { background-position: -6% -4%; }
  50%  { background-position: 4% 2%; }
  75%  { background-position: -2% 6%; }
  100% { background-position: 5% -3%; }
}

/* ============================================
   BLOB
   ============================================ */
.blob {
  position: fixed;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,74,31,0.2) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  will-change: left, top;
}

/* ============================================
   CURSOR
   ============================================ */
/* Wavy-circle SVG shared by cursor + O glyph */
.cursor-wave {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 10001;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%) scale(1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Ccircle cx='22' cy='22' r='19' fill='none' stroke='%23A78BDA' stroke-width='3'/%3E%3Ccircle cx='22' cy='22' r='13' fill='none' stroke='%23A78BDA' stroke-width='1.6' opacity='0.55'/%3E%3Ccircle cx='22' cy='22' r='6' fill='none' stroke='%23A78BDA' stroke-width='1.6' opacity='0.25'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  will-change: left, top, transform;
  transition: transform 0.35s var(--ease-expo), opacity 0.3s;
}

body.cur-hover .cursor-wave { transform: translate(-50%, -50%) scale(1.35); }
body.cur-btn   .cursor-wave { transform: translate(-50%, -50%) scale(1.7); opacity: 0.5; }

/* MARGOT first name — purple */
#hero-line-1 .char { color: var(--accent); }

/* O glyph — inline SVG with animated rings */
#hero-line-1 .char-o {
  color: transparent;
  position: relative;
}
.o-svg {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  aspect-ratio: 1;
  pointer-events: none;
  overflow: visible;
}
.o-ring--mid {
  /* 60% arc of circumference (2π×13 ≈ 81.7) */
  stroke-dasharray: 49 32.7;
  animation: o-cw 5s linear infinite;
}
.o-ring--inner {
  /* 50% arc of circumference (2π×6 ≈ 37.7) */
  stroke-dasharray: 18.85 18.85;
  animation: o-ccw 3.2s linear infinite;
}
@keyframes o-cw  {
  from { stroke-dashoffset: 81.7; }
  to   { stroke-dashoffset: 0; }
}
@keyframes o-ccw {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: 37.7; }
}

/* ============================================
   LOADER
   ============================================ */
.loader { position: fixed; inset: 0; z-index: 9998; }
.loader-bg { position: absolute; inset: 0; background: var(--accent); }
.loader-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.loader-name {
  font-family: var(--f-display);
  font-size: clamp(2rem, 8vw, 7rem);
  font-weight: 900;
  font-optical-sizing: auto;
  color: var(--text);
  letter-spacing: -0.02em;
  display: block;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem 3rem;
  opacity: 0;
}

.nav-logo {
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 700;
  font-optical-sizing: auto;
  color: var(--text);
  letter-spacing: -0.01em;
  transition: color .3s;
}
.nav-logo:hover { color: var(--accent); }
.nav-at {
  color: var(--text);
  font-weight: 400;
  font-size: 0.82em;
}

.nav-links { display: flex; gap: 2.5rem; }

.nav-link {
  font-family: var(--f-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  position: relative;
  padding-bottom: 3px;
  transition: color .3s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width .4s var(--ease-expo);
}
.nav-link:hover { color: var(--hot); }
.nav-link:hover::after { width: 100%; }

/* Nav hamburger (mobile only — hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  cursor: none;
  flex-shrink: 0;
  position: relative;
  z-index: 101;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transform-origin: center;
  transition: transform 0.4s var(--ease-expo), opacity 0.3s;
}
.nav.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6.5rem 3rem 3rem;
  overflow: hidden;
}

/* ---- Puzzle bg: rounder cubic-bezier puzzle tabs ---- */
.puzzle-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* Horizontal line: round dome tab going UP. Vertical: round dome tab going RIGHT */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cpath d='M0 100 C22 100 42 68 80 68 C118 68 138 132 160 132 C182 132 194 100 200 100' fill='none' stroke='%23A78BDA' stroke-width='1.3' stroke-linecap='round'/%3E%3Cpath d='M100 0 C100 22 68 42 68 80 C68 118 132 138 132 160 C132 182 100 194 100 200' fill='none' stroke='%23A78BDA' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  -webkit-mask-image: radial-gradient(circle 320px at var(--cx, -999px) var(--cy, -999px), rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
  mask-image: radial-gradient(circle 320px at var(--cx, -999px) var(--cy, -999px), rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
}

/* ---- Subtle door outline hint in the puzzle (revealed by spotlight) ---- */
.puzzle-door-hint {
  position: absolute;
  top: 54%;
  left: 67%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 62px;
  border: 1px solid rgba(167, 139, 218, 0.09);
  border-radius: 2px 2px 0 0;
  pointer-events: none;
  z-index: 2;
}
.puzzle-door-hint::after {
  content: '';
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: 1px solid rgba(201, 74, 31, 0.12);
}

/* ---- Secret door button ---- */
.secret-btn {
  position: absolute;
  top: 54%;
  left: 67%;
  width: 44px;
  height: 64px;
  border-radius: 2px 2px 0 0;
  border: 1.5px solid transparent;
  background: transparent;
  cursor: none;
  z-index: 5;
  opacity: 0;
  transform: translate(-50%, -50%);
  outline: none;
}
/* Door knob */
.secret-btn::after {
  content: '';
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  color: inherit;
}

/* ---- Name: full-width column-aligned ---- */
.hero-name {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-bottom: 0;
}

.hero-line {
  display: flex;
  width: 100%;
}

/* Each char gets equal share of the line — column alignment */
.hero-line .char {
  flex: 1;
  text-align: center;
  display: block;
  font-family: var(--f-display);
  font-size: clamp(3.5rem, 14.5vw, 20rem);
  font-weight: 900;
  font-optical-sizing: auto;
  line-height: 0.86;
  color: var(--text);
  will-change: transform, opacity;
  letter-spacing: 0; /* spacing handled by equal flex cells */
}

/* ---- Meta row: tiles + bio side by side ---- */
.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem 0 0.5rem;
  opacity: 0;
}

.hero-handle-wrap {
  display: flex;
  align-items: baseline;
  gap: 0;
}

.handle-at {
  font-family: var(--f-display);
  font-size: clamp(1rem, 2.1vw, 2.1rem);
  font-weight: 400;
  font-optical-sizing: auto;
  color: var(--text);
  opacity: 0.35;
  line-height: 1;
}

.handle-word {
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 3.5vw, 3.5rem);
  font-weight: 900;
  font-optical-sizing: auto;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
}

.hero-bio-right {
  text-align: right;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hero-role {
  font-family: var(--f-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
}

.hero-bio-text {
  font-family: var(--f-accent);
  font-style: italic;
  font-size: clamp(0.82rem, 1vw, 1rem);
  line-height: 1.65;
  color: var(--text);
  opacity: 0.65;
  white-space: normal;
}

/* ---- Puzzle tiles ---- */
.hero-tiles-wrap {
  padding-bottom: 0.5rem;
}

.tiles-eyebrow {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.75;
  margin-bottom: 0.9rem;
}

.tiles-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.tile {
  position: relative;
  overflow: hidden;
  border: 1.5px solid var(--accent);
  cursor: none;
  will-change: transform;
}

.tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-expo);
  z-index: 0;
}
.tile:hover::before { transform: scaleX(1); }

.tile-inner {
  display: block;
  padding: 0.55rem 1.2rem;
  font-family: var(--f-display);
  font-weight: 900;
  font-optical-sizing: auto;
  font-size: clamp(1rem, 2vw, 1.75rem);
  color: var(--text);
  letter-spacing: 0.06em;
  position: relative;
  z-index: 1;
}

.tile-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.45;
  flex-shrink: 0;
}

/* ---- Scroll hint ---- */
.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  opacity: 0;
}
.hero-scroll-hint span {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  writing-mode: vertical-rl;
}
.scroll-line {
  width: 1px;
  height: 55px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-pulse 2.2s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50%       { transform: scaleY(0.35); opacity: 0.25; }
}

/* ============================================
   ABOUT
   ============================================ */
.about {
  position: relative;
  padding: 8rem 3rem 10rem;
  background: var(--surface);
  overflow: hidden;
}

.about-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 5rem;
  align-items: start;
  max-width: 1400px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--f-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 2.5rem;
}

.about-body { display: flex; flex-direction: column; gap: 1.8rem; }

.about-p {
  font-family: var(--f-body);
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  line-height: 1.78;
  color: var(--text);
}
.about-p em {
  font-family: var(--f-accent);
  font-style: italic;
  font-size: 1.15em;
  color: var(--hot);
}

.about-image-wrap {
  position: sticky;
  top: 8rem;
}

.about-image {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  clip-path: inset(100% 0 0 0);
}

.about-image-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, var(--accent) 0%, #8B2D0E 40%, #3D1510 100%);
  transform: scale(1.08);
  transition: transform 0.8s var(--ease-expo);
}
.about-image:hover .about-image-inner { transform: scale(1.0); }

.about-image-label {
  position: absolute;
  bottom: 1.1rem;
  left: 1.1rem;
  font-family: var(--f-body);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.45;
}

.about-pullquote {
  max-width: 900px;
  margin: 7rem auto 0;
}

.pullquote {
  font-family: var(--f-display);
  font-style: normal;
  font-weight: 700;
  font-optical-sizing: auto;
  font-size: clamp(1.15rem, 1.7vw, 1.55rem);
  line-height: 1.65;
  color: var(--text);
  opacity: 0;
  text-align: left;
}

.pullquote em {
  font-family: inherit;
  font-style: normal;
  font-size: inherit;
  color: inherit;
  font-weight: inherit;
}

.pullquote-drop {
  float: left;
  font-family: var(--f-display);
  font-weight: 900;
  font-optical-sizing: auto;
  font-size: clamp(4.4rem, 8.2vw, 7.8rem);
  line-height: 0.82;
  color: var(--text);
  margin-right: 0.1em;
  margin-top: 0.05em;
}

/* ============================================
   WORK
   ============================================ */
.work {
  padding: 9rem 3rem 10rem;
  background: var(--bg);
}

.work-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 4rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.work-title {
  font-family: var(--f-display);
  font-size: clamp(3.5rem, 8vw, 9rem);
  font-weight: 900;
  font-optical-sizing: auto;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 0.9;
}
.work-title em { font-style: italic; color: var(--text); }

/* Filter tabs */
.work-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: var(--f-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  border: 1px solid rgba(237,213,176,0.2);
  padding: 0.4rem 0.9rem;
  cursor: none;
  position: relative;
  overflow: hidden;
  transition: color .3s, border-color .3s;
}

.filter-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease-expo);
  z-index: 0;
}

.filter-btn.is-active::before { transform: scaleX(1); }
.filter-btn.is-active { border-color: var(--accent); color: var(--text); }
.filter-btn:not(.is-active):hover { border-color: rgba(167,139,218,0.5); color: var(--hot); }

.filter-btn span,
.filter-btn { position: relative; z-index: 1; }

/* Asymmetric project grid */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Card 1: wide (2-col) */
.work-grid .project-card:nth-child(1) {
  grid-column: span 2;
}
.work-grid .project-card:nth-child(1) .project-image {
  aspect-ratio: 16 / 9;
}

/* Card 4: wide (2-col) */
.work-grid .project-card.project-card--wide {
  grid-column: span 2;
}
.work-grid .project-card.project-card--wide .project-image {
  aspect-ratio: 16 / 9;
}

.project-card {
  cursor: none;
  will-change: transform;
  transition: opacity .4s ease, filter .4s ease;
}

.project-card.is-filtered {
  opacity: 0.12;
  filter: saturate(0);
  pointer-events: none;
}

.project-image {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--img-bg, var(--surface));
  clip-path: inset(0 0 100% 0);
  position: relative;
}

.project-img-inner {
  width: 100%;
  height: 100%;
  background: var(--img-bg, var(--surface));
  transform: scale(1.1);
  transition: transform 0.9s var(--ease-expo);
}
.project-card:hover .project-img-inner { transform: scale(1.03); }

/* Hover overlay */
.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17,10,7,0.95) 0%, rgba(17,10,7,0.4) 60%, transparent 100%);
  display: flex;
  align-items: flex-end;
  padding: 1.75rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s var(--ease-expo), transform .4s var(--ease-expo);
}
.project-card:hover .project-overlay {
  opacity: 1;
  transform: translateY(0);
}

.overlay-content { display: flex; flex-direction: column; gap: 0.3rem; }

.overlay-cat {
  font-family: var(--f-body);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
}

.overlay-title {
  font-family: var(--f-display);
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-weight: 900;
  font-optical-sizing: auto;
  color: var(--text);
  line-height: 1;
}

.overlay-cta {
  font-family: var(--f-body);
  font-size: 0.78rem;
  color: var(--text);
  letter-spacing: 0.08em;
  margin-top: 0.3rem;
}

.project-info {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1rem 0;
}

.project-num {
  font-family: var(--f-body);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--text);
  padding-top: 0.3rem;
  font-weight: 600;
}

.project-title {
  font-family: var(--f-display);
  font-size: 1.35rem;
  font-weight: 700;
  font-optical-sizing: auto;
  color: var(--text);
  margin-bottom: 0.2rem;
  transition: color .3s;
}
.project-card:hover .project-title { color: var(--hot); }

.project-cat {
  font-family: var(--f-body);
  font-size: 0.72rem;
  color: var(--text);
  opacity: 0.38;
  letter-spacing: 0.06em;
}

/* ============================================
   MARQUEE
   ============================================ */
.marquee-section { overflow: hidden; }

.marquee-track {
  overflow: hidden;
  padding: 1rem 0;
  background: var(--accent);
}
.marquee-track-2 {
  background: var(--deep);
  padding: 0.85rem 0;
}

.marquee-inner {
  display: flex;
  white-space: nowrap;
  width: max-content;
}

.marquee-inner span {
  font-family: var(--f-display);
  font-size: clamp(1.1rem, 2.2vw, 2rem);
  font-weight: 900;
  font-optical-sizing: auto;
  letter-spacing: 0.04em;
}
.marquee-track   .marquee-inner span { color: var(--bg); }
.marquee-track-2 .marquee-inner span { color: var(--accent); }

.marquee-fwd { animation: mq-left 18s linear infinite; }
.marquee-bwd { animation: mq-right 24s linear infinite; }

@keyframes mq-left  { from { transform: translateX(0); } to { transform: translateX(-33.333%); } }
@keyframes mq-right { from { transform: translateX(-33.333%); } to { transform: translateX(0); } }

/* ============================================
   RESUME
   ============================================ */
.resume-section {
  padding: 12rem 3rem;
  text-align: center;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
.resume-section::before {
  content: 'CV';
  position: absolute;
  font-family: var(--f-display);
  font-size: clamp(12rem, 32vw, 34rem);
  font-weight: 900;
  font-optical-sizing: auto;
  color: var(--accent);
  opacity: 0.04;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.resume-title {
  font-family: var(--f-display);
  font-size: clamp(2.8rem, 6.5vw, 7.5rem);
  font-weight: 900;
  font-optical-sizing: auto;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 0.9;
  margin-bottom: 1.5rem;
}

.resume-sub {
  font-family: var(--f-accent);
  font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.6rem);
  color: var(--text);
  opacity: 0.5;
  margin-bottom: 4rem;
}

.resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 3rem;
  background: var(--accent);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 100px;
  position: relative;
  overflow: hidden;
  will-change: transform;
}
.resume-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hot);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .55s var(--ease-expo);
}
.resume-btn:hover::before { transform: scaleX(1); }
.btn-text, .btn-icon { position: relative; z-index: 1; }
.btn-icon {
  display: inline-block;
  transition: transform .4s var(--ease-expo);
}
.resume-btn:hover .btn-icon { transform: translateY(4px); }

/* ============================================
   ABOUT BADGES
   ============================================ */
.about-badges {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.scad-amp-badge {
  height: 192px;
  width: auto;
  opacity: 0.9;
}

.resume-link {
  font-family: var(--f-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.5;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 2px;
  transition: opacity .3s, border-color .3s;
}
.resume-link:hover { opacity: 1; border-color: var(--accent); }

/* ============================================
   RECOMMENDATIONS
   ============================================ */
.rec-section {
  padding: 6rem 3rem 10rem;
  max-width: 1400px;
  margin: 0 auto;
}
.rec-inner { max-width: 900px; margin: 0 auto; }

.rec-grid {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.rec-card {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid rgba(167,139,218,0.15);
  padding: 2rem;
  transition: border-color .3s, transform .4s var(--ease-expo);
  cursor: none;
}
.rec-card:hover {
  border-color: rgba(167,139,218,0.5);
  transform: translateY(-4px);
}

.rec-preview {
  flex-shrink: 0;
  width: 180px;
  overflow: hidden;
  border: 1px solid rgba(167,139,218,0.1);
}
.rec-preview img {
  width: 100%;
  display: block;
  transition: transform .6s var(--ease-expo);
}
.rec-card:hover .rec-preview img { transform: scale(1.03); }

.rec-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.3rem;
}
.rec-name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.3;
}
.rec-org {
  font-family: var(--f-body);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--text);
  opacity: 0.55;
}
.rec-cta {
  margin-top: auto;
  font-family: var(--f-body);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
  padding: 12rem 3rem 6rem;
  background: var(--bg);
  overflow: hidden;
}

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

.contact-title {
  font-family: var(--f-display);
  font-size: clamp(4rem, 11vw, 13rem);
  font-weight: 900;
  font-optical-sizing: auto;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 0.87;
  margin-bottom: 5rem;
}
.contact-title em { font-style: italic; color: var(--text); }

.contact-email-wrap { margin-bottom: 3rem; }

.contact-email {
  font-family: var(--f-display);
  font-size: clamp(1rem, 2.2vw, 2rem);
  font-weight: 600;
  font-optical-sizing: auto;
  color: var(--text);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.4rem;
  display: inline-block;
  transition: color .3s;
  letter-spacing: -0.01em;
}
.contact-email:hover { color: var(--hot); }

.contact-socials { display: flex; gap: 3rem; }

.social-link {
  font-family: var(--f-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.38;
  position: relative;
  padding-bottom: 3px;
  transition: opacity .3s, color .3s;
}
.social-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--hot);
  transition: width .4s var(--ease-expo);
}
.social-link:hover { opacity: 1; color: var(--hot); }
.social-link:hover::after { width: 100%; }

.contact-footer {
  max-width: 1400px;
  margin: 8rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(237,213,176,0.07);
  padding-top: 1.75rem;
  font-family: var(--f-body);
  font-size: 0.72rem;
  color: var(--text);
  opacity: 0.28;
}

/* ============================================
   PUZZLE ROOM
   ============================================ */
.puzzle-room {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: #0A0504;
  display: none;
  clip-path: circle(0px at 67% 54%);
  overflow: hidden;
}

.room-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
  animation: noise-anim 0.4s steps(2) infinite;
}

.room-back {
  position: absolute;
  top: 2rem;
  left: 3rem;
  font-family: var(--f-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.35;
  background: none;
  border: none;
  cursor: none;
  z-index: 10;
  transition: opacity 0.3s;
  padding: 0;
}
.room-back:hover { opacity: 1; }

.room-header {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
  pointer-events: none;
}

.room-eyebrow {
  font-family: var(--f-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.7;
  margin-bottom: 0.75rem;
}

.room-prompt {
  font-family: var(--f-display);
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 900;
  font-optical-sizing: auto;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 1rem;
}

.room-hint {
  font-family: var(--f-accent);
  font-style: italic;
  font-size: 1rem;
  color: var(--text);
  opacity: 0.35;
}

/* Floating word tiles */
.puzzle-word {
  position: absolute;
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3vw, 2.8rem);
  font-weight: 900;
  font-optical-sizing: auto;
  color: var(--text);
  letter-spacing: -0.02em;
  border: 1.5px solid rgba(201, 74, 31, 0.3);
  padding: 0.6rem 1.4rem;
  cursor: none;
  z-index: 5;
  transition: border-color 0.3s, color 0.3s;
  will-change: transform;
  opacity: 0;
}

#pw-made  { top: 18%; left: 12%; }
#pw-by    { top: 22%; right: 14%; }
#pw-hand  { bottom: 25%; left: 20%; }
#pw-bold  { top: 55%; right: 10%; }
#pw-found { bottom: 35%; right: 30%; }

.puzzle-word:hover       { border-color: rgba(167,139,218,0.7); color: var(--hot); }
.puzzle-word.is-found    { border-color: var(--accent); color: var(--accent); pointer-events: none; }
.puzzle-word.is-decoy    { opacity: 0.7; }
.puzzle-word.is-wrong    { border-color: rgba(255,100,100,0.5); }

/* Progress dots */
.room-progress {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
  z-index: 10;
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(201, 74, 31, 0.35);
  transition: background 0.4s, border-color 0.4s, transform 0.4s;
}

.progress-dot.is-lit {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.3);
}

/* Solved state */
.room-solved {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  z-index: 8;
  opacity: 0;
  pointer-events: none;
  max-width: 680px;
  margin: auto;
}

.room-solved.is-visible {
  pointer-events: all;
}

.solved-phrase {
  font-family: var(--f-display);
  font-size: clamp(3rem, 8vw, 8rem);
  font-weight: 900;
  font-optical-sizing: auto;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 1rem;
}

.solved-sub {
  font-family: var(--f-accent);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  color: var(--text);
  opacity: 0.55;
  margin-bottom: 2.5rem;
}

.solved-divider {
  width: 3rem;
  height: 1px;
  background: var(--accent);
  margin: 0 auto 2.5rem;
}

.solved-reveal {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}

.solved-reveal p {
  font-family: var(--f-body);
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  line-height: 1.82;
  color: var(--text);
  opacity: 0.72;
  text-align: left;
}

.solved-reveal p em {
  font-family: var(--f-accent);
  font-style: italic;
  color: var(--hot);
  opacity: 1;
  font-size: 1.1em;
}

.solved-sign {
  font-family: var(--f-accent);
  font-style: italic;
  font-size: 1rem;
  color: var(--text);
  opacity: 0.4;
  border-top: 1px solid rgba(237,213,176,0.08);
  padding-top: 1.5rem;
  width: 100%;
  text-align: center;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar          { width: 3px; }
::-webkit-scrollbar-track    { background: var(--bg); }
::-webkit-scrollbar-thumb    { background: var(--accent); border-radius: 2px; }

/* ============================================
   MOBILE
   ============================================ */

/* ---- Tablet (2-col grid) ---- */
@media (max-width: 1024px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid .project-card:nth-child(1),
  .work-grid .project-card.project-card--wide { grid-column: span 2; }
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
  body { cursor: auto; }
  .cursor-wave, .blob { display: none; }
  .noise { opacity: 0.02; }

  /* ---- Nav ---- */
  .nav { padding: 1.25rem 1.5rem; }
  .nav-toggle { display: flex; cursor: pointer; }

  /* Full-screen overlay nav */
  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    background: rgba(10, 5, 4, 0.97);
    backdrop-filter: blur(16px);
    z-index: 99;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.6s var(--ease-expo), opacity 0.45s;
    pointer-events: none;
  }
  .nav.nav-open .nav-links {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav-links .nav-link {
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    opacity: 1;
  }
  .nav-links .nav-link::after { display: none; }

  /* ---- Hero ---- */
  .hero { padding: 5.5rem 1.5rem 2.5rem; min-height: 100svh; }
  .hero-meta { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .hero-bio-right { text-align: left; max-width: 100%; }
  .tiles-row { flex-wrap: wrap; gap: 0.5rem; }
  .tile-inner { font-size: 0.95rem; padding: 0.45rem 0.9rem; }

  /* ---- About ---- */
  .about { padding: 5rem 1.5rem 6rem; }
  .about-inner { grid-template-columns: 1fr; gap: 3rem; }
  .about-image-wrap { position: relative; top: auto; }
  .about-image { aspect-ratio: 4 / 3; }
  .about-pullquote { margin-top: 4rem; }
  .pullquote { font-size: 1rem; }

  /* ---- Work ---- */
  .work { padding: 5rem 1.5rem 6rem; }
  .work-header { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .work-filters { flex-wrap: wrap; gap: 0.4rem; }
  .work-grid { grid-template-columns: 1fr; gap: 2rem; }
  .work-grid .project-card:nth-child(1),
  .work-grid .project-card.project-card--wide { grid-column: span 1; }
  .work-grid .project-card:nth-child(1) .project-image,
  .work-grid .project-card.project-card--wide .project-image { aspect-ratio: 4 / 3; }
  /* Always show overlay text on mobile (no hover) */
  .project-overlay { opacity: 1; transform: translateY(0); }

  .about-badges { gap: 1.5rem; }
  .scad-amp-badge { height: 120px; }

  /* ---- Recommendations ---- */
  .rec-section { padding: 4rem 1.5rem 6rem; }
  .rec-card { flex-direction: column; gap: 1.5rem; }
  .rec-preview { width: 100%; max-width: 280px; }

  /* ---- Contact ---- */
  .contact { padding: 7rem 1.5rem 4rem; }
  .contact-socials { flex-direction: column; gap: 1.25rem; }
  .contact-footer { flex-direction: column; gap: 1rem; text-align: center; }

  /* ---- Puzzle room ---- */
  .room-prompt { font-size: clamp(1.8rem, 7vw, 3rem); }
  .puzzle-word { font-size: clamp(1.1rem, 4vw, 1.8rem); padding: 0.5rem 1rem; }
  #pw-made  { top: 12%; left: 6%; }
  #pw-by    { top: 18%; right: 6%; }
  #pw-hand  { bottom: 28%; left: 8%; }
  #pw-bold  { top: 58%; right: 5%; }
  #pw-found { bottom: 32%; right: 22%; }
}

/* ---- Small phones ---- */
@media (max-width: 480px) {
  .nav-links .nav-link { font-size: 1.25rem; }
  .hero { padding: 5rem 1.25rem 2rem; }
  .tiles-eyebrow { font-size: 0.72rem; }
  .hero-role { font-size: 0.65rem; letter-spacing: 0.12em; }
  .contact-email { font-size: clamp(0.85rem, 4.5vw, 1.4rem); }
  .about { padding: 4rem 1.25rem 5rem; }
  .work { padding: 4rem 1.25rem 5rem; }
  .rec-section { padding: 4rem 1.25rem 5rem; }
  .contact { padding: 5rem 1.25rem 3rem; }
  .filter-btn { font-size: 0.65rem; padding: 0.35rem 0.75rem; }
}
