/* MIA_Ether — Personal Universe v2 */
:root, [data-theme="dark"] {
  --bg: #03040a;
  --bg-elevated: #08091a;
  --bg-card: #0b0c1c;
  --border: #161831;
  --border-hover: #24294a;
  --text: #e8eaf4;
  --text-secondary: #9aa0c2;
  --text-muted: #5f6484;
  --accent: #b9c2ff;
  --accent-2: #ff7dc7;
  --accent-dim: rgba(179, 184, 255, 0.14);
  --accent-glow: rgba(179, 184, 255, 0.35);
  --cyan: #9ee8ff;
  --grid: rgba(179, 184, 255, 0.04);
  --header-bg: rgba(3, 4, 10, 0.82);
  --card-shadow: 0 24px 64px -28px rgba(0, 0, 0, 0.7);
  --font: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
[data-theme="light"] {
  --bg: #f4f4fb;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --border: #dadbf0;
  --border-hover: #b8b9d8;
  --text: #111124;
  --text-secondary: #3e4266;
  --text-muted: #72739a;
  --accent: #3b43b7;
  --accent-2: #c2257a;
  --accent-dim: rgba(59, 68, 183, 0.1);
  --accent-glow: rgba(59, 68, 183, 0.25);
  --cyan: #12677e;
  --grid: rgba(59, 68, 183, 0.04);
  --header-bg: rgba(244, 244, 251, 0.85);
  --card-shadow: 0 18px 44px -18px rgba(28, 24, 90, 0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: geometricPrecision; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 16px;
  overflow-x: hidden;
  transition: background 0.35s, color 0.35s;
}
body.has-custom-cursor, body.has-custom-cursor * { cursor: none !important; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.75;
}

#stardust {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 110;
  box-shadow: 0 0 14px var(--accent-glow);
}

.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 120;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.25s;
}
.cursor-dot { width: 6px; height: 6px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.cursor-ring { width: 34px; height: 34px; border: 1px solid var(--accent); transition: width 0.18s, height 0.18s, border-color 0.18s; }
body.has-custom-cursor .cursor-dot,
body.has-custom-cursor .cursor-ring { opacity: 1; }
.cursor-ring.hover { width: 50px; height: 50px; border-color: var(--accent-2); }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; }
.mono { font-family: var(--mono); letter-spacing: 0.06em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.skip-link {
  position: absolute; top: -100px; left: 1rem;
  background: var(--accent); color: #000;
  padding: 0.55rem 1rem; border-radius: 8px; z-index: 200; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.container {
  width: 100%; max-width: 1120px;
  margin: 0 auto; padding: 0 1.5rem;
  position: relative; z-index: 1;
}

/* Header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: transparent;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.site-header.solid {
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 30px -20px rgba(0,0,0,0.45);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo {
  display: inline-flex; align-items: center; gap: 0.65rem;
  background: none; border: none; cursor: pointer;
  font-weight: 700; font-size: 0.95rem; color: var(--text);
  letter-spacing: -0.03em; padding: 0;
}
.logo-mark {
  width: 28px; height: 28px; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #03040a; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.78rem;
  box-shadow: 0 0 18px var(--accent-glow);
}
.nav-links { display: flex; align-items: center; gap: 1.4rem; }
.nav-links a {
  font-size: 0.84rem; color: var(--text-secondary); transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 1px;
  background: var(--accent); transition: width 0.25s var(--ease);
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }
.nav-external::after { display: none !important; }
.nav-right { display: flex; align-items: center; gap: 0.45rem; }
.icon-btn {
  background: transparent; border: 1px solid var(--border);
  border-radius: 10px; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }

.lang-panel {
  position: absolute; right: 0; top: 54px; z-index: 70;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 0.45rem; min-width: 170px;
  box-shadow: var(--card-shadow);
  animation: menuIn 0.22s var(--ease);
}
.lang-panel[hidden] { display: none !important; }
.lang-panel-inner { display: flex; flex-direction: column; gap: 0.15rem; }
.lang-option {
  background: none; border: none; color: var(--text-secondary);
  text-align: left; font-size: 0.85rem; padding: 0.55rem 0.7rem; border-radius: 8px; cursor: pointer;
  font-family: var(--font);
}
.lang-option:hover { background: var(--accent-dim); color: var(--accent); }
.lang-option.active { color: var(--accent); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 0.35rem;
}
.nav-toggle span { display: block; width: 18px; height: 1.5px; background: var(--text); transition: transform 0.25s var(--ease), opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: 156px 0 120px;
}
.hero-mist {
  position: absolute; left: 50%; top: 18%;
  width: 780px; height: 520px; transform: translateX(-50%);
  background:
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(158, 232, 255, 0.08), transparent),
    radial-gradient(ellipse 60% 70% at 40% 55%, rgba(255, 125, 199, 0.06), transparent);
  filter: blur(80px);
  pointer-events: none;
  transition: transform 0.3s ease-out;
}
.hero-inner {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  position: relative; z-index: 1;
}
.hero-kicker {
  font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.14em;
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px;
  background: rgba(11, 12, 28, 0.35);
}
.hero-title {
  font-size: clamp(3.2rem, 11vw, 6.4rem);
  font-weight: 800; letter-spacing: -0.06em; line-height: 0.95;
  background: linear-gradient(180deg, var(--text) 0%, rgba(232,234,244,0.55) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 80px rgba(179, 184, 255, 0.15);
}
.hero-tagline {
  font-size: clamp(0.88rem, 1.8vw, 1.04rem);
  color: var(--text-secondary); font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero-sub { font-size: 0.94rem; color: var(--text-muted); max-width: 38ch; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; margin-top: 0.4rem; }

.hero-depth { position: absolute; inset: 0; pointer-events: none; }
.depth-star {
  position: absolute; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  transition: transform 0.2s ease-out;
}
.depth-star:nth-child(1) { width: 2px; height: 2px; left: 12%; top: 22%; opacity: 0.7; }
.depth-star:nth-child(2) { width: 3px; height: 3px; left: 78%; top: 34%; opacity: 0.45; }
.depth-star:nth-child(3) { width: 2px; height: 2px; left: 64%; top: 72%; opacity: 0.6; }
.depth-star:nth-child(4) { width: 3px; height: 3px; left: 30%; top: 80%; opacity: 0.35; }
.depth-star:nth-child(5) { width: 2px; height: 2px; left: 88%; top: 14%; opacity: 0.55; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.88rem; font-weight: 600; padding: 12px 18px;
  border-radius: 12px; transition: all 0.22s var(--ease); cursor: pointer; border: none;
}
.btn-primary {
  background: linear-gradient(135deg, rgba(179,184,255,0.14), rgba(255,125,199,0.14));
  color: var(--text); border: 1px solid rgba(179,184,255,0.35);
  box-shadow: 0 0 24px rgba(179,184,255,0.15);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 32px rgba(179,184,255,0.28); }
.btn-ghost {
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-hover); background: var(--bg-elevated); }

/* Sections */
.section { padding: 6rem 0; position: relative; z-index: 1; }
.section-label {
  font-size: 0.82rem; font-weight: 600; color: var(--text-muted);
  margin-bottom: 1.6rem; display: inline-flex; align-items: center; gap: 0.6rem;
}
.section-label .mono { color: var(--accent); font-size: 0.74rem; font-weight: 700; }
.section-header { margin-bottom: 2rem; }
.section-desc { font-size: 1.02rem; color: var(--text-secondary); margin-top: 0.35rem; max-width: 56ch; }

/* About */
.about-grid {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 2.75rem; align-items: start;
}
.about-lead { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.4; margin-bottom: 1.1rem; }
.about-content p { color: var(--text-secondary); margin-bottom: 0.95rem; max-width: 52ch; font-size: 0.98rem; }
.identity-stack { display: flex; flex-direction: column; gap: 1rem; }
.identity-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 0.9rem; align-items: center;
  padding: 1rem 1.1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  transition: border-color 0.22s, transform 0.22s var(--ease), box-shadow 0.22s;
}
.identity-item:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--card-shadow); }
.identity-index { color: var(--accent); font-size: 0.7rem; font-weight: 700; }
.identity-name { font-size: 1rem; font-weight: 700; letter-spacing: -0.02em; }
.identity-note { font-size: 0.75rem; color: var(--text-muted); }

