/* ============================
   LEARNING — Tutorial Hub
   Apple-quality Dark Hero Redesign
   ============================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand — Blue */
  --accent:        #0071e3;
  --accent-light:  #2997ff;
  --accent-deep:   #004fc4;
  --accent-vivid:  #60a5fa;
  --accent-dim:    rgba(0, 113, 227, 0.08);
  --accent-dim2:   rgba(0, 113, 227, 0.14);
  --accent-border: rgba(0, 113, 227, 0.20);
  --accent-glow:   rgba(0, 113, 227, 0.30);
  --accent-glow2:  rgba(0, 113, 227, 0.50);

  /* Surface */
  --bg:            #ffffff;
  --bg-alt:        #f8faff;
  --bg-alt2:       #f0f5ff;
  --surface:       #ffffff;
  --surface-raised:rgba(255, 255, 255, 0.9);

  /* Text */
  --text-1:        #0f172a;
  --text-2:        #475569;
  --text-3:        #94a3b8;

  /* Dark */
  --dark:          #030712;
  --dark-mid:      #0a1628;
  --dark-surface:  rgba(255, 255, 255, 0.04);
  --dark-surface-h:rgba(255, 255, 255, 0.08);
  --dark-border:   rgba(255, 255, 255, 0.08);
  --dark-border-h: rgba(255, 255, 255, 0.16);

  /* Border */
  --border:        rgba(15, 23, 42, 0.07);
  --border-strong: rgba(15, 23, 42, 0.14);
  --border-focus:  rgba(0, 113, 227, 0.50);

  /* Shadows */
  --shadow-xs:     0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-sm:     0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md:     0 12px 32px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
  --shadow-lg:     0 24px 64px rgba(0, 0, 0, 0.10), 0 8px 16px rgba(0, 0, 0, 0.06);
  --shadow-xl:     0 40px 80px rgba(0, 0, 0, 0.14), 0 12px 24px rgba(0, 0, 0, 0.08);
  --shadow-float:  0 32px 80px rgba(0, 0, 0, 0.18), 0 8px 24px rgba(0, 0, 0, 0.10);
  --shadow-accent: 0 8px 32px rgba(0, 113, 227, 0.28);
  --shadow-accent-lg: 0 16px 48px rgba(0, 113, 227, 0.36);

  /* Gradients */
  --grad-accent:   linear-gradient(135deg, #0071e3 0%, #2997ff 100%);
  --grad-accent-h: linear-gradient(135deg, #004fc4 0%, #0071e3 100%);
  --grad-brand:    linear-gradient(135deg, #0071e3 0%, #60a5fa 100%);
  --grad-dark:     linear-gradient(135deg, #030712 0%, #0a1628 100%);
  --grad-hero:     radial-gradient(ellipse at 60% 0%, rgba(0, 113, 227, 0.15) 0%, transparent 60%),
                   radial-gradient(ellipse at 0% 80%, rgba(96, 165, 250, 0.10) 0%, transparent 50%),
                   #030712;

  /* Radius */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  18px;
  --r-xl:  24px;
  --r-2xl: 32px;

  /* Layout */
  --nav-h: 64px;
  --max-w: 1100px;

  /* Type */
  --font:      -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', ui-monospace, 'Cascadia Code', Menlo, monospace;

  /* Motion */
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:    cubic-bezier(0.0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.6, 1);
  --dur:         0.22s;
  --dur-slow:    0.48s;
  --dur-xslow:   0.7s;
}

html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100%;
}

a  { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul  { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* Skip link */
.skip-link {
  position: absolute; top: -100%; left: 16px;
  padding: 8px 16px; background: var(--accent);
  color: #fff; font-weight: 600; font-size: 14px;
  border-radius: var(--r-md); z-index: 9999;
  text-decoration: none; transition: top var(--dur);
}
.skip-link:focus { top: 16px; }

/* Scroll progress */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px;
  width: 0%; background: var(--grad-accent);
  z-index: 9999; transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(0, 113, 227, 0.5);
}

/* ============================
   KEYFRAMES & ANIMATIONS
   ============================ */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-14px); }
}
@keyframes float-slow {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-9px); }
}
@keyframes orb-drift-1 {
  0%,  100% { transform: translate(0px, var(--oy, 0px)) scale(1); }
  33%        { transform: translate(80px, calc(var(--oy, 0px) - 50px)) scale(1.12); }
  66%        { transform: translate(-40px, calc(var(--oy, 0px) + 40px)) scale(0.92); }
}
@keyframes orb-drift-2 {
  0%,  100% { transform: translate(0px, var(--oy, 0px)) scale(1); }
  40%        { transform: translate(-60px, calc(var(--oy, 0px) + 30px)) scale(1.08); }
  70%        { transform: translate(50px, calc(var(--oy, 0px) - 30px)) scale(0.94); }
}
@keyframes orb-drift-3 {
  0%,  100% { transform: translate(0px, var(--oy, 0px)) scale(1); }
  50%        { transform: translate(30px, calc(var(--oy, 0px) - 60px)) scale(1.06); }
}
@keyframes pulse-ring {
  0%   { transform: scale(0.95); box-shadow: 0 0 0 0 var(--accent-glow); }
  70%  { transform: scale(1); box-shadow: 0 0 0 10px rgba(0, 113, 227, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 113, 227, 0); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes fade-up {
  0%   { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes glow-pulse {
  0%,  100% { box-shadow: 0 0 0 0 rgba(0, 113, 227, 0); }
  50%        { box-shadow: 0 0 24px 4px rgba(0, 113, 227, 0.25); }
}
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.float-anim      { animation: float 7s ease-in-out infinite; }
.float-anim-slow { animation: float-slow 10s ease-in-out infinite; }

/* Scroll reveal */
.reveal, .reveal-right, .reveal-stagger > * {
  opacity: 0;
  transform: translateY(32px) scale(0.98);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal-right { transform: translateX(40px) scale(0.98); }
.reveal.visible, .reveal-right.visible { opacity: 1; transform: none; }
.reveal-stagger.visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.04s; }
.reveal-stagger.visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.10s; }
.reveal-stagger.visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.16s; }
.reveal-stagger.visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.22s; }
.reveal-stagger.visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.28s; }
.reveal-stagger.visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.34s; }

