/* ==========================================================================
   Harshit Jaiswal — Portfolio
   Light theme. Cobalt + sun-yellow accents on a cool off-white base.
   Fonts: Bricolage Grotesque (headings) + Manrope (body)
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  color-scheme: light;

  --paper: #F5F6FB;
  --white: #FFFFFF;
  --ink: #0E1120;
  --muted: #565C74;
  --line: #E0E3EF;

  --cobalt: #2A43FF;
  --cobalt-deep: #1B2CC7;
  --tint: #E8EBFF;
  --sun: #FFD23F;
  --mint: #1FAF7E;
  --danger: #C2253D;

  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --container: 1180px;
  --header-h: 76px;
  --shadow-soft: 0 1px 2px rgba(14, 17, 32, .05), 0 18px 40px -18px rgba(42, 67, 255, .28);
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html.no-scroll { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.025em;
}

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}

/* ---------- 3. Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s, box-shadow .2s, border-color .2s;
}
.btn-primary {
  background: var(--cobalt);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(42, 67, 255, .7);
}
.btn-primary:hover { background: var(--cobalt-deep); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--cobalt-deep); }
.btn-light:hover { background: var(--sun); color: var(--ink); }
.btn-outline-light { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--cobalt-deep); }
.btn-sm { padding: 10px 20px; font-size: .95rem; }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }

.text-link {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--cobalt);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.text-link:hover { color: var(--cobalt); }

/* ---------- 4. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 246, 251, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 8px 24px -16px rgba(14, 17, 32, .2);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 12px 12px 12px 4px;
  background: var(--cobalt);
  color: #fff;
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: -.04em;
}

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 4px; }
.site-nav a {
  display: block;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: .98rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s;
}
.site-nav a:hover { background: var(--tint); }
.site-nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.nav-cta-mobile { display: none; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  margin-left: auto;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}
.nav-toggle .bars {
  display: block;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: var(--ink);
  box-shadow: 0 -6px 0 var(--ink), 0 6px 0 var(--ink);
  transition: all .2s;
}
.site-header.is-open .nav-toggle .bars {
  width: 20px; height: 20px;
  border-radius: 0;
  box-shadow: none;
  background:
    linear-gradient(45deg, transparent 44%, var(--ink) 44% 56%, transparent 56%),
    linear-gradient(-45deg, transparent 44%, var(--ink) 44% 56%, transparent 56%);
}

/* ---------- 5. Shared sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--white { background: var(--white); }
.section--flush-top { padding-top: 0; }

.section-head { max-width: 680px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: clamp(2rem, 3.8vw, 3.1rem); }
.section-head p { color: var(--muted); font-size: 1.1rem; margin-bottom: 0; }

.section-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  max-width: none;
}
.section-head-row > div { max-width: 640px; }

.page-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(32px, 4vw, 56px); }
.page-hero h1 {
  max-width: 14em;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -.035em;
}
.lead { max-width: 38em; color: var(--muted); font-size: 1.2rem; }

.split {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.split h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
.split-sticky { position: sticky; top: calc(var(--header-h) + 24px); }

/* ---------- 6. Home: hero ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.2vw, 4.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.035em;
}
.hero-lead { max-width: 33em; color: var(--muted); font-size: 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 28px; }
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  color: var(--muted);
  font-size: .95rem;
  font-weight: 600;
}
.hero-facts li { display: flex; align-items: center; gap: 8px; }
.hero-facts svg { width: 18px; height: 18px; color: var(--mint); flex: none; }

/* one orchestrated page-load moment */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
[data-rise] {
  animation: rise .8s cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(var(--i, 0) * 100ms);
}

/* hero: browser showcase */
.showcase { position: relative; padding-bottom: 8px; }
.showcase::before {
  content: "";
  position: absolute;
  inset: 7% -3% 4% 7%;
  border-radius: 38px;
  background: var(--tint);
  transform: rotate(-2.5deg);
}
.browser {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #FBFBFE;
}
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.address {
  flex: 1;
  overflow: hidden;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: .8rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.slides { position: relative; aspect-ratio: 16 / 10; }
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .7s ease;
}
.slide.is-active { opacity: 1; }
.slide .cover { width: 100%; height: 100%; aspect-ratio: auto; }

