/* =========================================
   Dark “glass black” theme — single mode
   ========================================= */
:root{
  --bg: 0, 0, 0;
  --fg: 232 236 244;
  --muted: 168 174 190;
  --elev: 20 22 28;
  --border: 50 56 70;
  --primary: 138 147 255;

  --shadow-sm: 0 10px 30px rgba(0,0,0,.28);
  --shadow-md: 0 18px 60px rgba(0,0,0,.42);
}

*{ box-sizing:border-box }
html,body{ height:100%; scroll-behavior:smooth }

/* Remove horizontal scrollbar (modern + fallback) */
html, body { overflow-x: clip; }
@supports not (overflow-x: clip) { html, body { overflow-x: hidden; } }

body{
  margin:0;
  font-family: "Lexend Tera", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: rgb(var(--fg));
  background: rgb(var(--bg));
}

a{ color: rgb(var(--primary)); text-decoration:none }
img{ max-width:100%; display:block }

/* Subtle texture + vignette */
.noise{
  position:fixed; inset:-100px; pointer-events:none; opacity:.05; mix-blend-mode:soft-light;
  background-image: radial-gradient(rgba(255,255,255,.3) 1px, transparent 1px);
  background-size: 3px 3px; z-index:0;
}
.vignette{
  position:fixed; inset:0; pointer-events:none; z-index:0;
  background:
    radial-gradient(1200px 500px at 50% -100px, rgba(255,255,255,.08), transparent 60%),
    radial-gradient(1200px 700px at 50% 120%, rgba(0,0,0,.45), transparent 60%);
}

/* Helpers */
.container{ width:min(1100px, 92vw); margin-inline:auto }
.grid{ display:grid; gap:1.1rem }

/* … keep your existing root/theme/global rules … */

/* Header is hidden by default; shows when body.nav-open is set */
#siteHeader.topbar{
  position: fixed;
  top: 14px; left: 0; right: 0;
  display: grid; place-items: center;
  z-index: 40;
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s ease;
}
body.nav-open #siteHeader.topbar{
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Full-width glass bar with max width */
.nav-shell.nav-v3{
  width:min(1260px, 98vw);
  display:grid; align-items:center;
  grid-template-columns: auto 1fr auto;   /* brand | center nav | right cta/toggle */
  column-gap: 10px;
  background: rgba(18,20,25,.55);
  border: 1px solid rgba(var(--border), .55);
  backdrop-filter: blur(14px) saturate(130%);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: var(--shadow-sm);
}

/* Brand (left) */
.brand.brand-v3{
  justify-self:start;
  display:flex; align-items:center; gap:.6rem; color:inherit;
  padding-left: clamp(14px, 3vw, 36px);   /* nudged in from the edge */
}
.logo-dot{
  width:12px; height:12px; border-radius:50%;
  background: rgb(var(--primary));
  box-shadow:0 0 12px rgba(138,147,255,.6);
}
.brand-text{ font-weight:800; letter-spacing:.3px }

/* Centered nav */
.center-nav{ justify-self:center }
.center-nav ul{
  display:flex; gap:1.8rem; list-style:none; margin:0; padding:0;
}
.center-nav a{
  color:inherit; opacity:.9; font-weight:600;
  padding:8px 10px; border-radius:10px;
}
.center-nav a:hover{ background: rgba(255,255,255,.06); opacity:1 }

/* Right side: CTA + mobile toggle */
.right-side{ display:flex; align-items:center; gap:.6rem; justify-self:end }
.cta-outline{
  display:inline-flex; align-items:center; justify-content:center;
  padding:8px 12px; font-weight:700; letter-spacing:.02em;
  border:1px solid rgba(255,255,255,.28);
  color: rgb(var(--fg));
  border-radius:10px; text-decoration:none;
  background: rgba(255,255,255,.02);
}
.cta-outline:hover{ background: rgba(255,255,255,.06) }

/* Persistent top-left menu button — CSS-only hamburger ↔ X */
#menuToggle{
  position: fixed;
  top: 14px; left: 14px;
  z-index: 100;
  width: 42px; height: 42px;
  display: inline-block;
  border: 0;
  padding: 0;
  border-radius: 10px;
  background: rgba(18,20,25,.78);
  color: rgb(232 236 244);
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
  backdrop-filter: blur(10px) saturate(130%);
  cursor: pointer;
}

/* Hide any inner SVG/content so our pseudo-bars are the only thing visible */
#menuToggle > * { display:none; }

/* Draw the three hamburger bars (center bar via background, top/bottom via pseudos) */
#menuToggle{
  --w: 22px;           /* bar width */
  --h: 2px;            /* bar thickness */
  --gap: 6px;          /* distance from center to top/bottom bars */

  position: fixed;
  background-image: linear-gradient(currentColor, currentColor);  /* middle bar */
  background-repeat: no-repeat;
  background-position: center;
  background-size: var(--w) var(--h);
  transition: background-size .22s ease;
}

#menuToggle::before,
#menuToggle::after{
  content: "";
  position: absolute;
  left: 50%;
  width: var(--w);
  height: var(--h);
  background: currentColor;
  border-radius: 1px;
  transform: translateX(-50%);
  transition: transform .28s ease, top .28s ease, opacity .2s ease;
}
 
/* Top & bottom bars (closed state) */
#menuToggle::before{ top: calc(45% - var(--gap)); }
#menuToggle::after { top: calc(50% + var(--gap)); }

/* Open state → make a perfect X that meets in the center */
#menuToggle.is-open{
  background-size: 0 0; /* hide middle bar */
}
#menuToggle.is-open::before{
  top: 50%;
  transform: translateX(-50%) rotate(45deg);
}
#menuToggle.is-open::after{
  top: 50%;
  transform: translateX(-50%) rotate(-45deg);
}

/* Focus ring */
#menuToggle:focus{ outline: 2px solid rgba(255,255,255,.25); outline-offset: 2px }

/* ===== The rest of your CSS (landing, hero-name, scroll-hint, sections, robot, projects, watermark hiding, etc.) stays as-is ===== */


/* =========================================
   Landing (full-viewport Spline) + name + scroll
   ========================================= */
.landing{
  position: relative;
  min-height: 100dvh;
  display: grid;
  z-index: 1;
}
@supports not (height: 100dvh){
  .landing{ min-height: 100svh; }
}

