/* ═══════════════════════════════════════════════════════════
   ZILLA.CODES — base.css
   Structural layer shared by ALL themes. Every color, font,
   size multiplier and effect comes from a CSS variable; the
   active theme-*.css sets those in :root and adds decoration.
   Defaults below = RPG Classic, so the site is intact even
   if no theme file loads.
   ═══════════════════════════════════════════════════════════ */

/* ─── TOKENS (theme contract) ─── */
:root {
  /* Surfaces */
  --bg-deep: #0f0a1e;
  --bg-card: #1a1333;
  --bg-card-hover: #221a42;
  --bg-nav: rgba(15, 10, 30, 0.95);
  --bg-strip: rgba(26, 19, 51, 0.5);
  --code-bg: #0d0820;
  --border: #2d1f5e;
  --border-hover: #4a2f8a;

  /* Palette (content colors in the DB use these hexes) */
  --purple: #a855f7;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --green: #4ade80;
  --yellow: #f59e0b;

  /* Roles */
  --accent: var(--purple);
  --accent-2: var(--cyan);
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --text-on-accent: #ffffff;
  --danger: #f472b6;

  /* Type */
  --font-pixel: 'Press Start 2P', monospace;   /* display / UI */
  --font-body: 'VT323', monospace;
  --fs-display: 1;        /* multiplier for display-font sizes */
  --fs-body: 1;           /* multiplier for body-font sizes */
  --lh-title: 2;          /* hero title line-height */
  --ls-display: 0;        /* letter-spacing for display font */
  --tt-display: none;     /* text-transform for display font */
  --tt-content: uppercase; /* CMS text (stored in sentence case) — Builder sets none */

  /* Shape + motion */
  --radius: 8px;
  --radius-sm: 4px;
  --lift: -6px;
  --lift-sm: -3px;

  /* Effects (themes may set to none) */
  --glow-text: 0 0 8px var(--accent);
  --glow-text-2: 0 0 10px var(--accent-2);
  --glow-box: 0 0 20px color-mix(in srgb, var(--accent) 40%, transparent);
  --glow-box-2: 0 0 20px color-mix(in srgb, var(--accent-2) 40%, transparent);
  --shadow-card-hover: 0 8px 30px color-mix(in srgb, var(--accent) 20%, transparent);
  --xp-glow: 0 0 10px currentColor;

  --content-max: 1200px;
  --gutter: 1.5rem;
  --nav-h: 64px;
  color-scheme: dark;
}

/* ─── RESET ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1rem); }
body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-body);
  font-size: calc(1.1rem * var(--fs-body));
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
[x-cloak] { display: none !important; }
.container { max-width: var(--content-max); margin-inline: auto; width: 100%; padding-inline: var(--gutter); }
.accent { color: var(--accent); }
.main { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pixel { font-family: var(--font-pixel); letter-spacing: var(--ls-display); text-transform: var(--tt-display); }

/* ═══════ NAV ═══════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 0.3s ease;
}
.nav.scrolled { box-shadow: 0 4px 30px color-mix(in srgb, var(--accent) 12%, transparent); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav__brand {
  font-family: var(--font-pixel); letter-spacing: var(--ls-display);
  font-size: calc(0.9rem * var(--fs-display));
  color: var(--text); text-decoration: none; white-space: nowrap;
  transition: text-shadow 0.3s ease;
  display: flex; align-items: center; gap: 0.6rem;
}
.nav__brand img { height: 32px; width: auto; }
.nav__brand:hover { text-shadow: var(--glow-text), var(--glow-text); }
.nav__links { display: flex; align-items: center; gap: 1.5rem; }

.nav-link {
  font-family: var(--font-pixel); letter-spacing: var(--ls-display); text-transform: var(--tt-display);
  font-size: calc(0.6rem * var(--fs-display));
  color: var(--text-dim); text-decoration: none; position: relative;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
.nav-link:hover, .nav-link.active { color: var(--accent); text-shadow: var(--glow-text); }
.nav-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
  background: var(--accent); transition: width 0.3s ease;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.cta-btn {
  color: var(--accent) !important; border: 1px solid var(--accent);
  padding: 0.5rem 1rem; border-radius: var(--radius-sm);
}
.cta-btn:hover { background: var(--accent); color: var(--text-on-accent) !important; box-shadow: var(--glow-box); text-shadow: none; }
.cta-btn::after { display: none; }

/* Language switch */
.lang-switch { display: flex; gap: 0.3rem; }
.lang-btn {
  font-family: var(--font-pixel); font-size: calc(0.5rem * var(--fs-display));
  color: var(--text-dim); text-decoration: none;
  padding: 0.3rem 0.5rem; border: 1px solid var(--border); border-radius: 3px;
  transition: all 0.3s ease;
}
.lang-btn:hover, .lang-btn.active {
  color: var(--accent-2); border-color: var(--accent-2);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent-2) 30%, transparent);
}

/* Theme switch */
.theme-switch { position: relative; }
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 26px; cursor: pointer;
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 3px;
  transition: all 0.3s ease;
}
.theme-toggle:hover, .theme-toggle[aria-expanded="true"] { color: var(--accent-2); border-color: var(--accent-2); }
.theme-toggle svg { width: 14px; height: 14px; }
.theme-dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 190px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.4rem; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); z-index: 110;
}
.theme-dropdown__label {
  display: block; padding: 0.4rem 0.6rem 0.5rem;
  font-family: var(--font-pixel); font-size: calc(0.45rem * var(--fs-display));
  color: var(--text-dim); letter-spacing: var(--ls-display); text-transform: var(--tt-display);
}
.theme-option {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  padding: 0.5rem 0.6rem; border-radius: 3px; text-decoration: none;
  font-family: var(--font-body); font-size: calc(1.1rem * var(--fs-body)); color: var(--text);
  transition: background 0.2s ease;
}
.theme-option:hover { background: var(--bg-card-hover); }
.theme-option.active { color: var(--accent); }
.theme-option.active::after { content: '◆'; margin-left: auto; font-size: 0.7em; }
.theme-dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.25); flex-shrink: 0; }

