/* =============================================
   DESIGN SYSTEM — Refined Dark Editorial
   ============================================= */
:root {
  --bg:           #09090b;
  --bg-surface:   #111113;
  --bg-elevated:  #18181b;
  --bg-hover:     #1f1f23;

  --border:       rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  --text:         #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted:   #71717a;

  --accent:       #10b981;
  --accent-dim:   rgba(16, 185, 129, 0.12);
  --accent-glow:  rgba(16, 185, 129, 0.25);

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'IBM Plex Sans', system-ui, sans-serif;

  --ease:         cubic-bezier(0.22, 1, 0.36, 1);
  --duration:     0.45s;

  --wrap:         1120px;
  --header-h:     72px;
  --radius:       12px;
  --radius-lg:    20px;
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

main {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; font-size: inherit; color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
  min-width: 0;
}

/* ===== Ambient Effects ===== */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.6s ease;
  will-change: transform;
}

body:hover .cursor-glow { opacity: 0.4; }

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background var(--duration) var(--ease),
              border-color var(--duration) var(--ease);
}

.header.scrolled {
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  letter-spacing: -0.02em;
  min-width: 0;
  flex-shrink: 1;
  overflow: hidden;
}

.header__brand-mark {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 12px var(--accent-glow);
  flex-shrink: 0;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header__link {
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 8px;
  transition: color 0.25s, background 0.25s;
}

.header__link:hover,
.header__link.active {
  color: var(--text);
  background: var(--bg-hover);
}

.header__cta {
  margin-left: 8px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--bg);
  background: var(--accent);
  border-radius: 8px;
  transition: transform 0.25s, box-shadow 0.25s;
}

.header__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.header__cta.active {
  box-shadow: 0 0 0 2px var(--accent), 0 4px 20px var(--accent-glow);
}

.header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 110;
  -webkit-tap-highlight-color: transparent;
}

.header__burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

.header__burger.open span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.header__burger.open span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 10px;
  transition: all 0.3s var(--ease);
}

