/* =============================================
   ALICE DI PINTO — PORTFOLIO
   Aesthetic: living forest · Gris · Abzu · Journey
   ============================================= */

:root {
  --bg:         #080712;
  --surface:    #0c0b1a;
  --card:       #0e1520;
  --border:     rgba(154,126,232,0.13);
  --card-uw:    #0a1622;
  --border-uw:  rgba(0,190,200,0.14);
  --gold:       #9a7ee8;
  --gold-soft:  rgba(154,126,232,0.14);
  --gold-glow:  rgba(154,126,232,0.36);
  --teal:       #7b6bd6;
  --teal-soft:  rgba(104,85,200,0.13);
  --rose:       #c490e8;
  --mist:       #b8aad8;
  --branch:     rgba(154,126,232,0.45);
  --branch-dim: rgba(154,126,232,0.18);
  --text:       #ede8f8;
  --text-muted: #9b8fc0;
  --font-head:  'Comfortaa', 'Nunito', sans-serif;
  --font-body:  'Nunito', sans-serif;
  --nav-h:      68px;
  --radius:     8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: linear-gradient(
    170deg,
    #09071c 0%,
    #080c1e 12%,
    #07101e 28%,
    #060e1c 42%,
    #050d18 55%,
    #060e1a 68%,
    #07101c 82%,
    #060e18 100%
  );
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.78;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* =============================================
   SCROLL PROGRESS
   ============================================= */
.xp-bar-track { position: fixed; top: 0; left: 0; width: 100%; height: 2px; z-index: 1000; }
.xp-bar-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--rose), #f0ccff);
  transition: width 0.12s linear;
  box-shadow: 0 0 8px var(--gold-glow);
}

/* =============================================
   NAVIGATION
   ============================================= */
.game-nav {
  position: fixed;
  top: 2px; left: 0; width: 100%;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 3rem;
  z-index: 999;
  transition: background 0.5s, backdrop-filter 0.5s;
}
.game-nav.scrolled {
  background: rgba(8,7,18,0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

/* Compass icon */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--gold);
  opacity: 0.85;
  transition: opacity 0.3s;
}
.nav-logo:hover { opacity: 1; }

.compass-wrap {
  width: 34px; height: 34px;
  position: relative;
}
.compass-ring {
  width: 100%; height: 100%;
  animation: compass-breathe 5s ease-in-out infinite;
}
@keyframes compass-breathe {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.06); }
}
.compass-needle {
  transform-origin: 50% 50%;
  animation: needle-sway 7s ease-in-out infinite;
}
@keyframes needle-sway {
  0%, 100% { transform: rotate(0deg); }
  30%       { transform: rotate(8deg); }
  70%       { transform: rotate(-6deg); }
}
.nav-logo-text {
  font-family: var(--font-head);
  font-size: 0.95rem;
  letter-spacing: 3px;
  color: var(--gold);
  font-style: italic;
}

.nav-links { display: flex; gap: 0.2rem; list-style: none; }
.nav-link {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.65rem 1rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 40px;
  color: var(--text-muted);
  transition: color 0.3s, background 0.3s;
}
.nav-link:hover, .nav-link.active {
  color: var(--gold);
  background: var(--gold-soft);
}
.cursor-blink { animation: blink 1.2s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
}

/* =============================================
   SECTIONS — SHARED
   ============================================= */
.section { position: relative; z-index: 2; }
.section-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.85;
  margin-bottom: 0.6rem;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.section-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.8;
  margin-bottom: 3rem;
}

/* =============================================
   LANDING
   ============================================= */
.landing {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 0;
  position: relative;
  background: transparent;
}
#particleCanvas {
  position: fixed;
  inset: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
}
#worldLandscape {
  position: fixed;
  bottom: 0; left: 0;
  width: 100%; height: 50vh;
  z-index: 1;
  pointer-events: none;
  object-fit: cover;
  object-position: center top;
  opacity: 0.4;
  transition: opacity 0.6s ease;
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.15) 20%, rgba(0,0,0,0.5) 40%, black 65%, black 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.15) 20%, rgba(0,0,0,0.5) 40%, black 65%, black 100%);
}
/* ── Two-column hero layout ── */
.landing-hero {
  position: relative; z-index: 1;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 0 2rem;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

.landing-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.9rem;
  min-width: 0;
  flex: 1;
}

