/* ============ FONTS ============ */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;700&family=Fraunces:ital,wght@0,400;0,600;0,900;1,400;1,900&family=VT323&display=swap');

/* ============ TOKENS ============ */
:root {
  /* brand palette */
  --c-purple-deep: #110090;
  --c-purple-mid: #4c2e84;
  --c-purple-soft: #5f3a92;
  --c-yellow: #ffc932;
  --c-yellow-soft: #fbdc6d;
  --c-yellow-warm: #f6c745;
  --c-yellow-dim: #eebb43;

  /* accents (tweakable) */
  --accent: var(--c-yellow);
  --accent-2: var(--c-yellow-soft);

  /* fonts (tweakable) */
  --f-display: 'Space Grotesk', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', monospace;
  --f-pixel: 'VT323', monospace;
  --f-serif: 'Fraunces', serif;

  /* dark theme defaults */
  --bg: #0a0050;
  --bg-2: #110090;
  --bg-3: #1a0fa0;
  --surface: #19119c;
  --surface-2: #2a1eb0;
  --ink: #fff8e1;
  --ink-soft: #d4c9ff;
  --ink-dim: #9d8fd1;
  --border: rgba(251, 220, 109, 0.25);
  --border-strong: rgba(255, 201, 50, 0.6);
  --shadow-color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
  --bg: #fbdc6d;
  --bg-2: #fdebaa;
  --bg-3: #fff8d9;
  --surface: #fff8d9;
  --surface-2: #fff;
  --ink: #110090;
  --ink-soft: #2a1eb0;
  --ink-dim: #4c2e84;
  --border: rgba(17, 0, 144, 0.25);
  --border-strong: rgba(17, 0, 144, 0.7);
  --shadow-color: rgba(17, 0, 144, 0.35);
}

/* ============ RESET ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-display);
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s, color 0.4s;
  position: relative;
}

/* grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.12;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* scanlines overlay (retro CRT) */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.04) 2px,
    rgba(0, 0, 0, 0.04) 3px
  );
  opacity: 0.7;
}

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

::selection {
  background: var(--accent);
  color: var(--c-purple-deep);
}

/* ============ UTILITIES ============ */
.container {
  width: min(1280px, 100% - 48px);
  margin-inline: auto;
}

.mono { font-family: var(--f-mono); }
.pixel { font-family: var(--f-pixel); letter-spacing: 0.02em; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-top: 12px;
}

.section-title em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

/* hard shadow (90s brutalist) */
.hard-shadow {
  box-shadow: 6px 6px 0 0 var(--accent);
}
.hard-shadow-purple {
  box-shadow: 6px 6px 0 0 var(--c-purple-deep);
}

/* sticker (rotated badge) */
.sticker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--accent);
  color: var(--c-purple-deep);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 2px solid var(--c-purple-deep);
}

/* pixel border */
.pixel-border {
  border: 3px solid var(--ink);
  position: relative;
}

/* CRT glow on hover */
.crt-hover {
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}
.crt-hover:hover {
  transform: translate(-3px, -3px);
}

/* blink cursor */
.cursor-blink::after {
  content: '▊';
  display: inline-block;
  margin-left: 4px;
  color: var(--accent);
  animation: blink 1s steps(2) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* marquee */
@keyframes scroll-x {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* shimmer for loading */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* glitch */
@keyframes glitch {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-2px, 1px); }
  40% { transform: translate(2px, -1px); }
  60% { transform: translate(-1px, 2px); }
  80% { transform: translate(1px, -2px); }
}

.glitch:hover {
  animation: glitch 0.3s infinite;
}