/* ============================
   HEADER & NAV
   ============================ */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000; height: var(--nav-h);
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur), box-shadow var(--dur-slow), background var(--dur-slow);
}
.header.scrolled {
  background: rgba(248, 250, 255, 0.90);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 4px 24px rgba(0, 0, 0, 0.06);
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center; height: 100%;
  max-width: calc(var(--max-w) + 80px);
  margin: 0 auto; padding: 0 32px; gap: 16px;
}
.nav-left { display: flex; align-items: center; gap: 2px; }

.nav-link {
  font-size: 13.5px; font-weight: 500; color: rgba(255, 255, 255, 0.75);
  padding: 6px 12px; border-radius: var(--r-sm);
  transition: background var(--dur), color var(--dur); white-space: nowrap;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav-link.nav-link-active { color: var(--accent-vivid); }

.header.scrolled .nav-link { color: var(--text-2); }
.header.scrolled .nav-link:hover { background: var(--bg-alt); color: var(--text-1); }
.header.scrolled .nav-link.nav-link-active { color: var(--accent); }

.nav-brand { text-align: center; }
.brand-link {
  font-size: 16px; font-weight: 800;
  letter-spacing: -0.5px; color: #fff;
  display: flex; align-items: center; gap: 8px;
  transition: color var(--dur);
}
.brand-link:hover { color: var(--accent-light); }
.header.scrolled .brand-link { color: var(--text-1); }
.header.scrolled .brand-link:hover { color: var(--accent); }

.brand-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--grad-accent); display: flex;
  align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 13px;
  font-weight: 700; color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow);
  flex-shrink: 0;
}

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

.lang-switcher { display: flex; align-items: center; gap: 2px; }
.lang-btn {
  font-size: 12.5px; font-weight: 500; color: rgba(255, 255, 255, 0.50);
  padding: 4px 8px; border-radius: 6px;
  transition: color var(--dur), background var(--dur);
}
.lang-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.lang-btn.active { color: var(--accent-vivid); font-weight: 700; }
.lang-sep { color: rgba(255, 255, 255, 0.20); font-size: 13px; user-select: none; }