.landing-intro {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: var(--text-muted);
}
.hero-pronouns {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  opacity: 0.7;
  margin-top: -0.6rem;
}
.landing-intro strong { color: var(--text); font-weight: 600; }
.landing-location { color: var(--gold); font-size: 0.9em; letter-spacing: 0.4px; }

.landing-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.8rem;
  border: 1px solid rgba(154,126,232,0.3);
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(154,126,232,0.06);
  backdrop-filter: blur(8px);
  transition: color 0.35s, border-color 0.35s, background 0.35s, transform 0.35s;
}
.btn-hero:hover {
  color: var(--text);
  border-color: var(--gold);
  background: rgba(154,126,232,0.14);
  transform: translateY(-2px);
}

/* ── Avatar scene (blobs + circle) ── */
.avatar-scene {
  position: relative;
  width: 320px; height: 320px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  animation: avatar-float 6s ease-in-out infinite;
}

/* Orbiting splat blobs — arm + blob pattern */
.blob-arm {
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  animation: arm-cw var(--speed, 10s) linear var(--d, 0s) infinite;
}
.blob-arm-rev {
  animation-direction: reverse;
}
@keyframes arm-cw {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.blob {
  position: absolute;
  left: var(--r, 80px);
  top: 0;
  transform: translateY(-50%);
  width: var(--s, 20px);
  height: var(--s, 20px);
  background: var(--c, #9a7ee8);
  border-radius: 40% 60% 55% 45% / 55% 45% 60% 40%;
  opacity: 0.78;
  filter: blur(0.5px);
  box-shadow: 0 0 12px var(--c, #9a7ee8);
  animation: blob-morph var(--ms, 4s) ease-in-out infinite;
}

@keyframes blob-morph {
  0%, 100% { border-radius: 40% 60% 55% 45% / 55% 45% 60% 40%; transform: translateY(-50%) scale(1); }
  20%       { border-radius: 68% 32% 42% 58% / 38% 62% 48% 52%; transform: translateY(-50%) scale(1.18); }
  40%       { border-radius: 30% 70% 65% 35% / 60% 40% 55% 45%; transform: translateY(-50%) scale(0.88); }
  60%       { border-radius: 55% 45% 38% 62% / 45% 55% 35% 65%; transform: translateY(-50%) scale(1.1); }
  80%       { border-radius: 72% 28% 50% 50% / 28% 72% 58% 42%; transform: translateY(-50%) scale(0.95); }
}

/* Avatar circle */
.landing-avatar {
  position: relative;
  z-index: 2;
  width: 210px; height: 210px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--rose);
  box-shadow: 0 0 0 10px rgba(196,144,232,0.08), 0 0 70px rgba(196,144,232,0.4);
  background: radial-gradient(circle at 50% 40%, #f4eeff 55%, #d4b8f0 100%);
}
.landing-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 10%;
}

/* Speech bubble */
.speech-bubble {
  position: relative;
  align-self: center;
  margin-top: -30px;
  margin-left: 14px;
  z-index: 5;
  transform-origin: left center;
  background: rgba(20, 16, 40, 0.82);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(154,126,232,0.3);
  border-radius: 4px 18px 18px 18px;
  padding: 0.85rem 1.1rem;
  max-width: 195px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(154,126,232,0.12);
  animation: bubble-pop 0.6s cubic-bezier(0.16,1,0.3,1) 1s both;
}
.speech-bubble::before {
  content: '';
  position: absolute;
  left: -10px; top: 18px;
  border: 5px solid transparent;
  border-right-color: rgba(154,126,232,0.3);
}
.speech-bubble::after {
  content: '';
  position: absolute;
  left: -8px; top: 19px;
  border: 4px solid transparent;
  border-right-color: rgba(20,16,40,0.82);
}
.speech-bubble p {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}
.speech-bubble strong { color: var(--gold); font-weight: 500; }
.speech-location {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
@keyframes bubble-pop {
  from { transform: scale(0.5) translateX(-10px); opacity: 0; }
  to   { transform: scale(1)   translateX(0);     opacity: 1; }
}
@keyframes avatar-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-10px) scale(1.02); }
}
@keyframes caustic-drift {
  0%   { transform: translate(0, 0)      scale(1);    opacity: 0.7; }
  30%  { transform: translate(3%, -4%)   scale(1.06); opacity: 1;   }
  65%  { transform: translate(-3%, 3%)   scale(0.96); opacity: 0.8; }
  100% { transform: translate(2%, -2%)   scale(1.04); opacity: 0.9; }
}