/* fade in on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 14px;
}
.nav-logo-mark {
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: var(--c-purple-deep);
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-weight: 700;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-3deg);
  transition: transform 0.2s;
}
.nav-logo:hover .nav-logo-mark {
  transform: rotate(3deg);
}
.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  align-items: center;
}
.nav-links > li { display: inline-flex; align-items: center; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 13px;
  font-family: var(--f-mono);
  line-height: 1;
  border-radius: 6px;
  position: relative;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::before {
  content: '◆';
  margin-right: 6px;
  font-size: 9px;
}

.nav-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.nav-btn {
  width: 36px;
  height: 36px;
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 700;
}
.nav-btn:hover {
  background: var(--accent);
  color: var(--c-purple-deep);
  border-color: var(--accent);
}
.nav-btn.lang {
  width: auto;
  padding: 0 10px;
  gap: 4px;
  display: flex;
}

/* mobile nav */
@media (max-width: 880px) {
  .nav-links { display: none; }
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  padding: 120px 0 80px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* hero-bg patterns */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  opacity: 0.6;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
}
.hero-orb-1 {
  width: 500px; height: 500px;
  background: var(--accent);
  top: -100px; right: -150px;
  opacity: 0.25;
}
.hero-orb-2 {
  width: 400px; height: 400px;
  background: var(--c-purple-soft);
  bottom: -100px; left: -100px;
  opacity: 0.4;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  border-radius: 8px;
  transition: transform 0.15s, box-shadow 0.15s;
  background: transparent;
  color: var(--ink);
  position: relative;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}
.btn:active {
  transform: translate(0, 0);
  box-shadow: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--c-purple-deep);
  border-color: var(--c-purple-deep);
}
.btn-primary:hover {
  box-shadow: 4px 4px 0 var(--c-purple-deep);
}

/* ============ CARD ============ */
.card {
  background: var(--surface);
  border: 2px solid var(--border-strong);
  border-radius: 12px;
  padding: 24px;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card.bordered-hard {
  border: 3px solid var(--ink);
  border-radius: 8px;
}
.card.bordered-hard:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--accent);
}

/* ============ SECTIONS ============ */
section {
  padding: 100px 0;
  position: relative;
}

.section-head {
  margin-bottom: 56px;
  max-width: 800px;
}

/* ============ ABOUT ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; }
}

.about-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 420px;
}
.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 3px solid var(--ink);
  border-radius: 12px;
  filter: contrast(1.05) saturate(1.1);
}
.about-photo-frame {
  position: absolute;
  inset: 0;
  border: 3px solid var(--accent);
  border-radius: 12px;
  transform: translate(12px, 12px);
  z-index: -1;
}

/* ============ STATS ============ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 32px;
}
@media (max-width: 768px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
.stat {
  padding: 20px;
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
}
.stat-num {
  font-family: var(--f-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-label {
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* ============ STACK ============ */
.stack-marquee {
  overflow: hidden;
  border-block: 2px solid var(--ink);
  background: var(--accent);
  color: var(--c-purple-deep);
  padding: 18px 0;
  margin: 40px 0;
}
.stack-track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: scroll-x 30s linear infinite;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
}
.stack-track > span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.stack-track > span::after {
  content: '★';
  color: var(--c-purple-deep);
  font-size: 22px;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.stack-chip {
  padding: 14px 16px;
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}
.stack-chip:hover {
  background: var(--accent);
  color: var(--c-purple-deep);
  border-color: var(--c-purple-deep);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--c-purple-deep);
}
.stack-chip-icon {
  font-size: 18px;
}

