:root {
  /* Accent — overridden by JS joystick */
  --accent-h: 197;
  --accent-s: 89%;
  --accent-l: 63%;
  --accent:     hsl(var(--accent-h), var(--accent-s), var(--accent-l));
  --accent-dim: hsl(var(--accent-h), var(--accent-s), 45%);
  --accent-glow: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.15);
  --accent-glow-strong: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.35);

  --bg:           #07070a;
  --bg-2:         #0d0d12;
  --surface:      #111118;
  --surface-2:    #18181f;
  --surface-3:    #1e1e28;
  --border:       rgba(255,255,255,0.07);
  --border-light: rgba(255,255,255,0.12);

  /* Text */
  --text:         #f0f0f6;
  --text-2:       #8888a0;
  --text-3:       #444458;

  /* Fonts */
  --font-display: 'Bebas Neue', sans-serif;
  --font-ui:      'Syne', sans-serif;
  --font-mono:    'Space Mono', monospace;

  /* Radii */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t: 0.25s var(--ease);
  --ts: 0.5s var(--ease);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  line-height: 1.6;
  overflow-x: clip;
  cursor: none;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: none; border: none; background: none; font-family: inherit; }
input, textarea { font-family: var(--font-ui); }

/* ── Container ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 768px) { .container { padding: 0 20px; } }

/* ── Custom Cursor ── */
.cursor {
  position: fixed; width: 32px; height: 32px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none; z-index: 10000;
  transform: translate(-50%,-50%);
  transition: width .2s, height .2s, border-color .2s, background .2s, opacity .2s;
  mix-blend-mode: exclusion;
}
.cursor.hovered { width: 52px; height: 52px; background: var(--accent-glow); }
.cursor-dot {
  position: fixed; width: 4px; height: 4px;
  background: var(--accent); border-radius: 50%;
  pointer-events: none; z-index: 10001;
  transform: translate(-50%,-50%);
  transition: background .2s;
}
@media (hover: none) { .cursor, .cursor-dot { display: none; } }

/* ── Utility ── */
.accent { color: var(--accent); }
code {
  font-family: var(--font-mono); font-size: .88em;
  background: var(--accent-glow); color: var(--accent);
  padding: 2px 7px; border-radius: 4px;
}
.section-label {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 4px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #07070a;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 13px 26px; border-radius: var(--r-sm);
  position: relative; overflow: hidden;
  transition: transform .3s var(--spring), box-shadow var(--t), background var(--t);
}
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.3) 50%, transparent 60%);
  transform: translateX(-100%); transition: transform .5s;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 40px var(--accent-glow-strong); }
.btn-primary:hover::after { transform: translateX(100%); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border-light); color: var(--text-2);
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 13px 26px; border-radius: var(--r-sm);
  transition: border-color var(--t), color var(--t), transform .3s var(--spring);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ══════════════════════ HEADER ══════════════════════ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  transform: translateZ(0);
  will-change: transform, backdrop-filter;
  background: rgba(7,7,10,.75);
  transition: border-color var(--t);
}
.header.scrolled { border-bottom-color: var(--border-light); }
.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 40px;
  height: 62px; display: flex; align-items: center; justify-content: space-between;
}
.logo { font-family: var(--font-display); font-size: 26px; letter-spacing: 5px; }
.logo-bracket { color: var(--text-3); }
.logo-text { transition: color var(--t); }

.nav { display: flex; align-items: center; gap: 36px; }
.nav-link {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-2); position: relative;
  transition: color var(--t);
}
.nav-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform var(--t);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-cta {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  background: var(--accent); color: var(--bg);
  padding: 8px 18px; border-radius: var(--r-sm);
  transition: transform .3s var(--spring), box-shadow var(--t), background var(--t);
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 24px var(--accent-glow-strong); }

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--t); }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