/* Hamburger */
.nav__hamburger {
  display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; width: 40px; height: 36px; position: relative; flex-shrink: 0;
}
.nav__hamburger span {
  display: block; width: 20px; height: 2px; background: var(--text);
  position: absolute; left: 9px; transition: all 0.3s;
}
.nav__hamburger span:nth-child(1) { top: 11px; }
.nav__hamburger span:nth-child(2) { top: 17px; }
.nav__hamburger span:nth-child(3) { top: 23px; }
.nav__hamburger.open span:nth-child(1) { top: 17px; transform: rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { top: 17px; transform: rotate(-45deg); }

/* Mobile drawer */
.nav__drawer {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; z-index: 99;
  background: var(--bg-deep); padding: 1.5rem var(--gutter) 3rem; overflow-y: auto;
  flex-direction: column;
}
.nav__drawer.open { display: flex; animation: drawer-in 0.25s ease; }
@keyframes drawer-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.nav__drawer .nav-link {
  display: block; font-size: calc(0.8rem * var(--fs-display));
  padding: 1.1rem 0; border-bottom: 1px solid var(--border);
}
.nav__drawer .nav-link::after { display: none; }
.nav__drawer .cta-btn { margin-top: 1.5rem; text-align: center; border-bottom: 1px solid var(--accent); }
.drawer-group { padding: 1.2rem 0; border-bottom: 1px solid var(--border); }
.drawer-group__label {
  display: block; margin-bottom: 0.8rem;
  font-family: var(--font-pixel); font-size: calc(0.5rem * var(--fs-display)); color: var(--text-dim);
  letter-spacing: var(--ls-display); text-transform: var(--tt-display);
}
.drawer-themes { display: grid; gap: 0.3rem; }
.nav__drawer .lang-btn { font-size: calc(0.6rem * var(--fs-display)); padding: 0.5rem 0.9rem; }

/* ═══════ BUTTONS ═══════ */
.btn {
  font-family: var(--font-pixel); letter-spacing: var(--ls-display); text-transform: var(--tt-display);
  font-size: calc(0.65rem * var(--fs-display));
  padding: 0.8rem 1.8rem; text-decoration: none; border-radius: var(--radius-sm);
  display: inline-block; cursor: pointer; border: 1px solid transparent;
  transition: all 0.3s ease; line-height: 1.4; text-align: center;
}
.btn-primary { background: var(--accent); color: var(--text-on-accent); border-color: var(--accent); }
.btn-primary:hover { background: transparent; color: var(--accent); box-shadow: var(--glow-box); transform: translateY(-2px); }
.btn-secondary { background: transparent; color: var(--accent-2); border-color: var(--accent-2); }
.btn-secondary:hover { background: var(--accent-2); color: var(--bg-deep); box-shadow: var(--glow-box-2); transform: translateY(-2px); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: var(--bg-deep); transform: translateY(-2px); }
.btn-sm { font-size: calc(0.55rem * var(--fs-display)); padding: 0.5rem 1rem; }
.btn-block { display: block; width: 100%; }

/* ═══════ HERO ═══════ */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: calc(var(--nav-h) + 3rem) var(--gutter) 4rem;
  position: relative;
}
.hero-content { max-width: 820px; position: relative; z-index: 1; }
.hero-subtitle {
  font-family: var(--font-pixel); text-transform: var(--tt-display);
  font-size: calc(0.7rem * var(--fs-display)); color: var(--accent-2);
  letter-spacing: 3px; margin-bottom: 2rem;
  animation: blink-glow 2s ease-in-out infinite;
}
@keyframes blink-glow {
  0%, 100% { opacity: 1; text-shadow: var(--glow-text-2); }
  50% { opacity: 0.7; text-shadow: var(--glow-text-2), var(--glow-text-2); }
}
.hero-title {
  font-family: var(--font-pixel); letter-spacing: var(--ls-display); text-transform: var(--tt-display);
  font-size: calc(clamp(1.2rem, 4vw, 2.5rem) * var(--fs-display));
  line-height: var(--lh-title); margin-bottom: 2rem; font-weight: inherit;
}
.hero-title .line1 { color: var(--text); display: block; }
.hero-title .line2 { color: var(--accent); display: block; }
.hero-desc {
  font-size: calc(1.4rem * var(--fs-body)); color: var(--text-dim);
  margin: 0 auto 2.5rem; max-width: 600px;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ═══════ TECH STACK MARQUEE ═══════ */
.tech-scroll {
  overflow: hidden; padding: 2rem 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--bg-strip);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.tech-tags { display: flex; gap: 1.5rem; animation: scroll-left 30s linear infinite; width: max-content; }
.tech-scroll:hover .tech-tags { animation-play-state: paused; }
@keyframes scroll-left { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 0.75rem)); } }
.tech-tag {
  font-family: var(--font-pixel); letter-spacing: var(--ls-display);
  font-size: calc(0.6rem * var(--fs-display)); color: var(--accent);
  padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  white-space: nowrap; transition: all 0.3s ease;
}
.tech-tag:hover {
  border-color: var(--accent); box-shadow: var(--glow-box);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

/* ═══════ SECTIONS ═══════ */
.section { max-width: var(--content-max); margin: 0 auto; padding: 5rem var(--gutter); width: 100%; }
.section-title {
  font-family: var(--font-pixel); letter-spacing: var(--ls-display); text-transform: var(--tt-display);
  font-size: calc(clamp(0.8rem, 2vw, 1.2rem) * var(--fs-display));
  color: var(--text); text-align: center; margin-bottom: 3rem; font-weight: inherit;
}

/* ═══════ SERVICES ═══════ */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.service-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; position: relative; overflow: hidden; transition: all 0.3s ease;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--card-color, var(--accent)); opacity: 0; transition: opacity 0.3s ease;
}
.service-card:hover {
  background: var(--bg-card-hover); border-color: var(--border-hover);
  transform: translateY(var(--lift)); box-shadow: var(--shadow-card-hover);
}
.service-card:hover::before { opacity: 1; }
.service-level {
  font-family: var(--font-pixel); font-size: calc(0.55rem * var(--fs-display));
  color: var(--card-color, var(--accent)); display: block; margin-bottom: 0.8rem;
}
.service-name {
  font-family: var(--font-pixel); letter-spacing: var(--ls-display); text-transform: var(--tt-display);
  font-size: calc(0.75rem * var(--fs-display)); color: var(--text); margin-bottom: 1rem;
  font-weight: inherit; line-height: 1.6;
}
.service-desc { font-size: calc(1.2rem * var(--fs-body)); color: var(--text-dim); margin-bottom: 1.5rem; }

/* XP bars (shared) — width comes from --xp; JS animates from 0 when in view */
.xp-bar {
  height: 6px; background: color-mix(in srgb, var(--text) 6%, transparent);
  border-radius: 3px; overflow: hidden; margin-bottom: 0.5rem;
}
.xp-fill {
  height: 100%; width: var(--xp, 0%); border-radius: inherit;
  background: var(--fill, var(--accent)); color: var(--fill, var(--accent));
  box-shadow: var(--xp-glow); transition: width 1.1s cubic-bezier(.2, .8, .2, 1);
}
.js .xp-animate .xp-fill { width: 0; }
.js .xp-animate.in-view .xp-fill { width: var(--xp, 0%); }
.xp-label { font-family: var(--font-pixel); font-size: calc(0.5rem * var(--fs-display)); color: var(--text-dim); }

