/* ============================================================
   One Raid Studio — shared styles
   ============================================================ */

:root {
  --bg: #0a0a0c;
  --bg-2: #101013;
  --panel: #131318;
  --panel-2: #18181f;
  --border: #23232a;
  --border-strong: #2e2e36;
  --text: #f4f4f6;
  --text-dim: #9a9aa6;
  --text-mute: #62626e;
  --red: #ff2a3d;
  --red-soft: #ff2a3d22;
  --red-glow: 0 0 24px rgba(255, 42, 61, 0.45), 0 0 60px rgba(255, 42, 61, 0.18);
  --red-glow-card: 0 0 24px rgba(255, 42, 61, 0.315), 0 0 60px rgba(255, 42, 61, 0.126);
  --red-glow-soft: 0 0 14px rgba(255, 42, 61, 0.35);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.03) inset, 0 20px 40px -20px rgba(0,0,0,0.6);
  --pad-x: clamp(18px, 4vw, 56px);
  --section-pad: clamp(64px, 10vw, 120px);
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* ---------- custom scrollbar (#13 thin & subtle) ---------- */

html {
  scrollbar-width: thin;
  scrollbar-color: var(--red) #0c0c10;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0c0c10; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff2a3d, #b51c2b);
  border: 2px solid #0c0c10;
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover { background: var(--red); }
::-webkit-scrollbar-corner { background: #0c0c10; }

/* ---------- scroll progress bar (#anim) ---------- */

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, #ff2a3d, #ff6a78);
  box-shadow: 0 0 12px rgba(255, 42, 61, 0.7);
  z-index: 60;
  pointer-events: none;
}

/* ---------- intro (#anim page-load assembles from cubes) ---------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 600ms ease, visibility 600ms ease;
}
.intro.done {
  opacity: 0;
  visibility: hidden;
}
.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.intro-grid span {
  width: clamp(18px, 5vw, 30px);
  height: clamp(18px, 5vw, 30px);
  background: var(--border-strong);
  opacity: 0;
  transform: scale(0.2) translateY(14px);
  animation: introCube 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.intro-grid span.red {
  background: var(--red);
  box-shadow: var(--red-glow-soft);
}
.intro-grid span:nth-child(1) { animation-delay: 40ms; }
.intro-grid span:nth-child(2) { animation-delay: 120ms; }
.intro-grid span:nth-child(3) { animation-delay: 200ms; }
.intro-grid span:nth-child(4) { animation-delay: 100ms; }
.intro-grid span:nth-child(5) { animation-delay: 180ms; }
.intro-grid span:nth-child(6) { animation-delay: 260ms; }
.intro-grid span:nth-child(7) { animation-delay: 160ms; }
.intro-grid span:nth-child(8) { animation-delay: 240ms; }
.intro-grid span:nth-child(9) { animation-delay: 320ms; }
@keyframes introCube {
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.intro-word {
  position: absolute;
  bottom: clamp(28px, 6vh, 56px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-mute);
  opacity: 0;
  animation: introWord 600ms ease 380ms forwards;
}
@keyframes introWord { to { opacity: 1; } }

body.intro-lock { overflow: hidden; }

/* ---------- shared ---------- */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.section {
  padding: var(--section-pad) 0;
  position: relative;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--red);
  box-shadow: var(--red-glow-soft);
}

.section-heading {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: var(--text);
}

.section-intro {
  color: var(--text-dim);
  font-size: clamp(15px, 1.4vw, 17px);
  max-width: 56ch;
  margin: 0;
}

/* ---------- word-by-word heading reveal (#anim) ---------- */

.reveal-words .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.5em);
  transition: opacity 460ms ease, transform 460ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
  will-change: opacity, transform;
}
.reveal-words.in .word { opacity: 1; transform: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  transition: transform 160ms ease, box-shadow 200ms ease, background 200ms ease, border-color 200ms ease, color 200ms ease;
  white-space: nowrap;
  user-select: none;
}
.btn svg { flex: 0 0 auto; }

.btn-primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  animation: breathe 3.4s ease-in-out infinite;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--red-glow-soft);
  animation-play-state: paused;
}
.btn-primary:active { transform: translateY(0); }

/* breathing glow for all Discord CTAs (#4) */
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 6px rgba(255, 42, 61, 0.16); }
  50% { box-shadow: 0 0 12px rgba(255, 42, 61, 0.3), 0 0 22px rgba(255, 42, 61, 0.1); }
}

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: #4a4a55;
  background: rgba(255,255,255,0.03);
}

.btn-lg { height: 56px; padding: 0 28px; font-size: 16px; }

.magnetic { will-change: transform; }

/* ---------- nav ---------- */