.mobile-nav {
  display: flex; 
  flex-direction: column;
  gap: 14px;
  background: var(--bg-2);
  
  /* Starting state: hidden and squished */
  max-height: 0;
  padding: 0 40px;
  opacity: 0;
  visibility: hidden; /* Prevents clicking invisible links */
  border-top: 1px solid transparent;
  overflow: hidden;
  
  transition: max-height 0.4s var(--ease), 
              padding 0.4s var(--ease), 
              opacity 0.3s var(--ease), 
              border-color 0.4s var(--ease),
              visibility 0.4s;
}
.mobile-nav.open {
  max-height: 250px;
  padding: 20px 40px;
  opacity: 1;
  visibility: visible;
  border-top: 1px solid var(--border);
}
.mnav-link { font-family: var(--font-mono); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-2); transition: color var(--t); }
.mnav-link:hover { color: var(--accent); }

/* ══════════════════════ HERO ══════════════════════ */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#heroCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* Glossy gradient overlay */
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, hsla(var(--accent-h),var(--accent-s),var(--accent-l),.06) 0%, transparent 70%),
    linear-gradient(180deg, rgba(7,7,10,0) 60%, rgba(7,7,10,1) 100%);
  pointer-events: none; z-index: 1;
  transition: background var(--ts);
}

.hero-content {
  position: relative; z-index: 2;
  max-width: 1280px; width: 100%;
  padding: 120px 40px 80px;
}

.hero-title-wrap { margin-bottom: 48px; }
.hero-title-line { display: flex; align-items: center; line-height: 0.88; }
.hero-second-line { margin-top: -6px; }

.ht {
  font-family: var(--font-display);
  font-size: clamp(80px, 13vw, 190px);
  letter-spacing: -2px; line-height: 0.88;
  display: block;
}
.accent-stroke {
  -webkit-text-stroke: 2px var(--accent);
  color: transparent;
  filter: drop-shadow(0 0 60px var(--accent-glow));
  transition: -webkit-text-stroke-color var(--ts), filter var(--ts);
}

/* ── Sun Badge (color picker) ── */
.joystick-wrap {
  flex-shrink: 0;
  margin-right: clamp(12px, 1.4vw, 24px);
  position: relative;
  width: clamp(70px, 9vw, 130px);
  height: clamp(70px, 9vw, 130px);
  user-select: none; touch-action: none;
  cursor: none;
}

/* The solid circle — exactly like the Japan poster sun */
.joystick-base {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: background var(--ts);
  animation: sun-breathe 4s ease-in-out infinite;
  box-shadow:
    0 0 0 0 var(--accent-glow),
    0 0 60px var(--accent-glow-strong);
}

@keyframes sun-breathe {
  0%, 100% { box-shadow: 0 0 40px var(--accent-glow-strong), 0 0 0 0 var(--accent-glow); }
  50%       { box-shadow: 0 0 80px var(--accent-glow-strong), 0 0 0 8px var(--accent-glow); }
}

/* Conic hue-ring — removed */
.joystick-wheel { display: none; }

/* Inner ring — keeps the solid circle on top of the hue ring */
.joystick-plate {
  position: absolute; inset: 3px;
  border-radius: 50%;
  background: var(--accent);
  transition: background var(--ts);
  z-index: 0;
}

/* Static inner stroke — hidden, JS-created indicator handles this now */
.joystick-base::before { display: none; }

/* Drag hint text — fades out after first use */
.joystick-hint {
  position: absolute; bottom: -24px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-3); white-space: nowrap;
  pointer-events: none;
  opacity: 0.7;
}

/* Hide all the old sub-elements we no longer need */
.joystick-arc,
.joystick-stick-wrap,
.joystick-stick,
.joystick-knob,
.joystick-knob-shine,
.joystick-label { display: none; }

.hero-bottom {
  display: flex; align-items: center; gap: 56px; flex-wrap: wrap;
}
.hero-sub {
  font-size: clamp(14px, 1.2vw, 17px); color: var(--text-2);
  max-width: 460px; line-height: 1.75;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ══════════════════════ HOW IT WORKS ══════════════════════ */
.how { padding: 120px 0; border-top: 1px solid var(--border); }
.how .section-label { margin-bottom: 48px; }

.how-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden;
}
.how-card {
  background: var(--bg-2); padding: 40px 32px;
  display: flex; flex-direction: column; gap: 20px;
  position: relative; overflow: hidden;
  transition: background var(--t);
}
.how-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, var(--accent-glow) 0%, transparent 70%);
  opacity: 0; transition: opacity .4s;
}
.how-card:hover { background: var(--surface); }
.how-card:hover::before { opacity: 1; }