.header.scrolled .lang-btn { color: var(--text-3); }
.header.scrolled .lang-btn:hover { color: var(--text-1); background: var(--bg-alt); }
.header.scrolled .lang-btn.active { color: var(--accent); }
.header.scrolled .lang-sep { color: var(--border-strong); }

.nav-hamburger {
  display: none; flex-direction: column; gap: 5px; width: 28px; padding: 4px;
}
.nav-hamburger span {
  display: block; height: 2px; background: rgba(255, 255, 255, 0.85);
  border-radius: 2px; transition: transform var(--dur), opacity var(--dur);
}
.header.scrolled .nav-hamburger span { background: var(--text-1); }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none; position: fixed; top: var(--nav-h);
  left: 0; right: 0;
  background: rgba(3, 7, 18, 0.97);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border-bottom: 1px solid var(--dark-border);
  padding: 12px 20px 24px;
  flex-direction: column; gap: 2px; z-index: 999;
}
.nav-mobile.open { display: flex; }
.nav-mobile-link {
  font-size: 16px; font-weight: 500; color: rgba(255, 255, 255, 0.85);
  padding: 11px 12px; border-radius: var(--r-sm);
  transition: background var(--dur), color var(--dur);
}
.nav-mobile-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.lang-switcher-mobile {
  display: flex; gap: 8px; padding: 12px 12px 0;
  border-top: 1px solid var(--dark-border); margin-top: 8px;
}
.lang-switcher-mobile .lang-btn {
  font-size: 14px; padding: 7px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: var(--r-sm);
  color: rgba(255, 255, 255, 0.60);
}
.lang-switcher-mobile .lang-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.lang-switcher-mobile .lang-btn.active {
  border-color: var(--accent); color: var(--accent-light);
  background: rgba(0, 113, 227, 0.12);
}

/* ============================
   LAYOUT UTILS
   ============================ */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; }
.section { padding: 112px 0; }
.section-alt {
  background: var(--bg-alt);
  position: relative;
}

/* Dot grid on alt sections */
.section-alt::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0, 113, 227, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}
.section-alt > .container { position: relative; z-index: 1; }

.section-dark { background: var(--dark); }

.section-head { text-align: center; margin-bottom: 72px; }

.section-label {
  display: inline-block; font-size: 13px; font-weight: 800;
  letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
  border-left: 4px solid var(--accent);
  padding-left: 12px;
}

.section-title {
  font-size: clamp(30px, 5vw, 50px);
  font-weight: 800; letter-spacing: -1.8px; line-height: 1.08;
  color: var(--text-1); margin-bottom: 18px;
}
.section-title.light { color: #fff; }

.section-sub {
  font-size: clamp(15px, 2.5vw, 18px); font-weight: 400;
  color: var(--text-2); max-width: 560px; margin: 0 auto; line-height: 1.65;
}
.section-sub.light { color: rgba(255, 255, 255, 0.58); }

.accent { color: var(--accent); }

/* Utility: dot-grid background */
.bg-dots {
  background-image: radial-gradient(circle, rgba(0, 113, 227, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ============================
   HERO
   ============================ */
.hero {
  padding-top: calc(var(--nav-h) + 110px);
  padding-bottom: 120px;
  background: var(--grad-hero);
  position: relative; overflow: hidden;
  text-align: center;
}

/* Glowing grid overlay */
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 113, 227, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 113, 227, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
  z-index: 0;
}

/* Bottom fade to next section */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--bg-alt));
  pointer-events: none;
  z-index: 1;
}

.hero-orb {
  position: absolute; border-radius: 50%;
  pointer-events: none; will-change: transform;
  filter: blur(100px);
  z-index: 0;
}
.hero-orb-1 {
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(0, 113, 227, 0.22) 0%, transparent 70%);
  top: -250px; right: -150px;
  animation: orb-drift-1 22s ease-in-out infinite;
}
.hero-orb-2 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(41, 151, 255, 0.18) 0%, transparent 70%);
  bottom: -120px; left: -100px;
  animation: orb-drift-2 18s ease-in-out infinite;
}
.hero-orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.14) 0%, transparent 70%);
  top: 40%; left: 50%; transform: translate(-50%, -50%);
  animation: orb-drift-3 28s ease-in-out infinite;
}