/* ═══════ STATS ═══════ */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem; max-width: 760px; margin: 0 auto;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem 1rem; text-align: center; transition: all 0.3s ease;
}
.stat-card:hover {
  transform: translateY(-4px); border-color: var(--stat-color, var(--accent));
  box-shadow: 0 0 20px color-mix(in srgb, var(--stat-color, var(--accent)) 25%, transparent);
}
.stat-value {
  font-family: var(--font-pixel); font-size: calc(1.5rem * var(--fs-display));
  display: block; margin-bottom: 0.5rem; color: var(--stat-color, var(--accent));
}
.stat-label {
  font-family: var(--font-pixel); letter-spacing: var(--ls-display); text-transform: var(--tt-display);
  font-size: calc(0.55rem * var(--fs-display)); color: var(--text-dim);
}

/* ═══════ CONTACT ═══════ */
.contact { text-align: center; border-top: 1px solid var(--border); }
.contact-desc { font-size: calc(1.4rem * var(--fs-body)); color: var(--text-dim); margin-bottom: 2rem; }
.contact-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ═══════ FOOTER ═══════ */
.footer { border-top: 1px solid var(--border); padding: 2.5rem 0 1.5rem; margin-top: 2rem; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer__brand { font-family: var(--font-pixel); font-size: calc(0.7rem * var(--fs-display)); color: var(--text); letter-spacing: var(--ls-display); }
.footer__links { display: flex; gap: 1.5rem; list-style: none; flex-wrap: wrap; }
.footer__links a {
  font-family: var(--font-pixel); font-size: calc(0.5rem * var(--fs-display)); letter-spacing: var(--ls-display);
  text-transform: var(--tt-display); color: var(--text-dim); text-decoration: none; transition: color 0.2s;
}
.footer__links a:hover { color: var(--accent); }
.footer__copy {
  font-family: var(--font-pixel); font-size: calc(0.5rem * var(--fs-display)); letter-spacing: var(--ls-display);
  text-transform: var(--tt-display); color: var(--text-dim);
  text-align: center; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); opacity: 0.8;
}

/* ═══════ INNER PAGES ═══════ */
.page { max-width: var(--content-max); margin: 0 auto; padding: calc(var(--nav-h) + 3rem) var(--gutter) 4rem; width: 100%; }
.page--narrow { max-width: 880px; }
.page-header { text-align: center; margin-bottom: 3rem; }
.page-title {
  font-family: var(--font-pixel); letter-spacing: var(--ls-display); text-transform: var(--tt-display);
  font-size: calc(clamp(0.9rem, 3vw, 1.5rem) * var(--fs-display));
  color: var(--text); margin-bottom: 1rem; font-weight: inherit; line-height: 1.6;
}
.page-subtitle { font-size: calc(1.3rem * var(--fs-body)); color: var(--text-dim); }
.page-cta { text-align: center; margin-top: 3rem; }

/* ═══════ SKILLS ═══════ */
.skills-legend { display: flex; gap: 1rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }
.legend-item, .skill-level {
  font-family: var(--font-pixel); letter-spacing: var(--ls-display);
  border-radius: 3px; white-space: nowrap;
}
.legend-item { font-size: calc(0.5rem * var(--fs-display)); padding: 0.3rem 0.8rem; border: 1px solid currentColor; }
.skill-level { font-size: calc(0.45rem * var(--fs-display)); padding: 0.2rem 0.5rem; }
.level-maxed { color: var(--purple); background: color-mix(in srgb, var(--purple) 18%, transparent); }
.level-high { color: var(--cyan); background: color-mix(in srgb, var(--cyan) 18%, transparent); }
.level-mid { color: var(--green); background: color-mix(in srgb, var(--green) 18%, transparent); }
.level-learning { color: var(--yellow); background: color-mix(in srgb, var(--yellow) 18%, transparent); }

.skill-category { margin-bottom: 3rem; }
.category-title {
  font-family: var(--font-pixel); letter-spacing: var(--ls-display); text-transform: var(--tt-display);
  font-size: calc(0.75rem * var(--fs-display)); color: var(--cat-color, var(--accent));
  margin-bottom: 1.5rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; font-weight: inherit;
}
.category-count { font-size: 0.75em; color: var(--text-dim); }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.skill-node {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: calc(var(--radius) - 2px);
  padding: 1rem 1.2rem; transition: all 0.3s ease;
}
.skill-node:hover {
  background: var(--bg-card-hover); border-color: var(--cat-color, var(--accent));
  transform: translateY(var(--lift-sm));
  box-shadow: 0 4px 20px color-mix(in srgb, var(--cat-color, var(--accent)) 15%, transparent);
}
.skill-header { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.skill-name { font-family: var(--font-pixel); letter-spacing: var(--ls-display); font-size: calc(0.6rem * var(--fs-display)); color: var(--text); }
.skill-node .xp-bar { height: 4px; margin-bottom: 0.4rem; }
.skill-note { font-size: calc(1rem * var(--fs-body)); color: var(--text-dim); }

/* ═══════ WORK (portfolio) ═══════ */
.page-kicker {
  font-family: var(--font-pixel); letter-spacing: 3px; text-transform: var(--tt-display);
  font-size: calc(0.5rem * var(--fs-display)); color: var(--accent-2); margin-bottom: 1rem;
}
.post-tag {
  font-family: var(--font-pixel); letter-spacing: var(--ls-display);
  font-size: calc(0.5rem * var(--fs-display)); padding: 0.3rem 0.6rem; border-radius: var(--radius-sm);
}
.work-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin: -1rem 0 2.5rem; }
.work-filter {
  min-height: 44px; padding: 0 1rem; display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-pixel); letter-spacing: var(--ls-display); text-transform: var(--tt-display);
  font-size: calc(0.5rem * var(--fs-display)); color: var(--text-dim);
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer;
  transition: all 0.2s ease;
}
.work-filter span { opacity: 0.7; }
.work-filter:hover { color: var(--text); border-color: var(--border-hover); }
.work-filter.is-on { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); }