.nav-wrap {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: backdrop-filter 200ms ease, background 200ms ease, border-color 200ms ease;
  border-bottom: 1px solid transparent;
}
.nav-wrap.is-scrolled {
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom-color: var(--border);
}
.nav {
  height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 200px;
  max-width: 60vw;
  height: 40px;
}
.logo-mark {
  width: 22px; height: 22px;
  background: var(--red);
  box-shadow: var(--red-glow-soft);
  position: relative;
  flex: 0 0 auto;
}
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255,255,255,0.85);
  mix-blend-mode: screen;
}
.logo-text {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 13px;
  color: var(--text);
}
.logo-text em {
  color: var(--text-mute);
  font-style: normal;
  font-weight: 400;
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 10px 14px;
  position: relative;
  transition: color 160ms ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::before {
  content: "";
  position: absolute;
  left: 14px; top: 50%;
  width: 4px; height: 4px;
  background: var(--red);
  transform: translate(-14px, -50%);
  opacity: 0;
  transition: opacity 160ms ease, transform 160ms ease;
}
.nav-links a:hover::before {
  opacity: 1;
  transform: translate(-10px, -50%);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.nav-menu-btn {
  display: none;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  align-items: center; justify-content: center;
}

/* mobile menu panel */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px var(--pad-x) 20px;
  background: rgba(10, 10, 12, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: none; }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: inline-flex; }
  .nav-cta .nav-discord-label { display: none; }
  .nav-cta .btn { padding: 0 14px; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 60% 50% at 30% 50%, rgba(10,10,12,0.85), rgba(10,10,12,0.2) 60%, transparent 80%),
    linear-gradient(180deg, rgba(10,10,12,0.4), transparent 30%, transparent 70%, rgba(10,10,12,0.9));
  pointer-events: none;
}
.hero-grid {
  position: absolute;
  inset: -10%;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 30%, transparent 80%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: 80px;
}

/* staggered entrance of hero content after intro */
.hero-rise { opacity: 0; transform: translateY(20px); }
body.ready .hero-rise {
  animation: heroRise 700ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
body.ready .hero-rise:nth-child(1) { animation-delay: 80ms; }
body.ready .hero-rise:nth-child(2) { animation-delay: 180ms; }
body.ready .hero-rise:nth-child(3) { animation-delay: 280ms; }
body.ready .hero-rise:nth-child(4) { animation-delay: 380ms; }
body.ready .hero-rise:nth-child(5) { animation-delay: 480ms; }
@keyframes heroRise { to { opacity: 1; transform: none; } }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  background: rgba(15,15,20,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  margin-bottom: 32px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.hero-tag .dot {
  width: 8px; height: 8px; background: var(--red);
  box-shadow: var(--red-glow-soft);
  animation: pulseDot 2.4s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.hero-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(46px, 9vw, 124px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 0 0 24px;
  max-width: 14ch;
}
.hero-title .accent {
  color: var(--red);
  text-shadow: 0 0 40px rgba(255, 42, 61, 0.35);
}
.hero-title .period {
  display: inline-block;
  width: 0.32em;
  height: 0.32em;
  background: var(--red);
  margin-left: 0.08em;
  transform: translateY(-0.06em);
  box-shadow: var(--red-glow-soft);
}

/* tagline (#3) */
.hero-tagline {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(16px, 1.8vw, 21px);
  letter-spacing: -0.01em;
  color: var(--text-dim);
  margin: 0 0 40px;
  transition: color 240ms ease, text-shadow 240ms ease;
  cursor: default;
  width: fit-content;
}
.hero-tagline:hover {
  color: var(--red);
  text-shadow: 0 0 28px rgba(255, 42, 61, 0.4);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.hero-meta {
  margin-top: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.hero-meta .sep { width: 4px; height: 4px; background: var(--border-strong); }
.hero-meta strong { color: var(--text-dim); font-weight: 500; }

.scroll-cube {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-mute);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.scroll-cube .sc-cube {
  width: 10px; height: 10px; background: var(--text-mute);
  animation: scrollBob 2s ease-in-out infinite;
}
@keyframes scrollBob {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(6px); opacity: 1; background: var(--red); box-shadow: var(--red-glow-soft); }
}

/* ---------- services ---------- */

.services-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 64px;
}
@media (min-width: 880px) {
  .services-head {
    grid-template-columns: 1.2fr 1fr;
    align-items: end;
  }
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 880px) {
  .cards.services-cards { grid-template-columns: repeat(3, 1fr); }
}

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
  overflow: hidden;
}
/* discovery sweep + hover glow (#14) */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(255,42,61,0.10), transparent 60%);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}
.card::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 50%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.06), transparent);
  transform: skewX(-18deg);
  opacity: 0;
  pointer-events: none;
}
.card:hover {
  border-color: var(--red);
  box-shadow: var(--red-glow-card);
  animation: cardFloat 3.2s ease-in-out infinite;
}
.card:hover::before { opacity: 1; }
.card:hover::after { animation: cardSweep 720ms ease forwards; }

