/* ════════════════════════════════════════════════════════════════
   heyaapl.com - design system
   Layout rules mirror the Salüd marketing site (fixed scroll-header,
   hero grid, cards-grid, sectioning, fade-in scroll animations) but
   the brand identity is heyaapl's appletini green over a theme-aware
   surface that follows the visitor's OS color-scheme (light default,
   dark when preferred) and can be overridden with the header toggle.
   ════════════════════════════════════════════════════════════════ */

:root {
  /* ── Brand (theme-independent) ───────────────────────── */
  --apl-green: #3FB349;        /* the appletini green, sampled from the logo */
  --apl-green-bright: #5BD167; /* glow / hover */
  --apl-green-deep: #2C8E37;   /* borders, depth */
  --apl-lime: #8DC63F;         /* secondary accent */

  /* ── Platform colors ─────────────────────────────────── */
  --c-twitch: #9146FF;
  --c-youtube: #FF0000;
  --c-instagram: #E1306C;
  --c-bluesky: #1185FE;
  --c-threads: #111111;

  /* ── LIGHT THEME (default) ───────────────────────────── */
  --bg: #F1F5EF;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --surface-2: #F6FAF4;
  --text: #18271C;
  --text-dim: rgba(24, 39, 28, 0.66);
  --text-faint: rgba(24, 39, 28, 0.45);
  --border: rgba(24, 50, 30, 0.10);
  --border-strong: rgba(24, 50, 30, 0.16);
  --header-bg: rgba(255, 255, 255, 0.82);
  --card-shadow: 0 12px 32px rgba(24, 50, 30, 0.10);
  --threads-glyph: var(--c-threads);

  /* Hero is always a dramatic dark gradient in both themes. */
  --hero-from: #0d1f14;
  --hero-mid: #102a1a;
  --hero-to: #07120c;
}

/* ── DARK THEME: follows the visitor's OS color-scheme preference. ── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D1117;
    --bg-alt: #11161E;
    --surface: #161D27;
    --surface-2: #1B2531;
    --text: #E9EFE9;
    --text-dim: rgba(233, 239, 233, 0.66);
    --text-faint: rgba(233, 239, 233, 0.42);
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);
    --header-bg: rgba(13, 17, 23, 0.82);
    --card-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    --threads-glyph: #F4F6F4;
  }
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* Clip rather than hide so position:fixed/sticky descendants still
     anchor to the viewport (matches the Salüd approach). */
  overflow-x: clip;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.narrow {
  max-width: 880px;
}

/* ─── HEADER ───────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s, border-color 0.3s, background 0.3s;
}

.site-header.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
  border-bottom-color: var(--border);
}

/* 3-zone grid header (left | center | right). Top-of-page shows the
   full wordmark on the left; on scroll it collapses and the round
   icon fades in at center, same choreography as the Salüd header. */
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.6rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  transition: padding 0.35s;
}

.site-header.scrolled .header-inner {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

/* ── LEFT ZONE ── */
.header-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  justify-self: start;
  min-width: 0;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  transition: max-width 0.35s ease, opacity 0.35s ease;
}

.header-logo .logo-mark {
  height: 44px;
  width: 44px;
  transition: transform 0.35s;
}

.header-logo .logo-word {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.header-logo .logo-word span {
  color: var(--apl-green);
}

.site-header.scrolled .header-logo {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.nav-anchor { display: none; }
.site-header.scrolled .nav-anchor { display: block; }

/* ── CENTER ZONE (round icon, revealed on scroll) ── */
.header-center {
  justify-self: center;
  display: flex;
  align-items: center;
}

.logo-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px) scale(0.85);
  transition: opacity 0.35s, transform 0.35s;
}

.logo-icon-wrap img {
  height: 40px;
  width: 40px;
}

