/* ============================================================
   SARTHAK CHHABRA — design system
   "The portfolio is itself an AI agent."
   ============================================================ */

:root {
  --bg: #050608;
  --bg-elev: #0a0c11;
  --surface: rgba(255, 255, 255, 0.025);
  --surface-hover: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f4f8;
  --text-dim: #9aa3b2;
  --text-faint: #5d6675;
  --cyan: #67e8f9;
  --violet: #a78bfa;
  --amber: #fbbf24;
  --green: #4ade80;
  --grad: linear-gradient(100deg, #67e8f9 0%, #a78bfa 55%, #f0abfc 100%);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(167, 139, 250, 0.35); color: #fff; }

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

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--cyan);
  color: #04151a;
  padding: 10px 18px;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- texture & ambience ---------- */

.noise::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#constellation {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.page { position: relative; z-index: 2; }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  z-index: 110;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.7);
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(5, 6, 8, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}

.nav-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.logo .prompt { color: var(--cyan); }
.logo .blink {
  display: inline-block;
  width: 9px;
  height: 18px;
  background: var(--cyan);
  animation: blink 1.1s steps(1) infinite;
  vertical-align: text-bottom;
}

@keyframes blink { 50% { opacity: 0; } }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--text); background: var(--surface-hover); }
.nav-links a.active { color: var(--text); }

.nav-cta {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: #04151a !important;
  background: var(--cyan);
  padding: 9px 18px !important;
  border-radius: 99px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  box-shadow: 0 0 0 rgba(103, 232, 249, 0);
}

.nav-cta:hover {
  background: var(--cyan) !important;
  color: #04151a !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(103, 232, 249, 0.35);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(5, 6, 8, 0.96);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    gap: 4px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 14px; font-size: 16px; }
  .nav-cta { text-align: center; margin-top: 8px; }
}

/* ---------- layout primitives ---------- */

.container { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

section { padding: 110px 0; position: relative; }

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

.kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--cyan);
  opacity: 0.6;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.section-sub {
  margin-top: 16px;
  max-width: 620px;
  color: var(--text-dim);
  font-size: 17px;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- hero ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 40px) 0 60px;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 99px;
  padding: 7px 16px;
  margin-bottom: 32px;
  width: fit-content;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  position: relative;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--green);
  animation: pulse 2s var(--ease) infinite;
}

@keyframes pulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9.5vw, 7.2rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero h1 .line { display: block; overflow: hidden; }

.hero h1 .line > span {
  display: block;
  transform: translateY(110%);
  animation: rise 0.9s var(--ease) forwards;
}

.hero h1 .line:nth-child(2) > span { animation-delay: 0.12s; }

@keyframes rise { to { transform: translateY(0); } }

.hero-role {
  margin-top: 28px;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--text-dim);
  max-width: 640px;
}

.hero-role strong { color: var(--text); font-weight: 600; }

/* terminal card */

.terminal {
  margin-top: 44px;
  max-width: 720px;
  background: rgba(8, 10, 14, 0.82);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.t-dot { width: 11px; height: 11px; border-radius: 50%; }
.t-dot.r { background: #ff5f57; }
.t-dot.y { background: #febc2e; }
.t-dot.g { background: #28c840; }

.terminal-title {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}

.terminal-body {
  padding: 20px 22px 24px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.8;
  min-height: 132px;
}

.terminal-body .t-prompt { color: var(--green); }
.terminal-body .t-cmd { color: var(--text); }
.terminal-body .t-out { color: var(--text-dim); }
.terminal-body .t-accent { color: var(--cyan); }

.t-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--cyan);
  vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

/* hero stat ticker */

.hero-ticker {
  margin-top: 52px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 40px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
}

.hero-ticker span b {
  color: var(--text);
  font-weight: 600;
  margin-right: 6px;
}

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-faint);
  animation: bob 2.2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- bento metrics ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.bento-cell {
  position: relative;
  grid-column: span 2;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 30px 28px;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.bento-cell.wide { grid-column: span 3; }
.bento-cell.full { grid-column: span 6; }

.bento-cell:hover { border-color: var(--border-strong); transform: translateY(-3px); }

.bento-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(167, 139, 250, 0.12), transparent 65%);
  pointer-events: none;
}

.bento-cell:hover::before { opacity: 1; }

.metric-value {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.metric-value .unit { font-size: 0.5em; color: var(--violet); }

.metric-label {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.5;
}

.metric-tag {
  position: absolute;
  top: 22px;
  right: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 99px;
}

@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-cell, .bento-cell.wide, .bento-cell.full { grid-column: span 1; }
  .bento-cell.full { grid-column: span 2; }
}

@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .bento-cell, .bento-cell.wide, .bento-cell.full { grid-column: span 1; }
}

/* ---------- systems cards ---------- */

.systems-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.system-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 34px 32px;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.system-card:hover { border-color: var(--border-strong); transform: translateY(-4px); }

.system-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(103, 232, 249, 0.09), transparent 65%);
  pointer-events: none;
}

.system-card:hover::before { opacity: 1; }

.system-card.featured {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(103, 232, 249, 0.05), rgba(167, 139, 250, 0.06));
}