/* Building / Pipeline */
.pipeline {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: nowrap;
  overflow-x: auto; padding-bottom: 0.5rem;
}
.pipeline-node {
  flex: 1 1 auto; min-width: 120px; text-align: center;
  padding: 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  transition: border-color 0.22s, transform 0.22s var(--ease), box-shadow 0.22s;
}
.pipeline-node:hover, .pipeline-node:focus {
  outline: none; border-color: var(--accent); transform: translateY(-2px);
  box-shadow: 0 0 26px rgba(179,184,255,0.12);
}
.pipeline-node:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.pipeline-index { display: block; color: var(--accent); font-size: 0.72rem; margin-bottom: 0.4rem; }
.pipeline-name { display: block; font-size: 0.95rem; font-weight: 700; letter-spacing: -0.02em; }
.pipeline-hint { display: block; color: var(--text-muted); font-size: 0.68rem; margin-top: 0.2rem; }
.pipeline-connector { color: var(--text-muted); font-size: 0.9rem; opacity: 0.55; }

/* Featured */
.featured-card {
  background: linear-gradient(180deg, rgba(179,184,255,0.07), rgba(255,125,199,0.04));
  border: 1px solid var(--border);
  border-radius: 18px; padding: 1.5rem 1.6rem;
  display: flex; flex-direction: column; gap: 1.2rem;
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.featured-card:hover { border-color: rgba(179,184,255,0.45); transform: translateY(-2px); box-shadow: var(--card-shadow); }
.featured-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.featured-name { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; }
.featured-meta { color: var(--text-muted); font-size: 0.72rem; margin-top: 0.3rem; }
.featured-badge { color: var(--accent); border: 1px solid rgba(179,184,255,0.25); padding: 6px 10px; border-radius: 999px; font-size: 0.7rem; }
.featured-body p { color: var(--text-secondary); max-width: 64ch; font-size: 0.98rem; }
.featured-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.featured-tags li {
  font-size: 0.72rem; color: var(--text-muted);
  border: 1px solid var(--border); padding: 5px 10px; border-radius: 999px;
  font-family: var(--mono);
}
.featured-footer { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.featured-note { font-size: 0.78rem; color: var(--text-muted); }

/* Projects */
.projects-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.filter-btn {
  font-family: var(--mono); font-size: 0.72rem;
  padding: 6px 12px; border-radius: 999px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer; transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.projects-status { font-size: 0.72rem; color: var(--text-muted); }
.project-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem;
}
.project-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.65rem;
  transition: border-color 0.22s, transform 0.22s var(--ease), box-shadow 0.22s, opacity 0.35s;
}
.project-card.hidden { display: none; }
.project-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--card-shadow); }
.project-card:focus-within { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 14px; }
.project-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.project-title { font-size: 1.02rem; font-weight: 700; letter-spacing: -0.02em; }
.project-title a:hover { color: var(--accent); }
.project-meta { display: flex; gap: 0.9rem; color: var(--text-muted); font-size: 0.72rem; }
.project-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.project-desc { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.55; flex: 1; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.project-tags span {
  font-size: 0.68rem; color: var(--text-muted); background: var(--bg-elevated);
  border: 1px solid var(--border); padding: 3px 9px; border-radius: 999px; font-family: var(--mono);
}
.project-footer { margin-top: 0.15rem; padding-top: 0.85rem; border-top: 1px solid var(--border); }
.project-link { font-size: 0.84rem; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.02em; }
.project-link:hover { color: var(--accent); }

/* Activity */
.activity-panels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.activity-panel {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 1.1rem;
  transition: border-color 0.22s, transform 0.22s var(--ease);
}
.activity-panel:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.activity-kicker { color: var(--text-muted); font-size: 0.7rem; margin-bottom: 0.35rem; }
.activity-value { font-size: clamp(1.4rem, 3vw, 2rem); color: var(--text); font-weight: 700; }
.activity-chart { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 1rem; min-height: 180px; }
#activityCanvas { width: 100%; height: 220px; display: block; }

/* Agent lab / workflow */
.workflow {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: nowrap; overflow-x: auto;
}
.workflow-step {
  flex: 1 1 auto; min-width: 120px; text-align: center;
  padding: 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  transition: border-color 0.22s, transform 0.22s var(--ease), box-shadow 0.22s;
}
.workflow-step:hover, .workflow-step:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 22px rgba(179,184,255,0.1); }
.workflow-step:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.workflow-index { display: block; color: var(--accent); font-size: 0.7rem; margin-bottom: 0.3rem; }
.workflow-name { display: block; font-size: 0.92rem; font-weight: 700; letter-spacing: -0.01em; }
.workflow-arrow { color: var(--text-muted); opacity: 0.7; font-size: 0.9rem; }
.lab-note { color: var(--text-secondary); max-width: 58ch; margin-top: 1.1rem; font-size: 0.98rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0.8rem; }
.contact-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 1.05rem 1.15rem;
  display: flex; flex-direction: column; gap: 0.3rem;
  transition: border-color 0.22s, transform 0.22s var(--ease);
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.contact-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.contact-label { font-size: 0.66rem; color: var(--text-muted); letter-spacing: 0.12em; }
.contact-value { font-size: 0.88rem; font-weight: 600; color: var(--text-secondary); word-break: break-all; }
.contact-card:hover .contact-value { color: var(--accent); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border); padding: 2.5rem 0 3rem; margin-top: 1rem;
  position: relative; z-index: 1;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; text-align: center; }
