@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Dancing+Script:wght@500;600;700&display=swap');

:root {
  --bg: #0B0710;
  --bg-2: #150E1F;
  --bg-3: #1F1530;
  --border: rgba(230, 220, 245, 0.09);
  --border-strong: rgba(230, 220, 245, 0.18);
  --text: #F1ECFA;
  --text-2: #AB9FC4;
  --text-3: #71678A;
  --pine: #9B6BE0;
  --pine-hover: #B085F0;
  --ochre: #C9A66B;
  --red: #C4695A;
  --tag-bg: rgba(230, 220, 245, 0.05);
  --tag-text: #AB9FC4;
  --card-bg: #150E1F;
  --toggle-bg: #1F1530;
  --toggle-knob: #F1ECFA;
  --font-display: "Space Grotesk", sans-serif;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", SFMono-Regular, ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg: #FBFAFE;
  --bg-2: #F1EDFA;
  --bg-3: #E7DFF6;
  --border: rgba(43, 20, 74, 0.09);
  --border-strong: rgba(43, 20, 74, 0.18);
  --text: #211433;
  --text-2: #665A80;
  --text-3: #9187A8;
  --pine: #7C3FDB;
  --pine-hover: #6A2FC2;
  --ochre: #9C7A3E;
  --red: #A3493C;
  --tag-bg: rgba(43, 20, 74, 0.05);
  --tag-text: #665A80;
  --card-bg: #F1EDFA;
  --toggle-bg: #E7DFF6;
  --toggle-knob: #211433;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}
.nav-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.nav-name::before { content: "~/"; color: var(--pine); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-links { display: none; list-style: none; }
.nav-links a {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: -0.01em;
}
.nav-links a::before { content: "./"; color: var(--text-3); }
.nav-links a:hover { color: var(--pine-hover); }

.nav-burger {
  width: 32px; height: 32px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  background: none; border: none; cursor: pointer;
}
.nav-burger span {
  display: block; width: 18px; height: 1.5px;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.2s ease;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: 52px; left: 0; right: 0;
  z-index: 99;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column;
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s var(--ease);
}
.mobile-menu.open { max-height: 320px; }
.mobile-menu a {
  padding: 16px 20px;
  color: var(--text-2);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.mobile-menu a::before { content: "./"; color: var(--pine); }
.mobile-menu a:active { background: var(--bg-2); }

/* THEME TOGGLE */
.theme-toggle {
  width: 40px; height: 22px;
  border-radius: 4px;
  background: var(--toggle-bg);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  position: relative;
  transition: background 0.3s ease;
  flex-shrink: 0;
}
.theme-toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 2px;
  background: var(--pine);
  transition: transform 0.3s var(--ease), background 0.3s ease;
}
[data-theme="light"] .theme-toggle::after { transform: translateX(18px); }

/* ── MAIN LAYOUT ── */
main { max-width: 860px; margin: 0 auto; padding: 0 16px; }

section { padding: 64px 0; border-bottom: 1px solid var(--border); position: relative; }
section:last-of-type { border-bottom: none; }

/* migration-file section labels: 001_experience, 002_projects, etc. */
.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-3);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-label::before {
  content: attr(data-mid);
  color: var(--ochre);
  font-weight: 600;
}
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 6vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 16px;
}
.section-subtitle {
  font-size: 15px;
  color: var(--text-2);
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 40px;
}

/* ── HERO — rendered like a struct / query response ── */
#hero { padding-top: 88px; padding-bottom: 56px; }

.hero-content {
  display: grid;
  gap: 32px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--pine-hover);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-eyebrow::before { content: "// "; color: var(--text-3); }

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(38px, 11vw, 76px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: var(--text);
  margin-bottom: 18px;
}

.hero-role {
  font-family: "Dancing Script", cursive;
  font-size: clamp(20px, 5vw, 26px);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-2);
  margin-bottom: 28px;
  line-height: 1.5;
  max-width: 480px;
}
.hero-role-sub {
  display: block;
  font-size: clamp(12px, 3vw, 14px);
  color: var(--ochre);
  margin-top: 8px;
}