.pre-title {
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 1px;
  color: var(--text-muted);
  opacity: 0.85;
}
.hero-line1 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: -0.8rem;
}
.hero-name {
  font-family: var(--font-head);
  font-size: clamp(2.6rem, 5.5vw, 4.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.5px;
  color: var(--text);
}
.hero-name .accent { color: var(--gold); font-weight: 700; }

.hero-role {
  font-size: clamp(0.78rem, 1.8vw, 0.95rem);
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hero-tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
  opacity: 0.7;
  max-width: 420px;
  text-align: center;
  line-height: 1.7;
}
.hero-location { font-size: 0.9rem; color: var(--text-muted); letter-spacing: 1px; }

/* btn-pulse kept for potential reuse */
@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 0 28px var(--gold-glow); }
  50%       { box-shadow: 0 0 50px rgba(154,126,232,0.55); }
}

.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem; letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted); opacity: 0.45;
  animation: float-hint 3s ease-in-out infinite;
  z-index: 1;
}
@keyframes float-hint {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.45; }
  50%       { transform: translateX(-50%) translateY(8px); opacity: 0.7; }
}

/* =============================================
   ABOUT
   ============================================= */
.about {
  min-height: 100vh;
  padding: calc(var(--nav-h) + 5rem) 3rem 7rem;
  position: relative;
  background: transparent;
}
.about-inner { position: relative; z-index: 1; }
.about-inner { max-width: 1000px; margin: 0 auto; }
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 4rem;
  max-width: 680px;
}
.about-photo {
  position: relative;
  flex-shrink: 0;
}
.about-photo img {
  width: 100%; aspect-ratio: 3/4;
  object-fit: contain; object-position: center;
  border-radius: 4px;
  background: radial-gradient(circle at 50% 40%, #f4eeff 55%, #d4b8f0 100%);
  transition: filter 0.5s, transform 0.5s;
}
.about-photo:hover img { transform: scale(1.02); }
.about-photo::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--gold) 0%, transparent 50%, var(--teal) 100%);
  opacity: 0.2;
  z-index: -1;
}
.about-photo::after {
  content: '';
  position: absolute;
  inset: 10px -10px -10px 10px;
  border: 1px solid var(--gold);
  border-radius: 4px;
  opacity: 0.15;
  z-index: -1;
  transition: opacity 0.4s, inset 0.4s;
}
.about-photo:hover::after { inset: 14px -14px -14px 14px; opacity: 0.3; }
.about-photo.no-img {
  aspect-ratio: 3/4;
  background: var(--card);
  border: 1px dashed rgba(154,126,232,0.2);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; letter-spacing: 2px;
  color: var(--text-muted); text-align: center;
}
/* Bio */
.about-bio { margin-bottom: 3rem; }
.about-bio-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  align-items: center;
  margin-top: 1.5rem;
}
.about-portrait {
  position: relative;
  width: 260px;
  height: 260px;
}
.about-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 50%;
  border: 2px solid rgba(154,126,232,0.35);
  filter: saturate(0.95) brightness(0.98);
  display: block;
}
.about-portrait::before {
  content: '';
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(154,126,232,0.25) 0%, transparent 65%);
  z-index: -1;
}

