/* ═══════════════════════════════════════════════════════════
   xoleric — creative portfolio v3.1 (V1 spirit + V3 skeleton)
   Flashlight mask-reveal · neon welcome · orbit · scroll layout
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #0b101a;
  --bg-soft: #0a0d14;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.07);
  --text: #e8ecf4;
  --text-2: #b6becb;
  --muted: #8a93a3;
  --faint: rgba(255, 255, 255, 0.35);
  --line: rgba(255, 255, 255, 0.09);
  --accent: #5aa7ff;
  --accent-2: #00d4ff;
  --accent-rgb: 90, 167, 255;
  --gold: #d2aa00;
  --ok: #4cd97b;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Arial Black', Impact, sans-serif;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 80px;
  --space-7: 120px;

  --ease-out: cubic-bezier(0.2, 0.9, 0.27, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 150ms;
  --t-ui: 300ms;
  --t-macro: 700ms;

  --header-h: 72px;
  --radius: 16px;
  --radius-sm: 12px;
  --max-w: 1200px;

  color-scheme: dark;
}

/* ─────────── RESET / BASE ─────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-snap-type: y proximity;
  scroll-padding-top: var(--header-h);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  /* NO pure black anywhere: this is only a fallback behind the animated
     WebGL chrome (which covers it completely when running) */
  background: radial-gradient(ellipse at 50% 0%, #161c28 0%, #0b0f18 75%);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─────────── CONTENT PROTECTION (no copy / no select / no screenshots) ─────────── */
html,
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  cursor: default;
}

img,
svg,
canvas,
a {
  -webkit-user-drag: none;
  -moz-user-select: none;
  user-select: none;
  pointer-events: inherit;
}

::selection {
  background: transparent;
  color: inherit;
}

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

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 110;
  padding: 10px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--accent);
  border-radius: 10px;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 0.3s var(--ease-out);
}

.skip-link:focus-visible { transform: translateY(0); }

/* ─────────── LOADER — BIOS boot → XOLERIC logo ─────────── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #0b101a;
  overflow: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

#loader.hidden { opacity: 0; visibility: hidden; }

.scanlines {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.12) 50%, rgba(0,0,0,0.12));
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 10;
}

#terminal-container {
  position: absolute;
  inset: 0;
  padding: clamp(28px, 6vw, 72px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  font-family: 'Courier New', ui-monospace, monospace;
  font-size: clamp(16px, 2.6vw, 22px);
  line-height: 1.55;
  letter-spacing: 0.04em;
  color: #c9ffd3;
  opacity: 0.95;
  z-index: 1;
}

.log-line { word-break: break-word; }
.log-line .ok { color: #4dff7e; }
.log-line .hash { color: #7dffb0; }
.log-line .load { color: #6ff0ff; }

#logo-container {
  position: absolute;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: #0b101a;
  z-index: 2;
}

.xoleric-logo {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: clamp(6px, 1.2vw, 10px);
  text-transform: uppercase;
  font-weight: 700;
  color: #fff;
  border: 2px solid #fff;
  padding: clamp(14px, 3vw, 20px) clamp(30px, 6vw, 50px);
  box-shadow: 0 0 15px rgba(255,255,255,0.2) inset, 0 0 20px rgba(255,255,255,0.3);
  text-shadow: 0 0 10px rgba(255,255,255,0.5);
  animation: fadeIn 0.5s ease-out forwards, glitch-anim 0.3s steps(2, end) infinite;
}

.xoleric-logo.stable {
  animation: fadeIn 0.5s ease-out forwards, glow 3s ease-in-out infinite;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes glitch-anim {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3px, 3px); }
  40% { transform: translate(-3px, -3px); }
  60% { transform: translate(3px, 3px); }
  80% { transform: translate(3px, -3px); }
  100% { transform: translate(0, 0); }
}

@keyframes glow {
  0% { box-shadow: 0 0 15px rgba(255,255,255,0.2) inset, 0 0 20px rgba(255,255,255,0.3); }
  50% { box-shadow: 0 0 30px rgba(255,255,255,0.5) inset, 0 0 50px rgba(255,255,255,0.6); }
  100% { box-shadow: 0 0 15px rgba(255,255,255,0.2) inset, 0 0 20px rgba(255,255,255,0.3); }
}

/* ─────────── SCROLL PROGRESS + HEADER ─────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  z-index: 40;
  pointer-events: none;
  will-change: transform;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0 clamp(var(--space-3), 4vw, var(--space-6));
  background: rgba(0, 0, 0, 0.7);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out), border-color 0.3s, background 0.3s;
}

.site-header.visible { opacity: 1; transform: translateY(0); }
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(0, 0, 0, 0.85); background: color-mix(in srgb, var(--bg) 85%, transparent); }

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.logo-dot { color: var(--accent-2); }

.site-nav { display: flex; gap: clamp(14px, 2vw, 28px); }

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  position: relative;
  transition: color 0.2s;
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  background: var(--accent-2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-out);
}

.site-nav a:hover, .site-nav a.active { color: var(--text); }
.site-nav a.active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: var(--space-2); }

/* ─────────── BUTTONS ─────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) ease,
              background var(--t-fast) ease, border-color var(--t-fast) ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #041018;
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.32);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(var(--accent-rgb), 0.45); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text-2);
}

.btn-ghost:hover { border-color: rgba(var(--accent-rgb), 0.5); color: var(--text); transform: translateY(-2px); }

.btn-lg { padding: 15px 28px; font-size: 15px; }
.btn-sm { padding: 9px 16px; font-size: 13px; }

.btn:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 3px;
}

/* ─────────── GLOBAL WEBGL BACKGROUND ─────────── */
canvas#webgl-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  /* GPU compositing: promotes the canvas to its own hardware layer so it
     never forces the page to re-paint under it (scroll stays 60fps) */
  will-change: transform;
  transform: translateZ(0);
}