.how-icon-canvas-wrap {
  width: 72px; height: 72px; flex-shrink: 0;
}
.how-icon-canvas { display: block; }
.how-step-num {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 3px; color: var(--accent); text-transform: uppercase;
}
.how-card h3 { font-size: 17px; font-weight: 700; line-height: 1.3; }
.how-card p { font-size: 13px; color: var(--text-2); line-height: 1.65; }

/* ══════════════════════ SKILLS GRID ══════════════════════ */
.skills { padding: 120px 0; border-top: 1px solid var(--border); }
.skills-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; margin-bottom: 48px; flex-wrap: wrap;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 88px);
  letter-spacing: -1px; line-height: .9;
  margin-top: 6px;
}

/* Filter Bar */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 2px; text-transform: uppercase;
  padding: 8px 18px; border-radius: var(--r-sm);
  border: 1px solid var(--border); color: var(--text-2);
  transition: all var(--t);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active {
  background: var(--accent); border-color: var(--accent);
  color: var(--bg); font-weight: 700;
}

/* Grid */
.skills-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden;
}

.skill-card {
  background: var(--bg-2); padding: 28px 26px;
  display: flex; flex-direction: column; gap: 16px;
  cursor: none; position: relative; overflow: hidden;
  transition: background var(--t), transform .15s;
}
.skill-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0); transform-origin: center;
  transition: transform .4s var(--ease);
}
.skill-card:hover { background: var(--surface); }
.skill-card:hover::before { transform: scaleX(1); }

.card-header { display: flex; align-items: center; justify-content: space-between; }
.card-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--surface-3); border: 1px solid var(--border);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  transition: transform .3s var(--spring), border-color var(--t), box-shadow var(--t);
}
.card-icon img { width: 28px; height: 28px; object-fit: contain; }
.card-icon-fallback {
  font-family: var(--font-display); font-size: 20px;
  color: var(--text-3); line-height: 1;
}
.skill-card:hover .card-icon {
  transform: scale(1.1) rotate(-5deg);
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

.card-badge {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 3px 9px; border-radius: 100px;
  border: 1px solid var(--border); color: var(--text-3);
  transition: border-color var(--t), color var(--t);
}
.skill-card:hover .card-badge { border-color: var(--accent); color: var(--accent); }

.card-name {
  font-family: var(--font-display); font-size: 30px;
  letter-spacing: 0; line-height: 1;
  color: var(--text); transition: color var(--t);
}
.skill-card:hover .card-name { color: var(--accent); }

.card-desc {
  font-size: 12.5px; color: var(--text-2);
  line-height: 1.6; flex: 1;
}

/* Palette dots */
.card-palette { display: flex; gap: 5px; align-items: center; margin-top: auto; }
.palette-dot {
  width: 11px; height: 11px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.1); flex-shrink: 0;
  transition: transform .2s var(--spring);
}
.skill-card:hover .palette-dot:nth-child(1) { transform: scale(1.2); transition-delay: 0s; }
.skill-card:hover .palette-dot:nth-child(2) { transform: scale(1.2); transition-delay: .04s; }
.skill-card:hover .palette-dot:nth-child(3) { transform: scale(1.2); transition-delay: .08s; }
.skill-card:hover .palette-dot:nth-child(4) { transform: scale(1.2); transition-delay: .12s; }

.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--border); padding-top: 14px;
}
.card-file {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-3); letter-spacing: .5px;
}
.card-arrow {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text-3);
  transition: border-color var(--t), color var(--t), background var(--t), transform .3s var(--spring);
}
.skill-card:hover .card-arrow {
  border-color: var(--accent); color: var(--bg);
  background: var(--accent); transform: rotate(-45deg);
}