/* floating + slight breathing while hovered (#14) */
@keyframes cardFloat {
  0%   { transform: translateY(-4px) scale(1); }
  50%  { transform: translateY(-9px) scale(1.012); }
  100% { transform: translateY(-4px) scale(1); }
}
@keyframes cardSweep {
  0%   { opacity: 0; left: -60%; }
  20%  { opacity: 1; }
  100% { opacity: 0; left: 120%; }
}

.card-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-mute);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 20px;
}
.card-num .tag {
  color: var(--text-dim);
  padding: 4px 8px;
  border: 1px solid var(--border-strong);
  font-size: 10px;
  white-space: nowrap;
}

.card-icon {
  width: 56px; height: 56px;
  position: relative;
  flex: 0 0 auto;
}
.card-icon svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* icon hover animations (#11) */
/* 3D box opens (lid lifts + hinges back) then closes, looping (#7) */
.card:hover .lid-3d {
  animation: lidOpen 2.4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
@keyframes lidOpen {
  0%   { transform: translateY(0) rotateX(0deg); }
  35%  { transform: translateY(-12px) rotateX(-32deg); }
  60%  { transform: translateY(-12px) rotateX(-32deg); }
  100% { transform: translateY(0) rotateX(0deg); }
}
.card:hover .icon-pixel rect { animation: pixelBlink 1.4s steps(1) infinite; }
.card:hover .icon-pixel rect:nth-child(2n) { animation-delay: 0.2s; }
.card:hover .icon-pixel rect:nth-child(3n) { animation-delay: 0.45s; }
.card:hover .icon-pixel rect:nth-child(5n) { animation-delay: 0.7s; }
@keyframes pixelBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.card:hover .icon-node .node-dot { animation: nodePulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.card:hover .icon-node .node-dot:nth-child(2) { animation-delay: 0.15s; }
.card:hover .icon-node .node-dot:nth-child(3) { animation-delay: 0.3s; }
.card:hover .icon-node .node-dot:nth-child(4) { animation-delay: 0.45s; }
.card:hover .icon-node .node-dot:nth-child(5) { animation-delay: 0.6s; }
@keyframes nodePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

.card-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.01em;
  margin: 0;
  min-height: 1.2em;
}
.card-summary {
  color: var(--text-dim);
  margin: 0;
  font-size: 15px;
  min-height: 3.1em; /* align lists across cards (#10) */
}
.card-list {
  list-style: none;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.card-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-dim);
}
.card-list li::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--red);
  flex: 0 0 auto;
}

/* ---------- projects (#20) ---------- */

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 760px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1040px) {
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
}

.project-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--red);
  box-shadow: var(--red-glow-card);
}
.project-thumb {
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  background: #0c0c10;
}
.project-thumb svg { width: 100%; height: 100%; display: block; transition: transform 600ms ease; }
.project-card:hover .project-thumb svg { transform: scale(1.05); }
.project-thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(10,10,12,0.8) 100%);
  pointer-events: none;
}
.project-free {
  z-index: 3;
  position: absolute;
  top: 14px; right: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  background: var(--red);
  padding: 5px 9px;
  box-shadow: var(--red-glow-soft);
}
.project-meta {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.project-cat {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.project-cat::before { content: ""; width: 6px; height: 6px; background: var(--red); }
.project-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 21px;
  letter-spacing: -0.01em;
  margin: 0;
}
.project-desc {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0;
  flex: 1;
}
.project-link {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 180ms ease, gap 180ms ease;
}
.project-card:hover .project-link { color: var(--red); gap: 12px; }

/* ---------- work ---------- */

.work-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 760px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1040px) {
  .work-grid { grid-template-columns: repeat(3, 1fr); }
}