.hero-bio {
  font-size: 15px;
  color: var(--text-2);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 32px;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: all 0.2s var(--ease);
  cursor: pointer;
  border: none;
  font-family: var(--font);
  width: 100%;
  justify-content: center;
}
.btn-primary { background: var(--pine); color: #F0EDE4; }
.btn-primary:hover { background: var(--pine-hover); }
.btn-secondary {
  background: var(--tag-bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-3); }
.open-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--pine-hover);
  font-weight: 500;
}
.open-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--pine-hover);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pine-hover) 25%, transparent);
}

.hero-image { justify-self: start; }
.profile-pic-placeholder {
  width: 160px; height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  position: relative;
}
.profile-pic-placeholder::after {
  content: "";
  position: absolute; inset: 0;
  border: 1px solid var(--ochre);
  border-radius: 50%;
  transform: translate(8px, 8px);
  z-index: -1;
}
.profile-pic-placeholder img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

@media (min-width: 640px) {
  .hero-content {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
  .hero-image { justify-self: end; }
  .profile-pic-placeholder { width: 200px; height: 200px; }
}

/* ── STATS — rendered as a returned row set ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 40px;
}
.stat {
  background: var(--bg);
  padding: 20px 16px;
  text-align: left;
  transition: background 0.2s;
  position: relative;
}
.stat:hover { background: var(--bg-2); }
.stat-num {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ochre);
  display: block;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
  letter-spacing: 0.01em;
  font-family: var(--font-mono);
}

/* ── GITHUB STATS ── */
.github-stats {
  margin-top: 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
}
.gh-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.gh-icon { color: var(--text-2); flex-shrink: 0; }
.gh-handle {
  margin-left: auto;
  font-size: 12px;
  color: var(--pine-hover);
  text-decoration: none;
  font-family: var(--font-mono);
}
.gh-handle:hover { color: var(--ochre); }
.gh-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.gh-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px 12px;
  text-align: center;
}
.gh-num {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  display: block;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.3s ease;
}
.gh-stat.loading .gh-num { opacity: 0.3; }
.gh-label {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
  display: block;
  font-family: var(--font-mono);
}
.gh-calendar {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 1fr);
  gap: 3px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.gh-day {
  width: 9px; height: 9px;
  border-radius: 2px;
  background: var(--bg-3);
  flex-shrink: 0;
}
.gh-day[data-level="1"] { background: color-mix(in srgb, var(--pine) 30%, var(--bg-3)); }
.gh-day[data-level="2"] { background: color-mix(in srgb, var(--pine) 55%, var(--bg-3)); }
.gh-day[data-level="3"] { background: color-mix(in srgb, var(--pine) 80%, var(--bg-3)); }
.gh-day[data-level="4"] { background: var(--pine-hover); }
.gh-error { font-size: 12px; color: var(--text-3); text-align: center; padding: 8px 0; font-family: var(--font-mono); }

/* ── EXPERIENCE — rendered like a migration log ── */
.exp-list { display: flex; flex-direction: column; }
.exp-item { border-bottom: 1px solid var(--border); }
.exp-item:last-child { border-bottom: none; }
.exp-trigger {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 0;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font);
  color: inherit;
  transition: opacity 0.2s;
}
.exp-trigger:hover { opacity: 0.8; }
.exp-meta { flex-shrink: 0; width: 84px; }
.exp-period {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  line-height: 1.65;
}
.exp-type {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--pine-hover);
  margin-top: 6px;
  letter-spacing: 0.02em;
}
.exp-body { flex: 1; min-width: 0; }
.exp-company {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}
.exp-company::before { content: "> "; color: var(--ochre); }
.exp-role-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
}
.exp-role {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.25;
}
.exp-chevron { flex-shrink: 0; color: var(--text-3); transition: transform 0.3s var(--ease); }
.exp-item.open .exp-chevron { transform: rotate(180deg); color: var(--pine-hover); }
.exp-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.35s var(--ease); }
.exp-item.open .exp-panel { grid-template-rows: 1fr; }
.exp-panel-inner { overflow: hidden; }
.exp-content { padding: 0 0 24px 0; }
.exp-desc { font-size: 14px; color: var(--text-2); line-height: 1.7; margin-bottom: 16px; }
.exp-bullets { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.exp-bullet {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  padding-left: 18px;
  position: relative;
  font-family: var(--font-mono);
}
.exp-bullet::before { content: "+"; position: absolute; left: 0; color: var(--pine-hover); }
.exp-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 4px;
  background: transparent;
  color: var(--tag-text);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}