/* ══════════════════════ ANATOMY ══════════════════════ */
.anatomy { padding: 120px 0; border-top: 1px solid var(--border); }
.anatomy-inner {
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 80px; align-items: start;
}
.anatomy-left { position: sticky; top: 90px; }
.anatomy-left h2 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 70px);
  line-height: .95; letter-spacing: -1px; margin-bottom: 20px;
}
.anatomy-left p { font-size: 15px; color: var(--text-2); line-height: 1.75; }

.layer-list { display: flex; flex-direction: column; }
.layer-item {
  display: grid; grid-template-columns: 36px 1fr 90px;
  align-items: center; gap: 18px;
  padding: 18px 0; border-bottom: 1px solid var(--border);
  transition: padding-left var(--t);
}
.layer-item:hover { padding-left: 10px; }
.layer-n { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); letter-spacing: 1px; }
.layer-info { display: flex; flex-direction: column; gap: 3px; }
.layer-name { font-size: 13.5px; font-weight: 700; transition: color var(--t); }
.layer-item:hover .layer-name { color: var(--accent); }
.layer-desc { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.layer-bar { height: 3px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.lb-fill { height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; border-radius: 2px; transition: transform .9s var(--ease), background var(--ts); }
.lb-fill.animated { transform: scaleX(1); }

/* ══════════════════════ REQUEST ══════════════════════ */
.request { padding: 120px 0; border-top: 1px solid var(--border); }
.request-inner {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 80px; align-items: start;
}
.request-left { position: sticky; top: 90px; }
.request-left h2 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 70px);
  line-height: .95; letter-spacing: -1px; margin-bottom: 20px;
}
.request-left p { font-size: 15px; color: var(--text-2); line-height: 1.75; margin-bottom: 28px; }
.request-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.req-tag {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px;
  padding: 6px 12px; border-radius: 100px;
  border: 1px dashed var(--border-light); color: var(--text-3);
  transition: border-color var(--t), color var(--t);
}
.req-tag:hover { border-color: var(--accent); color: var(--accent); }

/* Form */
.request-form { display: flex; flex-direction: column; gap: 20px; }
.form-success { display: none; text-align: center; padding: 60px 40px; }
.form-success.visible { display: block; }
.form-success .success-icon {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--accent); color: var(--bg);
  font-size: 26px; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.form-success h3 { font-size: 22px; margin-bottom: 8px; }
.form-success p { color: var(--text-2); font-size: 14px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 2px; text-transform: uppercase; color: var(--text-2);
}
.req-star { color: var(--accent); }
.form-optional { color: var(--text-3); font-size: 10px; }

.form-input {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 12px 16px;
  color: var(--text); font-size: 14px; line-height: 1.5;
  transition: border-color var(--t), box-shadow var(--t);
  outline: none; resize: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-input::placeholder { color: var(--text-3); }
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-textarea { min-height: 100px; }
.form-submit { width: 100%; justify-content: center; }
.form-disclaimer {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 1px; color: var(--text-3); text-align: center;
}

/* ══════════════════════ FOOTER ══════════════════════ */
.footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer-inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.footer-logo { font-family: var(--font-display); font-size: 22px; letter-spacing: 5px; }
.footer-note { font-size: 12px; color: var(--text-3); text-align: center; line-height: 1.7; }
.footer-gh {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-2); border: 1px solid var(--border);
  padding: 8px 16px; border-radius: var(--r-sm);
  transition: border-color var(--t), color var(--t), transform .3s var(--spring);
}
.footer-gh:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ══════════════════════ MODAL ══════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.8);
  z-index: 5000; display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; pointer-events: none;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: opacity .35s var(--ease);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-xl); width: 100%; max-width: 640px;
  max-height: 90vh; overflow-y: auto; position: relative;
  transform: scale(.93) translateY(24px);
  transition: transform .45s var(--spring);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-close {
  position: sticky; top: 16px; float: right; margin: 16px 16px 0 0;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface-3); border: 1px solid var(--border);
  color: var(--text-2); display: flex; align-items: center; justify-content: center;
  z-index: 10; transition: background var(--t), color var(--t), border-color var(--t);
}
.modal-close:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }

.modal-body { padding: 12px 36px 36px; clear: both; }

/* Modal header strip */
.modal-strip {
  height: 6px; border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: linear-gradient(90deg, var(--accent), hsla(var(--accent-h),var(--accent-s),80%,1));
  margin: 0 0 0 0; position: sticky; top: 0; z-index: 5;
  transition: background var(--ts);
}

.modal-hero { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.modal-icon {
  width: 64px; height: 64px; border-radius: 14px;
  background: var(--surface-3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.modal-icon img { width: 40px; height: 40px; object-fit: contain; }
.modal-icon-fallback { font-family: var(--font-display); font-size: 28px; color: var(--text-3); }
.modal-meta { display: flex; flex-direction: column; gap: 5px; }
.modal-title { font-family: var(--font-display); font-size: 46px; line-height: 1; }
.modal-badge {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 2px; text-transform: uppercase;
  background: var(--accent-glow); color: var(--accent);
  border: 1px solid rgba(255,255,255,.08);
  padding: 3px 10px; border-radius: 100px;
}

.modal-section { margin-bottom: 28px; }
.modal-section-title {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 14px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}

/* Palette display */
.modal-palette { display: flex; gap: 8px; }
.modal-swatch {
  flex: 1; border-radius: var(--r-sm); overflow: hidden;
  border: 1px solid rgba(255,255,255,.06);
  transition: transform .25s var(--spring);
}
.modal-swatch:hover { transform: scaleY(1.05); }
.swatch-color { height: 48px; }
.swatch-hex {
  background: var(--surface-2); padding: 6px 8px;
  font-family: var(--font-mono); font-size: 9.5px;
  color: var(--text-3); text-align: center; letter-spacing: .5px;
}

/* Typography display */
.modal-type-grid { display: flex; flex-direction: column; gap: 10px; }
.modal-type-row {
  display: flex; align-items: baseline; gap: 16px;
  padding: 10px 14px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-sm);
}
.type-label { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); width: 70px; flex-shrink: 0; }
.type-sample { color: var(--text); }

.modal-desc { font-size: 14px; color: var(--text-2); line-height: 1.7; }

/* Modal actions */
.modal-actions { display: flex; gap: 12px; margin-top: 28px; }
.modal-actions .btn-primary { flex: 1; justify-content: center; }
.btn-download {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  flex: 1;
  border: 1px solid var(--border-light); color: var(--text-2);
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 13px 20px; border-radius: var(--r-sm);
  transition: border-color var(--t), color var(--t), background var(--t), transform .3s var(--spring);
}
.btn-download:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ══════════════════════ TOAST ══════════════════════ */
.toast {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent); color: var(--bg);
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 2px; text-transform: uppercase;
  padding: 12px 24px; border-radius: 100px;
  z-index: 99999; opacity: 0;
  pointer-events: none;
  transition: all .35s var(--spring);
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ══════════════════════ SCROLLBAR ══════════════════════ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ══════════════════════ RESPONSIVE ══════════════════════ */
@media (max-width: 1100px) {
  .skills-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .how-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .anatomy-inner, .request-inner { grid-template-columns: 1fr; gap: 48px; }
  .anatomy-left, .request-left { position: static; }
}
@media (max-width: 768px) {
  .header-inner { padding: 0 20px; }
  .nav { display: none; }
  .hamburger { display: flex; }
  .hero-content { padding: 100px 20px 60px; }
  .hero-bottom { gap: 28px; }
  .modal-body { padding: 8px 20px 28px; }
  .modal-palette { flex-wrap: wrap; }
  .modal-swatch { flex: calc(50% - 4px); }
  .modal-actions { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
  .skills-header { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-note { font-size: 11px; }
}
@media (max-width: 540px) {
  .how-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .ht { font-size: 68px; }
}
@media (hover: none) {
  body { cursor: auto; }
  button { cursor: pointer; }
  a { cursor: pointer; }
}