/* ── Floating portrait blobs ── */
.contact-photo-wrap { position: relative; }
.portrait-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  filter: blur(0.5px);
  box-shadow: 0 0 22px 4px rgba(154,126,232,0.55);
  animation: blobFloat 7s ease-in-out infinite;
}
.portrait-blob.b1 {
  width: 34px; height: 34px;
  background: radial-gradient(circle at 35% 35%, #d9c6ff 0%, #9a7ee8 55%, #6855c8 100%);
  top: -6%; right: -4%;
  animation-duration: 8s;
  animation-delay: 0s;
}
.portrait-blob.b2 {
  width: 22px; height: 22px;
  background: radial-gradient(circle at 35% 35%, #efe2ff 0%, #b49af0 60%, #7d65d9 100%);
  top: 18%; right: -12%;
  animation-duration: 9s;
  animation-delay: -2s;
}
.portrait-blob.b3 {
  width: 16px; height: 16px;
  background: radial-gradient(circle at 35% 35%, #f5ecff 0%, #c8b0f5 60%, #8e75e0 100%);
  top: 42%; left: -10%;
  animation-duration: 7.5s;
  animation-delay: -4s;
}
.portrait-blob.b4 {
  width: 28px; height: 28px;
  background: radial-gradient(circle at 35% 35%, #e8d6ff 0%, #a88ceb 55%, #6d58c8 100%);
  bottom: -4%; left: 8%;
  animation-duration: 8.5s;
  animation-delay: -1s;
}
.portrait-blob.b5 {
  width: 18px; height: 18px;
  background: radial-gradient(circle at 35% 35%, #f0e4ff 0%, #bea3f0 60%, #8670d9 100%);
  bottom: 4%; right: 0%;
  animation-duration: 7s;
  animation-delay: -3s;
}
.portrait-blob.b6 {
  width: 10px; height: 10px;
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #d6c4ff 60%, #9a7ee8 100%);
  top: 8%; left: -6%;
  animation-duration: 6.5s;
  animation-delay: -5s;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.85; }
  25%      { transform: translate(6px, -8px) scale(1.08); opacity: 1; }
  50%      { transform: translate(-4px, -12px) scale(0.95); opacity: 0.7; }
  75%      { transform: translate(-8px, 4px) scale(1.05); opacity: 0.95; }
}
.about-bio-text {
  color: var(--text);
  line-height: 1.9;
  font-size: 1.02rem;
}
.about-bio-text em { color: var(--mist); font-style: italic; }
.about-bio-text strong { color: var(--text); font-weight: 600; }

/* About skills cards */
.about-skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.skill-card {
  padding: 1.6rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(12,11,26,0.65);
  backdrop-filter: blur(10px);
  transition: border-color 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.skill-card:hover {
  border-color: rgba(154,126,232,0.4);
  transform: translateY(-3px);
}
.skill-card-wide { grid-column: 1 / -1; }

.skill-card-label {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.9;
  margin: 0;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: flex-start;
}
.skill-tags .tag em { opacity: 0.65; font-style: normal; }
.at-edu { display: flex; flex-direction: column; gap: 0.6rem; }
.at-edu-item {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}
.at-year {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.timeline-heading {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.85;
  margin-bottom: 1.5rem;
}
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0 0 1.6rem 1.4rem;
  position: relative;
}
.tl-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0.55rem;
  bottom: 0;
  width: 1px;
  background: var(--branch-dim);
}
.tl-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.55;
}
.tl-date {
  font-size: 0.68rem;
  color: var(--gold);
  opacity: 0.7;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 0.1rem;
}
.tl-content {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.tl-content strong {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.tl-place {
  font-size: 0.78rem;
  color: var(--text-muted);
}


.skill-col-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Software icons */
.software-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
}
.sw-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 46px;
}
.sw-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.3s, transform 0.3s;
  filter: none;
}
.sw-icon:hover img { opacity: 1; transform: translateY(-2px); }
.sw-icon span {
  font-size: 0.58rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
}

/* Soft skills */
.soft-skills {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.soft-skills li {
  font-size: 0.88rem;
  color: var(--text);
  padding-left: 1rem;
  position: relative;
}
.soft-skills li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--gold);
  opacity: 0.7;
}

/* Language list */
.lang-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.lang-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}
.lang-name {
  font-size: 0.88rem;
  color: var(--text);
}
.lang-level {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.75;
  background: var(--gold-soft);
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
}

/* =============================================
   PROJECTS — WORLD MAP (Tree Branch)
   ============================================= */