.spline-full{
  width: 100%;
  height: 100dvh;
  display: block;
  border-radius: 0 !important;
  border-bottom: 0 !important;
  overflow: hidden;
  /* don't trap vertical swipes in the canvas */
  touch-action: pan-y;
}
@supports not (height: 100dvh){
  .spline-full{ height: 100svh; }
}

/* Fade shouldn't swallow clicks */
.fade-bottom{
  position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, #000 70%) !important;
  border-radius: 0 !important;
  pointer-events: none;
}

/* Scroll button on top */
.scroll-hint{
  position: absolute;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: transparent;
  border: 0;
  cursor: pointer;
  color: rgba(255,255,255,.9);
  z-index: 3;
  pointer-events: auto;
  padding: 8px 10px;        /* bigger tap target */
}
.scroll-hint .mouse{
  width: 22px; height: 34px;
  border: 2px solid rgba(255,255,255,.6);
  border-radius: 20px;
  display: inline-flex; align-items: flex-start; justify-content: center;
  padding-top: 5px;
}
.scroll-hint .wheel{
  width: 4px; height: 8px; border-radius: 6px;
  background: rgba(255,255,255,.7);
  animation: wheel 1.8s infinite ease-in-out;
}
.scroll-hint .hint-text{ display:block; text-align:center; font-size:.78rem; opacity:.8; margin-top:.2rem }
@keyframes wheel{ 0%,100%{transform:translateY(0)} 50%{transform:translateY(10px)} }

/* Name overlay — higher, left */
.hero-name{
  position: absolute;
  left: clamp(20px, 6vw, 120px);
  top: 22%;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(36px, 7.8vw, 120px);
  line-height: .95;
  color: #fff;
  text-shadow: 0 6px 40px rgba(0,0,0,.35);
  pointer-events: none;
  z-index: 2;
}

/* Tighter, safer mobile sizing */
@media (max-width: 900px){
  .hero-name{
    left: clamp(16px, 6vw, 40px);
    top: 16%;
    font-size: clamp(28px, 10.5vw, 56px);
    line-height: 1.02;
    max-width: 92vw;               /* prevent overflow */
    word-break: break-word;
    hyphens: auto;
    text-align: left;
  }
}
.hero-name .hero-role{
  display: block;
  font-weight: 800;
  opacity: .98;
  letter-spacing: .005em;
  font-size: .45em;
  line-height: 1.05;
}
@media (max-width: 900px){
  .hero-name .hero-role{ font-size: .52em; }
}


/* About (minimal) – tweakable heading position */
.about-min{
  --about-w: 720px;           /* width of centered text */
  --about-title-offset: -87px;  /* <— change this to move the title */
  padding: 20px 0;
  margin-bottom: 36px;
}

.about-min .section-title{
  font-size: clamp(22px, 4vw, 34px); margin:0 0 12px;
  transform: translateX(var(--about-title-offset));
  margin-bottom: 50px;
}

.about-min p{
  max-width: var(--about-w);
  margin: 8px auto;
  line-height: 1.55;
  color: rgb(var(--fg));
  opacity: .95;
  margin-bottom: 40px;
}

@media (max-width: 900px){
  .about-min{ --about-w: 92vw; --about-title-offset: 0px; }
}


/* =========================================
   Experience
   ========================================= */
.section-title{ font-size: clamp(22px, 4vw, 34px); margin:0 0 12px }
.xp{ padding: 26px 0 28px; position:relative; z-index:1 }
.xp-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:1rem }
.xp-card{
  background: rgba(22,24,30,.75);
  border: 1px solid rgba(var(--border), .8);
  border-radius:16px; padding:18px 16px; box-shadow: var(--shadow-sm);
  color: rgb(var(--fg));
}
.xp-card h3{ margin:.2rem 0 .5rem }
@media (max-width:900px){ .xp-grid{ grid-template-columns:1fr } }

/* All Experiences modal */
/* =========================
   All Experiences — polished cards
   ========================= */
#xpModal .cm-sheet{
  max-width: 960px;
  padding: 18px 18px 16px;
}

/* Reset & layout */
#xpModal .xp-list{
  counter-reset: xpnum;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

/* Card */
#xpModal .xp-item{
  position: relative;
  padding: 14px 14px 12px 60px;          /* room for the number badge */
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(var(--border), .9);
  border-radius: 14px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

/* Number badge (uses the <ol> order) */
#xpModal .xp-item::before{
  counter-increment: xpnum;
  content: counter(xpnum) ".";
  position: absolute;
  left: 18px; top: 14px;
  font-weight: 900;
  opacity: .88;
  font-size: 1.02rem;
}

/* Typo */
#xpModal .xp-item h3{
  margin: 0 0 2px;
  font-size: 1.06rem;
}
#xpModal .xp-item .xp-meta{
  margin: 0 0 8px;
  color: rgb(var(--muted));
}
#xpModal .xp-item .xp-brief{ margin: 0; }

/* Hover lift + subtle accent */
#xpModal .xp-item:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,.075);
  box-shadow: 0 18px 42px rgba(0,0,0,.38);
  border-color: rgba(var(--border), .95);
}

/* Expand/collapse details (keep your interaction) */
#xpModal .xp-item .xp-details{
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  border-top: 1px solid rgba(var(--border), .6);
  margin-top: 0;
  padding-top: 0;
  transition: max-height .25s ease, opacity .2s ease, margin-top .2s ease, padding-top .2s ease;
}
#xpModal .xp-item:hover .xp-details,
#xpModal .xp-item.open .xp-details{
  max-height: 480px;                 /* raise if any description is longer */
  opacity: 1;
  margin-top: 8px;
  padding-top: 8px;
}

/* Touch devices (no hover) – click toggles .open in JS */
@media (hover: none){
  #xpModal .xp-item:hover .xp-details{ max-height:0; opacity:0; margin-top:0; padding-top:0; }
}
/* Make the modal sheet fill the phone and scroll smoothly */
#xpModal .cm-sheet{
  /* keep your existing max-width & padding */
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain; /* don't bubble scroll to page */
}

/* Full-bleed on small screens */
@media (max-width: 900px){
  #xpModal .cm-sheet{
    width: 100vw;
    max-width: 100vw;
    border-radius: 16px;
  }
}

/* Make sure the list has breathing room at the bottom */
#xpModal .xp-list{ padding-bottom: 12px; }

/* Close button = easier to tap */
#xpModal .cm-close{
  width: 40px; height: 40px; border-radius: 10px;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  #xpModal .xp-item:hover{ transform:none; box-shadow:none; }
}