.chrome-accent {
  position: fixed;
  top: -15%;
  right: -10%;
  width: 75%;
  height: 55%;
  z-index: -1;
  pointer-events: none;
  /* soft radial gradient only — no CSS blur filter: an already-soft gradient
     gains nothing from blur(14px) but it forces full re-raster every frame */
  background: radial-gradient(ellipse at 65% 25%,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(120, 120, 120, 0.02) 40%,
    transparent 72%);
  border-radius: 0 0 55% 35%;
  animation: accentDrift 20s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

@keyframes accentDrift {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 0.35; }
  100% { transform: translate(-6%, 4%) scale(1.12) rotate(3deg); opacity: 0.7; }
}

/* film grain removed from render path: at 3% opacity under mix-blend-mode
   it forced a full-region re-blend every frame on every device for zero
   visible benefit — kept as markup for potential future static use */
.grain-top { display: none; }

/* ─────────── VIGNETTE ─────────── */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 26;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(4, 6, 10, 0.55) 100%);
  opacity: 0;
  transition: opacity 1.2s ease;
}

.vignette.visible { opacity: 1; }

/* ─────────── SECTIONS / TYPOGRAPHY ─────────── */
.section {
  scroll-snap-align: start;
  scroll-margin-top: var(--header-h);
}

.section-head { margin-bottom: var(--space-5); }

.section-sub {
  margin-top: var(--space-2);
  font-size: 13px;
  color: var(--muted);
}

.section-sub .dot-live {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3fb950;
  margin-right: 6px;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 5px rgba(63, 185, 80, 0); }
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: var(--space-2);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.6vw, 58px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
}

.highlight {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ─────────── HERO ─────────── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh; /* iOS URL-bar safe viewport */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  overflow: hidden;
  padding: var(--header-h) clamp(var(--space-3), 6vw, var(--space-7)) var(--space-6);
}