.hero-inner {
  position: relative; z-index: 2;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0, 113, 227, 0.20);
  border: 1px solid rgba(0, 113, 227, 0.40);
  color: #60a5fa;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.8px; text-transform: uppercase;
  padding: 6px 16px; border-radius: 100px;
  margin-bottom: 32px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-title {
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 900; letter-spacing: -3px; line-height: 1.04;
  color: #ffffff; margin-bottom: 28px;
  animation: fade-up 0.7s var(--ease-out) 0.1s both;
}

.hero-title span.grad {
  background: var(--grad-brand);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 4s ease infinite;
}

.hero-sub {
  font-size: clamp(16px, 2.5vw, 20px); font-weight: 400;
  color: rgba(255, 255, 255, 0.70);
  max-width: 640px; margin: 0 auto 20px;
  line-height: 1.6;
  animation: fade-up 0.7s var(--ease-out) 0.2s both;
}

.hero-note {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.45);
  max-width: 560px; margin: 0 auto 48px;
  line-height: 1.6;
  animation: fade-up 0.7s var(--ease-out) 0.3s both;
}

.hero-note strong { color: rgba(255, 255, 255, 0.70); font-weight: 500; }

.hero-cta {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap;
  animation: fade-up 0.7s var(--ease-out) 0.4s both;
}

/* ============================
   BUTTONS
   ============================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; line-height: 1;
  padding: 13px 24px; border-radius: var(--r-md);
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--grad-accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
  background: var(--grad-accent-h);
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent-lg);
}
.btn-primary:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-accent);
}

.btn-outline {
  background: transparent; color: var(--text-1);
  border: 1.5px solid var(--border-strong);
}
/* Fill reveal pseudo-element */
.btn-outline::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--accent-dim2);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease);
  border-radius: inherit;
  z-index: 0;
}
.btn-outline > * { position: relative; z-index: 1; }
.btn-outline:hover::before { transform: scaleX(1); }
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.btn-outline:active { transform: scale(0.97); }

/* Dark context outline override (hero + featured card) */
.hero .btn-outline,
.tut-card-featured .btn-outline {
  border-color: rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.90);
}
.hero .btn-outline::before,
.tut-card-featured .btn-outline::before {
  background: rgba(255, 255, 255, 0.08);
}
.hero .btn-outline:hover,
.tut-card-featured .btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.70);
  color: #fff;
}

.btn-sm {
  font-size: 13px; padding: 9px 18px; border-radius: var(--r-sm);
}

/* ============================
   TUTORIAL CARDS GRID
   ============================ */
.tutorials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.tut-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 40px;
  transition:
    box-shadow var(--dur-slow) var(--ease),
    transform var(--dur-slow) var(--ease),
    border-color var(--dur) var(--ease);
  position: relative; overflow: hidden;
}

.tut-card:hover {
  box-shadow: var(--shadow-xl), 0 0 0 1px var(--accent-border), 0 0 48px rgba(0, 113, 227, 0.10);
  transform: translateY(-6px);
  border-color: var(--accent-border);
}