.showcase-tabs { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tab-btn {
  padding: 7px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: .85rem;
  font-weight: 700;
  transition: background .2s, color .2s, border-color .2s;
}
.tab-btn:hover { border-color: var(--ink); }
.tab-btn[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.chip-float {
  position: absolute;
  left: -22px;
  bottom: 74px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 4px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.35;
}
.chip-float small { display: block; color: var(--muted); font-size: .8rem; font-weight: 600; }
.pulse {
  position: relative;
  flex: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--mint);
}
.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--mint);
  animation: pulse 2.4s ease-out infinite;
}
/* Inline usage (footer/status lines): stays a normal positioning context
   so ::after doesn't fall back to the viewport as its containing block. */
.pulse--inline {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}
@keyframes pulse {
  0%   { transform: scale(1); opacity: .55; }
  100% { transform: scale(3); opacity: 0; }
}

/* home: tools strip */
.stack { padding: 0 0 clamp(40px, 6vw, 72px); }
.stack-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 44px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stack-inner p { margin: 0; font-weight: 700; }
.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 30px;
  color: #6A708A;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

/* ---------- 7. Project covers (drawn in CSS, no images needed) ---------- */
.cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--c-bg);
  container-type: inline-size;
}
.cv {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 3cqw;
  padding: 4.5cqw;
}
.cv i { display: block; }
.cv-hz { flex-direction: row; }
.cv-nav { display: flex; align-items: center; gap: 2cqw; }
.cv-row { display: flex; gap: 2.5cqw; min-height: 0; }
.cv-col { display: flex; flex-direction: column; gap: 1.6cqw; min-width: 0; }
.cv-grow { flex: 1; min-width: 0; }
.cv-push { margin-left: auto; }
.cv-logo { flex: none; width: 3.6cqw; height: 3.6cqw; border-radius: 1cqw; background: var(--c-a); }
.cv-link { flex: none; width: 6cqw; height: 1.1cqw; border-radius: 1cqw; background: var(--c-a); opacity: .28; }
.cv-pill { flex: none; width: 9cqw; height: 3.4cqw; border-radius: 3cqw; background: var(--c-a); }
.cv-h { height: 3.2cqw; border-radius: 1cqw; background: var(--c-a); }
.cv-t { height: 1.2cqw; border-radius: 1cqw; background: var(--c-a); opacity: .25; }
.cv-card { border-radius: 2cqw; background: #fff; box-shadow: 0 .4cqw 1.6cqw rgba(0, 0, 0, .08); }
.cv-blob { border-radius: 2cqw; background: var(--c-b); }
.cv-field { height: 3.6cqw; border: .3cqw solid rgba(0, 0, 0, .12); border-radius: 1cqw; background: #fff; }
.cv-bar { flex: 1; border-radius: .8cqw .8cqw .3cqw .3cqw; background: var(--c-a); opacity: .85; }
.cv-dot { flex: none; width: 2.4cqw; height: 2.4cqw; border-radius: 50%; background: var(--c-b); }
.cv-ring {
  align-self: center;
  flex: none;
  width: 12cqw; height: 12cqw;
  border: 2cqw solid var(--c-b);
  border-top-color: var(--c-a);
  border-radius: 50%;
}
.cv-center { align-items: stretch; justify-content: center; gap: 6cqw; }
.cv-center::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 46cqw; height: 46cqw;
  border-radius: 50%;
  background: var(--c-b);
  opacity: .3;
  transform: translate(-50%, -50%);
}
.cv-phone {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.6cqw;
  width: 24cqw;
  padding: 2cqw;
  overflow: hidden;
  border: .5cqw solid var(--c-a);
  border-radius: 4cqw;
  background: #fff;
  box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, .12);
}