.projects {
  padding: calc(var(--nav-h) + 5rem) 0 0;
  position: relative;
  background: transparent;
}
.projects-header { position: relative; z-index: 1; }
.projects-gallery { position: relative; z-index: 1; }
.projects-header {
  padding: 0 3rem;
  max-width: 1300px;
  margin: 0 auto 2rem;
}

/* ── Map wrap ── */
.map-wrap {
  position: relative;
  width: 100%;
  height: 820px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 55% at 50% 100%, rgba(104,85,200,0.09) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 20% 20%, rgba(154,126,232,0.05) 0%, transparent 50%),
    radial-gradient(ellipse 30% 25% at 80% 15%, rgba(196,144,232,0.04) 0%, transparent 45%),
    linear-gradient(180deg, #080712 0%, #0c0a1e 40%, #100d26 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Subtle glow blobs in the map background */
.map-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}
.map-blob-1 { width: 300px; height: 300px; background: rgba(104,85,200,0.08); top: 10%; left: 8%; }
.map-blob-2 { width: 250px; height: 250px; background: rgba(154,126,232,0.06); top: 20%; left: 38%; }
.map-blob-3 { width: 280px; height: 280px; background: rgba(196,144,232,0.05); top: 15%; left: 65%; }
.map-blob-4 { width: 320px; height: 320px; background: rgba(104,85,200,0.07); top: 30%; left: 82%; }

/* SVG fills the map */
.map-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  z-index: 1;
}

/* ── Terrain ── */
/* terrain now lives in #worldLandscape */

/* Stars */
.star { fill: white; }

/* ── Branch paths ── */
.branch {
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  pathLength: 1;
}
.branch-trunk      { stroke: rgba(154,126,232,0.6); stroke-width: 2.5; }
.branch-main       { stroke: rgba(154,126,232,0.45); stroke-width: 1.8; }
.branch-sub        { stroke: rgba(154,126,232,0.32); stroke-width: 1.2; }

.branch.grow { animation: grow-branch var(--dur, 1.2s) cubic-bezier(0.4,0,0.2,1) forwards var(--delay, 0s); }
@keyframes grow-branch { to { stroke-dashoffset: 0; } }

/* Branch glow on hover (added via JS) */
.branch.lit { stroke: rgba(240,204,255,0.7) !important; stroke-width: 2.5 !important; }

/* Tiny decorative buds at junction points */
.bud {
  fill: var(--branch-dim);
  animation: bud-appear 0.4s ease forwards;
  transform-origin: center;
}
@keyframes bud-appear {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ── Map nodes ── */
.map-node {
  position: absolute;
  left: var(--x); top: var(--y);
  transform: translate(-50%, -50%);
  z-index: 10; cursor: pointer;
}
.node-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, #cbb8f8 0%, var(--gold) 60%);
  box-shadow: 0 0 10px var(--gold-glow), 0 0 24px rgba(210,168,78,0.2);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative; z-index: 2;
}
.node-dot::after {
  content: '';
  position: absolute; inset: -7px;
  border-radius: 50%;
  border: 1px solid rgba(154,126,232,0.4);
  animation: pulse-ring 3s ease-out infinite;
}
.node-dot::before {
  content: '';
  position: absolute; inset: -14px;
  border-radius: 50%;
  border: 1px solid rgba(154,126,232,0.15);
  animation: pulse-ring 3s ease-out infinite 0.8s;
}
@keyframes pulse-ring {
  0%   { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}
.map-node:hover .node-dot {
  transform: scale(1.5);
  box-shadow: 0 0 18px var(--gold-glow), 0 0 50px rgba(210,168,78,0.3);
}

.node-label {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--text);
  opacity: 0.55;
  white-space: nowrap;
  margin-top: 10px;
  text-align: center;
  transition: opacity 0.25s, color 0.25s;
}
.map-node:hover .node-label { opacity: 1; color: var(--gold); }