.tut-card-featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  background: linear-gradient(135deg, #0a1628 0%, #0d2a50 50%, #071020 100%);
  border-color: rgba(0, 113, 227, 0.30);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.20);
}
.tut-card-featured:hover {
  background: linear-gradient(135deg, #0d1f3a 0%, #103260 50%, #091828 100%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 4px 16px rgba(0, 113, 227, 0.20);
}

.tut-card-featured .tut-card-label  { color: rgba(255, 255, 255, 0.55); }
.tut-card-featured .tut-card-title  { color: #fff; }
.tut-card-featured .tut-card-subtitle { color: rgba(255, 255, 255, 0.75); }
.tut-card-featured .tut-card-desc   { color: rgba(255, 255, 255, 0.65); }

.tut-card-label {
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 10px;
}

.tut-card-title {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800; letter-spacing: -0.8px;
  color: var(--text-1); margin-bottom: 6px;
  line-height: 1.15;
}

.tut-card-subtitle {
  font-size: 14px; font-weight: 500;
  color: var(--accent); margin-bottom: 16px;
}

.tut-card-desc {
  font-size: 15px; color: var(--text-2);
  line-height: 1.65; margin-bottom: 28px;
}

.tut-card-actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

.tut-card-visual { position: relative; }

.tut-img-wrap {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.50), 0 4px 16px rgba(0, 0, 0, 0.25);
  background: #1d1d1f;
}

.tut-card-img {
  display: block; width: 100%; height: auto;
  border-radius: var(--r-lg);
}

/* Coming Soon card */
.tut-card-soon {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; gap: 16px;
  min-height: 240px;
  border-style: dashed;
  background: var(--bg-alt2);
}
.tut-card-soon:hover { transform: none; box-shadow: none; }
.tut-card-soon::before { display: none; }

.soon-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.soon-title { font-size: 18px; font-weight: 700; color: var(--text-2); letter-spacing: -0.3px; }
.soon-desc  { font-size: 14px; color: var(--text-3); max-width: 200px; }

/* Portfolio card */
.tut-card-portfolio {
  background: linear-gradient(135deg, #1d1d1f 0%, #0a0a0c 100%);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.tut-card-portfolio .tut-card-title { color: #fff; }
.tut-card-portfolio .tut-card-desc  { color: rgba(255, 255, 255, 0.6); }
.tut-card-portfolio:hover { border-color: var(--accent-border); }

/* Tools card */
.tut-card-tools {
  background: linear-gradient(135deg, #f0f7ff 0%, #f5f8ff 100%);
  border-color: var(--accent-border);
}

.tool-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.5px;
  color: var(--accent); background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  padding: 4px 12px; border-radius: 100px;
  margin-bottom: 20px;
}

/* Coming Soon Hint */
.coming-soon-hint {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin-top: 36px;
  font-size: 14px; color: var(--text-3);
  flex-wrap: wrap;
}
.coming-soon-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
  animation: pulse-ring 2.4s ease-in-out infinite;
}
.coming-soon-hint span:not(.coming-soon-dot) { color: var(--text-2); font-weight: 500; }
.coming-soon-sub { color: var(--text-3) !important; font-weight: 400 !important; }
.coming-soon-sep { color: var(--text-3); }

/* ============================
   DEVELOPER SECTION
   ============================ */
.dev-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  align-items: start;
}

.dev-info {}

.dev-avatar {
  width: 80px; height: 80px; border-radius: 20px;
  background: var(--grad-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 900; color: #fff;
  font-family: var(--font-mono);
  margin-bottom: 24px;
  box-shadow: 0 8px 24px var(--accent-glow), 0 2px 8px rgba(0, 0, 0, 0.12);
  animation: glow-pulse 3s ease-in-out infinite;
}

.dev-name {
  font-size: 28px; font-weight: 800; letter-spacing: -0.8px;
  color: var(--text-1); margin-bottom: 6px;
}

.dev-role {
  font-size: 14px; color: var(--accent); font-weight: 600;
  margin-bottom: 16px;
}

.dev-bio {
  font-size: 15px; color: var(--text-2); line-height: 1.7;
  margin-bottom: 24px;
}

.dev-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--accent);
  transition: gap var(--dur), color var(--dur);
}
.dev-link:hover { gap: 10px; color: var(--accent-deep); }

.dev-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.dev-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  transition:
    box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    transform var(--dur-slow) var(--ease);
}
.dev-card:hover {
  box-shadow: 0 0 0 1px var(--accent-border), var(--shadow-md);
  border-color: var(--accent-border);
  transform: translateY(-2px);
}
.dev-card:hover .dev-card-icon {
  transform: scale(1.12);
  filter: drop-shadow(0 4px 8px rgba(0, 113, 227, 0.25));
}

.dev-card-icon {
  font-size: 26px; margin-bottom: 12px;
  display: inline-block;
  transition: transform var(--dur-slow) var(--ease-spring), filter var(--dur-slow) var(--ease);
}
.dev-card-title {
  font-size: 15px; font-weight: 700; color: var(--text-1);
  margin-bottom: 8px; letter-spacing: -0.3px;
}
.dev-card-text {
  font-size: 13px; color: var(--text-2); line-height: 1.6; margin-bottom: 12px;
}
.dev-card-links { display: flex; flex-direction: column; gap: 4px; }
.dev-card-link {
  font-size: 12.5px; color: var(--accent); font-weight: 500;
  transition: opacity var(--dur), gap var(--dur);
}
.dev-card-link:hover { opacity: 0.75; }

