﻿@font-face {
  font-family: "Geist Solais";
  src: url("/demos/multicenografia-v1/assets/geist-latin-wght-normal-BgDaEnEv.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Solais";
  src: url("/demos/multicenografia-v1/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #526174;
  --quiet: #738195;
  --line: #dbe4ef;
  --line-strong: #bfdbfe;
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --cyan: #06b6d4;
  --green: #10b981;
  --orange: #f97316;
  --pink: #d946ef;
  --red: #f43f5e;
  --indigo: #6366f1;
  --terminal: #0a0a0f;
  --terminal-text: #e2e8f0;
  --shadow: 0 16px 44px rgb(15 23 42 / 0.08);
  --shell: min(1218px, calc(100% - 40px));
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0f;
  --surface: #111827;
  --surface-soft: #0f172a;
  --text: #f8fafc;
  --muted: #a8b3c5;
  --quiet: #79869a;
  --line: #1f2d44;
  --line-strong: #2b66c3;
  --shadow: 0 18px 54px rgb(0 0 0 / 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 82px;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist Solais", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  transition: background-color 240ms ease, color 240ms ease;
}

body::selection {
  background: rgb(59 130 246 / 0.22);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  height: 3px;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--cyan), var(--green));
  transform: scaleX(0);
  transform-origin: left center;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 70;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg), transparent 26%);
  backdrop-filter: blur(10px);
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: color-mix(in srgb, var(--bg), transparent 8%);
  box-shadow: 0 10px 26px rgb(15 23 42 / 0.06);
}

.scroll-nav {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 65;
  min-height: 44px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: color-mix(in srgb, var(--surface), transparent 8%);
  box-shadow: 0 14px 34px rgb(15 23 42 / 0.12);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity 180ms ease, transform 220ms var(--ease);
}

.scroll-nav.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.scroll-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-family: "JetBrains Solais", monospace;
  font-size: 0.72rem;
  transition: color 160ms ease, background-color 160ms ease;
}

.scroll-nav a:hover {
  background: rgb(59 130 246 / 0.09);
  color: var(--primary-dark);
}

.nav-shell {
  width: var(--shell);
  min-height: 62px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: white;
  font-family: "JetBrains Solais", monospace;
  font-weight: 800;
  box-shadow: 0 12px 24px rgb(59 130 246 / 0.2);
}

.brand-word {
  color: var(--text);
  font-family: "JetBrains Solais", monospace;
  font-size: 1.23rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-word span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
}

.nav-links a {
  position: relative;
  padding-block: 8px;
  color: var(--muted);
  font-family: "JetBrains Solais", monospace;
  font-size: 0.84rem;
  transition: color 160ms ease;
}

.nav-links span {
  margin-right: 6px;
  color: var(--primary);
  font-weight: 800;
}

.nav-links a::after {
  content: "";
  position: absolute;
  inset: auto 0 2px;
  height: 1px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms var(--ease);
}

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

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.theme-toggle,
.menu-toggle {
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--primary);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
}

.menu-toggle {
  display: none;
  min-height: 38px;
  padding-inline: 13px;
  font-family: "JetBrains Solais", monospace;
  font-size: 0.75rem;
}