/* meta row, tags, stack */
.work-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.work-tag, .work-badge, .work-service, .work-stack li, .work-note, .work-link, .work-more {
  font-family: var(--font-pixel); letter-spacing: var(--ls-display); font-size: calc(0.45rem * var(--fs-display));
}
.work-tag {
  padding: 0.3rem 0.55rem; border-radius: 3px; color: var(--tag-color);
  border: 1px solid var(--tag-color); background: color-mix(in srgb, var(--tag-color) 12%, transparent);
}
.work-badge { padding: 0.35rem 0.6rem; border-radius: 3px; background: var(--p-color); color: var(--bg-deep); }
.work-service { color: var(--text-dim); margin-left: auto; }
.work-stack { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; margin: 0; }
.work-stack li {
  padding: 0.3rem 0.5rem; border-radius: 3px; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.work-stack li.more { color: var(--text-dim); border-color: var(--border); background: none; }
.work-link { color: var(--green); text-decoration: none; white-space: nowrap; }
.work-link:hover { text-shadow: var(--glow-text); }
.work-link + .work-link { margin-left: 0.9rem; }
.work-note { color: var(--text-dim); white-space: nowrap; }
.work-note--lg { padding: 0.7rem 1rem; border: 1px dashed var(--border-hover); border-radius: var(--radius-sm); text-align: center; }
.work-more { color: var(--accent-2); text-decoration: none; }
.work-more:hover { text-shadow: var(--glow-text-2); }

/* cover: uploaded image or generated dashboard in the project color */
.work-cover { display: block; position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--code-bg); }
.work-cover__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.gen-cover { position: absolute; inset: 0; display: flex; flex-direction: column; }
.gen-cover__bar { height: 9%; min-height: 16px; display: flex; gap: 5px; align-items: center; padding: 0 4%; border-bottom: 1px solid var(--border); }
.gen-cover__bar i { width: 6px; height: 6px; background: var(--border); }
.gen-cover__bar i:first-child { background: var(--p-color); }
.gen-cover__body { flex: 1; display: flex; gap: 5%; padding: 6% 5% 5%; }
.gen-cover__side { width: 22%; display: flex; flex-direction: column; gap: 9%; }
.gen-cover__side b { display: block; height: 7%; min-height: 5px; width: 70%; background: var(--p-color); }
.gen-cover__side i { display: block; height: 5%; min-height: 4px; background: var(--border); }
.gen-cover__side i:nth-child(odd) { width: 80%; }
.gen-cover__chart { flex: 1; display: flex; align-items: flex-end; gap: 6%; border-bottom: 1px solid var(--border); }
.gen-cover__chart i { flex: 1; background: var(--border); transition: background 0.3s ease; }
.gen-cover__chart i.hi { background: var(--p-color); box-shadow: 0 0 12px color-mix(in srgb, var(--p-color) 50%, transparent); }
.gen-cover__label {
  position: absolute; right: 4%; top: 2.2%; font-family: var(--font-pixel); letter-spacing: var(--ls-display);
  font-size: calc(0.4rem * var(--fs-display)); color: var(--text-dim);
}
.work-card:hover .gen-cover__chart i:not(.hi), .work-featured:hover .gen-cover__chart i:not(.hi) {
  background: color-mix(in srgb, var(--p-color) 30%, var(--border));
}
.work-card:hover .work-cover__img, .work-featured:hover .work-cover__img { transform: scale(1.03); }

/* featured */
.work-featured {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1.5rem;
  background: var(--bg-card); border: 1px solid var(--border-hover); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 0 26px color-mix(in srgb, var(--p-color) 18%, transparent);
}
.work-featured__media { aspect-ratio: auto; min-height: 100%; border-right: 1px solid var(--border); }
.work-featured__body { padding: 2.2rem; display: flex; flex-direction: column; gap: 1.1rem; }
.work-featured__title, .work-card__title, .case-title, .work-cta__title {
  font-family: var(--font-pixel); letter-spacing: var(--ls-display); text-transform: var(--tt-display); font-weight: inherit;
}
.work-featured__title { font-size: calc(1.05rem * var(--fs-display)); line-height: 1.6; }
.work-featured__title a, .work-card__title a { color: var(--p-color); text-decoration: none; }
.work-featured__title a:hover, .work-card__title a:hover { text-shadow: 0 0 10px color-mix(in srgb, var(--p-color) 60%, transparent); }
.work-featured__summary { font-size: calc(1.3rem * var(--fs-body)); color: var(--text); opacity: 0.88; line-height: 1.35; }
.work-featured__foot { margin-top: auto; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; padding-top: 0.5rem; }

/* results (big numbers) */
.work-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 0.7rem; margin: 0; }
.work-results > div {
  display: flex; flex-direction: column-reverse; gap: 0.4rem; padding: 0.8rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-deep);
}
.work-results dt { font-size: calc(1rem * var(--fs-body)); color: var(--text-dim); line-height: 1.2; }
.work-results dd { margin: 0; font-family: var(--font-pixel); font-size: calc(0.8rem * var(--fs-display)); color: var(--accent-2); }
.work-results--lg { gap: 1.2rem; }
.work-results--lg > div { padding: 1.6rem; background: var(--bg-card); }
.work-results--lg dt { font-size: calc(1.25rem * var(--fs-body)); }
.work-results--lg dd { font-size: calc(1.4rem * var(--fs-display)); }
.work-results--lg > div:nth-child(2) dd { color: var(--accent); }
.work-results--lg > div:nth-child(3) dd { color: var(--pink); }

/* grid cards */
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.work-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border); border-top: 3px solid var(--p-color);
  border-radius: var(--radius); transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.work-card:hover {
  transform: translateY(var(--lift)); border-color: color-mix(in srgb, var(--p-color) 50%, var(--border));
  box-shadow: 0 10px 30px color-mix(in srgb, var(--p-color) 18%, transparent);
}
.work-card .work-cover { border-bottom: 1px solid var(--border); }
.work-card__body { flex: 1; display: flex; flex-direction: column; gap: 0.8rem; padding: 1.3rem 1.4rem 1.4rem; }
.work-card__title { font-size: calc(0.68rem * var(--fs-display)); line-height: 1.7; }
.work-card__summary { font-size: calc(1.15rem * var(--fs-body)); color: var(--text-dim); line-height: 1.3; }
.work-card__foot {
  margin-top: auto; padding-top: 0.9rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; min-height: 44px;
}
.no-js .work-card--dup { display: none; }

.work-cta {
  margin-top: 3rem; padding: 2.2rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-strip);
}
.work-cta__title { font-size: calc(0.85rem * var(--fs-display)); line-height: 1.6; margin-bottom: 0.5rem; }
.work-cta p { font-size: calc(1.2rem * var(--fs-body)); color: var(--text-dim); }