/* ============================
   SUPPORT SECTION
   ============================ */
.support-inner {
  display: flex; flex-direction: column;
  align-items: center; gap: 32px;
  text-align: center;
}

.support-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 56px 48px;
  max-width: 540px; width: 100%;
  box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}

/* Subtle glow accent on support card */
.support-card::before {
  content: '';
  position: absolute; top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 300px; height: 200px;
  background: radial-gradient(circle, rgba(0, 113, 227, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.support-coffee-icon {
  font-size: 56px; margin-bottom: 20px;
  animation: float 5s ease-in-out infinite;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(255, 190, 50, 0.30));
}

.support-card-title {
  font-size: 24px; font-weight: 800; letter-spacing: -0.6px;
  color: var(--text-1); margin-bottom: 14px;
}

.support-card-text {
  font-size: 15px; color: var(--text-2);
  line-height: 1.65; margin-bottom: 32px;
}

.bmc-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #FFDD00; color: #000;
  font-size: 15px; font-weight: 700;
  padding: 14px 30px; border-radius: var(--r-md);
  transition: all var(--dur) var(--ease);
  box-shadow: 0 4px 16px rgba(255, 220, 0, 0.40);
  position: relative; overflow: hidden;
}
.bmc-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--dur);
}
.bmc-btn:hover {
  background: #f5d000;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 220, 0, 0.55);
}
.bmc-btn:hover::before { opacity: 1; }
.bmc-btn:active { transform: scale(0.97); }

.support-note { font-size: 12px; color: var(--text-3); margin-top: 14px; }

/* ============================
   FOOTER
   ============================ */
.footer {
  background: var(--dark);
  padding: 48px 0 28px;
  position: relative;
}

/* Top gradient border accent */
.footer::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 113, 227, 0.40) 30%,
    rgba(96, 165, 250, 0.40) 70%,
    transparent 100%
  );
}

.footer-inner {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--dark-border);
  margin-bottom: 24px;
}

.footer-brand {}

.footer-logo {
  font-size: 15px; font-weight: 800; color: #fff;
  letter-spacing: -0.4px; display: block; margin-bottom: 6px;
}

.footer-tag { font-size: 12px; color: rgba(255, 255, 255, 0.75); display: block; }

.footer-links {
  display: flex; flex-wrap: wrap; gap: 4px 20px;
  max-width: 600px; justify-content: flex-end;
}
.footer-links a {
  font-size: 12.5px; color: rgba(255, 255, 255, 0.85);
  transition: color var(--dur);
}
.footer-links a:hover { color: #fff; }

.footer-copy {
  font-size: 12px; color: rgba(255, 255, 255, 0.75);
  text-align: center;
}

/* ============================
   BACK TO TOP
   ============================ */
.back-top {
  position: fixed; bottom: 28px; right: 28px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--text-1);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none;
  transform: translateY(12px);
  transition: opacity var(--dur), transform var(--dur), background var(--dur), box-shadow var(--dur);
  z-index: 100;
}
.back-top.visible { opacity: 1; pointer-events: auto; transform: none; }
.back-top:hover {
  background: var(--accent);
  box-shadow: var(--shadow-accent);
  transform: translateY(-2px);
}

/* ============================
   SUBPAGE STYLES
   ============================ */
.subpage-hero {
  padding-top: calc(var(--nav-h) + 64px);
  padding-bottom: 48px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 500; color: var(--accent);
  margin-bottom: 24px;
  transition: gap var(--dur);
}
.back-btn:hover { gap: 10px; }

.subpage-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800; letter-spacing: -1.5px;
  color: var(--text-1); margin-bottom: 12px;
}

.subpage-subtitle {
  font-size: 18px; color: var(--accent); font-weight: 600;
  margin-bottom: 16px;
}

.subpage-meta { font-size: 14px; color: var(--text-3); }

.subpage-actions {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; margin-top: 28px;
}

/* Tutorial Content */
.tutorial-content { padding: 64px 0 96px; }
.tutorial-article { max-width: 780px; margin: 0 auto; }