.theme-toggle:hover,
.menu-toggle:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.matrix-bg {
  background-image:
    linear-gradient(rgb(59 130 246 / 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgb(59 130 246 / 0.05) 1px, transparent 1px);
  background-size: 33px 33px;
}

:root[data-theme="dark"] .matrix-bg {
  background-image:
    linear-gradient(rgb(59 130 246 / 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgb(59 130 246 / 0.12) 1px, transparent 1px);
}

.hero {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  padding-block: 124px 76px;
  display: grid;
  align-items: center;
}

.binary-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.binary-field span {
  position: absolute;
  color: var(--primary);
  font-family: "JetBrains Solais", monospace;
  font-size: 0.7rem;
  opacity: 0.16;
  animation: signalPulse var(--duration, 4s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.hero-shell {
  position: relative;
  z-index: 1;
  width: var(--shell);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(390px, 0.75fr);
  align-items: center;
  gap: clamp(44px, 7vw, 100px);
}

.code-pill {
  width: fit-content;
  margin: 0;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgb(59 130 246 / 0.06);
  color: var(--primary-dark);
  font-family: "JetBrains Solais", monospace;
  font-size: 0.86rem;
  line-height: 1.2;
}

:root[data-theme="dark"] .code-pill {
  color: #79b4ff;
  background: rgb(59 130 246 / 0.12);
}

.hero h1 {
  max-width: 12ch;
  margin: 24px 0 22px;
  font-size: clamp(3.7rem, 7vw, 6.1rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.hero-slogan {
  margin: 18px 0 -4px;
  color: var(--primary-dark);
  font-family: "JetBrains Solais", monospace;
  font-size: clamp(1rem, 1.5vw, 1.22rem);
  font-weight: 800;
}

:root[data-theme="dark"] .hero-slogan {
  color: #93c5fd;
}

.hero-copy > p:not(.code-pill) {
  max-width: 61ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.35vw, 1.18rem);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 32px;
}

.button {
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: "JetBrains Solais", monospace;
  font-size: 0.83rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 160ms var(--ease), box-shadow 160ms ease, background-color 160ms ease;
}

.button-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 14px 28px rgb(59 130 246 / 0.22);
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px rgb(59 130 246 / 0.28);
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--primary-dark);
}

.button-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.terminal-card,
.about-code,
.message-builder {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.terminal-card {
  max-width: 585px;
  position: relative;
  overflow: visible;
  --rx: 0deg;
  --ry: 0deg;
  border-color: rgb(59 130 246 / 0.3);
  background: #0f172a;
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 220ms var(--ease);
  box-shadow: 0 34px 90px rgb(15 23 42 / 0.26), 0 0 0 1px rgb(59 130 246 / 0.1);
  will-change: transform;
  animation: floatCard 7s ease-in-out infinite;
}

.terminal-card::before {
  content: "";
  position: absolute;
  inset: -22px;
  z-index: -1;
  border-radius: 26px;
  background: radial-gradient(circle at 70% 22%, rgb(6 182 212 / 0.2), transparent 42%);
  filter: blur(18px);
  opacity: 0.85;
  transform: translateZ(-1px);
}

.terminal-card .terminal-top {
  border: 1px solid rgb(59 130 246 / 0.24);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: #101827;
}

.terminal-card .terminal-body {
  border: 1px solid rgb(59 130 246 / 0.24);
  border-top: 0;
  border-radius: 0 0 12px 12px;
}

.terminal-top {
  min-height: 45px;
  padding-inline: 16px;
  border-bottom: 1px solid rgb(255 255 255 / 0.1);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgb(0 0 0 / 0.32);
}

.about-code .terminal-top {
  border-color: var(--line);
  background: var(--terminal);
}

.terminal-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-top span:nth-child(1) { background: #ef4444; }
.terminal-top span:nth-child(2) { background: #f59e0b; }
.terminal-top span:nth-child(3) { background: #22c55e; }

.terminal-top strong {
  margin-left: 8px;
  color: #94a3b8;
  font-family: "JetBrains Solais", monospace;
  font-size: 0.76rem;
  font-weight: 600;
}

.terminal-body {
  min-height: 335px;
  padding: clamp(26px, 3.4vw, 38px);
  background:
    radial-gradient(circle at 86% 12%, rgb(6 182 212 / 0.16), transparent 34%),
    linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: var(--terminal-text);
  font-family: "JetBrains Solais", monospace;
  font-size: clamp(0.84rem, 1.1vw, 0.96rem);
  line-height: 1.85;
}

.terminal-body p {
  margin: 0;
}

.terminal-body p + p {
  margin-top: 14px;
}

.terminal-body b {
  color: #3b82f6;
}

.terminal-command {
  color: #f8fafc;
  font-weight: 800;
}

.terminal-command span,
.terminal-ok {
  color: #06b6d4;
}

.terminal-command i {
  display: inline-block;
  width: 9px;
  height: 18px;
  margin-left: 7px;
  background: #3b82f6;
  vertical-align: -3px;
  animation: promptBlink 1s steps(1) infinite;
}

.terminal-muted {
  color: rgb(148 163 184 / 0.58);
}

.terminal-ready {
  color: #22c55e;
  font-weight: 800;
}

.section {
  padding-block: clamp(82px, 9vw, 132px);
}

.section-title {
  width: var(--shell);
  margin-inline: auto;
  margin-bottom: clamp(44px, 6vw, 68px);
}

.section-title.centered {
  display: grid;
  justify-items: center;
  text-align: center;
}

.section-title h2 {
  margin: 22px 0 10px;
  font-size: clamp(2.35rem, 4.3vw, 3.7rem);
  line-height: 1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.section-title h2 span {
  color: var(--primary);
}

.section-title > p:last-child {
  margin: 0;
  color: var(--muted);
  font-family: "JetBrains Solais", monospace;
}

.service-grid,
.project-grid,
.about-shell,
.contact-shell {
  width: var(--shell);
  margin-inline: auto;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.service-card {
  position: relative;
  isolation: isolate;
  --card-accent: var(--primary);
  --card-tint: rgb(59 130 246 / 0.08);
  min-height: 308px;
  padding: clamp(24px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface), transparent 2%);
  transition: transform 240ms var(--ease), border-color 220ms ease, box-shadow 220ms ease;
}

.service-card:nth-child(2) {
  --card-accent: var(--orange);
  --card-tint: rgb(249 115 22 / 0.08);
}

.service-card:nth-child(3) {
  --card-accent: var(--green);
  --card-tint: rgb(16 185 129 / 0.08);
}

.service-card:nth-child(4) {
  --card-accent: var(--pink);
  --card-tint: rgb(217 70 239 / 0.08);
}

.service-card:nth-child(5) {
  --card-accent: var(--red);
  --card-tint: rgb(244 63 94 / 0.08);
}

.service-card:nth-child(6) {
  --card-accent: var(--indigo);
  --card-tint: rgb(99 102 241 / 0.08);
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border: 1px solid var(--card-accent);
  border-radius: inherit;
  background:
    linear-gradient(135deg, var(--card-tint), transparent 58%),
    linear-gradient(90deg, color-mix(in srgb, var(--card-accent), transparent 90%), transparent);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 520ms var(--ease);
}

.service-card > * {
  position: relative;
  z-index: 1;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--card-accent), var(--line) 28%);
  box-shadow: var(--shadow);
}

.service-card:hover::before {
  clip-path: inset(0 0 0 0);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: white;
  font-family: "JetBrains Solais", monospace;
  font-size: 1.5rem;
  font-style: normal;
  font-weight: 800;
}

.service-icon.blue { background: linear-gradient(135deg, var(--primary), var(--cyan)); }
.service-icon.orange { background: linear-gradient(135deg, #f59e0b, var(--orange)); }
.service-icon.green { background: linear-gradient(135deg, var(--green), #14b8a6); }
.service-icon.pink { background: linear-gradient(135deg, #c084fc, var(--pink)); }
.service-icon.red { background: linear-gradient(135deg, #fb7185, var(--red)); }
.service-icon.indigo { background: linear-gradient(135deg, #818cf8, var(--indigo)); }

.service-card h3,
.project-card h3 {
  margin: 22px 0 10px;
  font-family: "JetBrains Solais", monospace;
  font-size: 1.13rem;
  line-height: 1.25;
}

.service-card p,
.project-card p,
.about-copy p,
.contact-copy p {
  margin: 0;
  color: var(--muted);
  text-wrap: pretty;
}

.tag-row,
.stack-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.tag-row span,
.stack-row span {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-family: "JetBrains Solais", monospace;
  font-size: 0.7rem;
  line-height: 1.2;
}

.projects {
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  transition: transform 240ms var(--ease), border-color 220ms ease, box-shadow 220ms ease;
}

.project-card:hover {
  transform: translateY(-7px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.project-image {
  position: relative;
  width: 100%;
  aspect-ratio: 2.04 / 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #0a0a0f;
  cursor: zoom-in;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms var(--ease), filter 220ms ease;
}

.project-card-system .project-image img {
  object-fit: contain;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 45%, rgb(59 130 246 / 0.18), transparent 46%),
    #0a0a0f;
}

.project-card:nth-child(2) .project-image img {
  filter: saturate(0.92) contrast(1.02);
}

.project-card:hover .project-image img {
  transform: scale(1.045);
}

.project-content {
  padding: 24px;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.project-meta span,
.project-meta strong {
  padding: 6px 12px;
  border-radius: 999px;
  font-family: "JetBrains Solais", monospace;
  font-size: 0.72rem;
  font-weight: 500;
}

.project-meta span {
  background: rgb(59 130 246 / 0.11);
  color: var(--primary-dark);
}

.project-meta strong {
  background: rgb(249 115 22 / 0.1);
  color: #c2410c;
}

:root[data-theme="dark"] .project-meta span {
  color: #93c5fd;
}

:root[data-theme="dark"] .project-meta strong {
  color: #fdba74;
}

.project-link {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  color: var(--primary-dark);
  font-family: "JetBrains Solais", monospace;
  font-size: 0.86rem;
  transition: color 160ms ease, transform 160ms var(--ease);
}

.project-link:hover {
  color: var(--primary);
  transform: translateX(3px);
}

.project-link.disabled {
  color: var(--quiet);
}

.about-shell,
.contact-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1fr);
  gap: clamp(42px, 7vw, 90px);
  align-items: center;
}

.about-copy h2,
.contact-copy h2 {
  margin: 22px 0 18px;
  font-size: clamp(2.45rem, 4.8vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.about-copy p + p {
  margin-top: 14px;
}

.about-code pre {
  margin: 0;
  padding: clamp(22px, 4vw, 34px);
  overflow-x: auto;
  background: linear-gradient(135deg, #111827, #0f172a);
  color: #dbeafe;
  font-family: "JetBrains Solais", monospace;
  font-size: 0.84rem;
  line-height: 1.85;
}

.contact {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.email-copy-line {
  width: fit-content;
  margin-top: 18px;
  padding: 6px 6px 6px 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-dark);
  font-family: "JetBrains Solais", monospace;
  font-size: 0.86rem;
  transition: color 180ms ease, transform 180ms var(--ease);
}

.email-copy-line::after {
  content: "copiado";
  padding: 4px 8px;
  border-radius: 999px;
  background: rgb(16 185 129 / 0.1);
  color: #059669;
  font-family: "Inter Solais", system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateX(-8px) scale(0.96);
  transition: opacity 180ms ease, transform 180ms var(--ease);
}

.email-copy-line.copied {
  color: #059669;
  transform: translateY(-1px);
}

.email-copy-line.copied::after {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.email-copy-line button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--primary-dark);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms var(--ease);
}

.email-copy-line button span {
  display: block;
  transition: transform 160ms var(--ease), opacity 160ms ease;
}

.email-copy-line button:hover {
  border-color: var(--primary);
  background: rgb(59 130 246 / 0.08);
  transform: translateY(-1px);
}

.email-copy-line.copied button {
  border-color: rgb(5 150 105 / 0.38);
  background: rgb(16 185 129 / 0.12);
  color: #059669;
}

.email-copy-line.copied button span {
  transform: scale(1.12);
}

.message-builder {
  padding: clamp(22px, 4vw, 34px);
}

.builder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.builder-head strong {
  font-family: "JetBrains Solais", monospace;
}

.builder-head span,
.message-builder label,
.copy-feedback {
  color: var(--quiet);
  font-family: "JetBrains Solais", monospace;
  font-size: 0.72rem;
}

.template-options {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
}

.template-options button {
  position: relative;
  padding: 10px 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
  transition: transform 160ms var(--ease), border-color 160ms ease, color 160ms ease;
}

.template-options button::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms var(--ease);
}

.template-options button:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  color: var(--text);
}

.template-options button.active {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: rgb(59 130 246 / 0.09);
}

.template-options button.active::after {
  transform: scaleX(1);
}

.message-builder label {
  display: block;
  margin-bottom: 9px;
}

.message-builder textarea {
  width: 100%;
  min-height: 156px;
  resize: vertical;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  background: var(--surface-soft);
  color: var(--text);
  transition: opacity 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms var(--ease);
}

.message-builder textarea.is-switching {
  opacity: 0.35;
  transform: translateY(5px);
}

.message-builder textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(59 130 246 / 0.16);
}

.builder-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.copy-feedback {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--primary-dark);
}

.footer {
  width: var(--shell);
  margin-inline: auto;
  padding-block: 34px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 22px;
  color: var(--muted);
}

.footer-brand strong {
  font-family: "JetBrains Solais", monospace;
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer p {
  margin: 0;
  font-family: "JetBrains Solais", monospace;
  font-size: 0.72rem;
}

.back-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 60;
  width: 48px;
  height: 48px;
  border: 1px solid rgb(255 255 255 / 0.32);
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: white;
  font-family: "JetBrains Solais", monospace;
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgb(59 130 246 / 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 180ms ease, transform 180ms var(--ease);
}

.back-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.lightbox {
  width: min(1040px, calc(100% - 30px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 30px 90px rgb(0 0 0 / 0.45);
}

.lightbox::backdrop {
  background: rgb(0 0 0 / 0.82);
  backdrop-filter: blur(6px);
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 9px 12px;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 8px;
  background: rgb(15 23 42 / 0.78);
  color: white;
  cursor: pointer;
}

.lightbox img {
  width: 100%;
  max-height: calc(100dvh - 95px);
  object-fit: contain;
  background: #0a0a0f;
}

.lightbox p {
  margin: 0;
  padding: 14px 18px;
  color: var(--muted);
  font-family: "JetBrains Solais", monospace;
}

.js .reveal:not(.terminal-card) {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 680ms var(--ease), transform 680ms var(--ease);
}

.js .reveal.is-visible:not(.terminal-card) {
  opacity: 1;
  transform: translateY(0);
}

@keyframes signalPulse {
  0%, 100% {
    opacity: 0.08;
    transform: translateY(0);
  }
  50% {
    opacity: 0.28;
    transform: translateY(-8px);
  }
}

@keyframes floatCard {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

@keyframes promptBlink {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

@media (max-width: 1040px) {
  .nav-shell {
    grid-template-columns: 1fr auto auto;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    inset: 63px 0 auto;
    display: none;
    padding: 18px 20px 24px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links.is-open {
    display: flex;
  }

  .hero-shell,
  .about-shell,
  .contact-shell {
    grid-template-columns: 1fr;
  }

  .terminal-card {
    max-width: 620px;
  }

  .service-grid,
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  :root {
    --shell: min(1218px, calc(100% - 28px));
  }

  .brand-word {
    font-size: 1.05rem;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
  }

  .hero {
    min-height: auto;
    padding-block: 108px 78px;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(3rem, 13vw, 4rem);
  }

  .hero-actions,
  .builder-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .scroll-nav {
    width: calc(100% - 28px);
    bottom: 18px;
    justify-content: space-between;
    overflow-x: auto;
  }

  .scroll-nav a {
    flex: 0 0 auto;
    padding-inline: 10px;
  }

  .back-top {
    right: 18px;
    bottom: 78px;
  }

  .terminal-body {
    min-height: 260px;
    font-size: 0.76rem;
  }

  .section {
    padding-block: 76px;
  }

  .service-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .section-title h2,
  .about-copy h2,
  .contact-copy h2 {
    font-size: clamp(2.35rem, 11vw, 3.2rem);
  }

  .project-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

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

  .terminal-card {
    transform: none !important;
  }
}