/* case study */
.case { max-width: 1040px; }
.case-draft {
  font-family: var(--font-pixel); font-size: calc(0.5rem * var(--fs-display)); color: var(--yellow);
  border: 1px dashed var(--yellow); padding: 0.7rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.5rem;
}
.case-head { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 2rem; align-items: end; margin-bottom: 2rem; }
.case-head__main { display: flex; flex-direction: column; gap: 1.1rem; }
.case-head__main .work-service { margin-left: 0; }
.case-title {
  font-size: calc(clamp(1rem, 3.2vw, 1.7rem) * var(--fs-display)); line-height: 1.5; color: var(--p-color);
  text-shadow: 0 0 18px color-mix(in srgb, var(--p-color) 35%, transparent);
}
.case-summary { font-size: calc(1.45rem * var(--fs-body)); color: var(--text); opacity: 0.9; line-height: 1.3; }
.case-head__links { display: flex; flex-direction: column; gap: 0.7rem; }
.case-head__links .btn { text-align: center; }
.case-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 0 0 2rem;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
}
.case-facts > div { padding: 1.1rem 1.4rem; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.4rem; }
.case-facts > div:last-child { border-right: 0; }
.case-facts dt, .case-kicker {
  font-family: var(--font-pixel); letter-spacing: var(--ls-display); text-transform: var(--tt-display);
  font-size: calc(0.45rem * var(--fs-display)); color: var(--text-dim); font-weight: inherit;
}
.case-facts dd { margin: 0; font-size: calc(1.3rem * var(--fs-body)); color: var(--text); }
.case-cover { margin: 0 0 3rem; aspect-ratio: 16 / 9; border: 1px solid var(--border); border-radius: var(--radius); }
.case-section { margin-bottom: 3rem; }
.case-kicker { color: var(--accent-2); font-size: calc(0.55rem * var(--fs-display)); letter-spacing: 2px; margin-bottom: 1.1rem; }
.case-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2.5rem; margin-bottom: 3rem; }
.case-aside .work-stack { gap: 0.45rem; }
.case-content { font-size: calc(1.3rem * var(--fs-body)); }
.case-content h2 {
  font-family: var(--font-pixel); text-transform: var(--tt-display); font-weight: inherit;
  font-size: calc(0.7rem * var(--fs-display)); color: var(--text); margin: 2rem 0 1rem;
}
.case-content h2:first-child { margin-top: 0; }
.case-content ul { list-style: none; padding: 0; }
.case-content li { padding: 0.45rem 0 0.45rem 1.4rem; border-bottom: 1px solid var(--border); position: relative; }
.case-content li:last-child { border-bottom: 0; }
.case-content li::before { content: '▸'; position: absolute; left: 0; color: var(--p-color); }
.case-quote {
  margin: 2rem 0 0; padding: 1.6rem 1.8rem; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); display: flex; flex-direction: column; gap: 0.8rem;
}
.case-quote p { font-size: calc(1.4rem * var(--fs-body)); color: var(--text); }
.case-quote footer { font-family: var(--font-pixel); font-size: calc(0.45rem * var(--fs-display)); color: var(--accent-2); }
.case-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.case-gallery figure { margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.case-gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.case-gallery figcaption { font-size: calc(1.05rem * var(--fs-body)); color: var(--text-dim); }
.case-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.case-nav__link {
  display: flex; flex-direction: column; gap: 0.6rem; padding: 1.3rem 1.5rem; text-decoration: none;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); transition: all 0.3s ease;
}
.case-nav__link:hover { border-color: var(--p-color); transform: translateY(var(--lift-sm)); }
.case-nav__link span { font-family: var(--font-pixel); font-size: calc(0.45rem * var(--fs-display)); color: var(--text-dim); }
.case-nav__link b { font-family: var(--font-pixel); font-weight: inherit; font-size: calc(0.6rem * var(--fs-display)); color: var(--p-color); line-height: 1.6; }
.case-nav__link--next { grid-column: 2; align-items: flex-end; text-align: right; }

@media (max-width: 1000px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-featured { grid-template-columns: 1fr; }
  .work-featured__media { aspect-ratio: 16 / 10; border-right: 0; border-bottom: 1px solid var(--border); }
}
@media (max-width: 700px) {
  .work-grid { grid-template-columns: 1fr; }
  .work-filters { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 0.3rem; }
  .work-filter { flex-shrink: 0; white-space: nowrap; }
  .work-featured__body { padding: 1.4rem; }
  .work-results { grid-template-columns: 1fr; }
  .work-cta { flex-direction: column; align-items: stretch; text-align: center; padding: 1.6rem; }
  .case-head, .case-body { grid-template-columns: 1fr; gap: 1.5rem; }
  .case-facts > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .case-facts > div:last-child { border-bottom: 0; }
  .case-gallery, .case-nav { grid-template-columns: 1fr; }
  .case-nav__link--next { grid-column: auto; }
}

/* ═══════ BLOG ═══════ */
.posts-list { display: flex; flex-direction: column; gap: 1.5rem; }
.post-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; transition: all 0.3s ease;
}
.post-card:hover {
  background: var(--bg-card-hover); border-color: var(--border-hover);
  transform: translateY(var(--lift-sm)); box-shadow: var(--shadow-card-hover);
}
.post-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem; }
.post-date { font-family: var(--font-pixel); font-size: calc(0.5rem * var(--fs-display)); color: var(--text-dim); }
.post-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.post-tag {
  color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-2) 30%, transparent);
}
.post-title {
  font-family: var(--font-pixel); letter-spacing: var(--ls-display);
  font-size: calc(0.8rem * var(--fs-display)); margin-bottom: 0.8rem; line-height: 1.7; font-weight: inherit;
}
.post-title a { color: var(--text); text-decoration: none; transition: color 0.3s ease; }
.post-title a:hover { color: var(--accent); text-shadow: var(--glow-text); }
.post-summary { font-size: calc(1.2rem * var(--fs-body)); color: var(--text-dim); margin-bottom: 1rem; }
.post-read-more, .back-link {
  font-family: var(--font-pixel); letter-spacing: var(--ls-display); text-transform: var(--tt-display);
  font-size: calc(0.55rem * var(--fs-display)); color: var(--accent); text-decoration: none;
  transition: text-shadow 0.3s ease;
}
.post-read-more:hover, .back-link:hover { text-shadow: var(--glow-text); }
.back-link { display: inline-block; margin-bottom: 1.5rem; }
.empty-state {
  font-size: calc(1.3rem * var(--fs-body)); color: var(--text-dim); text-align: center;
  padding: 3rem; border: 1px dashed var(--border); border-radius: var(--radius);
}

