/* =========================================================
   Design tokens
   ========================================================= */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f7fb;
  --surface: #ffffff;
  --border: #e4e8f0;
  --text: #0f172a;
  --muted: #5b6477;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: rgba(79, 70, 229, 0.1);
  --accent: #06b6d4;
  --on-primary: #ffffff;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
  --header-bg: rgba(255, 255, 255, 0.8);

  --editor-bg: #0f172a;
  --editor-bar: #1e293b;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: clamp(4rem, 9vw, 7rem);

  --fs-h1: clamp(2.3rem, 5.2vw, 3.9rem);
  --fs-h2: clamp(1.8rem, 3.6vw, 2.6rem);
  --fs-h3: 1.2rem;
  --fs-lead: clamp(1.05rem, 1.6vw, 1.2rem);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --header-h: 72px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1020;
    --bg-alt: #0f1629;
    --surface: #141c33;
    --border: #232d48;
    --text: #e8ecf5;
    --muted: #9aa4bb;
    --primary: #818cf8;
    --primary-hover: #a5b4fc;
    --primary-soft: rgba(129, 140, 248, 0.14);
    --accent: #22d3ee;
    --on-primary: #0b1020;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
    --header-bg: rgba(11, 16, 32, 0.75);
    --editor-bg: #0a0f1d;
    --editor-bar: #141c33;
  }
}

:root[data-theme="dark"] {
  --bg: #0b1020;
  --bg-alt: #0f1629;
  --surface: #141c33;
  --border: #232d48;
  --text: #e8ecf5;
  --muted: #9aa4bb;
  --primary: #818cf8;
  --primary-hover: #a5b4fc;
  --primary-soft: rgba(129, 140, 248, 0.14);
  --accent: #22d3ee;
  --on-primary: #0b1020;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
  --header-bg: rgba(11, 16, 32, 0.75);
  --editor-bg: #0a0f1d;
  --editor-bar: #141c33;
}

/* =========================================================
   Base
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

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

ul,
ol {
  list-style: none;
}

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

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

svg {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

svg.fill {
  fill: currentColor;
  stroke: none;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 {
  font-size: var(--fs-h1);
  font-weight: 800;
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 650;
}

p {
  color: var(--muted);
}

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

::selection {
  background: var(--primary);
  color: var(--on-primary);
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 2000;
  padding: 0.6rem 1rem;
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 1rem;
}

.center {
  text-align: center;
  margin-top: var(--space-lg);
}

.gradient-text {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.975rem;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
}

.btn svg {
  width: 1.1em;
  height: 1.1em;
  transition: transform 0.2s var(--ease);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 6px 20px -6px var(--primary);
}

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

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

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

.btn-sm {
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* =========================================================
   Header
   ========================================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
}

.logo-text span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  display: block;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.2s, background-color 0.2s;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: none;
  }

  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: block;
  }
}

.nav-toggle {
  display: none;
  gap: 4px;
  align-content: center;
}

.nav-toggle .bar {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 6rem) 0 var(--space-lg);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -20% -10% auto;
  height: 700px;
  background:
    radial-gradient(40% 50% at 20% 30%, rgba(99, 102, 241, 0.18), transparent 70%),
    radial-gradient(35% 45% at 85% 20%, rgba(6, 182, 212, 0.16), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--space-md);
}

.pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}

.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  to {
    transform: scale(2.8);
    opacity: 0;
  }
}

.hero h1 {
  margin-bottom: var(--space-md);
}

.lead {
  font-size: var(--fs-lead);
  max-width: 58ch;
  margin-bottom: var(--space-lg);
}

.lead strong {
  color: var(--text);
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.socials {
  display: flex;
  gap: 0.6rem;
  margin-top: var(--space-lg);
}

.socials a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}

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

.socials svg {
  width: 18px;
  height: 18px;
}

/* Editor visual */
.hero-visual {
  position: relative;
  padding: 1.5rem 0;
}

.editor {
  background: var(--editor-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-6deg) rotateX(2deg);
  transition: transform 0.6s var(--ease);
}

.hero-visual:hover .editor {
  transform: none;
}

.editor-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0.85rem 1rem;
  background: var(--editor-bar);
}

.editor-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff5f57;
}