/* ============ CLASSES ============ */
.classes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 768px) {
  .classes-grid { grid-template-columns: 1fr; }
}
.class-card {
  border: 3px solid var(--ink);
  border-radius: 10px;
  padding: 28px;
  position: relative;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
}
.class-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: var(--accent);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  opacity: 0.9;
  transition: width 0.3s, height 0.3s;
}
.class-card:hover::before {
  width: 110px;
  height: 110px;
}
.class-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--accent);
}
.class-num {
  position: absolute;
  top: 14px;
  right: 18px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--c-purple-deep);
  z-index: 1;
}
.class-title {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  padding-right: 60px;
}
.class-tag {
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 14px;
}
.class-desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.class-meta {
  margin-top: 18px;
  display: flex;
  gap: 14px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.class-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ============ PROJECTS ============ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 768px) {
  .projects-grid { grid-template-columns: 1fr; }
}
.project-card {
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  transition: all 0.25s;
  position: relative;
}
.project-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 8px 8px 0 var(--accent);
}
.project-thumb {
  aspect-ratio: 16/10;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--ink);
}
.project-thumb-inner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 64px;
  letter-spacing: -0.04em;
}
.project-body {
  padding: 22px 24px 26px;
}
.project-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.project-tag {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--ink-soft);
}
.project-name {
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.project-arrow {
  width: 36px;
  height: 36px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.project-card:hover .project-arrow {
  background: var(--accent);
  color: var(--c-purple-deep);
  border-color: var(--c-purple-deep);
  transform: rotate(-45deg);
}
.project-desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ============ BLOG ============ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 1024px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .posts-grid { grid-template-columns: 1fr; }
}
.post-card {
  padding: 24px;
  border: 2px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.post-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--accent);
  border-color: var(--ink);
}
.post-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.post-cat {
  padding: 3px 8px;
  background: var(--accent);
  color: var(--c-purple-deep);
  border-radius: 4px;
  font-weight: 700;
}
.post-title {
  font-family: var(--f-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 10px;
}
.post-excerpt {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ============ INSTAGRAM ============ */
.ig-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
@media (max-width: 768px) {
  .ig-grid { grid-template-columns: repeat(3, 1fr); }
}
.ig-item {
  aspect-ratio: 1;
  background: var(--surface);
  border: 2px solid var(--border-strong);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}
.ig-item:hover {
  transform: scale(1.04);
  border-color: var(--accent);
  z-index: 2;
}
.ig-item-bg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.ig-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.7));
  display: flex;
  align-items: flex-end;
  padding: 10px;
  opacity: 0;
  transition: opacity 0.2s;
}
.ig-item:hover .ig-item-overlay {
  opacity: 1;
}
.ig-item-stats {
  display: flex;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  color: white;
}

/* ============ YOUTUBE ============ */
.yt-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 18px;
}
@media (max-width: 880px) {
  .yt-grid { grid-template-columns: 1fr; }
}
.yt-card {
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.yt-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--accent);
}
.yt-card.featured {
  grid-row: span 2;
}
.yt-thumb {
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
}
.yt-card.featured .yt-thumb {
  aspect-ratio: 16/11;
}
.yt-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.2s;
}
.yt-card:hover .yt-play {
  opacity: 1;
}
.yt-play-icon {
  width: 64px;
  height: 64px;
  background: var(--accent);
  border: 3px solid var(--c-purple-deep);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--c-purple-deep);
}
.yt-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.85);
  color: white;
  padding: 2px 6px;
  font-family: var(--f-mono);
  font-size: 11px;
  border-radius: 3px;
}
.yt-body {
  padding: 16px 18px;
}
.yt-title {
  font-family: var(--f-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
}
.yt-card.featured .yt-title {
  font-size: 22px;
}
.yt-meta {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============ SOCIAL ============ */
.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 768px) {
  .social-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .social-grid { grid-template-columns: 1fr; }
}
.social-card {
  padding: 22px;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.social-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--accent);
  background: var(--accent);
  color: var(--c-purple-deep);
}
.social-card:hover .social-handle {
  color: var(--c-purple-deep);
}
.social-icon {
  width: 48px;
  height: 48px;
  border: 2px solid currentColor;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.social-card:hover .social-icon {
  background: var(--c-purple-deep);
  color: var(--accent);
  border-color: var(--c-purple-deep);
}
.social-name {
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
}
.social-handle {
  font-family: var(--f-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* ============ FOOTER ============ */
.footer {
  padding: 60px 0 40px;
  border-top: 2px dashed var(--border-strong);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-dim);
}
.footer-clock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-clock-dot {
  width: 8px;
  height: 8px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 8px #4ade80;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  50% { opacity: 0.4; }
}

/* visitor counter */
.visitor-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--c-purple-deep);
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 4px;
  font-family: var(--f-pixel);
  font-size: 18px;
  letter-spacing: 0.05em;
}
[data-theme="light"] .visitor-counter {
  background: var(--c-purple-deep);
  color: var(--c-yellow);
}