.btn--primary {
  color: var(--bg);
  background: var(--accent);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn--ghost {
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

.btn--full { width: 100%; justify-content: center; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 60px) 0 80px;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(16, 185, 129, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.hero__text,
.hero__visual {
  min-width: 0;
  max-width: 100%;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 100px;
  margin-bottom: 28px;
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 4.8rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 12px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.hero__title-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__role {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero__bio {
  max-width: 440px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero__stats {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.hero__stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.hero__stat span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero__stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* Hero Visual — Code Card */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero__card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  min-width: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03),
    0 20px 60px rgba(0,0,0,0.5);
}

.hero__card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.hero__card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.hero__card-dot--red    { background: #ef4444; }
.hero__card-dot--yellow { background: #eab308; }
.hero__card-dot--green  { background: #22c55e; }

.hero__card-filename {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'IBM Plex Mono', monospace;
}

.hero__code {
  padding: 24px;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.8;
  overflow-x: hidden;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.hero__code .code-kw   { color: #c084fc; }
.hero__code .code-var  { color: #f472b6; }
.hero__code .code-prop { color: #93c5fd; }
.hero__code .code-str  { color: #86efac; }
.hero__code .code-fn   { color: #fbbf24; }

.hero__orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
  pointer-events: none;
}

.hero__orbit--1 {
  width: 300px;
  height: 300px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: orbitSpin 30s linear infinite;
}

.hero__orbit--2 {
  width: 380px;
  height: 380px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-style: dashed;
  opacity: 0.4;
  animation: orbitSpin 45s linear infinite reverse;
}

@keyframes orbitSpin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero__scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollLine 2s ease infinite;
}

@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ===== Sections ===== */
.section {
  padding: 120px 0;
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.section--surface {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: flex;
  gap: 24px;
  margin-bottom: 64px;
}

.section-head__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.section-head__num {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.section-head__line {
  width: 1px;
  flex: 1;
  min-height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.section-head__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.section-head__desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 480px;
}

/* ===== Entries (Education & Experience) ===== */
.entries {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.entry {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  padding: 32px;
  border-radius: var(--radius);
  transition: background 0.3s;
}

.entry:hover {
  background: var(--bg-hover);
}

.entry--featured {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.entry--featured:hover {
  border-color: var(--border-hover);
}

.entry__year {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  padding-top: 4px;
  white-space: nowrap;
}

.entry__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.entry__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.entry__org {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 12px;
}

.entry__text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 600px;
}

/* ===== Tags ===== */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 5px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.25s, color 0.25s;
}

.entry:hover .tag,
.project:hover .tag {
  border-color: var(--border-hover);
}

/* ===== Bento Skills Grid ===== */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 12px;
}

.bento__cell {
  padding: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.3s, transform 0.3s var(--ease);
}

.bento__cell:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.bento__cell--wide {
  grid-column: span 2;
}

.bento__cell--accent {
  background: linear-gradient(135deg, rgba(16,185,129,0.08) 0%, var(--bg-elevated) 100%);
  border-color: rgba(16, 185, 129, 0.15);
}

.bento__cell--stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--accent);
  border-color: var(--accent);
}

.bento__label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.bento__cell--accent .bento__label { color: var(--accent); }
.bento__cell--stat .bento__label { color: rgba(0,0,0,0.5); }

.bento__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  padding: 8px 16px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.25s;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.bento__cell--accent .chip {
  color: var(--text);
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
}

.bento__cell--accent .chip:hover {
  color: var(--accent);
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent);
}

.bento__stat-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--bg);
  line-height: 1;
  margin-bottom: 8px;
}

.bento__stat-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(0,0,0,0.6);
  max-width: 180px;
  line-height: 1.4;
}

/* ===== Projects ===== */
.projects {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 24px;
  align-items: start;
  padding: 36px 32px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all 0.35s var(--ease);
  cursor: default;
}

.project:hover {
  background: var(--bg-elevated);
  border-color: var(--border);
}

.project--featured {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 44px 36px;
}

.project--featured:hover {
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.06);
}

.project__num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-top: 4px;
}

.project:hover .project__num { color: var(--accent); }

.project__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.project__desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 4px;
}

.project__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  padding-top: 4px;
}

.project__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  transition: gap 0.25s;
}

.project__link:hover { gap: 10px; }

.project__link--muted {
  color: var(--text-muted);
}

.project__link--muted:hover { color: var(--text-secondary); }

/* ===== Contact ===== */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact__pitch {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.contact__channels {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.channel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.3s var(--ease);
}

.channel:hover {
  padding-left: 8px;
}

.channel__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.channel__value {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.channel:hover .channel__value { color: var(--accent); }

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 36px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.field input,
.field textarea {
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.25s, box-shadow 0.25s;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-muted);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.field input.error,
.field textarea.error {
  border-color: #ef4444;
}

.field__error {
  font-size: 0.78rem;
  color: #ef4444;
  min-height: 1em;
}

/* ===== Footer ===== */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer__crafted {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.6;
}

.footer__top {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  transition: all 0.25s;
}

.footer__top:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ===== Reveal Animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in hero */
.hero__text .reveal:nth-child(1) { transition-delay: 0s; }
.hero__text .reveal:nth-child(2) { transition-delay: 0.08s; }
.hero__text .reveal:nth-child(3) { transition-delay: 0.16s; }
.hero__text .reveal:nth-child(4) { transition-delay: 0.24s; }
.hero__text .reveal:nth-child(5) { transition-delay: 0.32s; }
.hero__text .reveal:nth-child(6) { transition-delay: 0.4s; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero__card { max-width: 100%; }

  .bento {
    grid-template-columns: 1fr 1fr;
  }

  .bento__cell--wide {
    grid-column: span 2;
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .project {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .project__links {
    flex-direction: row;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 60px;
  }

  .header__brand {
    font-size: 0.88rem;
    max-width: calc(100vw - 72px);
  }

  .header__brand > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .cursor-glow {
    display: none;
  }

  .header__nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 105;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 20px 28px 28px;
    background: rgba(9, 9, 11, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s, visibility 0.35s;
  }

  .header__nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .header__overlay {
    position: fixed;
    inset: 0;
    z-index: 104;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s var(--ease), visibility 0.35s;
  }

  .header__overlay.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .header.menu-open {
    z-index: 200;
  }

  .header__link,
  .header__cta {
    width: 100%;
    text-align: center;
    padding: 14px;
  }

  .header__cta { margin-left: 0; margin-top: 8px; }

  .header__burger { display: flex; }

  .hero {
    min-height: auto;
    padding: calc(var(--header-h) + 20px) 0 40px;
    align-items: flex-start;
  }

  .hero__grid {
    gap: 28px;
  }

  .hero__text {
    display: flex;
    flex-direction: column;
  }

  .hero__title {
    order: -1;
    font-size: 2.1rem;
    margin-bottom: 8px;
  }

  .hero__badge {
    order: 0;
    font-size: 0.72rem;
    padding: 5px 12px 5px 8px;
    margin-bottom: 14px;
  }

  .hero__role {
    font-size: 0.95rem;
    margin-bottom: 14px;
  }

  .hero__bio {
    font-size: 0.88rem;
    line-height: 1.65;
    margin-bottom: 20px;
    max-width: 100%;
  }

  .hero__actions {
    margin-bottom: 24px;
    gap: 10px;
  }

  .hero__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding-top: 20px;
  }

  .hero__stat strong {
    font-size: 1.15rem;
  }

  .hero__stat span {
    font-size: 0.68rem;
    line-height: 1.3;
  }

  .hero__card-header {
    padding: 10px 14px;
  }

  .hero__card-dot {
    width: 8px;
    height: 8px;
  }

  .hero__card-filename {
    font-size: 0.68rem;
  }

  .hero__code {
    padding: 14px 12px;
    font-size: 0.65rem;
    line-height: 1.55;
  }

  .hero__orbit {
    display: none;
  }

  .hero__scroll-hint {
    display: none;
  }

  .hero__visual {
    width: 100%;
    max-width: 100%;
  }

  .section { padding: 80px 0; }

  .section-head { margin-bottom: 40px; }

  .entry {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 24px 16px;
  }

  .bento {
    grid-template-columns: 1fr;
  }

  .bento__cell--wide {
    grid-column: span 1;
  }

  .hero__stats {
    flex-wrap: wrap;
    gap: 20px;
  }

  .hero__stat-divider { display: none; }

  .footer__crafted { display: none; }
}

@media (max-width: 480px) {
  :root {
    --header-h: 56px;
  }

  .wrap { padding: 0 16px; }

  .header__inner { padding: 0 16px; }

  .hero {
    padding: calc(var(--header-h) + 16px) 0 32px;
  }

  .hero__title {
    font-size: 1.85rem;
  }

  .hero__role {
    font-size: 0.88rem;
  }

  .hero__bio {
    font-size: 0.84rem;
  }

  .hero__actions { flex-direction: column; }

  .btn {
    justify-content: center;
    width: 100%;
    padding: 11px 18px;
    font-size: 0.85rem;
  }

  .hero__stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .hero__stat strong {
    font-size: 1rem;
  }

  .hero__stat span {
    font-size: 0.62rem;
  }

  .hero__code {
    font-size: 0.6rem;
    padding: 12px 10px;
  }

  .section-head__title {
    font-size: 1.65rem;
  }

  .section-head__desc {
    font-size: 0.9rem;
  }

  .contact__form { padding: 24px; }
}