.hero-art {
  position: relative;
  width: min(38vw, 372px);
  height: min(38vw, 372px);
  z-index: 1;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.hero-art .layer-main,
.hero-art .layer-bg,
.hero-art .reveal {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.hero-art .layer-bg { background-image: url('../images/bg.webp'); opacity: 0.5; }
.hero-art .layer-main { background-image: url('../images/main.webp'); opacity: 1; }

/* V1 flashlight reveal — clear bg.webp opens in a circle inside the art box only */
.hero-art .reveal {
  z-index: 2;
  background-image: url('../images/bg.webp');
  opacity: 0.92;
  -webkit-mask-image: radial-gradient(circle 0px at 50% 50%, #000 0%, transparent 100%);
  mask-image: radial-gradient(circle 0px at 50% 50%, #000 0%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.hero-art-sheen {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 40%), rgba(var(--accent-rgb), 0.16), transparent 55%);
  transition: background 0.2s ease;
  opacity: 0.9;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding-bottom: var(--space-2);
}

.hero .eyebrow {
  color: var(--accent-2);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55), 0 0 24px rgba(0, 0, 0, 0.4);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 76px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--text);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5), 0 0 44px rgba(0, 0, 0, 0.35);
  margin-bottom: var(--space-3);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.hero.ready .hero-title { opacity: 1; transform: none; }

/* Neon welcome letters */
.hero-title .word {
  display: inline-block;
  white-space: nowrap;
}

.hero-title .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(22px) scale(0.9);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.hero-title .letter.visible { opacity: 1; }
.hero-title .letter.space { width: 0.42em; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out) 0.3s, transform 0.8s var(--ease-out) 0.3s;
}

.hero.ready .hero-cta { opacity: 1; transform: none; }

.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: clamp(var(--space-3), 6vw, var(--space-7));
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 1s ease 1s;
}

.hero.ready .hero-scroll { opacity: 1; }

.hero-scroll .arrow {
  width: 16px;
  height: 16px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  animation: bounceDown 2s ease-in-out infinite;
}

@keyframes bounceDown {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.4; }
  50% { transform: rotate(45deg) translateY(5px); opacity: 1; }
}

/* ─────────── ORBIT — orbiting social ring ─────────── */
.hero-orbit {
  position: absolute;
  right: clamp(24px, 6vw, 100px);
  top: 50%;
  transform: translateY(-50%);
  width: var(--orbit-d, 320px);
  height: var(--orbit-d, 320px);
  z-index: 1;
  pointer-events: none;
}

.orbit-ring {
  position: relative;
  width: 100%;
  height: 100%;
  /* solid hairline (not dashed): a rotating dashed border must re-raster
     every frame, a solid one is a pure compositor transform */
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 50%;
  animation: orbitSpin 48s linear infinite;
  will-change: transform;
}

.orbit-ring::before {
  content: '';
  position: absolute;
  inset: 22%;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: 50%;
}

.orbit-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  margin: -23px;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(10, 13, 20, 0.82);
  /* no backdrop-filter here: the icons rotate continuously, and per-frame
     backdrop sampling is one of the most expensive GPU ops on weak devices */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transform: rotate(var(--a)) translateX(var(--orbit-r, 160px)) rotate(calc(-1 * var(--a)));
  color: var(--accent);
  transition: border-color 0.2s, box-shadow 0.2s;
  will-change: transform;
}

/* soft mist trail sweeping behind each icon along its orbit
   (gradient-only softness — a blur filter here re-rasters every frame) */
.orbit-icon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 80px;
  height: 14px;
  margin-top: -7px;
  border-radius: 8px;
  background: linear-gradient(to right,
    transparent,
    color-mix(in srgb, currentColor 30%, transparent) 45%,
    color-mix(in srgb, currentColor 14%, transparent) 75%,
    transparent);
  transform: rotate(calc(var(--a) - 90deg));
  transform-origin: left center;
  opacity: 0.4;
  pointer-events: none;
}

.orbit-icon .icon-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  animation: orbitSpin 48s linear infinite reverse;
  will-change: transform;
}

.orbit-icon svg { width: 18px; height: 18px; fill: currentColor; transition: color 0.2s; }

.orbit-icon:hover {
  animation-play-state: paused;
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 10px 26px rgba(var(--accent-rgb), 0.35);
}