.site-header.scrolled .logo-icon-wrap {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* ── RIGHT ZONE ── */
.nav-pages { justify-self: end; }

.site-header.scrolled .nav-pages .anchor-fallback { display: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a:not(.btn) {
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}

.nav-links a:not(.btn):hover,
.nav-links a.is-current {
  color: var(--apl-green);
}

/* ─── BUTTONS ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
  line-height: 1;
}

.btn svg { width: 18px; height: 18px; }

.btn-primary {
  background: var(--apl-green);
  color: #06210c;
}
.btn-primary:hover {
  background: var(--apl-green-bright);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(63, 179, 73, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-outline:hover {
  border-color: var(--apl-green);
  color: var(--apl-green);
  transform: translateY(-2px);
}

/* Light buttons used on the dark hero */
.btn-on-dark {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}
.btn-on-dark:hover {
  border-color: var(--apl-green-bright);
  color: var(--apl-green-bright);
}

.btn-twitch { background: var(--c-twitch); color: #fff; }
.btn-twitch:hover { background: #7d2bff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(145,70,255,0.4); }
.btn-youtube { background: var(--c-youtube); color: #fff; }
.btn-youtube:hover { background: #e60000; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(255,0,0,0.35); }

/* ── Hamburger ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ─── MOBILE NAV ───────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 700;
}
.mobile-nav a:hover { color: var(--apl-green); }

/* ─── HERO ─────────────────────────────────────────────── */
.hero {
  padding: 9.5rem 1.5rem 5rem;
  background: linear-gradient(150deg, var(--hero-from) 0%, var(--hero-mid) 55%, var(--hero-to) 100%);
  position: relative;
  overflow: hidden;
  color: #fff;
}

/* Ambient green glow orbs (mirrors Salüd's radial ::before/::after) */
.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 680px;
  height: 680px;
  background: radial-gradient(circle, rgba(63, 179, 73, 0.20) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -35%;
  left: -10%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(141, 198, 63, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.85fr);
  gap: 3.5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-grid > * { min-width: 0; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--apl-green-bright);
  margin-bottom: 1.1rem;
}
.hero-eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--apl-green-bright);
  box-shadow: 0 0 0 0 rgba(91, 209, 103, 0.7);
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  color: #fff;
  margin-bottom: 1.25rem;
  line-height: 1.05;
}
.hero h1 .accent { color: var(--apl-green-bright); }

.hero-lead {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  max-width: 540px;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

/* ── Hero visual: the "stream card" with the animated appletini ── */
.hero-card-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.stream-card {
  width: 100%;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 1.4rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255,255,255,0.08);
  transition: transform 0.15s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
  position: relative;
  z-index: 1;
}

.stream-card-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.stream-card-head img {
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid var(--apl-green);
}
.stream-card-head .meta { flex: 1; min-width: 0; }
.stream-card-head .meta b {
  display: block;
  color: #fff;
  font-size: 0.98rem;
  font-weight: 700;
}
.stream-card-head .meta small {
  color: rgba(255,255,255,0.6);
  font-size: 0.78rem;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.live-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
}
/* Live on Twitch (set by js/main.js from the Twitch uptime check) */
.live-badge.is-live {
  background: rgba(63, 179, 73, 0.16);
  border-color: rgba(63, 179, 73, 0.4);
  color: var(--apl-green-bright);
}
.live-badge.is-live .dot {
  background: var(--apl-green-bright);
  box-shadow: 0 0 0 0 rgba(91, 209, 103, 0.7);
  animation: pulse 1.8s infinite;
}
/* Offline (default) */
.live-badge.is-offline {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.42);
  color: #f87171;
}
.live-badge.is-offline .dot {
  background: #f87171;
}

/* The martini stage */
.martini-stage {
  position: relative;
  border-radius: 16px;
  background:
    radial-gradient(120% 90% at 50% 10%, rgba(63,179,73,0.18) 0%, transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.18));
  padding: 1rem 0 0.5rem;
  overflow: hidden;
}
/* The logo is laid out in a square box so the bubble overlay (positioned
   in percentages) maps consistently onto the centered martini glass. */
.logo-anim {
  position: relative;
  width: 200px;
  max-width: 64%;
  aspect-ratio: 1;
  margin: 0.25rem auto;
}
.logo-anim .brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.35));
}

.stream-card-foot {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.now-playing {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
}
.now-playing .label {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.15rem;
}
.now-playing .game {
  color: var(--apl-green-bright);
  font-weight: 700;
  transition: opacity 0.4s;
}
.foot-platforms { display: flex; gap: 0.55rem; }
.foot-platforms a {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  transition: transform 0.2s, background 0.2s, color 0.2s;
}
.foot-platforms a:hover { transform: translateY(-2px); }
.foot-platforms svg { width: 16px; height: 16px; }

/* Floating chips around the card */
.float-chip {
  position: absolute;
  z-index: 6;                 /* float above the stream card, never behind it */
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  animation: float 5s ease-in-out infinite;
}
.float-chip .emoji { font-size: 1rem; }
.float-chip.chip-1 { top: 6%; left: -7%; animation-delay: 0s; }
.float-chip.chip-2 { top: 44%; right: -9%; animation-delay: 1.2s; }
.float-chip.chip-3 { bottom: 8%; left: -7%; animation-delay: 2.4s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(91, 209, 103, 0.6); }
  70% { box-shadow: 0 0 0 9px rgba(91, 209, 103, 0); }
  100% { box-shadow: 0 0 0 0 rgba(91, 209, 103, 0); }
}