/* ── Node popup card ── */
.node-card {
  position: absolute;
  bottom: calc(100% + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 270px;
  background: rgba(14,12,28,0.96);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(154,126,232,0.2);
  border-radius: 10px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 100;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7), 0 0 40px rgba(154,126,232,0.1);
}
.map-node:hover .node-card {
  opacity: 1; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.map-node.card-below .node-card {
  bottom: auto; top: calc(100% + 20px);
  transform: translateX(-50%) translateY(-10px);
}
.map-node.card-below:hover .node-card { transform: translateX(-50%) translateY(0); }
.map-node.card-left .node-card {
  left: auto; right: 0;
  transform: translateX(0) translateY(10px);
}
.map-node.card-left:hover .node-card { transform: translateX(0) translateY(0); }

.node-card-thumb {
  width: 100%; aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--card);
  display: flex; align-items: center; justify-content: center;
}
.node-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.5s;
}
.map-node:hover .node-card-thumb img { transform: scale(1.06); }
.node-card-thumb .thumb-icon { font-size: 2rem; opacity: 0.35; }

.node-card-body { padding: 1rem; }
.node-card-body h3 {
  font-family: var(--font-head);
  font-size: 1.05rem; font-weight: 400;
  color: var(--text); margin-bottom: 0.35rem;
}
.node-card-body p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 0.7rem; }

.node-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.7rem; }
.tag {
  font-size: 0.6rem; padding: 0.18rem 0.5rem;
  border: 1px solid rgba(154,126,232,0.2);
  border-radius: 3px; color: var(--text-muted);
}
.btn-explore {
  font-size: 0.65rem; font-weight: 500;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold);
  transition: opacity 0.2s;
}
.btn-explore:hover { opacity: 0.65; }

/* =============================================
   PROJECTS GALLERY — 2-COLUMN GRID
   ============================================= */
.projects-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 340px;
  gap: 8px;
  padding: 0 6px 6px;
}

/* All cards auto-flow, no manual placement */
.proj-card { grid-column: auto; }

/* Last card (The Other Sight) spans full width as cinematic strip */
.proj-card:last-child {
  grid-column: 1 / -1;
}

/* Full-width card (col 1-3) is shorter — cinematic strip */
.proj-full { grid-auto-rows: unset; height: 260px; }

/* ── Card base ── */
.proj-card {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: var(--card-uw);
  cursor: pointer;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  transform-style: preserve-3d;
  will-change: transform;
  text-decoration: none;
  color: inherit;
}
.proj-card.visible {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger each card slightly */
.proj-card:nth-child(1) { transition-delay: 0s; }
.proj-card:nth-child(2) { transition-delay: 0.07s; }
.proj-card:nth-child(3) { transition-delay: 0.14s; }
.proj-card:nth-child(4) { transition-delay: 0.21s; }
.proj-card:nth-child(5) { transition-delay: 0.28s; }
.proj-card:nth-child(6) { transition-delay: 0.35s; }
.proj-card:nth-child(7) { transition-delay: 0.42s; }
.proj-card:nth-child(8) { transition-delay: 0.49s; }
.proj-card:nth-child(9) { transition-delay: 0.56s; }

/* Image fills the card */
.proj-card img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  filter: brightness(0.88) saturate(0.95);
}
.proj-card:hover img {
  transform: scale(1.04);
  filter: brightness(1) saturate(1.1);
}

/* ColorQuest: logo on white bg — multiply blend removes white, keeps the colours */
.proj-card:nth-child(2) {
  background: #0d0b20;
}
.proj-card:nth-child(2) img {
  mix-blend-mode: multiply;
  filter: brightness(1.1) saturate(1.15);
}

/* Full-span banner card — cinematic strip */
.proj-card--banner {
  height: 200px;
  align-self: start;
}
.proj-card--banner img {
  object-fit: cover;
  object-position: center 30%;
}

/* Fallback icon for cards with no image */
.proj-icon {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
  opacity: 0.25;
}

/* Dark card with no image */
.proj-dark { background: linear-gradient(135deg, #110f22, #1a1535); }

/* Missing image state */
.proj-card.no-img { background: var(--card); }
.proj-card.no-img .proj-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 100%);
}

/* ── Always-visible gradient overlay ── */
.proj-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  background: linear-gradient(
    to top,
    rgba(6,5,16,0.94) 0%,
    rgba(8,6,20,0.58) 35%,
    rgba(8,6,20,0.12) 65%,
    transparent       100%
  );
  transition: background 0.4s;
}
.proj-card:hover .proj-overlay {
  background: linear-gradient(
    to top,
    rgba(6,5,16,0.97) 0%,
    rgba(8,6,20,0.70) 45%,
    rgba(8,6,20,0.18) 70%,
    transparent       100%
  );
}