.system-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
}

.system-card h3 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.system-card p { color: var(--text-dim); font-size: 15px; flex: 1; }

.system-impact {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 8px;
}

.system-impact svg { flex: none; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 4px 11px;
  border-radius: 99px;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .systems-grid { grid-template-columns: 1fr; }
  .system-card.featured { grid-column: span 1; }
}

/* ---------- timeline ---------- */

.timeline { position: relative; padding-left: 36px; }

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(to bottom, var(--cyan), var(--violet), transparent);
  opacity: 0.45;
}

.tl-item { position: relative; padding-bottom: 56px; }
.tl-item:last-child { padding-bottom: 0; }

.tl-item::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 12px rgba(103, 232, 249, 0.5);
}

.tl-item.current::before { background: var(--green); border-color: var(--green); box-shadow: 0 0 14px rgba(74, 222, 128, 0.6); }

.tl-date {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tl-badge {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #052e16;
  background: var(--green);
  padding: 2px 9px;
  border-radius: 99px;
}

.tl-item h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tl-item h3 .company { color: var(--violet); }

.tl-stack {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  margin: 8px 0 14px;
}

.tl-item ul { list-style: none; display: grid; gap: 9px; max-width: 760px; }

.tl-item ul li {
  color: var(--text-dim);
  font-size: 15px;
  padding-left: 22px;
  position: relative;
}

.tl-item ul li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--cyan);
  opacity: 0.7;
}

.tl-item ul li b { color: var(--text); font-weight: 600; }

/* ---------- stack / skills ---------- */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.stack-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  transition: border-color 0.3s var(--ease);
}

.stack-group:hover { border-color: var(--border-strong); }

.stack-group h3 {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stack-group h3 svg { opacity: 0.9; }

.stack-group .tags .tag { font-size: 12.5px; padding: 6px 14px; }

@media (max-width: 760px) { .stack-grid { grid-template-columns: 1fr; } }

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 56px;
  align-items: start;
}

.about-photo {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.about-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: saturate(0.92); }

.about-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, transparent 55%, rgba(5, 6, 8, 0.55));
}

.about-copy p { color: var(--text-dim); font-size: 17px; margin-bottom: 18px; max-width: 64ch; }
.about-copy p b, .about-copy p strong { color: var(--text); font-weight: 600; }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-photo { max-width: 320px; }
}

/* ---------- contact / footer ---------- */

.contact-cta {
  text-align: center;
  padding: 130px 0 120px;
}

.contact-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6.5vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}

.contact-cta p {
  margin: 24px auto 40px;
  color: var(--text-dim);
  font-size: 17px;
  max-width: 520px;
}

.btn-row { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  padding: 15px 30px;
  border-radius: 99px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}

.btn-primary {
  background: var(--grad);
  color: #0a0118;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(167, 139, 250, 0.4);
}

.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: var(--surface);
}

.btn-ghost:hover { background: var(--surface-hover); transform: translateY(-2px); }

.socials {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 44px;
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: color 0.2s, border-color 0.2s, transform 0.25s var(--ease);
}

.socials a:hover { color: var(--cyan); border-color: var(--cyan); transform: translateY(-3px); }

.footer {
  border-top: 1px solid var(--border);
  padding: 34px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
}

.footer-inner a:hover { color: var(--cyan); }
.footer-links { display: flex; gap: 22px; }

/* ---------- reveal animations ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0s);
}

.reveal.visible { opacity: 1; transform: none; }

/* ---------- subpage hero ---------- */

.subpage-hero { padding: calc(var(--nav-h) + 80px) 0 30px; }

.subpage-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

/* contact page */

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.contact-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.contact-card svg { color: var(--cyan); }

.contact-card h3 { font-family: var(--font-display); font-size: 1.15rem; }

.contact-card .value {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text-dim);
  word-break: break-all;
}

.contact-card .value:hover { color: var(--cyan); }

@media (max-width: 860px) { .contact-cards { grid-template-columns: 1fr; } }

/* contact form */

.contact-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 38px 34px;
  max-width: 720px;
}

.contact-form-card .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }

.form-field label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.form-field label .req { color: var(--cyan); }

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.2s, background 0.2s;
}

.form-input::placeholder { color: var(--text-faint); }

.form-input:hover { border-color: var(--border-strong); }

.form-input:focus {
  outline: none;
  border-color: var(--cyan);
  background: rgba(103, 232, 249, 0.04);
  box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.12);
}

textarea.form-input { min-height: 140px; resize: vertical; }

.form-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 20px);
  z-index: 120;
  font-family: var(--font-mono);
  font-size: 13.5px;
  padding: 13px 22px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(10, 12, 17, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}

.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast.success { border-color: rgba(74, 222, 128, 0.5); color: var(--green); }
.toast.error { border-color: rgba(248, 113, 113, 0.5); color: #f87171; }

@media (max-width: 640px) {
  .contact-form-card .form-row { grid-template-columns: 1fr; }
  .contact-form-card { padding: 28px 22px; }
}

/* 404 */

.err-wrap {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.err-code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 22vw, 13rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero h1 .line > span { transform: none; animation: none; }
  #constellation { display: none; }
}