.post-single { max-width: 800px; margin: 0 auto; }
.post-header { margin-bottom: 2rem; }
.post-single .post-title { font-size: calc(clamp(0.9rem, 2.4vw, 1.2rem) * var(--fs-display)); }

/* Markdown content */
.post-content { font-size: calc(1.3rem * var(--fs-body)); line-height: 1.8; color: var(--text); }
.post-content > * + * { margin-top: 1.1rem; }
.post-content h1, .post-content h2, .post-content h3, .post-content h4 {
  font-family: var(--font-pixel); letter-spacing: var(--ls-display); line-height: 1.6;
  margin: 2.2rem 0 1rem; font-weight: inherit;
}
.post-content h1 { font-size: calc(1rem * var(--fs-display)); }
.post-content h2 { font-size: calc(0.85rem * var(--fs-display)); color: var(--accent); }
.post-content h3 { font-size: calc(0.75rem * var(--fs-display)); color: var(--accent-2); }
.post-content ul, .post-content ol { padding-left: 1.5rem; }
.post-content code {
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent);
  padding: 0.1rem 0.4rem; border-radius: 3px; font-family: var(--font-body); font-size: 0.9em;
}
.post-content pre, .post-content .highlight {
  background: var(--code-bg); border: 1px solid var(--border); border-radius: calc(var(--radius) - 2px);
  overflow-x: auto;
}
.post-content .highlight pre { border: 0; margin: 0; }
.post-content pre { padding: 1.3rem 1.5rem; line-height: 1.5; }
.post-content pre code { background: none; padding: 0; color: var(--text); font-size: 0.95em; }
.post-content a { color: var(--accent-2); text-decoration: none; border-bottom: 1px solid transparent; transition: all 0.3s ease; }
.post-content a:hover { border-bottom-color: var(--accent-2); }
.post-content strong { color: var(--pink); }
.post-content blockquote { border-left: 3px solid var(--accent); padding-left: 1rem; color: var(--text-dim); }
.post-content hr { border: 0; border-top: 1px dashed var(--border); margin: 2rem 0; }
.post-content table { width: 100%; border-collapse: collapse; }
.post-content th, .post-content td { border: 1px solid var(--border); padding: 0.5rem 0.8rem; text-align: left; }
.post-content th { background: var(--bg-card); }

/* Pygments (codehilite, css_class=highlight) — theme-aware */
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kr, .highlight .kc, .highlight .ow { color: var(--purple); }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb, .highlight .sd, .highlight .se { color: var(--green); }
.highlight .n, .highlight .nx { color: var(--text); }
.highlight .nf, .highlight .nb, .highlight .nc { color: var(--cyan); }
.highlight .mi, .highlight .mf, .highlight .m, .highlight .il { color: var(--yellow); }
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cs { color: var(--text-dim); font-style: italic; }
.highlight .o, .highlight .p { color: var(--pink); }
.highlight .nt, .highlight .na { color: var(--cyan); }

/* ═══════ ERROR PAGES ═══════ */
.error-page {
  min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 1.5rem; padding: calc(var(--nav-h) + 2rem) var(--gutter) 3rem;
}
.error-code {
  font-family: var(--font-pixel); font-size: calc(clamp(2.5rem, 10vw, 5rem) * var(--fs-display));
  color: var(--accent); text-shadow: var(--glow-text), var(--glow-text); line-height: 1.2;
}

/* ═══════ AUTH (allauth) ═══════ */
.auth-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 3rem var(--gutter);
}
.auth-card {
  width: 100%; max-width: 420px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 2.2rem;
  box-shadow: var(--shadow-card-hover);
}
.auth-brand { display: block; text-align: center; margin-bottom: 1.8rem; text-decoration: none; }
.auth-brand__name { font-family: var(--font-pixel); font-size: calc(0.95rem * var(--fs-display)); color: var(--text); letter-spacing: var(--ls-display); }
.auth-brand__sub {
  display: block; margin-top: 0.6rem; font-family: var(--font-pixel);
  font-size: calc(0.45rem * var(--fs-display)); color: var(--accent-2); letter-spacing: 2px; text-transform: var(--tt-display);
}
.auth-card h1 {
  font-family: var(--font-pixel); font-size: calc(0.75rem * var(--fs-display)); letter-spacing: var(--ls-display);
  text-transform: var(--tt-display); text-align: center; margin-bottom: 1.5rem; font-weight: inherit; line-height: 1.6;
}
.auth-card p { font-size: calc(1.15rem * var(--fs-body)); color: var(--text-dim); text-align: center; margin-top: 1rem; }
.auth-card p a { color: var(--accent-2); text-decoration: none; }
.auth-card p a:hover { text-decoration: underline; }
.auth-row { display: flex; gap: 0.6rem; }
.auth-row > * { flex: 1; min-width: 0; }
.auth-error, .form-error {
  border: 1px solid color-mix(in srgb, var(--danger) 50%, transparent);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger); border-radius: var(--radius-sm);
  padding: 0.5rem 0.8rem; margin-bottom: 0.9rem; font-size: calc(1.05rem * var(--fs-body));
}
.auth-card form ul { list-style: none; }
/* allauth's stock pages (password reset etc.) render bare buttons/labels */
.auth-card button[type="submit"]:not(.btn) {
  width: 100%; margin-top: 0.5rem; padding: 0.8rem 1.8rem; cursor: pointer;
  font-family: var(--font-pixel); font-size: calc(0.65rem * var(--fs-display)); letter-spacing: var(--ls-display);
  background: var(--accent); color: var(--text-on-accent); border: 1px solid var(--accent); border-radius: var(--radius-sm);
}
.auth-card label { display: block; margin-bottom: 0.3rem; font-size: calc(1.05rem * var(--fs-body)); color: var(--text-dim); }
.auth-card .helptext, .auth-card .errorlist { font-size: calc(1rem * var(--fs-body)); color: var(--text-dim); }
.auth-card .errorlist { color: var(--danger); }
.auth-card .btn { margin-top: 0.5rem; }