.tag img { width: 14px; height: 14px; flex-shrink: 0; object-fit: contain; }
.tag.icon-only { padding: 6px; gap: 0; }
.tag.icon-only img { width: 20px; height: 20px; }

/* ── PROJECTS ── */
.projects-filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.filter-pill::before { content: "--"; color: var(--text-3); margin-right: 2px; }
.filter-pill:hover { border-color: var(--border-strong); color: var(--text); }
.filter-pill.active { background: var(--pine); border-color: var(--pine); color: #F0EDE4; }
.filter-pill.active::before { color: rgba(240,237,228,0.6); }
.projects-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-3);
  font-size: 14px;
  font-family: var(--font-mono);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.project-card {
  background: var(--bg);
  padding: 24px;
  transition: background 0.2s;
  cursor: pointer;
  position: relative;
  border: none;
  border-left: 2px solid transparent;
  text-align: left;
  font-family: var(--font);
  color: inherit;
  width: 100%;
}
.project-card:hover { background: var(--bg-2); border-left-color: var(--ochre); }
.project-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 14px;
  color: var(--text-3);
}
.project-status::before { content: "●"; font-size: 8px; }
.project-status.live { color: var(--pine-hover); }
.project-status.wip { color: var(--ochre); }
.project-status.done { color: var(--text-2); }
.project-status.paused { color: var(--red); }
.project-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 8px;
}
.project-desc { font-size: 14px; color: var(--text-2); line-height: 1.6; margin-bottom: 16px; max-width: 560px; }
.project-stack { display: flex; flex-wrap: wrap; gap: 6px; }
.project-expand-hint {
  position: absolute;
  top: 24px; right: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  opacity: 0;
  transition: opacity 0.2s;
}
.project-card:hover .project-expand-hint { opacity: 1; }