/* nav dropdown */
.nav-item {
  position: relative;
}
.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-family: var(--f-mono);
  line-height: 1;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s;
  background: none;
  border: none;
  color: inherit;
  height: auto;
}
.nav-dropdown-trigger:hover { color: var(--accent); }
.nav-dropdown-trigger.active { color: var(--accent); }
.nav-dropdown-caret {
  font-size: 9px;
  transition: transform 0.2s;
}
.nav-item.open .nav-dropdown-caret { transform: rotate(180deg); }
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--surface);
  border: 3px solid var(--ink);
  border-radius: 10px;
  box-shadow: 4px 4px 0 var(--accent);
  padding: 8px;
  min-width: 180px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 101;
  list-style: none;
}
.nav-item.open .nav-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-family: var(--f-mono);
  font-size: 13px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown a:hover {
  background: var(--accent);
  color: var(--c-purple-deep);
}

/* nav-mobile-menu sub-group label */
.nav-mobile-group {
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-dim);
  padding: 12px 14px 6px;
}

/* ============ RESPONSIVE — comprehensive ============ */

/* Mobile menu — hidden on desktop */
.nav-mobile-toggle { display: none; }
.nav-mobile-menu { display: none; }

/* tablets and below */
@media (max-width: 1024px) {
  .container { width: min(1100px, 100% - 40px); }
  section { padding: 80px 0; }
  .section-head { margin-bottom: 40px; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .stat { padding: 16px; }
  .stat-num { font-size: 28px; }
  .yt-grid { grid-template-columns: 1fr 1fr; }
  .yt-card.featured { grid-row: span 1; grid-column: span 2; }
  .yt-card.featured .yt-thumb { aspect-ratio: 16/9; }
  .yt-card.featured .yt-title { font-size: 18px; }
}

/* tablet portrait + large phones */
@media (max-width: 880px) {
  .container { width: min(720px, 100% - 32px); }
  section { padding: 64px 0; }
  .nav { padding: 12px 0; }
  .nav-links { display: none; }
  .nav-mobile-toggle {
    display: inline-flex;
    width: 36px;
    height: 36px;
    border: 2px solid var(--ink);
    border-radius: 6px;
    align-items: center;
    justify-content: center;
  }

  /* mobile slide-down menu */
  .nav-mobile-menu {
    position: fixed;
    top: 64px;
    left: 16px;
    right: 16px;
    background: var(--surface);
    border: 3px solid var(--ink);
    border-radius: 12px;
    box-shadow: 6px 6px 0 var(--accent);
    padding: 18px;
    display: none;
    z-index: 99;
  }
  .nav-mobile-menu.open { display: block; }  .nav-mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .nav-mobile-menu a {
    display: block;
    padding: 12px 14px;
    font-family: var(--f-mono);
    font-size: 14px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
  }
  .nav-mobile-menu a:hover,
  .nav-mobile-menu a.active {
    background: var(--accent);
    color: var(--c-purple-deep);
  }

  /* hero — stack columns */
  .hero { padding: 100px 0 60px; min-height: auto; }
  .hero-grid-resp { grid-template-columns: 1fr !important; gap: 40px !important; min-height: auto !important; }
  .hero-grid-resp > div:last-child { padding: 0 !important; }

  /* hero photo card centered */
  .hero-grid-resp + * { max-width: 320px !important; margin: 0 auto !important; }

  /* about */
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-photo-wrap { max-width: 320px; margin: 0 auto; }

  /* stack marquee */
  .stack-track { font-size: 22px; gap: 36px; }

  /* classes */
  .classes-grid { grid-template-columns: 1fr; gap: 16px; }
  .class-card { padding: 22px; }
  .class-title { font-size: 20px; padding-right: 50px; }

  /* projects */
  .projects-grid { grid-template-columns: 1fr; gap: 18px; }
  .project-name { font-size: 22px; }
  .project-thumb-inner > div > div:first-child { font-size: 56px !important; }

  /* posts */
  .posts-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .post-card { padding: 20px; }
  .post-title { font-size: 18px; }

  /* instagram */
  .ig-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }

  /* youtube */
  .yt-grid { grid-template-columns: 1fr; }
  .yt-card.featured { grid-column: span 1; }

  /* social */
  .social-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .social-card { padding: 18px; gap: 12px; }
  .social-icon { width: 42px; height: 42px; }
  .social-handle { font-size: 16px; }

  /* footer */
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; }

  /* hero orbs smaller */
  .hero-orb-1 { width: 320px; height: 320px; }
  .hero-orb-2 { width: 280px; height: 280px; }
}