/* ═══════ FORM CONTROLS (auth + CMS) ═══════ */
.input, .auth-card input[type="text"], .auth-card input[type="email"], .auth-card input[type="password"] {
  width: 100%; background: var(--bg-deep); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-family: var(--font-body); font-size: calc(1.2rem * var(--fs-body));
  padding: 0.7rem 0.9rem; margin-bottom: 0.8rem; transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus, .auth-card input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.input::placeholder, .auth-card input::placeholder { color: color-mix(in srgb, var(--text-dim) 60%, transparent); }

/* Focus visibility */
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 960px) {
  .nav__links { display: none; }
  .nav__hamburger { display: block; }
}
@media (max-width: 768px) {
  .section { padding: 3.5rem var(--gutter); }
  .hero { padding-top: calc(var(--nav-h) + 2rem); min-height: 88vh; }
  .services-grid, .skills-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__links { justify-content: center; }
  .service-card, .post-card { padding: 1.3rem; }
}
@media (max-width: 480px) {
  :root { --gutter: 1rem; }
  .hero-cta .btn, .contact-links .btn { width: 100%; }
  .auth-row { flex-direction: column; gap: 0; }
}

/* ═══════ REDUCED MOTION ═══════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tech-tags, .hero-subtitle { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js .xp-animate .xp-fill { width: var(--xp, 0%); }
}

/* ═══════ HIRE ME FORM ═══════ */
.contact-head { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; margin-bottom: 2.6rem; }
.contact-head .section-title { margin-bottom: 1rem; }
.contact-kicker {
  font-family: var(--font-pixel); font-size: calc(0.6rem * var(--fs-display)); letter-spacing: 3px;
  text-transform: var(--tt-display); color: var(--accent-2); text-shadow: var(--glow-text-2); margin-bottom: 1.1rem;
}
.contact-head .contact-desc { margin-bottom: 0; }
.hire { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 1.8rem; align-items: start; text-align: left; }
.hire__side { display: grid; gap: 1.2rem; }
.hire-panel {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem; display: grid; gap: 1rem;
}
.hire-panel__title, .hire__form-head h3 {
  font-family: var(--font-pixel); font-size: calc(0.55rem * var(--fs-display)); letter-spacing: var(--ls-display);
  text-transform: var(--tt-display); color: var(--accent-2); font-weight: inherit;
}
.hire-steps { list-style: none; display: grid; gap: 1rem; }
.hire-steps li { display: flex; gap: 0.9rem; align-items: flex-start; }
.hire-steps__n {
  flex-shrink: 0; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--step); color: var(--step); border-radius: var(--radius-sm);
  font-family: var(--font-pixel); font-size: calc(0.5rem * var(--fs-display));
}
.hire-steps strong { display: block; font-weight: inherit; font-size: calc(1.25rem * var(--fs-body)); color: var(--text); line-height: 1.3; }
.hire-steps small { display: block; font-size: calc(1.05rem * var(--fs-body)); color: var(--text-dim); }
.hire-link {
  display: flex; align-items: center; gap: 0.6rem; color: var(--accent-2); text-decoration: none;
  font-size: calc(1.25rem * var(--fs-body)); word-break: break-all;
}
.hire-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.hire-link:hover { text-decoration: underline; }
.hire-status {
  display: flex; align-items: center; gap: 0.6rem; padding-top: 0.9rem; border-top: 1px dashed var(--border);
  font-family: var(--font-pixel); font-size: calc(0.45rem * var(--fs-display)); color: var(--green);
  letter-spacing: var(--ls-display);
}
.hire-status span { width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.hire-status--busy { color: var(--yellow); }

.hire__form {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; display: grid; gap: 1.5rem; box-shadow: var(--shadow-card-hover);
}
.hire__form-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.hire__form-head h3 { font-size: calc(0.72rem * var(--fs-display)); color: var(--text); }
.hire__form-head span { font-size: calc(1.05rem * var(--fs-body)); color: var(--text-dim); }
.hire-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.3rem; }
.hire .field, .reply-form { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.hire .field--wide { grid-column: 1 / -1; }
.hire label, .chip-group legend, .reply-form__label {
  font-family: var(--font-pixel); font-size: calc(0.45rem * var(--fs-display)); color: var(--text-dim);
  letter-spacing: var(--ls-display); text-transform: var(--tt-display);
}
.chip-group legend { padding: 0; margin-bottom: 0.75rem; }
.hire label.chip-radio { font-family: var(--font-body); font-size: inherit; letter-spacing: normal; text-transform: none; color: inherit; }
.optional { opacity: 0.6; }
.hire .input, .reply-form .input { margin-bottom: 0; min-height: 48px; }
.input.is-invalid { border-color: var(--danger); }
.field-error { font-size: calc(1.05rem * var(--fs-body)); color: var(--danger); }
.chip-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.chip-group.is-invalid .chip { border-color: color-mix(in srgb, var(--danger) 60%, var(--border)); }
.chip-group .field-error { display: block; margin-top: 0.5rem; }

/* radio chips — real radios, styled via :checked (no JS needed) */
.chip-radio { position: relative; display: block; cursor: pointer; }
.chip-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chip {
  display: flex; box-sizing: border-box; border: 1px solid var(--border); background: var(--bg-deep);
  color: var(--text-dim); border-radius: var(--radius-sm); transition: all 0.2s ease;
}
.chip-radio:hover .chip { border-color: var(--border-hover); color: var(--text); }
.chip-radio input:checked + .chip {
  --c: var(--chip, var(--accent-2));
  border-color: var(--c); color: var(--c);
  background: color-mix(in srgb, var(--c) 15%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--c) 35%, transparent);
}
.chip-radio input:focus-visible + .chip { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.class-chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.6rem; }
.chip--class { flex-direction: column; align-items: flex-start; gap: 0.5rem; min-height: 76px; height: 100%; padding: 0.75rem 0.7rem; }
.chip__level { font-family: var(--font-pixel); font-size: calc(0.42rem * var(--fs-display)); }
.chip__label {
  font-family: var(--font-pixel); font-size: calc(0.48rem * var(--fs-display)); line-height: 1.6;
  color: var(--text); letter-spacing: var(--ls-display);
}
.pill-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip--pill {
  align-items: center; min-height: 44px; padding: 0 0.9rem; white-space: nowrap;
  font-family: var(--font-body); font-size: calc(1.2rem * var(--fs-body));
}
.hire__form-foot { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; }
.hire__form-foot span { font-size: calc(1.05rem * var(--fs-body)); color: var(--text-dim); }
.btn-send { display: inline-flex; align-items: center; gap: 0.7rem; padding: 1rem 1.8rem; }
.btn-send svg { width: 14px; height: 14px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ═══════ QUEST THREAD ═══════ */
.quest-banner {
  display: flex; flex-direction: column; align-items: center; gap: 0.8rem; text-align: center;
  background: var(--bg-card); border: 1px solid var(--green); border-radius: var(--radius);
  padding: 2.4rem 2rem; margin-bottom: 2.4rem;
  box-shadow: 0 0 40px color-mix(in srgb, var(--green) 15%, transparent);
}
.quest-banner .page-title { margin-bottom: 0; }
.quest-banner__icon { width: 52px; height: 52px; color: var(--green); }
.quest-banner__kicker { font-family: var(--font-pixel); font-size: calc(0.5rem * var(--fs-display)); letter-spacing: 3px; color: var(--green); }
.quest-link { width: 100%; max-width: 560px; margin-top: 0.8rem; display: grid; gap: 0.6rem; }
.quest-link p { font-size: calc(1.1rem * var(--fs-body)); color: var(--text-dim); }
.quest-link__row { display: flex; gap: 0.5rem; }
.quest-link__row .input { margin: 0; font-size: calc(1rem * var(--fs-body)); color: var(--accent-2); }

.quest-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; }
.quest-head__ref { font-family: var(--font-pixel); font-size: calc(0.45rem * var(--fs-display)); color: var(--yellow); margin-bottom: 0.6rem; }
.quest-head__title {
  font-family: var(--font-pixel); font-size: calc(0.9rem * var(--fs-display)); letter-spacing: var(--ls-display);
  text-transform: var(--tt-display); line-height: 1.5; font-weight: inherit;
}
.status-pill {
  flex-shrink: 0; font-family: var(--font-pixel); font-size: calc(0.45rem * var(--fs-display));
  padding: 0.4rem 0.6rem; border-radius: 3px; border: 1px solid currentColor; letter-spacing: 0.5px;
}
.status-pill--new { color: var(--pink); }
.status-pill--replied { color: var(--cyan); }
.status-pill--won { color: var(--green); }
.status-pill--lost, .status-pill--archived { color: var(--text-dim); }
.brief-summary {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem;
  padding: 1rem 1.2rem; margin-bottom: 2rem;
  background: var(--bg-card); border: 1px dashed var(--border); border-radius: var(--radius-sm);
}
.brief-summary dt { font-family: var(--font-pixel); font-size: calc(0.4rem * var(--fs-display)); color: var(--text-dim); margin-bottom: 0.3rem; }
.brief-summary dd { font-size: calc(1.2rem * var(--fs-body)); color: var(--accent-2); }