.footer-brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 0.9rem; }
.footer-brand .logo-mark { width: 22px; height: 22px; font-size: 0.7rem; border-radius: 6px; }
.footer-copy { font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.14em; }
.footer-links { display: flex; gap: 1.3rem; }
.footer-links a { font-size: 0.84rem; color: var(--text-secondary); }
.footer-links a:hover { color: var(--accent); }
.footer-friends { display: flex; gap: 1rem; align-items: center; margin-top: 0.3rem; }
.friends-label { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.1em; }
.footer-friends a { font-size: 0.84rem; color: var(--text-secondary); }
.footer-friends a:hover { color: var(--accent); }
.footer-note { font-size: 0.68rem; color: var(--text-muted); }

/* Terminal */
.terminal-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(3, 4, 10, 0.72);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.terminal-overlay[hidden] { display: none !important; }
.terminal-window {
  width: 100%; max-width: 580px; max-height: 80vh;
  background: #08091a; border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 70px rgba(179,184,255,0.12);
  display: flex; flex-direction: column;
  animation: menuIn 0.22s var(--ease);
}
.terminal-bar {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 0.95rem; background: #0b0c20; border-bottom: 1px solid var(--border);
}
.terminal-dots { display: flex; gap: 6px; }
.terminal-dots i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.terminal-dots i:nth-child(1) { background: #ff5f57; }
.terminal-dots i:nth-child(2) { background: #febc2e; }
.terminal-dots i:nth-child(3) { background: #28c840; }
.terminal-title { flex: 1; font-size: 0.75rem; color: var(--text-muted); }
.terminal-close { background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; line-height: 1; }
.terminal-body {
  padding: 1rem; overflow-y: auto; flex: 1;
  font-family: var(--mono); font-size: 0.8rem; line-height: 1.7;
  min-height: 180px; max-height: 360px; color: #d0d2e8;
}
.terminal-line { margin-bottom: 0.3rem; word-break: break-word; }
.t-green { color: #6de89a; }
.t-cyan { color: var(--cyan); }
.t-pink { color: var(--accent-2); }
.t-muted { color: #6a6b90; }
.terminal-input-row { display: flex; align-items: center; gap: 0.55rem; padding: 0.7rem 0.95rem; border-top: 1px solid var(--border); background: #0b0c20; }
.t-prompt { font-size: 0.8rem; white-space: nowrap; }
.terminal-input { flex: 1; background: transparent; border: none; outline: none; color: var(--text); font-size: 0.8rem; caret-color: var(--accent); }

/* Motion */
@keyframes menuIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.65s var(--ease), transform 0.65s var(--ease), filter 0.65s var(--ease); filter: blur(2px); }
.reveal.visible { opacity: 1; transform: none; filter: blur(0); }

/* Mobile */
@media (max-width: 1024px) {
  .pipeline { gap: 0.45rem; }
  .workflow { gap: 0.35rem; }
  .activity-panels { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-links {
    position: fixed; inset: 60px 0 auto 0; z-index: 45;
    background: rgba(3, 4, 10, 0.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    display: none; flex-direction: column; padding: 1.25rem 1.5rem; gap: 0.85rem;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .hero { padding: 128px 0 88px; }
  .about-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .section { padding: 4rem 0; }
  .project-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .lang-panel { right: 0.5rem; }
  body.has-custom-cursor, body.has-custom-cursor * { cursor: auto !important; }
  .cursor-dot, .cursor-ring { display: none !important; }
  .hero-mist { width: 520px; height: 360px; filter: blur(70px); }
}
@media (max-width: 480px) {
  .pipeline, .workflow { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.5rem; }
  .pipeline-node, .workflow-step { min-width: 110px; }
  .hero-title { letter-spacing: -0.04em; }
  .hero-mist { width: 340px; height: 240px; filter: blur(60px); }
  .activity-panels { grid-template-columns: repeat(2, 1fr); }
}

.projects-error a { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; filter: none; }
}