.editor-bar span:nth-child(2) {
  background: #febc2e;
}

.editor-bar span:nth-child(3) {
  background: #28c840;
}

.editor-bar p {
  margin-left: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #94a3b8;
}

.editor-body {
  padding: 1.25rem 1.4rem 1.6rem;
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 1.2vw, 0.88rem);
  line-height: 1.8;
  color: #cbd5e1;
  overflow-x: auto;
}

.c-key { color: #c084fc; }
.c-var { color: #60a5fa; }
.c-prop { color: #7dd3fc; }
.c-str { color: #86efac; }
.c-fn { color: #fcd34d; }

.caret {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: #818cf8;
  animation: blink 1s steps(1) infinite;
}

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

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--muted);
  animation: float 6s ease-in-out infinite;
}

.float-card strong {
  font-size: 1.4rem;
  color: var(--text);
}

.float-1 {
  top: -0.5rem;
  right: -1rem;
}

.float-1 strong {
  color: #22c55e;
}

.float-2 {
  bottom: -0.5rem;
  left: -1.5rem;
  animation-delay: -3s;
}

@keyframes float {
  50% {
    transform: translateY(-10px);
  }
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(3rem, 7vw, 5rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stats li {
  padding: 1.5rem 1rem;
  text-align: center;
}

.stats li+li {
  border-left: 1px solid var(--border);
}

.stats strong {
  display: block;
  line-height: 1.2;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.stats strong+span {
  font-size: 0.9rem;
  color: var(--muted);
}

/* =========================================================
   Sections
   ========================================================= */
.section {
  padding: var(--space-xl) 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 640px;
  margin: 0 auto var(--space-lg);
  text-align: center;
}

.section-head h2 {
  margin-bottom: 0.9rem;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

/* =========================================================
   Projects
   ========================================================= */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: var(--space-lg);
}

.filter {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.filter:hover {
  color: var(--text);
  border-color: var(--primary);
}

.filter.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: var(--space-md);
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.project-card.hidden {
  display: none;
}

.thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.project-card:hover .thumb img,
.project-card:hover .thumb-label {
  transform: scale(1.05);
}

.thumb-1 { background: linear-gradient(135deg, #6366f1, #06b6d4); }
.thumb-2 { background: linear-gradient(135deg, #0ea5e9, #22c55e); }
.thumb-3 { background: linear-gradient(135deg, #f43f5e, #f59e0b); }
.thumb-4 { background: linear-gradient(135deg, #a855f7, #ec4899); }
.thumb-5 { background: linear-gradient(135deg, #3b82f6, #8b5cf6); }
.thumb-6 { background: linear-gradient(135deg, #14b8a6, #6366f1); }

.mock {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 5px;
}

.mock span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.thumb-label {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.5s var(--ease);
}

.project-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem;
}

.project-body h3 {
  margin-bottom: 0.5rem;
}

.project-body>p {
  font-size: 0.95rem;
  margin-bottom: 1.1rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.tags li {
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
}

.project-links {
  display: flex;
  gap: 1.25rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s;
}

.link:hover {
  color: var(--primary);
}

/* =========================================================
   Services
   ========================================================= */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: var(--space-md);
}

.service-card {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.service-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 1.25rem;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  margin-bottom: 0.6rem;
}

.service-card p {
  font-size: 0.95rem;
}

.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  counter-reset: step;
}

.process li span {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary);
}

.process h3 {
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

.process p {
  font-size: 0.9rem;
}

/* =========================================================
   Skills
   ========================================================= */
.skill-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--space-md);
}

.skill-group {
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.skill-group h3 {
  margin-bottom: 1.1rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chips li {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.88rem;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}

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

/* =========================================================
   About
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.about-photo {
  position: relative;
}

.about-photo::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--primary);
  opacity: 0.4;
}

.about-photo img,
.photo-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.photo-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.about-copy h2 {
  margin-bottom: 1.25rem;
}

.about-copy p {
  margin-bottom: 1rem;
  max-width: 62ch;
}

.checklist {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem 1.5rem;
  margin: 1.5rem 0 2rem;
}

.checklist li {
  position: relative;
  padding-left: 1.75rem;
  font-weight: 500;
  font-size: 0.95rem;
}

.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.1rem;
  display: grid;
  place-items: center;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 800;
}

/* =========================================================
   Contact
   ========================================================= */
.contact-card {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(1.5rem, 5vw, 3.5rem);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(60% 80% at 0% 0%, var(--primary-soft), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.contact-info h2 {
  margin-bottom: 1rem;
}

.contact-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 2rem;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
}

.contact-list svg {
  color: var(--primary);
}

.contact-list a:hover {
  color: var(--primary);
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.88rem;
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea {
  resize: vertical;
  min-height: 130px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #ef4444;
}

.form-status {
  min-height: 1.4em;
  font-size: 0.9rem;
  text-align: center;
}

.form-status.error {
  color: #ef4444;
}

.form-status.success {
  color: #16a34a;
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer p {
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

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

/* =========================================================
   Pricing
   ========================================================= */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--space-md);
  align-items: stretch;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.price-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.price-card.featured {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-lg);
}

.price-badge {
  position: absolute;
  top: -0.8rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.price-card h3 {
  margin-bottom: 0.5rem;
}

.price-desc {
  font-size: 0.95rem;
}

.price {
  margin: 1.25rem 0 0.25rem;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.price-quote {
  font-size: 1.15rem;
  letter-spacing: 0;
  color: var(--primary);
}

.price span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

.price-card .checklist {
  grid-template-columns: 1fr;
  margin: 1.25rem 0 1.75rem;
  flex: 1;
  align-content: start;
}

/* =========================================================
   Testimonials
   ========================================================= */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--space-md);
}

.testimonial {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.testimonial blockquote {
  font-size: 1.02rem;
  color: var(--text);
}

.testimonial figcaption {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.testimonial figcaption strong {
  color: var(--text);
}

.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* =========================================================
   FAQ
   ========================================================= */
.faq-wrap {
  max-width: 820px;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-list details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.faq-list details[open] {
  border-color: var(--primary);
}

.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  color: var(--primary);
  transition: transform 0.2s var(--ease);
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list details p {
  padding: 0 1.4rem 1.25rem;
}

.text-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================================================
   Form extras
   ========================================================= */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-note {
  font-size: 0.82rem;
  text-align: center;
}

.btn[disabled] {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

/* =========================================================
   Simple pages (privacy, 404)
   ========================================================= */
.page {
  padding: var(--space-xl) 0;
}

.prose {
  max-width: 760px;
}

.prose h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 0.5rem;
}

.prose h2 {
  font-size: 1.35rem;
  margin: 2.25rem 0 0.75rem;
}

.prose p,
.prose li {
  margin-bottom: 0.75rem;
  color: var(--muted);
}

.prose ul {
  list-style: disc;
  padding-left: 1.25rem;
}

.prose a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.not-found {
  min-height: calc(100vh - var(--header-h) - 90px);
  display: grid;
  place-items: center;
  text-align: center;
}

.not-found .code {
  font-size: clamp(5rem, 18vw, 9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
}

.not-found p {
  margin: 1rem auto 2rem;
  max-width: 44ch;
}

.not-found .cta-group {
  justify-content: center;
}

/* =========================================================
   Scroll reveal
   ========================================================= */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px) {
  .hero-grid,
  .about-grid,
  .contact-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-copy {
    text-align: center;
  }

  .lead {
    margin-inline: auto;
  }

  .cta-group,
  .socials {
    justify-content: center;
  }

  .hero-visual {
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
  }

  .editor {
    transform: none;
  }

  .float-1 {
    right: 0.5rem;
  }

  .float-2 {
    left: 0.5rem;
  }

  .about-photo {
    max-width: 340px;
    margin: 0 auto;
  }

  .process {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-grid;
  }

  .primary-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    padding: 1rem clamp(16px, 4vw, 32px) 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0.25s;
  }

  .primary-nav.open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .nav-links a {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats li:nth-child(3) {
    border-left: 0;
  }

  .stats li:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 520px) {
  .nav-cta {
    display: none;
  }

  .logo-text {
    display: none;
  }

  .cta-group .btn {
    flex: 1 1 100%;
  }

  .float-card {
    display: none;
  }

  .process,
  .checklist {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

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