.orbit-icon.yt:hover { color: #ff0033; }
.orbit-icon.ig:hover { color: #e1306c; }
.orbit-icon.tg:hover { color: #229ed9; }
.orbit-icon.gh:hover { color: var(--text); }
.orbit-icon.pin:hover { color: #e60023; }
.orbit-icon.in:hover { color: #0a66c2; }

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

/* ─────────── ORBIT TRAVEL (≥1200px) ───────────
   The social ring leaves the hero and rolls down the page with scroll,
   riding the empty side zones. JS picks the clearest lane per frame
   (gutter center → edge hug → hidden) so it never covers panels/text. */
.orbit-layer {
  position: fixed;
  inset: 0;
  z-index: 3; /* above page background, below header/toasts */
  pointer-events: none;
  display: none;
}

.orbit-layer.active { display: block; }

.hero-orbit.orbit-travel {
  position: absolute;
  left: 0;
  top: 0;
  right: auto;
  width: var(--orbit-d, 320px);
  height: var(--orbit-d, 320px);
  transform: translate3d(-999px, -999px, 0);
  will-change: transform, opacity;
  transition: opacity 0.35s ease;
}

/* scroll drives rotation in travel mode — the CSS spin animations stop */
.hero-orbit.orbit-travel .orbit-ring,
.hero-orbit.orbit-travel .icon-inner { animation: none; }

@media (max-width: 1199.98px) {
  .orbit-layer { display: none !important; }
}

/* ─────────── ABOUT ─────────── */
.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: var(--space-6);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--space-7) clamp(var(--space-3), 6vw, var(--space-6));
}

.about-sticky { position: sticky; top: calc(var(--header-h) + var(--space-5)); align-self: start; }

.about-sticky .section-title { margin-bottom: var(--space-5); }

.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: var(--space-3);
}

.stat { text-align: left; }

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 700;
  color: var(--accent-2);
}

.stat-label { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.about-content { display: grid; gap: var(--space-4); }

.about-lead { font-size: clamp(16px, 1.6vw, 20px); line-height: 1.7; color: var(--text-2); }

.about-blurbs { display: grid; gap: var(--space-3); }

.blurb {
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform var(--t-ui) var(--ease-out), border-color var(--t-ui);
}

.blurb:hover { transform: translateY(-3px); border-color: rgba(var(--accent-rgb), 0.4); }

.blurb h3 { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--accent); margin-bottom: 6px; }

.blurb p { font-size: 14px; color: var(--muted); line-height: 1.65; }

/* ─────────── WORK ─────────── */
.work {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--space-7) clamp(var(--space-3), 6vw, var(--space-6));
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.project-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform var(--t-fast) var(--ease-out), border-color var(--t-ui), box-shadow var(--t-ui);
  opacity: 0;
  transform-origin: center;
}

.project-card:hover {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.card-body { padding: var(--space-3); }

.card-tag {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.card-body h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  margin: 8px 0 6px;
}

.card-body p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }

/* GitHub live-card art (no screenshot — gradient + lang badge) */
.card-art {
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1a2536, #0c121d);
}

.card-art::before {
  content: '';
  position: absolute;
  top: -45%;
  right: -25%;
  width: 75%;
  height: 130%;
  background: radial-gradient(circle at 30% 35%, rgba(143, 215, 255, 0.22), transparent 60%);
}

.card-art-lang {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 34px;
  height: 6px;
  border-radius: 3px;
  box-shadow: 0 0 14px currentColor;
}

.card-art-name {
  position: absolute;
  left: 16px;
  bottom: 14px;
  right: 16px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-impact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--gold);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.card-meta .meta-stars { color: var(--accent-2); }

.card-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  transition: transform 0.2s var(--ease-out), color 0.2s;
}

.project-card:hover .card-link { transform: translateX(4px); color: var(--accent-2); }

/* ─────────── CONTACT ─────────── */
.contact {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--space-7) clamp(var(--space-3), 6vw, var(--space-6));
  display: flex;
  justify-content: center;
}

.contact-box {
  width: min(720px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(var(--space-4), 5vw, var(--space-6));
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  text-align: center;
}

.contact-lead {
  color: var(--muted);
  margin: var(--space-2) 0 var(--space-4);
  font-size: 15px;
}

.contact-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

/* ─────────── FOOTER ─────────── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--space-5) clamp(var(--space-3), 6vw, var(--space-6));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
}

.footer-social { display: flex; gap: var(--space-2); }

.social-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform 0.2s var(--ease-out), border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.social-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  color: var(--muted);
  transition: color 0.2s;
}

.social-icon:hover { transform: translateY(-3px) scale(1.1); box-shadow: 0 10px 24px rgba(var(--accent-rgb), 0.3); }

.social-icon.yt:hover svg { color: #ff0033; }
.social-icon.ig:hover svg { color: #e1306c; }
.social-icon.tg:hover svg { color: #229ed9; }
.social-icon.gh:hover svg { color: var(--text); }
.social-icon.pin:hover svg { color: #e60023; }
.social-icon.in:hover svg { color: #0a66c2; }

.social-icon.yt:hover { border-color: #ff0033; }
.social-icon.ig:hover { border-color: #e1306c; }
.social-icon.tg:hover { border-color: #229ed9; }
.social-icon.gh:hover { border-color: rgba(255, 255, 255, 0.5); }
.social-icon.pin:hover { border-color: #e60023; }
.social-icon.in:hover { border-color: #0a66c2; }

.footer-note { font-size: 13px; color: var(--muted); }

.footer-top {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}

.footer-top:hover { color: var(--accent-2); }

/* ─────────── EASTER EGG ─────────── */
.ee-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 70;
  padding: 12px 24px;
  border-radius: 30px;
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  background: #0a0d14;
  background: color-mix(in srgb, var(--bg-soft) 85%, transparent);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s var(--ease-out);
}