/* Project number */
.proj-num {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--gold);
  opacity: 0.65;
  margin-bottom: 0.3rem;
  display: block;
}

/* Project name */
.proj-name {
  font-family: var(--font-head);
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  font-weight: 400;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}
.proj-card:hover .proj-name { color: var(--gold); }

/* Tags */
.proj-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.6rem; }

/* Description — hidden by default, slides up on hover */
.proj-desc {
  font-size: 0.82rem;
  color: rgba(237,232,248,0.72);
  line-height: 1.65;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  transition: max-height 0.4s ease, opacity 0.35s ease, transform 0.35s ease;
}
.proj-card:hover .proj-desc {
  max-height: 80px;
  opacity: 1;
  transform: translateY(0);
}

/* Mobile fallback */
.projects-mobile { display: none; }

/* =============================================
   WORKSHOP — HORIZONTAL SLIDE
   ============================================= */
.workshop {
  padding: calc(var(--nav-h) + 3rem) 3rem 5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.workshop-header {
  margin-bottom: 2rem;
}

/* Cards grid — 3 cols, last card spans 2 */
.workshop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Individual card */
.ws-slide {
  padding: 1.6rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(12,11,26,0.7);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: border-color 0.3s, transform 0.3s;
}
.ws-slide:hover {
  border-color: rgba(154,126,232,0.4);
  transform: translateY(-3px);
}

/* Feature card spans 2 cols on second row */
.ws-slide-feature {
  grid-column: span 2;
  border-color: rgba(154,126,232,0.3);
  background: linear-gradient(135deg, rgba(12,11,26,0.8), rgba(26,21,53,0.7));
}

.ws-slide-num {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--gold);
  opacity: 0.5;
}
.ws-slide-title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.2;
}
.ws-slide-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.ws-slide-meta {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.meta-chip {
  font-size: 0.6rem; font-weight: 500; letter-spacing: 1px;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  background: rgba(154,126,232,0.12);
  color: var(--gold);
  border: 1px solid rgba(154,126,232,0.2);
}
.ws-slide-list {
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.ws-slide-list li {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Info strip */
.workshop-info-strip {
  display: flex; gap: 0;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.info-item {
  flex: 1;
  display: flex; align-items: center; gap: 1rem;
  padding: 1.5rem 2rem;
  background: var(--card);
  border-right: 1px solid var(--border);
  transition: background 0.3s;
}
.info-item:last-child { border-right: none; }
.info-item:hover { background: #1a1535; }
.info-icon { font-size: 1.6rem; flex-shrink: 0; }
.info-label {
  font-size: 0.65rem; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--gold); opacity: 0.85;
  margin-bottom: 0.2rem;
}
.info-value { font-size: 0.82rem; color: var(--text); line-height: 1.5; }

/* FAQ */
.workshop-faq {
  margin-top: 2.5rem;
  display: flex; flex-direction: column; gap: 0.6rem;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  overflow: hidden;
  transition: border-color 0.3s;
}
.faq-item:hover { border-color: rgba(154,126,232,0.3); }
.faq-item summary {
  padding: 1rem 1.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  user-select: none;
}
.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--gold);
  opacity: 0.6;
  transition: transform 0.3s;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  padding: 0 1.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  padding: 2.5rem 3rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg);
}
.footer-text { font-size: 0.72rem; letter-spacing: 1.5px; color: var(--text-muted); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-link { font-size: 0.8rem; color: var(--text-muted); transition: color 0.25s; }
.footer-link:hover { color: var(--gold); }

/* =============================================
   FADE-IN REVEALS
   ============================================= */
.fade-in {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible { opacity: 1; transform: none; }
.fade-in.from-left  { transform: translateX(-28px); }
.fade-in.from-right { transform: translateX( 28px); }
.fade-in.from-left.visible,
.fade-in.from-right.visible { transform: none; }

/* =============================================
   GRAIN OVERLAY
   ============================================= */
/* grain overlay disabled for performance */
@keyframes grain-shift {
  0%  { background-position: 0 0; }
  25% { background-position: -40px -20px; }
  50% { background-position: 15px -45px; }
  75% { background-position: -20px 30px; }
}

/* =============================================
   SKIP LINK
   ============================================= */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 100000;
  padding: 0.75rem 1.5rem;
  background: var(--gold);
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid var(--bg);
  outline-offset: -4px;
}

/* =============================================
   FOCUS VISIBLE — keyboard navigation
   ============================================= */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Nav links and pill buttons get a rounder ring */
.nav-link:focus-visible,
.btn-hero:focus-visible,
.btn-know:focus-visible,
.proj-back:focus-visible {
  outline-radius: 50px;
  border-radius: 50px;
}

/* =============================================
   CUSTOM CURSOR
   ============================================= */
@media (pointer: fine) {
  * { cursor: none !important; }
}
.cursor-dot {
  position: fixed; top: 0; left: 0;
  width: 5px; height: 5px;
  background: #f0ccff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease, background 0.2s;
  will-change: left, top;
}
.cursor-glow {
  position: fixed; top: 0; left: 0;
  width: 38px; height: 38px;
  background: radial-gradient(circle, rgba(154,126,232,0.32) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  will-change: left, top;
  transition: width 0.35s ease, height 0.35s ease, background 0.35s ease;
}
.cursor-glow.is-hovering {
  width: 64px; height: 64px;
  background: radial-gradient(circle, rgba(196,144,232,0.22) 0%, transparent 70%);
}
.cursor-glow.is-clicking {
  width: 28px; height: 28px;
  background: radial-gradient(circle, rgba(240,204,255,0.5) 0%, transparent 70%);
}

/* =============================================
   TEXT WORD-REVEAL
   ============================================= */
.wr {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.wi {
  display: inline-block;
  animation: word-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.wi.accent {
  color: var(--gold);
  font-weight: 700;
}
@keyframes word-rise {
  from { transform: translateY(115%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Section title slide-up (applied by JS) */
.section-title-reveal {
  transform: translateY(32px);
  opacity: 0;
  transition: transform 0.85s cubic-bezier(0.16,1,0.3,1), opacity 0.65s ease;
}
.section-title-reveal.visible {
  transform: translateY(0);
  opacity: 1;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 700px) {
  .landing-hero {
    flex-direction: column;
    gap: 1.5rem;
    padding: 0 1.5rem;
    text-align: center;
  }
  .landing-text {
    align-items: center;
    text-align: center;
  }
  .avatar-scene {
    width: 280px;
    height: 280px;
  }
  .landing-avatar {
    width: 145px;
    height: 145px;
  }
  .landing-actions {
    justify-content: center;
  }
}

@media (max-width: 960px) {
  .game-nav { padding: 0 1.5rem; }
  .nav-links {
    display: none; flex-direction: column;
    position: absolute; top: var(--nav-h); left: 0;
    width: 100%;
    background: rgba(8,7,18,0.97);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem; gap: 0.25rem;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .about { padding: calc(var(--nav-h) + 3rem) 1.5rem 4rem; }
  .about-bio-row { grid-template-columns: 1fr; text-align: center; }
  .about-portrait { width: 200px; height: 200px; margin: 0 auto; }
  .about-skills { grid-template-columns: 1fr; }

  .projects { padding: calc(var(--nav-h) + 3rem) 0 0; }
  .projects-header { padding: 0 1.5rem; }
  .projects-gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
    gap: 6px; padding: 0 4px 4px;
  }
  /* On mobile: all cards full-width */
  .proj-card { grid-column: 1 / -1 !important; }

  .workshop { padding: calc(var(--nav-h) + 3rem) 1.5rem 4rem; }
  .workshop-grid { grid-template-columns: 1fr; }
  .workshop-info-strip { flex-direction: column; }
  .info-item { border-right: none; border-bottom: 1px solid var(--border); }
  .info-item:last-child { border-bottom: none; }
  .site-footer { flex-direction: column; gap: 1rem; text-align: center; padding: 2rem 1.5rem; }
}