/* phones */
@media (max-width: 600px) {
  .container { width: 100% - 32px; padding: 0 16px; }
  section { padding: 56px 0; }
  .section-head { margin-bottom: 32px; }
  .section-title { font-size: clamp(30px, 8vw, 48px); }

  .nav-logo { font-size: 13px; }
  .nav-logo-mark { width: 30px; height: 30px; font-size: 14px; }

  .hero { padding: 90px 0 48px; }

  /* allow huge headings to scale down nicely */
  .hero-grid-resp h1 { font-size: clamp(44px, 13vw, 72px) !important; }

  /* photo card no negative offset that overflows */
  .hero-grid-resp + * { max-width: 280px !important; }

  /* sticker overflow guard */
  .sticker {
    font-size: 10px;
    padding: 5px 10px;
  }

  /* about photo stickers — tighter offsets */
  .about-photo-wrap .sticker { font-size: 10px; }

  /* stat grid — 2 cols on phones */
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
  .stat { padding: 14px; }
  .stat-num { font-size: 26px; }
  .stat-label { font-size: 10px; }

  /* stack chips */
  .stack-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stack-chip { padding: 12px 14px; font-size: 12px; }
  .stack-track { font-size: 18px; gap: 28px; padding: 0 16px; }

  /* posts — single col on small phones */
  .posts-grid { grid-template-columns: 1fr; }

  /* IG grid — 3 cols */
  .ig-grid { grid-template-columns: repeat(3, 1fr); gap: 5px; }

  /* social — single col */
  .social-grid { grid-template-columns: 1fr; }

  /* buttons full width on small phones */
  .btn { padding: 12px 18px; font-size: 12px; }
  .hero-grid-resp .btn,
  .section-head + .btn,
  .section-head .btn {
    width: 100%;
    justify-content: center;
  }

  /* section heads with buttons — stack */
  .section-head[style*="space-between"] {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .section-head[style*="space-between"] .btn {
    width: 100%;
    justify-content: center;
  }

  /* terminal smaller text */
  .container > div > div > div[style*="0a0050"] { font-size: 11px !important; }

  /* footer text */
  .footer { padding: 40px 0 28px; }
  .footer-inner { font-size: 11px; }

  /* visitor counter smaller */
  .visitor-counter { font-size: 14px; padding: 5px 10px; }

  /* hard shadows lighter on mobile to avoid clipping */
  .hard-shadow { box-shadow: 4px 4px 0 0 var(--accent); }

  /* hero photo card — disable rotate to avoid overflow */
  .hero-grid-resp [style*="rotate(2deg)"] { transform: rotate(0deg) !important; }
}

/* very small phones */
@media (max-width: 380px) {
  .container { padding: 0 14px; }
  .hero-grid-resp h1 { font-size: 44px !important; }
  .nav-actions .nav-btn.lang { padding: 0 8px; font-size: 11px; }
  .ig-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
}

/* reduce hover-translate on touch devices */
@media (hover: none) {
  .btn:hover,
  .crt-hover:hover,
  .class-card:hover,
  .project-card:hover,
  .post-card:hover,
  .yt-card:hover,
  .social-card:hover,
  .stack-chip:hover {
    transform: none;
  }
}

/* CRT mode (easter egg) */
body.crt-mode {
  filter: contrast(1.15) saturate(1.4) hue-rotate(2deg);
}
body.crt-mode::after {
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 1px,
    rgba(0, 0, 0, 0.15) 1px,
    rgba(0, 0, 0, 0.15) 2px
  );
}

/* Easter egg toast */
.easter-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 22px;
  background: var(--accent);
  color: var(--c-purple-deep);
  border: 3px solid var(--c-purple-deep);
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--c-purple-deep);
  z-index: 2000;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.easter-toast.show {
  transform: translateX(-50%) translateY(0);
}