/* ---------- 8. Work cards ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 28px;
}
.work-grid--featured { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.work-grid--featured .work-card:first-child { grid-row: span 2; }
.work-grid--featured .work-card:first-child h3 { font-size: 1.85rem; }

.work-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  text-decoration: none;
  transition: transform .25s, box-shadow .25s;
}
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.work-card .cover { border-bottom: 1px solid var(--line); }
.work-body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 22px 24px 26px; }
.work-body h3 { margin: 2px 0 0; font-size: 1.4rem; }
.work-body p { margin: 0; color: var(--muted); font-size: .98rem; }
.work-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; }
.badge { padding: 4px 11px; border-radius: 999px; background: var(--tint); color: var(--cobalt-deep); }
.badge--soft { border: 1px solid var(--line); background: transparent; color: var(--muted); }
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: auto;
  padding-top: 12px;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 600;
}

/* ---------- 9. Services list ---------- */
.service {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.5fr) minmax(0, .8fr);
  gap: 16px 40px;
  align-items: start;
  padding: 34px 20px;
  border-top: 1px solid var(--line);
  transition: background .25s;
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service:hover { background: var(--white); }
.service h3 { margin: 0; font-size: 1.7rem; }
.service p { margin: 0; color: var(--muted); }
.service-tools { color: var(--cobalt-deep); font-size: .92rem; font-weight: 700; }

/* ---------- 10. Process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.step { position: relative; padding-top: 68px; }
.step::before {
  content: "";
  position: absolute;
  top: 22px; left: 58px; right: -20px;
  height: 2px;
  background: var(--line);
}
.step:last-child::before { display: none; }
.step-num {
  position: absolute;
  top: 0; left: 0;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
}
.step h3 { font-size: 1.3rem; }
.step p { margin: 0; color: var(--muted); font-size: .98rem; }

/* ---------- 11. Expect list / principles ---------- */
.expect-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 22px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.expect-item:last-child { border-bottom: 1px solid var(--line); }
.expect-icon {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 16px 16px 16px 4px;
  background: var(--sun);
}
.expect-icon svg { width: 26px; height: 26px; }
.expect-item h3 { margin-bottom: .3em; font-size: 1.35rem; }
.expect-item p { margin: 0; color: var(--muted); }

/* ---------- 12. CTA band ---------- */
.cta-section { padding: 0 0 clamp(64px, 9vw, 112px); }
.cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 6vw, 72px);
  border-radius: 36px;
  background: var(--cobalt);
  color: #fff;
}
.cta-band::after {
  content: "";
  position: absolute;
  top: -150px; right: -110px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: var(--sun);
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { max-width: 15em; color: #fff; font-size: clamp(2rem, 4vw, 3.2rem); }
.cta-band p { max-width: 36em; color: rgba(255, 255, 255, .88); font-size: 1.1rem; }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 28px; }
.cta-email { font-weight: 700; text-decoration: underline; text-underline-offset: 5px; }

/* ---------- 13. About page ---------- */
.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.portrait {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 40px 40px 150px 40px;
  background: var(--cobalt);
  color: #fff;
}
.portrait::before {
  content: "";
  position: absolute;
  left: -60px; bottom: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: var(--sun);
}
.portrait span {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(5rem, 14vw, 9rem);
  font-weight: 800;
  letter-spacing: -.05em;
}
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.facts { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 32px 0 0; }
.facts div { min-width: 150px; }
.facts dt { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; }
.facts dd { margin: 0; color: var(--muted); font-size: .92rem; }

.prose p { color: var(--muted); font-size: 1.1rem; }
.prose p:first-child { color: var(--ink); font-size: 1.3rem; line-height: 1.55; }

.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(32px, 6vw, 72px); }
.principle { padding: 28px 0 32px; border-top: 1px solid var(--line); }
.principle h3 { font-size: 1.35rem; }
.principle p { margin: 0; color: var(--muted); }

.skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.skills h3 { padding-bottom: 14px; border-bottom: 2px solid var(--ink); font-size: 1.15rem; }
.skills li { padding: 9px 0; border-bottom: 1px solid var(--line); font-weight: 600; }