.thread { list-style: none; display: grid; gap: 1rem; margin-bottom: 1.6rem; }
.msg {
  max-width: 88%; padding: 1rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--bg-card);
}
.msg--client { justify-self: end; border-right: 3px solid var(--accent); }
.msg--admin { justify-self: start; border-left: 3px solid var(--accent-2); }
.msg__meta { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; font-size: calc(1rem * var(--fs-body)); color: var(--text-dim); }
.msg__who { font-family: var(--font-pixel); font-size: calc(0.45rem * var(--fs-display)); letter-spacing: var(--ls-display); }
.msg--client .msg__who { color: var(--accent); }
.msg--admin .msg__who { color: var(--accent-2); }
.msg__body { font-size: calc(1.2rem * var(--fs-body)); line-height: 1.5; overflow-wrap: anywhere; }
.thread-note { font-size: calc(1.15rem * var(--fs-body)); color: var(--text-dim); margin-bottom: 1rem; }
.thread-note a { color: var(--accent); }
.thread-note--ok { color: var(--green); }
.reply-form { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; }
.reply-form__foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 0.4rem; }
.reply-form__foot span { font-size: calc(1rem * var(--fs-body)); color: var(--text-dim); }

@media (max-width: 1100px) {
  .class-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hire { grid-template-columns: 1fr; }
  .hire__side { order: 2; }
}
@media (max-width: 600px) {
  .hire__form { padding: 1.2rem 1rem; }
  .hire-grid { grid-template-columns: 1fr; }
  .class-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hire__form-foot .btn-send { width: 100%; justify-content: center; }
  .brief-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .msg { max-width: 100%; }
  .quest-link__row { flex-direction: column; }
}

/* Arrow glyphs: pixel/display fonts lack them, so use the system font */
.ico { font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 700; letter-spacing: 0; text-transform: none; }
.case-cover--gen { aspect-ratio: 16 / 5; }
@media (max-width: 700px) { .case-cover--gen { aspect-ratio: 16 / 7; } }

/* ═══════ CMS TEXT CASE ═══════
   Titles, labels and buttons that come from the CMS are stored in sentence case.
   RPG / Cyberpunk show them in capitals (as before); Builder sets --tt-content: none. */
.hero-subtitle, .hero-title, .hero-cta .btn, .section-title, .service-name, .stat-label, .category-title,
.page-title, .footer__copy, .chip__label, .work-featured__title, .work-card__title, .case-title,
.case-nav__link b, .work-tag, .quest-head__title, .pf-title { text-transform: var(--tt-content); }

/* ═══════ ZILLA KAIJU (hero art) ═══════
   30×30 grid from templates/_kaiju.html. Each block drops in (delay --d, bottom rows first);
   .hop blocks bounce now and then (--h). Colours come from --kaiju / --kaiju-hop per theme. */
.brand-pixel { display: none; }
.hero-stack { display: none; }
.hero-art { order: -1; width: clamp(140px, 17vw, 220px); margin-bottom: 2.4rem; position: relative; z-index: 1; }
.kaiju { position: relative; aspect-ratio: 1 / 1; width: 100%; }
.kaiju .px {
  position: absolute; left: calc(var(--x) * 3.3333%); top: calc(var(--y) * 3.3333%);
  width: 3.2%; height: 3.2%; background: var(--kaiju, var(--accent));
  animation: kaiju-fall 0.75s cubic-bezier(.3, 1.35, .5, 1) backwards; animation-delay: var(--d);
}
.kaiju .px.hop {
  background: var(--kaiju-hop, var(--accent-2));
  animation: kaiju-fall 0.75s cubic-bezier(.3, 1.35, .5, 1) backwards, kaiju-hop 7s ease-in-out infinite;
  animation-delay: var(--d), var(--h);
}
.kaiju__floor { position: absolute; left: 5%; right: 5%; bottom: -6%; height: 3px; border-radius: 2px; background: var(--border); }
@keyframes kaiju-fall { from { opacity: 0; transform: translateY(-1400%); } }
@keyframes kaiju-hop { 0%, 88%, 100% { transform: none; } 92% { transform: translateY(-90%); } 96% { transform: none; } }
@media (max-width: 600px) { .hero-art { width: 150px; margin-bottom: 1.8rem; } }
@media (prefers-reduced-motion: reduce) { .kaiju .px, .kaiju .px.hop { animation: none; } }