.work-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
  display: flex;
  flex-direction: column;
}
.work-card:hover {
  transform: translateY(-4px);
  border-color: var(--red);
  box-shadow: var(--red-glow-card);
}
.work-thumb {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  background: #0c0c10;
}
.work-thumb-inner {
  position: absolute; inset: 0;
  transition: transform 600ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.work-card:hover .work-thumb-inner { transform: scale(1.04); }
.work-thumb svg { width: 100%; height: 100%; display: block; }
/* drop a real cover image in later: add <img class="work-cover" src="..."> inside .work-thumb-inner (#5) */
.work-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.work-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10,10,12,0.85) 100%);
  pointer-events: none;
}
.work-thumb-corner {
  position: absolute;
  left: 16px; top: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(10,10,12,0.6);
  padding: 6px 10px;
  border: 1px solid var(--border);
  backdrop-filter: blur(4px);
}
.work-thumb-corner::before {
  content: ""; width: 6px; height: 6px; background: var(--red);
}
.work-meta {
  padding: 22px 24px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.work-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.work-caption {
  color: var(--text-mute);
  font-size: 13px;
  margin: 0;
}
.work-arrow {
  width: 38px; height: 38px;
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: transform 200ms ease, background 200ms ease, color 200ms ease, border-color 200ms ease;
  flex: 0 0 auto;
}
.work-card:hover .work-arrow {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  transform: translate(2px, -2px);
}

/* ---------- contact ---------- */

.contact-wrap {
  position: relative;
  border: 1px solid var(--border);
  padding: clamp(28px, 6vw, 80px);
  background:
    radial-gradient(ellipse 80% 80% at 80% 0%, rgba(255,42,61,0.10), transparent 60%),
    linear-gradient(180deg, #0d0d11, #0a0a0c);
  overflow: hidden;
}
.contact-wrap::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 80% at 70% 30%, #000, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 70% 30%, #000, transparent 70%);
  pointer-events: none;
}
.contact-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: end;
}
@media (min-width: 880px) {
  .contact-inner { grid-template-columns: 1.2fr 1fr; gap: 80px; }
}

.contact-body p {
  color: var(--text-dim);
  font-size: 17px;
  margin: 0;
  max-width: 48ch;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
}
.discord-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red);
  transition: transform 180ms ease, box-shadow 220ms ease;
  animation: breathe 3.4s ease-in-out infinite;
}
.discord-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--red-glow-soft);
  animation-play-state: paused;
}
.discord-cta .label {
  font-family: var(--display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.005em;
}
.discord-cta .sub {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.78;
}
.discord-cta .left { display: flex; align-items: center; gap: 16px; }
.discord-cta .icon-box {
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.14);
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}

.email-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border: 1px solid var(--border-strong);
  color: var(--text);
  transition: border-color 200ms ease, background 200ms ease;
}
.email-cta:hover {
  border-color: #4a4a55;
  background: rgba(255,255,255,0.03);
}
.email-cta .label {
  font-family: var(--display);
  font-weight: 500;
  font-size: 16px;
}
.email-cta .addr {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 0.04em;
}
.email-cta .left { display: flex; flex-direction: column; gap: 2px; }

/* ---------- socials (#18) ---------- */

.socials {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.socials-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 0 0 20px;
}
.socials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 680px) {
  .socials-grid { grid-template-columns: repeat(4, 1fr); }
}
.social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  background: var(--panel);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.social-link:hover {
  transform: translateY(-3px);
  border-color: var(--red);
  box-shadow: var(--red-glow-soft);
}
.social-link .s-icon {
  width: 22px; height: 22px;
  color: var(--text-dim);
  flex: 0 0 auto;
  transition: color 180ms ease;
}
.social-link:hover .s-icon { color: var(--red); }
.social-link .s-name {
  font-family: var(--display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
  background: #08080a;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}
@media (min-width: 880px) {
  .footer-inner {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 64px;
  }
}
.footer-brand .logo {
  width: auto;
  margin-bottom: 16px;
}
.footer-brand .logo-mark { width: 32px; height: 32px; }
.footer-brand .logo-text { font-size: 15px; }
.footer-tagline {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 0 0 16px;
}
.footer-col ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.footer-col a {
  color: var(--text-dim);
  font-size: 14px;
  transition: color 160ms ease;
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.footer-bottom .cubes { display: inline-flex; gap: 4px; }
.footer-bottom .cubes span { width: 8px; height: 8px; background: var(--border-strong); }
.footer-bottom .cubes span:first-child { background: var(--red); }

/* ---------- scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 400ms ease, transform 400ms ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- responsive (#21) ---------- */

@media (max-width: 880px) {
  .hero-meta { gap: 14px; margin-top: 40px; }
  .hero-ctas .btn { flex: 1 1 auto; }
}
@media (max-width: 600px) {
  .hero { padding-top: 64px; }
  .hero-inner { padding-block: 48px; }
  .hero-ctas { width: 100%; }
  .hero-ctas .btn-lg { width: 100%; }
  .discord-cta { flex-wrap: wrap; }
  .discord-cta .left { gap: 12px; }
  .work-meta { padding: 18px 18px 20px; }
  .card { padding: 26px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .reveal-words .word { opacity: 1; transform: none; }
  .hero-rise { opacity: 1; transform: none; }
  .scroll-cube .sc-cube, .hero-tag .dot { animation: none; }
  html { scroll-behavior: auto; }
  .intro { display: none; }
}