/* ── Bubble overlay (rises through the glass on the logo) ── */
.b-dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  bottom: 42%;            /* sits in the liquid, lower-center of the glass */
  width: 6px;
  height: 6px;
  opacity: 0;
  animation: rise 3.4s ease-in infinite;
  pointer-events: none;
}
.b-dot.b1 { left: 46%; width: 6px; height: 6px; animation-delay: 0s;    animation-duration: 3.4s; }
.b-dot.b2 { left: 51%; width: 4px; height: 4px; animation-delay: 0.8s;  animation-duration: 4.1s; }
.b-dot.b3 { left: 49%; width: 7px; height: 7px; animation-delay: 1.6s;  animation-duration: 3s;   }
.b-dot.b4 { left: 53%; width: 4px; height: 4px; animation-delay: 2.2s;  animation-duration: 3.7s; }
.b-dot.b5 { left: 47%; width: 5px; height: 5px; animation-delay: 1.1s;  animation-duration: 4.4s; }
@keyframes rise {
  0%   { transform: translateY(0);     opacity: 0; }
  15%  { opacity: 0.9; }
  100% { transform: translateY(-46px); opacity: 0; }
}

/* ─── DESCRIPTOR MARQUEE ───────────────────────────────── */
.marquee {
  background: var(--apl-green);
  overflow: hidden;
  position: relative;
}
.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: scroll-x 28s linear infinite;
  font-size: 0;
  padding: 0.85rem 0;
}
.marquee-track .item {
  font-size: 0.95rem;
  font-weight: 800;
  color: #06210c;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  margin-right: 2.5rem;
}
.marquee-track .item::before {
  content: '✦';
  margin-right: 2.5rem;
  color: rgba(6, 33, 12, 0.5);
}
@keyframes scroll-x {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── GENERIC SECTIONS ─────────────────────────────────── */
.section { padding: 5.5rem 1.5rem; }
.section-alt { background: var(--bg-alt); }

.section-header {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 3.5rem;
}
.section-header h2 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  margin-bottom: 1rem;
}
.section-header p {
  color: var(--text-dim);
  font-size: 1.08rem;
}
.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--apl-green);
  margin-bottom: 0.85rem;
}

/* ─── ABOUT ────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
}
.about-photo {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 1;
  box-shadow: var(--card-shadow);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-photo::after {
  content: '';
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px var(--border);
  border-radius: 24px;
  pointer-events: none;
}
.about-photo .photo-tag {
  position: absolute;
  bottom: 0.9rem; left: 0.9rem;
  background: var(--apl-green);
  color: #06210c;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
}
.about-content h2 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 1.4rem;
}
.about-content p {
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-bottom: 1.15rem;
  line-height: 1.75;
}
.about-content strong { color: var(--text); font-weight: 700; }

.fact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.6rem;
}
.fact {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
}
.fact .emoji { font-size: 1rem; }

/* ─── WATCH / PLATFORM CARDS ───────────────────────────── */
.watch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.platform-card {
  position: relative;
  border-radius: 20px;
  padding: 2.25rem;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}
.platform-card:hover { transform: translateY(-5px); }
.platform-card .glow {
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.22;
  pointer-events: none;
}
.platform-card.twitch .glow { background: var(--c-twitch); }
.platform-card.youtube .glow { background: var(--c-youtube); }
.platform-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
  color: #fff;
}
.platform-icon svg { width: 30px; height: 30px; }
.platform-card.twitch .platform-icon { background: var(--c-twitch); }
.platform-card.youtube .platform-icon { background: var(--c-youtube); }
.platform-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}
.platform-card .handle {
  color: var(--apl-green);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
}
.platform-card p {
  color: var(--text-dim);
  font-size: 0.98rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.play-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2.5rem;
  justify-content: center;
}
.play-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.play-chip .emoji { margin-right: 0.4rem; }