.tutorial-article h2 {
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 800; letter-spacing: -0.8px;
  color: var(--text-1); margin: 56px 0 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.tutorial-article h2:first-child { border-top: none; margin-top: 0; }

.tutorial-article h3 {
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 700; letter-spacing: -0.4px;
  color: var(--text-1); margin: 32px 0 12px;
}

.tutorial-article p {
  font-size: 16px; color: var(--text-2);
  line-height: 1.75; margin-bottom: 20px;
}

.tutorial-article ul, .tutorial-article ol {
  margin-bottom: 20px; padding-left: 20px;
}

.tutorial-article ul { list-style: none; padding-left: 0; }
.tutorial-article ul li {
  font-size: 16px; color: var(--text-2); line-height: 1.7;
  padding: 4px 0 4px 20px; position: relative;
}
.tutorial-article ul li::before {
  content: '→'; position: absolute; left: 0;
  color: var(--accent); font-weight: 600;
}

.tutorial-article ol li {
  font-size: 16px; color: var(--text-2); line-height: 1.7; padding: 4px 0;
}

.tutorial-article strong { color: var(--text-1); font-weight: 700; }

.tutorial-article code {
  font-family: var(--font-mono);
  font-size: 13.5px; background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 2px 7px; border-radius: 5px;
  color: var(--accent);
}

.tutorial-article pre {
  background: var(--dark); border-radius: var(--r-md);
  padding: 24px; margin: 24px 0; overflow-x: auto;
}

.tutorial-article pre code {
  background: none; border: none; padding: 0;
  color: rgba(255, 255, 255, 0.85); font-size: 13.5px;
}

.tutorial-diagram {
  margin: 32px 0; border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.tutorial-diagram img { width: 100%; height: auto; display: block; }

.info-box {
  background: var(--accent-dim); border: 1px solid var(--accent-border);
  border-radius: var(--r-md); padding: 20px 24px;
  margin: 24px 0;
}
.info-box p { margin: 0; color: var(--text-1); font-size: 15px; }
.info-box strong { color: var(--accent); }

.toc {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 28px;
  margin-bottom: 48px;
}
.toc-title {
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 16px;
}
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { padding: 0; margin: 0; }
.toc-list li::before { display: none; }
.toc-list a {
  display: block; font-size: 14px; color: var(--text-2);
  padding: 5px 0; border-bottom: 1px solid transparent;
  transition: color var(--dur), border-color var(--dur);
}
.toc-list a:hover { color: var(--accent); border-bottom-color: var(--accent-border); }

/* Legal pages */
.legal-content { padding: 64px 0 96px; }
.legal-article { max-width: 760px; margin: 0 auto; }

.legal-article h2 {
  font-size: 20px; font-weight: 700; color: var(--text-1);
  margin: 40px 0 12px;
}
.legal-article p {
  font-size: 15px; color: var(--text-2);
  line-height: 1.75; margin-bottom: 16px;
}
.legal-article a { color: var(--accent); }
.legal-article a:hover { text-decoration: underline; }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 900px) {
  .tutorials-grid { grid-template-columns: 1fr; }
  .tut-card-featured {
    grid-column: span 1;
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .dev-grid { grid-template-columns: 1fr; gap: 40px; }
  .dev-cards { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav { grid-template-columns: auto 1fr auto; }
  .nav-left { display: none; }
  .nav-hamburger { display: flex; }
  .nav-brand { text-align: left; }
  .section { padding: 72px 0; }
  .tut-card { padding: 28px; }
  .support-card { padding: 36px 24px; }
  .footer-inner { flex-direction: column; gap: 24px; }
  .footer-links { justify-content: flex-start; }
  .lang-switcher { display: none; }
  .hero { padding-top: calc(var(--nav-h) + 72px); padding-bottom: 80px; }
}

@media (max-width: 480px) {
  .hero { padding-top: calc(var(--nav-h) + 56px); padding-bottom: 60px; }
  .hero-title { letter-spacing: -1.8px; }
  .tut-card-featured { gap: 24px; }
  .container { padding: 0 20px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .hero-title, .hero-sub, .hero-note, .hero-cta { animation: none; opacity: 1; transform: none; }
}