.ee-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─────────── WEBGL BG TOGGLE ─────────── */
body.ee-mode .hero-art .layer-main,
body.ee-mode .hero-art .layer-bg { filter: hue-rotate(180deg) saturate(1.5); }

body.ee-mode .hero-title { animation: eePulse 1.6s infinite alternate ease-in-out; }

@keyframes eePulse {
  0% { text-shadow: 0 0 10px rgba(255, 0, 100, 0.5); }
  100% { text-shadow: 0 0 24px rgba(0, 255, 200, 0.6); }
}

/* ─────────── REVEAL ON SCROLL ─────────── */
.reveal-up {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal-up.in-view { opacity: 1; transform: none; }

/* ─────────── REDUCED MOTION ─────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-snap-type: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-art .reveal { opacity: 0; }
  .project-card, .reveal-up { opacity: 1; transform: none; }
  .hero-title, .hero-cta, .hero-scroll { opacity: 1; transform: none; }
  .hero-title .letter { opacity: 1; }
}

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 960px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; gap: var(--space-4); }
  .about-sticky { position: static; }
}

@media (max-height: 620px) and (min-width: 769px) {
  .hero-art { width: 220px; height: 220px; }
  .hero-title { font-size: clamp(26px, 4vw, 46px); }
  .hero { padding-bottom: calc(var(--space-6) / 2); }
}

@media (max-width: 768px) {
  .site-nav a { font-size: 12.5px; }
  .header-actions .btn { display: none; }
  .projects-grid { grid-template-columns: 1fr; }
  .hero { align-items: flex-start; text-align: left; }
  .hero-title { font-size: clamp(16px, 5vw, 44px); }
  .eyebrow { letter-spacing: 0.22em; font-size: 11px; }

  /* FIX: the orbit used to stay absolutely centered over the hero text and
     overlap the eyebrow/title/CTAs on phones. It now flows BELOW the content
     as a normal flex child — nothing can overlap anymore. */
  .hero-art {
    width: min(82vw, 304px);
    height: min(82vw, 304px);
    margin: 0 auto var(--space-4);
  }
  .hero-content { max-width: 100%; }
  .hero-orbit {
    position: static;
    transform: none;
    width: 190px;
    height: 190px;
    margin: var(--space-5) auto 0;
    opacity: 0.85;
    --orbit-r: 76px;
    flex-shrink: 0;
  }
  .orbit-icon { width: 40px; height: 40px; margin: -20px; }

  .hero-scroll { display: none; }
  .about, .work, .contact { padding-top: var(--space-6); padding-bottom: var(--space-6); }

  /* strip heavy GPU blur on small screens — mobile GPUs re-sample
     backdrop-filter every frame and it fights the WebGL background */
  .site-header,
  .contact-box {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(11, 16, 26, 0.92);
  }
}

/* very small phones — keep everything readable, nothing clipped */
@media (max-width: 380px) {
  .hero-art {
    width: min(92vw, 300px);
    height: min(92vw, 300px);
  }
  .hero-orbit {
    width: 160px;
    height: 160px;
    --orbit-r: 62px;
  }
  .orbit-icon { width: 36px; height: 36px; margin: -18px; }
}

/* ─────────── TOUCH DEVICES — strip heavy GPU work, never jank/freeze ─────────── */
@media (pointer: coarse) {
  html { scroll-snap-type: none; }

  .site-header,
  .contact-box,
  .orbit-icon {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .chrome-accent {
    filter: none;
    animation: none;
    opacity: 0.5;
  }

  .grain-top { display: none; }

  .orbit-ring,
  .orbit-icon,
  .orbit-icon .icon-inner,
  .orbit-icon::after {
    animation: none;
  }

  .orbit-icon::after { display: none; }
}