.city-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; }
.city-list li {
  padding: 8px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: .95rem;
  font-weight: 600;
}

.check-list li { position: relative; margin-bottom: 12px; padding-left: 32px; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .32em;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232A43FF' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ---------- 14. Portfolio page ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter-btn {
  padding: 10px 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-weight: 700;
  transition: background .2s, color .2s, border-color .2s;
}
.filter-btn:hover { border-color: var(--ink); }
.filter-btn span { margin-left: 6px; color: var(--muted); font-weight: 600; }
.filter-btn[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.filter-btn[aria-pressed="true"] span { color: rgba(255, 255, 255, .7); }

.project-dialog {
  width: min(1000px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 28px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 40px 120px -20px rgba(14, 17, 32, .45);
}
.project-dialog[open] { display: block; animation: pop .3s cubic-bezier(.2, .8, .2, 1); }
.project-dialog::backdrop { background: rgba(14, 17, 32, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@keyframes pop {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.dialog-scroll { max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; }
.dialog-close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 4px 16px rgba(14, 17, 32, .18);
  transition: transform .2s, background .2s;
}
.dialog-close:hover { background: var(--sun); transform: rotate(90deg); }
.dialog-close svg { width: 18px; height: 18px; }

.dialog-body {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 56px);
  padding: clamp(24px, 4vw, 44px);
}
.dialog-main h2 { margin-top: 14px; font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
.dialog-main h3 { margin-top: 28px; font-size: 1.15rem; }
.dialog-summary { color: var(--muted); font-size: 1.15rem; }
.dialog-side { align-self: start; padding: 24px; border-radius: 20px; background: var(--paper); }
.dialog-side dl { margin: 0 0 22px; }
.dialog-side dt { color: var(--muted); font-size: .85rem; font-weight: 700; }
.dialog-side dd { margin: 2px 0 16px; font-weight: 700; }
.dialog-side .btn { width: 100%; margin-top: 10px; }
.dialog-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.dialog-nav button {
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  font-size: .85rem;
  font-weight: 700;
  text-align: left;
  transition: border-color .2s;
}
.dialog-nav button:hover { border-color: var(--ink); }
.dialog-nav small { display: block; color: var(--muted); font-weight: 600; }

/* ---------- 15. Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr);
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}
.form-panel {
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--white);
}
.form-panel h2 { font-size: 1.7rem; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
label, legend { font-size: .95rem; font-weight: 700; }
legend { margin-bottom: 10px; padding: 0; }
fieldset { min-width: 0; margin: 0 0 22px; padding: 0; border: 0; }
.optional { color: var(--muted); font-weight: 600; }

input[type="text"], input[type="email"], textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 150px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #8A90A8; }
input:hover, textarea:hover { border-color: #B9BED3; }
input:focus, textarea:focus {
  border-color: var(--cobalt);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(42, 67, 255, .15);
}
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-error { min-height: 1.2em; margin: 0; color: var(--danger); font-size: .88rem; font-weight: 600; }
.hint { margin: -4px 0 0; color: var(--muted); font-size: .88rem; }

.pill-group { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span {
  display: inline-block;
  padding: 10px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: .95rem;
  font-weight: 600;
  transition: background .2s, border-color .2s, color .2s;
}
.pill:hover span { border-color: #B9BED3; }
.pill input:checked + span { border-color: var(--cobalt); background: var(--tint); color: var(--cobalt-deep); }
.pill input:focus-visible + span { outline: 3px solid var(--cobalt); outline-offset: 2px; }

.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form-note { margin: 14px 0 0; color: var(--muted); font-size: .9rem; }
.form-alert {
  margin-bottom: 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #FDECEF;
  color: #8E1B2E;
  font-weight: 600;
}

.form-success { text-align: left; }
.success-icon {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  margin-bottom: 20px;
  border-radius: 20px 20px 20px 6px;
  background: var(--mint);
  color: #fff;
}
.success-icon svg { width: 32px; height: 32px; }
.form-success h2 { font-size: 2rem; }
.form-success p { color: var(--muted); }

.contact-aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 20px; }
.email-card { padding: 28px; border-radius: 26px; background: var(--cobalt); color: #fff; }
.email-card h2 { margin-bottom: 10px; font-size: 1.35rem; }
.email-card a.email-link {
  display: block;
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.email-card p { margin: 16px 0 0; color: rgba(255, 255, 255, .85); font-size: .93rem; }

.aside-card { padding: 26px 28px; border: 1px solid var(--line); border-radius: 24px; background: var(--white); }
.aside-card h2 { font-size: 1.25rem; }
.next-steps { counter-reset: n; display: grid; gap: 16px; }
.next-steps li { position: relative; padding-left: 44px; color: var(--muted); font-size: .97rem; }
.next-steps li::before {
  counter-increment: n;
  content: counter(n);
  position: absolute;
  left: 0; top: -2px;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--cobalt-deep);
  font-weight: 800;
}
.status-line { display: flex; align-items: center; gap: 12px; margin: 0; font-weight: 700; }

.faq { border-top: 1px solid var(--line); }
.faq:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.015em;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  display: grid;
  flex: none;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--cobalt-deep);
  font-size: 1.4rem;
  line-height: 1;
  transition: transform .2s, background .2s;
}
.faq[open] summary::after { content: "–"; background: var(--sun); color: var(--ink); }
.faq p { max-width: 46em; margin: 0; padding: 0 0 26px; color: var(--muted); }

/* ---------- 16. Footer ---------- */
.site-footer { padding: 56px 0 32px; border-top: 1px solid var(--line); background: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 40px; }
.footer-grid h2 { margin-bottom: 14px; font-family: var(--font-body); font-size: .95rem; font-weight: 700; letter-spacing: 0; }
.footer-grid p { max-width: 26em; margin: 14px 0 0; color: var(--muted); font-size: .97rem; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { text-decoration: none; }
.footer-grid li a:hover, .footer-mail:hover { color: var(--cobalt); text-decoration: underline; }
.footer-mail { font-weight: 700; }
.footer-status { display: flex; align-items: center; gap: 12px; margin-top: 14px; color: var(--muted); font-size: .95rem; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}
.footer-bottom p { margin: 0; }

/* ---------- 17. Toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 28px;
  z-index: 200;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity .25s, transform .25s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 18. Responsive ---------- */
@media (max-width: 1040px) {
  .steps { grid-template-columns: repeat(2, 1fr); gap: 44px 32px; }
  .step::before { display: none; }
  .skills { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  .hero-grid, .about-hero, .split, .contact-grid, .dialog-body { grid-template-columns: minmax(0, 1fr); }
  .split-sticky, .contact-aside { position: static; }
  .work-grid--featured { grid-template-columns: minmax(0, 1fr); }
  .work-grid--featured .work-card:first-child { grid-row: auto; }
  .showcase { max-width: 640px; }
  .portrait { max-width: 420px; }
  .service { grid-template-columns: minmax(0, 1fr); padding-inline: 0; }
  .service:hover { background: transparent; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    display: none;
    margin: 0;
    padding: 12px 24px 24px;
    border-bottom: 1px solid var(--line);
    background: var(--white);
    box-shadow: 0 24px 40px -24px rgba(14, 17, 32, .3);
  }
  .site-header.is-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav a { padding: 14px 16px; font-size: 1.05rem; }
  .nav-cta-mobile { display: block; margin-top: 12px; }
  .nav-cta-mobile .btn { width: 100%; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 32px, var(--container)); }
  .steps, .principles, .skills, .field-row { grid-template-columns: minmax(0, 1fr); }
  .field-row { gap: 0; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .chip-float { left: 8px; bottom: 82px; }
  .cta-band::after { display: none; }
  .cta-band { border-radius: 28px; }
  .expect-item { grid-template-columns: 48px 1fr; gap: 16px; }
  .expect-icon { width: 48px; height: 48px; }
  .dialog-nav { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