/* =========================================
   Robot — big Spline, no card, no overflow
   ========================================= */
.robot-hero{ position:relative; margin: 6px 0 2px; overflow: clip; margin-top: 130px;}
.spline-robot{
  width: 100vw; max-width: 100vw;
  height: clamp(560px, 72svh, 900px);
  display:block; border:0; border-radius:18px;
  border-bottom:1px solid rgba(var(--border), .7);
  overflow:hidden;
}
.robot-caption{ text-align:center; color:rgb(var(--muted)); font-size:.92rem; margin:.35rem 0 0 }

/* =========================================
   Projects
   ========================================= */
.projects{ padding: 6px 0 64px }
.section-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px }
.tag{
  font-size:.9rem; opacity:.85; color:rgb(var(--fg));
  background: rgba(255,255,255,.06); border:1px solid rgba(var(--border),.9);
  padding:4px 8px; border-radius:10px; margin-left:.6rem;
}

.projects-grid{ grid-template-columns: repeat(3, 1fr) }
.project-card{
  background: rgba(22,24,30,.75);
  border: 1px solid rgba(var(--border), .85);
  border-radius:16px; padding:14px; box-shadow: var(--shadow-sm);
}
.project-card h3{ margin:.25rem 0 .25rem; font-size:1.06rem }
.project-card .meta{ font-size:.9rem; color: rgb(var(--muted)) }
.project-card .actions{ display:flex; gap:.6rem; flex-wrap:wrap; margin-top:.5rem }

.cta-row{ display:flex; justify-content:center; margin-top:16px }
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  background: rgb(var(--primary)); color:#0b0d12; font-weight:700;
  padding:12px 16px; border-radius:12px; text-decoration:none;
  box-shadow: var(--shadow-sm);
}

.site-footer{ padding:24px 0 56px; text-align:center; color:rgb(var(--muted)) }

/* Responsive */
@media (max-width:1000px){ .projects-grid{ grid-template-columns: repeat(2, 1fr) } }
@media (max-width:640px){ .projects-grid{ grid-template-columns: 1fr } }

/* Hide Spline watermark (CSS-level attempt) */
spline-viewer::part(branding),
spline-viewer::part(watermark),
spline-viewer::part(logo),
spline-viewer::part(watermark-container),
spline-viewer .watermark,
spline-viewer [data-testid="watermark"],
spline-viewer a[href*="spline.design"]{
  display:none !important; visibility:hidden !important; pointer-events:none !important;
}

/* ===========================
   Featured Experiences (3 cards)
   =========================== */
.featured-xp{ padding: 18px 0 36px }
.fxp{
  position: relative;
  overflow: visible; 
  display: block;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
}

/* Make this section a bit wider */
.featured-xp .container{
  width: min(1280px, 96vw);
}

/* Track: 3 columns with min widths so sides don't squash */
/* Track: 3 fixed columns + adjustable gap (no width reflow) */
.fxp-track{
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 360px;
  justify-content: center;
  gap: var(--gap, 20px);
  align-items: start;              /* <-- was stretch; now each card keeps own height */
  list-style: none; margin: 0; padding: 0;
  transition: gap .35s cubic-bezier(.2,.8,.2,1);
  will-change: gap;
}


/* When center expands, *only* increase spacing so side cards move outward */
.fxp-track.wide{
  --gap: 128px;                        /* tune: 72–128px looks good */
}

/* Card base */
.fxp-card{
  position: relative;
  background: rgba(22,24,30,.78);
  border: 1px solid rgba(var(--border), .85);
  border-radius: 16px;
  padding: 14px 14px 16px;
  box-shadow: var(--shadow-sm);
  min-height: 170px;
  display: grid; grid-template-rows: auto auto 1fr;
  transition:
    transform .33s cubic-bezier(.2,.8,.2,1),
    opacity   .25s ease,
    box-shadow .33s cubic-bezier(.2,.8,.2,1);
  will-change: transform;
  overflow: hidden;
}
.fxp-card header h3{ margin:.2rem 0 .2rem; font-size:1.06rem }
.fxp-card .when{ font-size:.88rem; color: rgb(var(--muted)) }
.fxp-card .skim{ margin:.4rem 0 .2rem; color: rgb(var(--fg)) }
.fxp-card .more{
  margin-top:.25rem;
  font-size:.95rem;
  color: rgb(var(--muted));
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .35s ease, opacity .3s ease;
}
.fxp-card .more ul{ margin:.25rem 0 0 1rem }

/* Emphasis / fading */
.fxp-card.pos-center{
  transform: scale(1.02);
  z-index: 2;
  opacity: 1;
  box-shadow: 0 18px 60px rgba(0,0,0,.44);
}
.fxp-card.pos-left,
.fxp-card.pos-right{
  transform: scale(.92);
  opacity: .35;            /* stronger fade */
  z-index: 1;
  cursor: pointer;         /* side cards are clickable */
}

/* Directional fade masks for sides */
.fxp-card.pos-left{
  -webkit-mask-image: linear-gradient(270deg, rgba(0,0,0,.02) 0%, black 30%);
          mask-image: linear-gradient(270deg, rgba(0,0,0,.02) 0%, black 30%);
}
.fxp-card.pos-right{
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.02) 0%, black 30%);
          mask-image: linear-gradient(90deg, rgba(0,0,0,.02) 0%, black 30%);
}

/* Wider + taller on hover */
@media (hover:hover){
  .fxp-track.wide .fxp-card.pos-center{
    transform: scale(1.22, 1.10);
    z-index: 3;
    box-shadow: 0 26px 80px rgba(0,0,0,.55);
  }
  .fxp-track.wide .fxp-card.pos-center .more{
    max-height: 320px;
    opacity: 1;
  }
}


/* Press/hold (center only): a touch stronger than hover */
.fxp-card.pos-center.held{
  transform: scale(1.16, 1.1);         /* extra width & height on hold */
  z-index: 4;
  box-shadow: 0 30px 90px rgba(0,0,0,.6);
}
.fxp-card.pos-center.held .more{
  max-height: 360px; opacity: 1;
}


/* Floating arrows that animate smoothly (layout only; visuals come from the icon-only block) */
.fxp-arrow{
  position: absolute;
  z-index: 5;
  left: 0; top: 0;
  transform: translate3d(var(--ax,0px), var(--ay,0px), 0);
  transition: transform .33s cubic-bezier(.2,.8,.2,1);
  will-change: transform;
}