/* ─── PROJECTS ─────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--apl-green);
}
.project-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.project-logo {
  width: 64px; height: 64px;
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.project-head .pmeta b {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.project-head .pmeta .role {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--apl-green);
}
.project-card > p {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  flex: 1;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.project-tags span {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.25rem 0.55rem;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
  color: var(--apl-green);
  align-self: flex-start;
}
.project-link svg { width: 16px; height: 16px; transition: transform 0.2s; }
.project-card:hover .project-link svg { transform: translate(2px, -2px); }

/* ─── CONNECT / SOCIALS ────────────────────────────────── */
.connect {
  background: linear-gradient(150deg, var(--hero-from) 0%, var(--hero-mid) 60%, var(--hero-to) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.connect::before {
  content: '';
  position: absolute;
  top: -30%; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 500px;
  background: radial-gradient(circle, rgba(63,179,73,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.connect .section-header h2 { color: #fff; }
.connect .section-header p { color: rgba(255,255,255,0.72); }
.connect .section-label { color: var(--apl-green-bright); }

.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  max-width: 920px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.social-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  transition: transform 0.25s, background 0.25s, border-color 0.25s;
}
.social-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.09);
}
.social-card .s-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.social-card .s-icon svg { width: 24px; height: 24px; }
.social-card .s-text b {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.social-card .s-text small {
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
}
.social-card.twitch .s-icon { background: var(--c-twitch); }
.social-card.youtube .s-icon { background: var(--c-youtube); }
.social-card.instagram .s-icon { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-card.bluesky .s-icon { background: var(--c-bluesky); }
.social-card.threads .s-icon { background: #000; }
.social-card.twitch:hover { border-color: var(--c-twitch); }
.social-card.youtube:hover { border-color: var(--c-youtube); }
.social-card.instagram:hover { border-color: var(--c-instagram); }
.social-card.bluesky:hover { border-color: var(--c-bluesky); }
.social-card.threads:hover { border-color: #fff; }

/* ─── FOOTER ───────────────────────────────────────────── */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem 2rem;
  color: var(--text-dim);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.footer-brand { display: flex; align-items: center; gap: 0.7rem; }
.footer-brand img { height: 40px; width: 40px; }
.footer-brand b { font-size: 1.2rem; font-weight: 800; color: var(--text); }
.footer-brand b span { color: var(--apl-green); }
.footer-socials { display: flex; gap: 0.6rem; }
.footer-socials a {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: transform 0.2s, color 0.2s, border-color 0.2s;
}
.footer-socials a:hover { transform: translateY(-2px); color: var(--apl-green); border-color: var(--apl-green); }
.footer-socials svg { width: 17px; height: 17px; }
.footer-copyright {
  width: 100%;
  text-align: center;
  padding-top: 1.75rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-faint);
}
.footer-copyright .sep { margin: 0 0.5rem; opacity: 0.5; }

/* ─── SCROLL ANIMATIONS ────────────────────────────────── */
.fade-in, .fade-in-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible, .fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 1024px) {
  /* Stack the hero and reorder so the visual sits between the title and
     the paragraph. display:contents dissolves .hero-content so its
     children become orderable flex items of .hero-grid. */
  .hero-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.9rem;
    text-align: center;
  }
  .hero-content { display: contents; }
  .hero-eyebrow { order: 1; justify-content: center; margin-bottom: 0; }
  .hero h1 { order: 2; margin-bottom: 0; }
  .hero-card-wrap { order: 3; width: 100%; }
  .hero-lead { order: 4; margin: 0 auto; }
  .hero-cta { order: 5; justify-content: center; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-photo { max-width: 420px; margin: 0 auto; order: -1; }
}

@media (max-width: 768px) {
  .nav-anchor,
  .site-header.scrolled .nav-anchor,
  .nav-pages { display: none; }
  .header-actions-desktop { display: none; }
  .hamburger { display: flex; justify-self: end; }
  .header-mobile-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-self: end;
  }
  .hero { padding: 8rem 1.25rem 4rem; }
  .section { padding: 4rem 1.25rem; }
  .float-chip { display: none; }
  .stream-card { max-width: 340px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (min-width: 769px) {
  .header-mobile-actions { display: none; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .social-grid { grid-template-columns: 1fr; }
}

/* ─── REDUCED MOTION ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-in, .fade-in-up { opacity: 1; transform: none; }
}