.projects-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 20px;
}
.pager-btn {
  width: 34px; height: 34px;
  border-radius: 4px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pager-btn:hover:not(:disabled) { border-color: var(--pine); color: var(--pine-hover); }
.pager-btn:disabled { opacity: 0.3; cursor: default; }
.pager-status {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ── SIDE PROJECTS ── */
.side-projects-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.side-project-row {
  background: var(--bg);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.side-project-name { font-family: var(--font-mono); font-weight: 600; color: var(--text); font-size: 14px; margin-right: 10px; }
.side-project-name::before { content: "$ "; color: var(--ochre); }
.side-project-desc { font-size: 13px; color: var(--text-2); }
.side-project-tags { display: flex; flex-wrap: wrap; gap: 6px; }

@media (min-width: 640px) {
  .side-project-row { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ── SKILLS ── */
.skills-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.skill-group { border-left: 2px solid var(--border); padding-left: 16px; }
.skill-group-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ochre);
  margin-bottom: 12px;
}
.skill-group-name::before { content: "// "; color: var(--text-3); }
.skill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-item {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  background: var(--tag-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.skill-icon { width: 16px; height: 16px; flex-shrink: 0; object-fit: contain; }
.skill-item.icon-only { padding: 6px; }
.skill-item.icon-only img { width: 18px; height: 18px; }

@media (min-width: 700px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── SERVICES ── */
.services-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.service-item {
  background: var(--bg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.service-item:hover { background: var(--bg-2); }
.service-left { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.service-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--text); }
.service-desc { font-size: 13px; color: var(--text-2); }
.service-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.service-price { font-family: var(--font-mono); font-size: 13px; color: var(--ochre); }
.service-arrow { color: var(--text-3); }

/* ── CONTACT ── */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin-top: 40px; }
.contact-item {
  background: var(--bg);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
  display: block;
}
a.contact-item:hover { background: var(--bg-2); }
.contact-label { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); margin-bottom: 6px; }
.contact-label::before { content: "field: "; }
.contact-value { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--pine-hover); }

@media (min-width: 640px) {
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── MODALS ── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.modal-overlay.open { opacity: 1; }
.modal {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 12px 12px 0 0;
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 28px 24px 32px;
  transform: translateY(24px);
  transition: transform 0.35s var(--ease);
}
.modal-overlay.open .modal { transform: translateY(0); }
@media (min-width: 700px) {
  .modal-overlay { align-items: center; }
  .modal { border-radius: 12px; }
}
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.modal-title { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.modal-close {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  width: 30px; height: 30px;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 14px;
}
.modal-close:hover { color: var(--text); border-color: var(--border-strong); }
.modal-price-row { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.modal-price { font-family: var(--font-mono); font-size: 18px; color: var(--ochre); font-weight: 600; }
.modal-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
}
.modal-badge.wip { color: var(--ochre); border-color: color-mix(in srgb, var(--ochre) 40%, transparent); }
.modal-badge.done { color: var(--text-2); }
.modal-section { margin-bottom: 22px; }
.modal-section-title { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--pine-hover); margin-bottom: 8px; }
.modal-section-title::before { content: "// "; color: var(--text-3); }
.modal-section-text { font-size: 14px; color: var(--text-2); line-height: 1.7; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.detail-card { background: var(--bg-2); padding: 12px 14px; }
.detail-label { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); margin-bottom: 4px; }
.detail-value { font-size: 13px; color: var(--text); font-weight: 500; }
.modal-stack-list { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-stack-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--tag-text);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
}
.modal-stack-note { font-size: 12px; color: var(--text-3); margin-top: 10px; font-style: italic; }
.terms-list { display: flex; flex-direction: column; gap: 8px; }
.term-item {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  padding-left: 16px;
  position: relative;
}
.term-item::before { content: "—"; position: absolute; left: 0; color: var(--text-3); }
.modal-divider { height: 1px; background: var(--border); margin: 24px 0; }
.modal-contact-cta, .modal-github-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s;
}
.modal-contact-cta:hover, .modal-github-cta:hover { border-color: var(--pine); background: var(--bg-3); }
.cta-left { display: flex; flex-direction: column; gap: 2px; }
.cta-small { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.cta-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.cta-email-text { font-size: 11px; color: var(--text-3); }
.cta-arrow { color: var(--pine-hover); font-size: 18px; }

/* ── FOOTER ── */
footer {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}
footer a { color: var(--text-3); }
footer a:hover { color: var(--pine-hover); }

@media (min-width: 640px) {
  footer { flex-direction: row; justify-content: space-between; }
}

/* ── DESKTOP NAV/LAYOUT ── */
@media (min-width: 760px) {
  nav { padding: 0 40px; height: 60px; }
  .nav-links { display: flex; gap: 28px; list-style: none; }
  .nav-burger { display: none; }
  main { padding: 0 40px; }
  section { padding: 96px 0; }
  #hero { padding-top: 140px; }
  .hero-actions { flex-direction: row; align-items: center; }
  .btn { width: auto; }
  .stats-row { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 900px) {
  main { max-width: 900px; }
}/* ══════════════ BOOKING PAGE ══════════════ */
.booking-wrap {
  max-width: 640px;
  margin: 0 auto;
}
.booking-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 40px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) {
  .form-row-split { grid-template-columns: 1fr; }
}
.form-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.form-label .required { color: var(--red); }
.form-input,
.form-select,
.form-textarea {
  background: var(--card-bg);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  padding: 13px 14px;
  width: 100%;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--pine);
  background: var(--bg-3);
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3e%3cpath d='M4 6l4 4 4-4' stroke='%23AB9FC4' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}
.form-hint {
  font-size: 12px;
  color: var(--text-3);
}
.form-error {
  font-size: 12px;
  color: var(--red);
  display: none;
}
.form-row.invalid .form-input,
.form-row.invalid .form-select,
.form-row.invalid .form-textarea {
  border-color: var(--red);
}
.form-row.invalid .form-error { display: block; }

.form-submit {
  margin-top: 8px;
}
.form-status {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-family: var(--font-mono);
  display: none;
}
.form-status.success {
  display: block;
  background: color-mix(in srgb, var(--pine) 15%, transparent);
  border: 1px solid var(--pine);
  color: var(--pine-hover);
}
.form-status.error {
  display: block;
  background: color-mix(in srgb, var(--red) 15%, transparent);
  border: 1px solid var(--red);
  color: var(--red);
}
.form-status.loading {
  display: block;
  background: var(--tag-bg);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
}

.booking-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  margin-top: 32px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}

.nav-cta {
  border: 1px solid var(--border-strong) !important;
  padding: 6px 14px;
  border-radius: 4px;
}
.nav-cta::before { content: none !important; }