/* left/right 'left' will be set by JS; keep classes for semantics */


/* Mobile */
@media (max-width: 820px){
  .fxp-track{ grid-template-columns: 1fr !important;  grid-auto-flow: row;
    grid-auto-columns: unset;
    grid-template-columns: 1fr;
    justify-content: stretch;
    gap: 14px;}
  .fxp-card{ transform: none !important; opacity: 1 !important; -webkit-mask-image:none; mask-image:none; }
  .fxp-arrow{ position: absolute; top: calc(50% - 21px) }
  .fxp-arrow.left{ left: -4px }
  .fxp-arrow.right{ right: -4px }

}

/* CTA under Featured Experiences */
.xp-cta{
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

/* Base */
.btn-all-xp{
  --grey-bg: rgba(255,255,255,.06);
  --grey-border: rgba(var(--border), .9);

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;

  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  text-decoration: none;
  color: rgb(var(--fg));
  background: var(--grey-bg);
  border: 1px solid var(--grey-border);
  box-shadow: var(--shadow-sm);
  overflow: visible;

  /* smooth pop */
  transform-origin: center;
  transition:
    transform .22s cubic-bezier(.2,.8,.2,1),
    box-shadow .25s ease;
}

/* keep label above effects */
.btn-all-xp > * { position: relative; z-index: 2; }

/* subtle purple glow underneath (only visible on hover) */
.btn-all-xp::after{
  content:"";
  position:absolute; inset:-6px;
  border-radius: inherit;
  background: radial-gradient(60% 60% at 50% 40%, rgba(122,108,255,.35), transparent 70%);
  filter: blur(10px);
  opacity: 0;
  transform: scale(.96);
  transition: opacity .25s ease, transform .25s ease;
  z-index: 0; /* below the border ring */
}

/* gradient BORDER (center stays grey) */
.btn-all-xp::before{
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #7a6cff, #b074ff);
  padding: 1px; /* border thickness */
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .35s cubic-bezier(.2,.8,.2,1),
              transform .35s cubic-bezier(.2,.8,.2,1);
  z-index: 1; /* above glow, below text */
}

/* POP on hover/focus: scale a bit, lift, glow, and fade the border ring */
.btn-all-xp:hover,
.btn-all-xp:focus-visible{
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 22px 70px rgba(0,0,0,.45);
  outline: none;
}
.btn-all-xp:hover::before,
.btn-all-xp:focus-visible::before{
  opacity: 1;
  transform: scale(1);
}
.btn-all-xp:hover::after,
.btn-all-xp:focus-visible::after{
  opacity: 1;
  transform: scale(1);
}

/* press */
.btn-all-xp:active{
  transform: translateY(0) scale(1.02);
  box-shadow: var(--shadow-sm);
}

/* ===========================
   HERO Projects carousel
   =========================== */
.hero-projects .container{ width:min(1400px, 96vw) }
.section-title.big{ font-size: clamp(28px, 5.2vw, 56px); margin-bottom: 14px }

.proj-hero{
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr 48px; /* arrows | stage | arrows */
  align-items: center;
  gap: 12px;
}

.proj-stage{
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  height: clamp(360px, 48vw, 520px);
  border: 1px solid rgba(var(--border), .7);
  background: rgba(15,16,22,.8);
  box-shadow: var(--shadow-sm);
}

/* track */
.proj-track{
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
  will-change: transform;
}

/* slide */
.proj-slide{
  position: relative;
  width: 100%;
  height: 100%;
  flex: 0 0 100%;
  color: #fff;
}
.proj-bg{
  position:absolute; inset:0;
  background: radial-gradient(70% 120% at 20% 30%, #201a55 0%, #0c0e12 60%) ;
}
.proj-bg > img{
  width:100%; height:100%; object-fit: cover; display:block; opacity:.8;
}
.proj-bg::after{ /* vignette for legible text */
  content:""; position:absolute; inset:0;
  background: linear-gradient(90deg, rgba(0,0,0,.50) 0%, rgba(0,0,0,.2) 60%, transparent 100%);
}

.proj-content{
  position:absolute; left:min(4vw, 40px); right:min(4vw, 40px); top: clamp(22px, 8vw, 80px);
  max-width: 780px; z-index:2;
}
.proj-title{ margin:0 0 6px; font-weight: 800; letter-spacing:.01em; font-size: clamp(22px, 3vw, 34px) }
.proj-tldr{ font-weight:700; margin:.3rem 0 1rem; opacity:.9 }
.proj-desc{ font-size: 1.02rem; opacity:.95; margin:0 0 .6rem }

/* Expandable details */
.proj-more{
  margin-top:10px; background: rgba(0,0,0,.28);
  border:1px solid rgba(var(--border),.7); border-radius:14px;
  padding:12px 14px; max-width: 720px;
}
.proj-more header{ font-weight:800; margin:.1rem 0 .35rem; opacity:.95 }
.proj-more .cols{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px }
.proj-more .cols section{ background: rgba(255,255,255,.04); border:1px solid rgba(var(--border),.7); border-radius:10px; padding:10px }
.proj-more .cols h4{ margin:.1rem 0 .25rem; font-size:.92rem; opacity:.9 }
.proj-more .tags{ margin-top:8px; display:flex; flex-wrap:wrap; gap:6px }
.proj-more .tag{ font-size:.82rem; padding:4px 8px; border-radius:10px; background: rgba(255,255,255,.06); border:1px solid rgba(var(--border),.8) }

/* links */
.proj-links{ margin-top:10px; display:flex; gap:8px; flex-wrap:wrap }
.proj-links a{
  display:inline-flex; align-items:center; gap:.35rem; padding:8px 12px; border-radius:10px;
  background: rgba(255,255,255,.06); border:1px solid rgba(var(--border),.9); color:inherit; text-decoration:none; font-weight:700;
}
.proj-links a:hover{ background: rgba(255,255,255,.12) }

/* arrows */
.proj-arrow{
  display:inline-flex; align-items:center; justify-content:center;
  width:42px; height:42px; border-radius:50%;
  background: rgba(18,20,25,.86);
  border: 1px solid rgba(var(--border), .65);
  color: rgb(var(--fg)); box-shadow: var(--shadow-sm); cursor:pointer;
}
.proj-arrow svg circle{ fill:none; stroke: currentColor; opacity:.4 }
.proj-arrow:hover{ background: rgba(18,20,25,.94) }
.proj-arrow:focus{ outline:2px solid rgba(255,255,255,.25); outline-offset:2px }

/* dots / progress tabs */
.proj-dots{
  position:absolute; left:50%; bottom:14px; transform: translateX(-50%);
  display:flex; gap:10px; z-index:3;
}
.proj-dot{
  width:120px; height:4px; border-radius:3px; background: rgba(255,255,255,.16);
}
.proj-dot.is-active{ background: linear-gradient(90deg, #7a6cff, #b074ff) }

/* mobile */
@media (max-width: 860px){
  .proj-more .cols{ grid-template-columns:1fr }
  .proj-dot{ width:66px }
  .proj-content{ top: clamp(16px, 12vw, 52px) }
}

/* =========================
   Projects — full-bleed hero with centered overlay
   ========================= */
.projects-hero{ padding: 24px 0 40px; position: relative; z-index: 1 }
.projects-hero .container{ width:min(1280px,96vw) }

/* full-width stage (escapes the site container) */
.ph-bleed{
  position: relative;
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
}

/* the slide is entirely the image */
.ph-slide{
  position: relative;
  height: clamp(420px, 56vw, 680px);
  overflow: clip;
  border-radius: 18px;
  border: 1px solid rgba(var(--border), .75);
  box-shadow: var(--shadow-sm);
}

/* background image */
.ph-media{
  position:absolute; inset:0;
  background-size: cover;
  background-position: center;
}
.ph-media::after{ /* legibility gradient */
  content:""; position:absolute; inset:0;
  background:
    radial-gradient(70% 120% at 20% 30%, rgba(138,147,255,.18), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.00) 40%, rgba(0,0,0,.45) 100%);
}

/* centered overlay text */
.ph-overlay{
  position:absolute; inset:0;
  display:grid; place-items:center;
  text-align:center; color:#fff;
  padding: clamp(12px, 4vw, 28px);
}
.ph-title{
  margin: 0 0 .25rem;
  font-weight: 900;
  letter-spacing: .01em;
  font-size: clamp(26px, 4.6vw, 52px);
  text-shadow: 0 6px 40px rgba(0,0,0,.35);
}
.ph-tldr{
  margin: 0 0 .75rem;
  font-size: clamp(16px, 1.6vw, 20px);
  opacity: .95;
}

/* tags row sits near the bottom */
.ph-tags{
  position: absolute; left:50%; bottom: clamp(16px, 3vw, 28px);
  transform: translateX(-50%);
  display:flex; flex-wrap:wrap; gap:8px;
}
.ph-tags .tag{
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(var(--border), .85);
  color:#fff; padding: 6px 10px; border-radius: 999px;
  font-size: .9rem; font-weight: 700;
}

.ph-arrow.in.left{  left: 18px }
.ph-arrow.in.right{ right: 18px }
.ph-arrow.in:hover{ transform: translateY(-50%) scale(1.06) }
.ph-arrow.in:focus{ outline:2px solid rgba(255,255,255,.25); outline-offset:2px }

/* pager bars (bottom center) */
.ph-pager{
  position:absolute; left:50%; bottom: 8px; transform: translateX(-50%);
  display:flex; gap:12px; z-index:3;
}
.ph-pager button{
  width: clamp(64px, 10vw, 140px); height: 3px; border-radius: 3px;
  background: rgba(255,255,255,.25); border:0; cursor:pointer;
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}
.ph-pager button.active{
  background: linear-gradient(90deg, #7a6cff, #b074ff);
  box-shadow: 0 0 18px rgba(138,147,255,.45);
  transform: scale(1.08);
}

/* mobile */
@media (max-width: 820px){
  .ph-slide{ height: clamp(360px, 60vh, 520px) }
  .ph-title{ font-size: clamp(22px, 6vw, 36px) }
  .ph-tldr{ font-size: clamp(14px, 3.6vw, 18px) }
  .ph-tags{ gap:6px }
  .ph-pager button{ width: clamp(48px, 12vw, 100px) }
}

/* =========================
   GitHub CTA under Projects
   ========================= */
.proj-cta{
  margin: 40px 0 6px;
  display:flex; justify-content:center;
  margin-bottom: 100px;
}

.btn-gh{
  position: relative;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  text-decoration: none; color: #fff; font-weight: 800;
  background: rgba(0, 0, 0);           /* grey fill */
  border: 1px solid rgba(var(--border), .9);   /* grey border */
  box-shadow: var(--shadow-sm);
  transform-origin: center;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s;
}

/* Purple border on hover (fill stays grey) */
.btn-gh::before{
  content:""; position:absolute; inset:0; border-radius: inherit;
  background: linear-gradient(90deg, #7a6cff, #b074ff);
  padding: 1px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transform: scale(1.03);
  transition: opacity .35s cubic-bezier(.2,.8,.2,1), transform .35s cubic-bezier(.2,.8,.2,1);
  z-index: 1;
}

.btn-gh:hover,
.btn-gh:focus-visible{
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 22px 70px rgba(0,0,0,.45);
  outline: none;
}
.btn-gh:hover::before,
.btn-gh:focus-visible::before{
  opacity: 1; transform: scale(1);
}

/* BIG logo that does NOT shrink */
.btn-gh .gh-logo{
  width: 130px; height: auto; display:block;
  flex-shrink: 0;                     /* keep size */
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.35));
}

/* Keep label visible; no morphing needed */
.btn-gh .label{
  white-space: nowrap;
  font-weight: 800;
  opacity: 1;
}

/* Hover: POP + gradient border + reveal label, logo shrinks/slots left */
.btn-gh:hover,
.btn-gh:focus-visible{
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 22px 70px rgba(0,0,0,.45);
  outline: none;
}
.btn-gh:hover::before,
.btn-gh:focus-visible::before{ opacity:1; transform: scale(1); }

.btn-gh:hover .gh-logo,
.btn-gh:focus-visible .gh-logo{
  width: 140px; transform: translateX(-2px);
}
.btn-gh:hover .label,
.btn-gh:focus-visible .label{
  max-width: 220px; opacity: 1; margin-left: 2px;
}

/* Disabled state (no URL) */
.btn-gh.is-disabled{ pointer-events:none; opacity:.5 }

/* Clickable hero + title hover emphasis */
.ph-slide{ cursor: pointer; }

/* --- Projects hero title: purple glow/outline on hover --- */
.ph-title{
  display: inline-block;                 /* so effects size to text only */
  margin: 0 0 .25rem;
  font-weight: 900;
  letter-spacing: .01em;
  font-size: clamp(26px, 4.6vw, 52px);
  color: #fff;
  text-shadow: 0 6px 40px rgba(0,0,0,.35);
  -webkit-text-stroke: 0 transparent;    /* no stroke at rest */
  transition:
    transform .28s cubic-bezier(.2,.8,.2,1),
    color .2s ease,
    text-shadow .28s ease,
    -webkit-text-stroke .28s ease;
}

.ph-title:hover{
  transform: scale(1.06);
  -webkit-text-stroke: 1px rgba(138,147,255,.45);
  text-shadow:
    0 10px 40px rgba(0,0,0,.55),
    0 0 14px rgba(138,147,255,.35),
    0 0 36px rgba(138,147,255,.28);
}

/* was .ph-slide:hover .ph-title::after { ... } */
.ph-title:hover::after{
  opacity: 1;
  transform: scaleX(1);
}

/* nice affordance */
.ph-title{ cursor: pointer; }

/* Clean chevron icon (for Projects + Featured Experiences) */
.ph-arrow svg,
.fxp-arrow svg{
  width: 22px;
  height: 22px;
  display: block;
}

.chev{
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.5; /* adjust thickness if you want */
}

/* Mirror the same chevron path for the left buttons */
.ph-arrow.left svg,
.fxp-arrow.left svg{
  transform: scaleX(-1);
}

.ph-arrow.in.left  { left: 18px; }
.ph-arrow.in.right { right: 18px; }

.ph-arrow svg,
.fxp-arrow svg{
  width: var(--chev-size);
  height: var(--chev-size);
  display: block;
}

.chev{
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: var(--chev-stroke);
  transition: transform .18s ease, color .18s ease, opacity .18s ease;
}

.ph-arrow.left svg,
.fxp-arrow.left svg{ transform: scaleX(-1); }

.ph-arrow:hover,
.fxp-arrow:hover{ color: var(--chev-hover); }

.ph-arrow:active .chev,
.fxp-arrow:active .chev{ transform: scale(0.94); }

.ph-arrow:focus-visible,
.fxp-arrow:focus-visible{
  outline: 2px solid rgba(255,255,255,.35);
  outline-offset: 2px;
}

/* nuke any leftover circular styles */
.ph-arrow.in,
.fxp-arrow{
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
/* ==== FIX: icon-only arrows, with correct transforms ==== */

/* Projects hero arrows (static, centered vertically) */
.ph-arrow{
  position:absolute; top:50%;
  left:auto; right:auto;                /* keep your left/right rules above */
  transform: translateY(-50%);          /* projects keep center-vert */
  background:none !important;
  border:0 !important;
  box-shadow:none !important;
  border-radius:0 !important;
  width:auto; height:auto;              /* no 42px circle */
  padding: var(--chev-hit, 14px);
  color: var(--chev-color, rgba(255,255,255,.85));
}

/* Featured Experiences arrows (JS-pinned with --ax/--ay) */
.fxp-arrow{
  position:absolute;
  left:0; top:0;                        /* anchor at the fxp container origin */
  transform: translate3d(var(--ax,0px), var(--ay,0px), 0) !important; /* <-- critical */
  transition: transform .33s cubic-bezier(.2,.8,.2,1);
  will-change: transform;

  background:none !important;
  border:0 !important;
  box-shadow:none !important;
  border-radius:0 !important;
  width:auto; height:auto;
  padding: var(--chev-hit, 14px);
  color: var(--chev-color, rgba(255,255,255,.85));
}

/* Chevron icon look (shared) */
.ph-arrow svg,
.fxp-arrow svg{ width: var(--chev-size, 28px); height: var(--chev-size, 28px); display:block; }

.chev{
  fill:none; stroke: currentColor;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-width: var(--chev-stroke, 3.8);
  transition: transform .18s ease, color .18s ease, opacity .18s ease;
}

/* mirror the same path for left arrows */
.ph-arrow.left svg,
.fxp-arrow.left svg{ transform: scaleX(-1); }

/* hover/active */
.ph-arrow:hover,
.fxp-arrow:hover{ color: var(--chev-hover, #a593ff); }
.ph-arrow:active .chev,
.fxp-arrow:active .chev{ transform: scale(0.94); }

.ph-arrow:focus-visible,
.fxp-arrow:focus-visible{
  outline: 2px solid rgba(255,255,255,.35);
  outline-offset: 2px;
}
/* ===== Clean icon-only chevrons (final) ===== */
:root{
  --chev-size: 28px;              /* icon size */
  --chev-stroke: 3.8;             /* thickness */
  --chev-color: rgba(255,255,255,.85);
  --chev-hover: #a593ff;
  --chev-hit: 14px;               /* invisible click padding */
}

/* Shared icon */
.chev{
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: var(--chev-stroke);
  transition: transform .18s ease, color .18s ease, opacity .18s ease;
}
.ph-arrow svg, .fxp-arrow svg{
  width: var(--chev-size);
  height: var(--chev-size);
  display:block;
}
.ph-arrow.left svg, .fxp-arrow.left svg{ transform: scaleX(-1); }

/* ---- Projects (static center-vert) ---- */
.ph-arrow{
  position:absolute; top:50%;
  background:none; border:0; padding: var(--chev-hit);
  color: var(--chev-color);
  transform: translateY(-50%);        /* only projects use this */
}
.ph-arrow.in.left  { left: 18px; }
.ph-arrow.in.right { right: 18px; }
/* scale the ICON on hover, not the button */
.ph-arrow:hover{ color: var(--chev-hover) }
.ph-arrow:focus-visible{
  outline: 2px solid rgba(255,255,255,.35);
  outline-offset: 2px;
}

/* ---- Featured Experiences (JS pins with --ax/--ay) ---- */
.fxp-arrow{
  position:absolute; left:0; top:0;   /* anchor at .fxp origin */
  background:none; border:0; padding: var(--chev-hit);
  color: var(--chev-color);
  transform: translate3d(var(--ax,0px), var(--ay,0px), 0) !important; /* critical */
  transition: color .18s ease;
}
.fxp-arrow:hover{ color: var(--chev-hover) }
.fxp-arrow:focus-visible{
  outline: 2px solid rgba(255,255,255,.35);
  outline-offset: 2px;
}
/* --- Chevron direction + hover without flipping --- */
.ph-arrow .chev,
.fxp-arrow .chev{
  /* direction and hover scale composed together */
  --chev-dir: 1;         /* default: right */
  --chev-scale: 1;       /* default scale */
  transform: scaleX(var(--chev-dir)) scale(var(--chev-scale));
  transition: transform .18s ease, color .18s ease, opacity .18s ease;
}

/* left arrows: mirror once via the var */
.ph-arrow.left  .chev,
.fxp-arrow.left .chev{ --chev-dir: -1; }

/* hover: only bump scale (direction preserved) */
.ph-arrow:hover .chev,
.fxp-arrow:hover .chev{ --chev-scale: 1.08; }

/* optional: small active press feedback */
.ph-arrow:active .chev,
.fxp-arrow:active .chev{ --chev-scale: 0.95; }

/* --- Remove the focus rectangle on click (mouse). 
   If you still want keyboard accessibility, keep :focus-visible with a custom style instead. --- */
.ph-arrow:focus,
.fxp-arrow:focus{ outline: none; }

.ph-arrow:focus-visible,
.fxp-arrow:focus-visible{
  outline: none;   /* set to none to remove entirely */
  /* or replace with a subtle ring you like, e.g.:
  outline: 2px solid rgba(255,255,255,.25);
  outline-offset: 2px;
  */
}

/* ============ FINAL OVERRIDES: Arrow chevrons & focus ============ */
/* Shared variables (safe if already defined elsewhere) */
:root{
  --chev-size: 28px;
  --chev-stroke: 3.8;
  --chev-color: rgba(255,255,255,.85);
  --chev-hover: #a593ff;
  --chev-hit: 14px;
}

/* Make SVGs the only visible arrow (no circle buttons) */
.ph-arrow, .fxp-arrow{
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: var(--chev-hit) !important;
  color: var(--chev-color) !important;
}

/* Projects arrows: keep vertically centered */
.ph-arrow.in{
  position: absolute;
  top: 50%;
  transform: translateY(-50%) !important;
}

/* Experiences arrows: JS pins with CSS vars --ax/--ay */
.fxp-arrow{
  position: absolute;
  left: 0; top: 0;
  transform: translate3d(var(--ax,0px), var(--ay,0px), 0) !important;
  transition: transform .33s cubic-bezier(.2,.8,.2,1);
  will-change: transform;
}

/* Chevron icon sizing */
.ph-arrow svg, .fxp-arrow svg{
  width: var(--chev-size) !important;
  height: var(--chev-size) !important;
  display: block;
}

/* Compose direction + hover scale ONLY on the icon path */
.ph-arrow .chev, .fxp-arrow .chev{
  --chev-dir: 1;
  --chev-scale: 1;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: var(--chev-stroke);
  transform: scaleX(var(--chev-dir)) scale(var(--chev-scale));
  transition: transform .18s ease, color .18s ease, opacity .18s ease;
}
.ph-arrow.left .chev, .fxp-arrow.left .chev{ --chev-dir: -1; }
.ph-arrow:hover .chev, .fxp-arrow:hover .chev{ --chev-scale: 1.08; }
.ph-arrow:active .chev, .fxp-arrow:active .chev{ --chev-scale: .95; }

/* Neutralize any leftover whole-SVG mirroring */
.ph-arrow.left svg, .fxp-arrow.left svg{ transform: none !important; }

/* Hover color */
.ph-arrow:hover, .fxp-arrow:hover{ color: var(--chev-hover) !important; }

/* Remove browser focus rectangle on arrow buttons */
.ph-arrow:focus, .ph-arrow:focus-visible,
.fxp-arrow:focus, .fxp-arrow:focus-visible{ outline: none !important; }
/* ================================================================ */

/* === Force left chevrons to stay left (and still scale on hover) === */

/* base icon: scale variable only */
.ph-arrow .chev,
.fxp-arrow .chev{
  --chev-scale: 1;
  transform: scaleX(1) scale(var(--chev-scale));
  transition: transform .18s ease, color .18s ease, opacity .18s ease;
}

/* hover/active only change the scale var (direction preserved) */
.ph-arrow:hover .chev,
.fxp-arrow:hover .chev{ --chev-scale: 1.08; }
.ph-arrow:active .chev,
.fxp-arrow:active .chev{ --chev-scale: .95; }

/* LEFT buttons: compose mirror + the same scale var, with highest priority */
.ph-arrow.left  .chev,
.fxp-arrow.left .chev{
  transform: scaleX(-1) scale(var(--chev-scale)) !important;
}

/* kill any leftover whole-SVG transforms from earlier rules */
.ph-arrow.left svg,
.fxp-arrow.left svg{ transform: none !important; }

/* remove the focus rectangle on project arrows */
.ph-arrow:focus,
.ph-arrow:focus-visible,
.fxp-arrow:focus,
.fxp-arrow:focus-visible{
  outline: none !important;
}

/* Spline block under Projects */
.spline-block{
  padding: 16px 0 28px;
  display: grid;
  place-items: center;
}

.spline-shell{
  width: min(1100px, 56vw);
  border-radius: 20px;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.spline-shell spline-viewer{
  display: block;
  width: 100%;
  height: clamp(540px, 95svh, 1100px);
  background: transparent;
  border-bottom: 0;
}

/* Ensure the shell is positioning context */
.spline-shell{ position: relative; }

/* ===== Projects Spline: mobile = full-width, non-interactive ===== */
@media (max-width: 900px){
  /* remove any paddings / rounding so it goes edge-to-edge */
  #projects-spline{
    padding: 0;
  }

  #projects-spline .spline-shell{
    width: 100vw;               /* fill the phone width */
    max-width: 100vw;
    margin: 0 auto;             /* center if a parent has constraints */
    border-radius: 0;           /* no rounded corners on mobile */
    overflow: hidden;           /* crop any canvas overflow */
    position: relative;         /* for stacking the CTA above */
  }

  /* make the viewer tall and stop touch interaction */
  #projects-spline .spline-shell spline-viewer{
    width: 100%;
    height: 85dvh;              /* tweak: 75–100dvh depending on taste */
    pointer-events: none;       /* no drag/zoom */
    touch-action: none;
    display: block;
  }

  /* ensure the CTA stays clickable above the viewer */
  #projects-spline .spline-cta{
    position: absolute;         /* centered overlay */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
  }
}


/* Centered CTA over the Spline */
.spline-cta{
  position: absolute;
  left: 50%;
  top: 50%;                          /* move up/down as you like */
  transform: translate(-50%, -50%);
  z-index: 3;                        /* above the viewer */
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 22px;
  border-radius: 14px;
  font-weight: 900;
  letter-spacing: .01em;
  color: #0b0d12;
  background: linear-gradient(90deg, #7a6cff, #ff6ad5);
  border: 0;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.spline-cta:hover{
  transform: translate(-50%, -50%) scale(1.04);
  box-shadow: 0 26px 80px rgba(0,0,0,.55);
  filter: saturate(1.06);
}
.spline-cta:focus{ outline: none; }
.spline-cta:focus-visible{
  box-shadow: 0 0 0 3px rgba(255,255,255,.25), 0 22px 70px rgba(0,0,0,.5);
}

/* ===== Contact modal (morph from CTA) ===== */
.contact-modal{
  position: fixed; inset: 0; z-index: 80;
  pointer-events: none;                   /* off until open */
  --cx: 50%; --cy: 50%;                  /* morph origin (set by JS) */
}
.contact-modal.open{ pointer-events: auto; }

.cm-backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.45);
  opacity:0; transition: opacity .28s ease;
  backdrop-filter: blur(2px);
}
.contact-modal.open .cm-backdrop{ opacity:1; }

.cm-sheet{
  position:absolute; left:50%; top:50%; transform: translate(-50%,-50%) translateY(10px);
  width:min(1100px, 92vw);
  background: rgba(22,24,30,.92);
  border:1px solid rgba(var(--border), .85);
  border-radius: 18px;
  box-shadow: 0 30px 120px rgba(0,0,0,.55);
  padding: 16px 16px 18px;
  opacity: 0;
  clip-path: circle(0% at var(--cx) var(--cy));
  transition:
    clip-path .52s cubic-bezier(.2,.8,.2,1),
    opacity .25s ease,
    transform .52s cubic-bezier(.2,.8,.2,1);
}
.contact-modal.open .cm-sheet{
  opacity:1; transform: translate(-50%,-50%);
  clip-path: circle(150vmax at var(--cx) var(--cy));
}

.cm-close{
  position:absolute; right:10px; top:10px;
  display:inline-flex; align-items:center; justify-content:center;
  width:36px; height:36px;
  border-radius:10px; border:1px solid rgba(var(--border), .75);
  background: rgba(255,255,255,.04); color:#fff;
  cursor:pointer;
}
.cm-close:hover{ background: rgba(255,255,255,.08) }
.cm-grid{
  display:grid; grid-template-columns: 1fr 1.15fr; gap: 16px; align-items:start;
  padding-top: 20px;
}
.cm-blurb h2{ margin:.2rem 0 .2rem; font-size: clamp(22px, 3.6vw, 32px) }
.muted{ color: rgb(var(--muted)) }
.small{ font-size:.92rem }

.cm-email{ display:flex; gap:10px; align-items:center; margin:.6rem 0 1rem }
.cm-email a{ font-weight:800; color:#fff }
.cm-email .ghost{
  padding:8px 10px; border-radius:10px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(var(--border), .85);
  color:#fff; font-weight:800; cursor:pointer;
}
.cm-email .ghost:hover{ border-color: rgba(138,147,255,.8); color: #cdbdff }

.cm-socials{ display:flex; gap:10px; flex-wrap:wrap }
.soc{
  display:inline-flex; gap:8px; align-items:center;
  padding:8px 10px; border-radius:10px;
  color:#fff; background: rgba(255,255,255,.06);
  border:1px solid rgba(var(--border), .85);
  font-weight:800;
}
.soc:hover{ border-color: rgba(138,147,255,.8); color:#cdbdff }

/* Form */
.cm-form .fld{ position:relative; margin-bottom: 12px; }
.cm-form .fld > div{ position:relative }
.cm-form .fld.split{ display:grid; grid-template-columns: 1fr 1fr; gap:10px }
.cm-form input, .cm-form textarea{
  width:100%;
  background: rgba(18,20,25,.55);
  border:1px solid rgba(var(--border), .8);
  border-radius:12px;
  color:#fff; outline:0;
  padding: 18px 12px 12px;   /* was 16px on top */
  font-size: 1rem;
  line-height: 1.4;
  resize: vertical;
}

.cm-form textarea{ padding-top: 22px; } /* more breathing room for first line */

.cm-form label{
  position:absolute; left:12px; top:11px;
  color: rgba(255,255,255,.65);
  pointer-events:none;
  transition: transform .18s ease, opacity .18s ease, color .18s ease;
}

/* float the label a touch higher/smaller when not empty or focused */
.cm-form input:focus + label,
.cm-form textarea:focus + label,
.cm-form input:not(:placeholder-shown) + label,
.cm-form input:valid + label,
.cm-form textarea:not(:placeholder-shown) + label,
.cm-form textarea:valid + label{
  transform: translateY(-14px) scale(.90);  /* was -10px /.92 */
  opacity: .9;
}


.cm-actions{ display:flex; justify-content:flex-end; }
.cm-send{
  padding: 12px 16px; border-radius:12px; border:0; cursor:pointer;
  font-weight:900; color:#0b0d12;
  background: rgb(var(--primary));
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  transition: transform .18s ease, box-shadow .18s ease;
}
.cm-send:hover{ transform: translateY(-1px); box-shadow: 0 20px 54px rgba(0,0,0,.45) }

/* Disable page scroll while open */
body.modal-open{ overflow:hidden }

/* Responsive */
@media (max-width: 900px){
  .cm-grid{ grid-template-columns: 1fr; }
}
.hero-name{ display:none !important; }


/* Fixed logo (no heavy blur) */
.site-logo{
  position: fixed;
  top: 12px; left: 12px;
  z-index: 9999;
  display: inline-block;
  line-height: 0;
  padding: 4px 6px;
  border-radius: 10px;
  background: rgba(0,0,0,.35);
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
  transform: translateZ(0);
  will-change: transform;
}
.site-logo img{ display:block; width: 36px; height:auto; }
.site-logo:hover{ transform: translateZ(0) translateY(-1px); transition: transform .15s ease; }

/* Hide the old header + toggle so only the logo shows */
#siteHeader, #menuToggle { display: none !important; }


/* Lexend Tera for the three main section titles */
#about h1,  #about h2,  #about .section-title,
#xp h1,     #xp h2,     #xp .section-title,
#projects h1, #projects h2, #projects .section-title {
  font-family: "Lexend Tera", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 800;
  letter-spacing: .01em;
}

/* copy look */
#cmCopy:disabled { opacity: .75; cursor: default; }
