:root,
html[data-theme="light"] {
  color-scheme: light;

  --bg-page: #f4f8fd;
  --bg-page-alt: #fbfdff;
  --surface-1: #ffffff;
  --surface-2: #f7faff;
  --surface-3: #eef4fb;

  --text-primary: #1f2a3d;
  --text-secondary: #3d4b61;
  --text-muted: #61718a;

  --border: #dce6f1;
  --border-strong: #bdd5fa;

  --accent-primary: #4776b7;
  --accent-primary-strong: #365f98;
  --accent-primary-soft: #e3eeff;
  --accent-secondary: #765eb5;
  --accent-secondary-soft: #f0ebff;

  --success: #39755d;
  --success-soft: #e6f6ee;
  --warning: #7b5a13;
  --warning-soft: #fff4d8;
  --danger: #a34550;
  --danger-soft: #fdebed;

  --button-primary-text: #ffffff;
  --button-primary-bg: linear-gradient(135deg, #4776b7 0%, #6f63b2 100%);
  --button-primary-bg-hover: linear-gradient(135deg, #365f98 0%, #5f4f9d 100%);

  --focus-ring: rgba(71, 118, 183, .18);
  --shadow-sm:
    0 1px 2px rgba(31, 42, 61, .04),
    0 6px 18px rgba(54, 95, 152, .06);
  --shadow-md:
    0 2px 4px rgba(31, 42, 61, .04),
    0 16px 40px rgba(54, 95, 152, .09);

  --page-atmosphere:
    radial-gradient(62% 42% at 8% 0%, rgba(189,213,250,.58), transparent 72%),
    radial-gradient(48% 34% at 92% 10%, rgba(213,201,248,.46), transparent 74%),
    linear-gradient(180deg, #fbfdff 0%, #f4f8fd 48%, #ffffff 100%);

  --hero-atmosphere:
    radial-gradient(72% 68% at 20% 8%, rgba(227,238,255,.95), transparent 72%),
    radial-gradient(58% 62% at 90% 88%, rgba(240,235,255,.90), transparent 74%),
    rgba(255,255,255,.86);

  --header-bg: rgba(251, 253, 255, .85);
}

html[data-theme="dark"] {
  color-scheme: dark;

  --bg-page: #0d1727;
  --bg-page-alt: #111d30;
  --surface-1: #142137;
  --surface-2: #17243a;
  --surface-3: #1b2b44;

  --text-primary: #f1f6ff;
  --text-secondary: #c6d1e1;
  --text-muted: #91a2ba;

  --border: rgba(159, 185, 220, .18);
  --border-strong: #638fc8;

  --accent-primary: #89b7ef;
  --accent-primary-strong: #a4ccfb;
  --accent-primary-soft: #1d3555;
  --accent-secondary: #b8a8ee;
  --accent-secondary-soft: #292443;

  --success: #91d3b5;
  --success-soft: #17372f;
  --warning: #efc56d;
  --warning-soft: #3b3120;
  --danger: #f0a0ac;
  --danger-soft: #3b2028;

  --button-primary-text: #0c1726;
  --button-primary-bg: linear-gradient(135deg, #93c2f7 0%, #bba9ef 100%);
  --button-primary-bg-hover: linear-gradient(135deg, #acd2fb 0%, #cabaf3 100%);

  --focus-ring: rgba(137, 183, 239, .22);
  --shadow-sm:
    0 1px 2px rgba(0, 0, 0, .16),
    0 10px 28px rgba(2, 8, 20, .24);
  --shadow-md:
    0 2px 4px rgba(0, 0, 0, .18),
    0 22px 58px rgba(2, 8, 20, .32);

  --page-atmosphere:
    radial-gradient(58% 42% at 8% 0%, rgba(79,124,182,.30), transparent 74%),
    radial-gradient(48% 36% at 92% 8%, rgba(122,100,182,.26), transparent 75%),
    radial-gradient(40% 28% at 48% 44%, rgba(56,105,145,.13), transparent 78%),
    linear-gradient(180deg, #0d1727 0%, #111d30 48%, #0c1626 100%);

  --hero-atmosphere:
    radial-gradient(72% 68% at 16% 8%, rgba(47,82,126,.52), transparent 72%),
    radial-gradient(58% 62% at 90% 88%, rgba(82,65,126,.48), transparent 74%),
    rgba(17,28,46,.80);

  --header-bg: rgba(13, 23, 39, .82);
}

:root {
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  --duration-fast: 160ms;
  --duration-base: 240ms;
  --duration-slow: 420ms;
  --ease-standard: cubic-bezier(.22, 1, .36, 1);

  --font-main: Onest, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: JetBrains Mono, ui-monospace, SFMono-Regular, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--page-atmosphere);
  background-attachment: fixed;
  transition: color var(--duration-base) var(--ease-standard);
}

::selection {
  background: var(--accent-primary-soft);
  color: var(--text-primary);
}

h1, h2, h3 {
  color: var(--text-primary);
  text-wrap: balance;
}

h1 {
  font-size: clamp(44px, 6vw, 84px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.04;
}

h2 {
  font-size: clamp(34px, 4.2vw, 56px);
  font-weight: 650;
  letter-spacing: -.032em;
  line-height: 1.08;
}

h3 {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 650;
  letter-spacing: -.02em;
  line-height: 1.16;
}

.lead {
  font-size: clamp(19px, 1.8vw, 23px);
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 56ch;
}

.body-text {
  color: var(--text-secondary);
  max-width: 68ch;
}

.body-text.small {
  font-size: 15px;
  color: var(--text-muted);
}

.mono,
.mono-label {
  font-family: var(--font-mono);
}

.mono-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

.section {
  padding-top: clamp(56px, 9vw, 112px);
  scroll-margin-top: 84px;
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.section-head h2 {
  margin: 10px 0 14px;
}

.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-primary-strong);
  background: var(--accent-primary-soft);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 60;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent-primary);
  transition: width 80ms linear;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: background-color var(--duration-base) var(--ease-standard);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}

.brand {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -.02em;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--accent-primary-soft);
}

.nav-links {
  display: flex;
  gap: 26px;
  margin-inline: auto;
}

.nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  position: relative;
  padding: 6px 0;
  transition: color var(--duration-fast) ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--accent-primary);
  border-radius: 2px;
  transition: width var(--duration-base) var(--ease-standard);
}

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

.nav-links a:hover::after,
.nav-links a[aria-current="true"]::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-1);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color var(--duration-fast) ease, background-color var(--duration-fast) ease, color var(--duration-fast) ease;
}

.theme-toggle:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  color: var(--text-primary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  position: absolute;
  transition: opacity var(--duration-base) ease, transform var(--duration-slow) var(--ease-standard);
}

.theme-toggle { position: relative; }

html[data-theme="light"] .icon-moon { opacity: 0; transform: rotate(-60deg) scale(.6); }
html[data-theme="light"] .icon-sun { opacity: 1; transform: rotate(0deg); }
html[data-theme="dark"] .icon-sun { opacity: 0; transform: rotate(60deg) scale(.6); }
html[data-theme="dark"] .icon-moon { opacity: 1; transform: rotate(0deg); }

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--duration-fast) ease, box-shadow var(--duration-fast) ease, border-color var(--duration-fast) ease;
}

.button-primary {
  border: 0;
  color: var(--button-primary-text);
  background: var(--button-primary-bg);
  box-shadow: var(--shadow-sm);
}

.button-primary:hover {
  background: var(--button-primary-bg-hover);
  box-shadow: var(--shadow-md);
}

.button-primary:active {
  box-shadow: var(--shadow-sm);
}

.button-primary svg {
  width: 17px;
  height: 17px;
  transition: transform var(--duration-base) var(--ease-standard);
}

.button-primary:hover svg {
  transform: translateX(3px);
}

.button-secondary {
  border: 1px solid var(--border);
  color: var(--text-primary);
  background: var(--surface-1);
  box-shadow: var(--shadow-sm);
}

.button-secondary:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.text-link {
  color: var(--accent-primary-strong);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.text-link:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: none;
  border-radius: 6px;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  box-shadow: none;
}

.hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: center;
  padding-top: clamp(40px, 6vw, 96px);
  padding-bottom: clamp(24px, 4vw, 48px);
  scroll-margin-top: 84px;
}

.hero-copy {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero-copy h1 em {
  font-style: normal;
  color: var(--accent-primary-strong);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.trust-line {
  font-size: 12.5px;
  color: var(--text-muted);
  letter-spacing: .02em;
}

.hero-scene {
  grid-column: span 7;
  position: relative;
  min-height: 480px;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--hero-atmosphere);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

html[data-theme="dark"] .hero-scene {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .035),
    var(--shadow-md);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--success);
  background: var(--success-soft);
  border: 1px solid var(--success);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  animation: breathe 2.4s ease-in-out infinite;
}

.stepper {
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
}

.step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 8px;
  row-gap: 4px;
  min-width: 118px;
}

.step:not(:last-child)::after {
  content: "";
  flex: 1;
  min-width: 18px;
  height: 2px;
  align-self: center;
  border-radius: 2px;
  background: var(--border-strong);
  margin-right: 2px;
}

.step.is-done:not(:last-child)::after {
  background: var(--success);
}

.step.is-active:not(:last-child)::after {
  background: linear-gradient(90deg, var(--accent-primary) 50%, var(--border-strong) 110%);
  background-size: 200% 100%;
  animation: route-fill 3.2s var(--ease-standard) infinite alternate;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--surface-1);
  flex-shrink: 0;
  transition: border-color var(--duration-base) ease, background-color var(--duration-base) ease;
}

.is-done .dot {
  border-color: var(--success);
  background: var(--success);
}

.is-active .dot {
  border-color: var(--accent-primary);
  background: var(--accent-primary-soft);
  box-shadow: 0 0 0 4px var(--focus-ring);
  animation: breathe 2.4s ease-in-out infinite;
}

.step-name {
  width: 100%;
  order: 1;
  font-size: 15px;
  font-weight: 650;
  color: var(--text-primary);
  line-height: 1.3;
}

.step-state {
  width: 100%;
  order: 2;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--text-muted);
}

.is-done .step-state { color: var(--success); }
.is-active .step-state { color: var(--accent-primary-strong); }
.is-active .step-name { color: var(--accent-primary-strong); }

.log-card {
  margin-top: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.log-title {
  margin-bottom: 2px;
}

.log-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.log-time {
  font-size: 11.5px;
  color: var(--text-muted);
}

.log-src {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-primary-strong);
  background: var(--accent-primary-soft);
  border-radius: 6px;
  padding: 1px 8px;
}

.caret {
  width: 8px;
  height: 16px;
  background: var(--accent-primary);
  transform: translateY(3px);
  animation: blink 1.1s steps(2, start) infinite;
}

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

.card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  box-shadow: var(--shadow-sm);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.card:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  box-shadow: var(--shadow-md);
}

.tone-sky { background: var(--accent-primary-soft); }
.tone-lavender { background: var(--accent-secondary-soft); }

html[data-theme="dark"] .tone-sky,
html[data-theme="dark"] .tone-lavender {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025), var(--shadow-sm);
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--accent-primary);
  margin-bottom: 16px;
}

.tone-lavender .card-icon {
  color: var(--accent-secondary);
}

.card-icon svg {
  width: 23px;
  height: 23px;
}

.card h3 {
  font-size: 19px;
  margin-bottom: 12px;
}

.chip-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

li.chip-list:last-child,
.case-summary + .chip-list { margin-bottom: 0; }

.timeline-item .chip-list { margin: 14px 0; }

.chip-list li {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  white-space: nowrap;
}

.tone-sky .chip-list li,
.tone-lavender .chip-list li {
  background: var(--surface-1);
}

.ai-strip {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 24px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--accent-secondary);
  border-radius: var(--radius-xl);
  background: var(--accent-secondary-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), var(--shadow-sm);
}

.ai-strip-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--accent-secondary);
  background: var(--surface-1);
  border: 1px solid var(--border);
}

.ai-strip-icon svg { width: 26px; height: 26px; }

.ai-strip h3 { font-size: 21px; margin-bottom: 8px; }

.ai-strip p {
  color: var(--text-secondary);
  max-width: 76ch;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.diff-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-left: 2px solid var(--border-strong);
  padding-left: 22px;
}

.diff-list li {
  color: var(--text-secondary);
  font-size: 16px;
}

.diff-list strong {
  color: var(--text-primary);
}

.expertise-grid { margin-bottom: 0; }

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.case-grid .case-card:nth-child(odd):last-child {
  grid-column: span 2;
}

.case-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  box-shadow: var(--shadow-sm);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.case-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  box-shadow: var(--shadow-md);
}

.case-head { margin-bottom: 12px; }

.case-head h3 {
  font-size: 21px;
  margin-top: 8px;
}

.case-summary {
  color: var(--text-secondary);
  font-size: 15.5px;
  margin-bottom: 16px;
}

.story-slot {
  margin-top: auto;
  border-top: 1px dashed var(--border-strong);
  padding-top: 14px;
}

.story-slot summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 650;
  color: var(--accent-primary-strong);
  user-select: none;
}

.story-slot summary::-webkit-details-marker { display: none; }

.story-slot summary svg {
  width: 16px;
  height: 16px;
  transition: transform var(--duration-base) var(--ease-standard);
}

.story-slot[open] summary svg {
  transform: rotate(180deg);
}

.slot-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.slot-body p {
  font-size: 14.5px;
  line-height: 1.55;
  border-radius: var(--radius-md);
}

.slot-text {
  color: var(--text-muted);
  font-style: italic;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  padding: 12px 14px;
}

.slot-result {
  color: var(--warning);
  background: var(--warning-soft);
  border: 1px dashed var(--warning);
  font-style: italic;
  font-weight: 550;
  padding: 12px 14px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 980px;
}

.timeline-item {
  position: relative;
  padding: clamp(22px, 3vw, 32px) clamp(22px, 3.5vw, 40px) clamp(22px, 3vw, 32px) clamp(30px, 4vw, 48px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  box-shadow: var(--shadow-sm);
}

.timeline-marker {
  position: absolute;
  left: -7px;
  top: 38px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 0 5px var(--accent-primary-soft);
}

.timeline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.timeline-role { margin-top: 4px; }

.timeline-dates {
  font-size: 12.5px;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  white-space: nowrap;
}

.timeline-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 86ch;
}

.timeline-bullets li {
  position: relative;
  padding-left: 22px;
  color: var(--text-secondary);
  font-size: 16px;
}

.timeline-bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-strong);
}

.contact-panel {
  padding: clamp(32px, 5vw, 64px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--hero-atmosphere);
  box-shadow: var(--shadow-md);
}

html[data-theme="dark"] .contact-panel {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), var(--shadow-md);
}

.contact-panel h2 { margin: 14px 0 12px; }

.contact-panel .lead { margin-bottom: 32px; }

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

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.contact-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  box-shadow: var(--shadow-md);
}

.contact-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-primary-soft);
  color: var(--accent-primary-strong);
  border: 1px solid var(--border);
}

.contact-icon svg { width: 22px; height: 22px; }

.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.contact-value {
  font-weight: 650;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-card .arrow {
  width: 18px;
  height: 18px;
  margin-left: auto;
  color: var(--text-muted);
  transition: transform var(--duration-base) var(--ease-standard), color var(--duration-base) ease;
}

.contact-card:hover .arrow {
  transform: translate(2px, -2px);
  color: var(--accent-primary-strong);
}

.site-footer {
  margin-top: clamp(56px, 8vw, 104px);
  border-top: 1px solid var(--border);
  background: var(--surface-1);
}

.footer-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 14px;
  font-size: 14px;
  color: var(--text-muted);
}

.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity var(--duration-slow) var(--ease-standard),
    transform var(--duration-slow) var(--ease-standard);
  transition-delay: var(--delay, 0s);
}

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

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 3px var(--focus-ring); }
  50%      { box-shadow: 0 0 0 7px var(--focus-ring); }
}

@keyframes route-fill {
  from { background-position: 0% 0; }
  to   { background-position: -60% 0; }
}

@keyframes blink {
  to { visibility: hidden; }
}

@media (max-width: 1080px) {
  .hero { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 20px; }
  .hero-copy, .hero-scene { grid-column: span 4; }
  .hero-scene { min-height: 520px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; }
  .stepper { flex-wrap: wrap; gap: 14px 8px; }
  .step:not(:last-child)::after { min-width: 26px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }

  .container { width: min(100% - 32px, 1240px); }

  .hero,
  .about-grid,
  .grid-3,
  .case-grid,
  .contact-cards { grid-template-columns: 1fr; }

  .hero-copy { order: 1; }
  .hero-scene { order: 2; min-height: 0; grid-column: span 1; }

  .case-grid .case-card:nth-child(odd):last-child { grid-column: span 1; }

  .stepper {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .step {
    align-items: flex-start;
    column-gap: 10px;
    padding-block: 7px;
    min-width: 0;
  }

  .step-name { width: auto; order: 0; }
  .step-state { width: auto; order: 0; margin-left: 2px; }

  .step:not(:last-child)::after {
    align-self: flex-start;
    width: 2px;
    height: 14px;
    min-width: 0;
    margin-left: 6px;
    margin-top: 2px;
    flex: none;
  }

  .log-line { white-space: normal; flex-wrap: wrap; }

  .nav-cta { padding: 0 14px; min-height: 42px; }

  .ai-strip { flex-direction: column; }

  .timeline-marker { left: clamp(-1px, 0px, 0px); top: 34px; }

  .timeline-item { padding-left: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }

  html { scroll-behavior: auto; }
}

/* ═══════════════ PHOTO SLOTS (transparent cutouts) ═══════════════ */
.photo-frame {
  position: relative;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* transparent cutout variants: person floats on a soft brand cloud */
.photo-frame.is-cutout {
  border: 0;
  box-shadow: none;
  background:
    radial-gradient(90% 62% at 50% 30%, var(--accent-primary-soft), transparent 74%),
    radial-gradient(70% 52% at 62% 78%, var(--accent-secondary-soft), transparent 78%),
    var(--surface-2);
}

.photo-frame.is-cutout img {
  object-fit: contain;
  object-position: center bottom;
  padding: clamp(14px, 2vw, 26px);
}

html[data-theme="light"] .photo-frame.is-cutout img {
  filter:
    saturate(.95)
    contrast(.98)
    brightness(1.02)
    drop-shadow(0 22px 30px rgba(31, 42, 61, .16));
}

html[data-theme="dark"] .photo-frame.is-cutout img {
  filter:
    saturate(.92)
    contrast(1.02)
    brightness(.96)
    drop-shadow(0 26px 36px rgba(2, 8, 20, .55));
}

.photo-frame.is-portrait {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 3 / 4;
  justify-self: center;
  align-self: start;
}

.photo-frame.is-hero {
  width: min(100%, 330px);
  aspect-ratio: 3 / 4;
  margin-inline: auto;
  border-radius: var(--radius-lg);
}

html[data-theme="light"] img[data-brand-image] {
  filter: saturate(.90) contrast(.96) brightness(1.04);
}

html[data-theme="dark"] img[data-brand-image] {
  filter: saturate(.82) contrast(1.03) brightness(.88);
}

.photo-fallback {
  position: absolute;
  inset: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed var(--border-strong);
  border-radius: calc(var(--radius-lg) - 6px);
  color: var(--text-muted);
  text-align: center;
  padding: 16px;
}

.photo-fallback svg {
  width: 28px;
  height: 28px;
  opacity: .7;
}

.photo-fallback span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.photo-fallback code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  opacity: .85;
}

.photo-frame:not(.is-empty) .photo-fallback { display: none; }
.photo-frame.is-empty img { display: none; }

/* ═══════════════ ABOUT LAYOUT ═══════════════ */
.about-grid {
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, .95fr)
    clamp(230px, 26vw, 340px);
  align-items: stretch;
}

/* ═══════════════ CASE STORIES ═══════════════ */
.case-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.case-story {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

html[data-theme="dark"] .case-story {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025), var(--shadow-sm);
}

.case-story:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.case-media { grid-column: 1 / span 5; }

.case-media .photo-frame {
  height: 100%;
  min-height: 320px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.case-body { grid-column: 6 / span 7; }
.case-body:first-child { grid-column: 1 / -1; }

.case-story.is-media-right .case-body { grid-column: 1 / span 7; grid-row: 1; }
.case-story.is-media-right .case-media { grid-column: 8 / span 5; grid-row: 1; }

.case-story .case-body,
.case-story:first-child .case-body { padding: clamp(24px, 3vw, 40px); }

.case-body p {
  max-width: 68ch;
  color: var(--text-secondary);
  font-size: 15.5px;
  margin-bottom: 13px;
}

.case-body p strong { color: var(--text-primary); }

.case-head { margin-bottom: 14px; }

.case-head h3 {
  font-size: clamp(20px, 2vw, 25px);
  margin-top: 8px;
  letter-spacing: -.02em;
}

.case-body .chip-list { margin-bottom: 4px; }

.case-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 16px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 150px;
  flex: 0 1 auto;
}

.stat b {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text-primary);
  white-space: nowrap;
}

.stat span {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--text-muted);
}

.case-result {
  color: var(--success) !important;
  background: var(--success-soft);
  border-left: 3px solid var(--success);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px 18px !important;
  margin-top: 18px !important;
  font-weight: 550;
  font-size: 15.5px !important;
  max-width: none !important;
}

/* ═══════════════ CASE SCENE (flow diagram) ═══════════════ */
.case-scene {
  margin: 0;
  height: 100%;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 2.5vw, 32px);
  background-image:
    linear-gradient(color-mix(in srgb, var(--accent-primary) 6%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--accent-primary) 6%, transparent) 1px, transparent 1px);
  background-size: 40px 40px;
  border-right: 1px solid var(--border);
}

.case-scene svg {
  width: 100%;
  max-width: 360px;
  height: auto;
}

.sc-edge {
  stroke: var(--border-strong);
  stroke-width: 1.5;
}

.sc-edge.is-done { stroke: var(--success); stroke-width: 2; }

.sc-edge.is-active {
  stroke: var(--accent-primary);
  stroke-width: 2;
  stroke-dasharray: 6 6;
  animation: edge-flow 1.6s linear infinite;
}

.sc-node-rect {
  fill: var(--surface-1);
  stroke: var(--border);
  stroke-width: 1;
}

.sc-node.is-done .sc-node-rect { stroke: var(--success); }
.sc-node.is-active .sc-node-rect {
  fill: var(--accent-primary-soft);
  stroke: var(--border-strong);
  stroke-width: 1.5;
}

.sc-title {
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 650;
  fill: var(--text-primary);
}

.sc-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .03em;
  fill: var(--text-muted);
}

.sc-node.is-active .sc-title { fill: var(--accent-primary-strong); }

.sc-pill-rect {
  fill: var(--success-soft);
  stroke: var(--success);
  stroke-width: 1;
}

.sc-pill-text {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .02em;
  fill: var(--success);
}

@keyframes edge-flow {
  to { stroke-dashoffset: -12; }
}

/* ═══════════════ ALSO BLOCK ═══════════════ */
.also-block {
  margin-top: 26px;
  padding: clamp(22px, 3vw, 30px);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

.also-title {
  font-size: 17px;
  margin-bottom: 16px;
}

.also-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.also-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 16px;
  row-gap: 2px;
  font-size: 14.5px;
  color: var(--text-secondary);
}

.also-list li > span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent-primary-strong);
  min-width: 250px;
}

@media (max-width: 1080px) {
  .about-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid .photo-frame.is-portrait {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: end;
    max-width: 280px;
  }
  .case-story { grid-template-columns: 1fr; }
  .case-media { order: -1; grid-column: 1 / -1; }
  .case-media .photo-frame,
  .case-scene {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 7;
  }
  .case-scene { border-right: 0; border-bottom: 1px solid var(--border); }
  .case-story.is-media-right .case-body { grid-column: 1 / -1; }
  .case-body, .case-body:first-child { grid-column: 1 / -1; padding: clamp(22px, 4vw, 32px); }
  .photo-frame.is-hero { width: min(100%, 300px); }
}

@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-grid .photo-frame.is-portrait {
    grid-column: 1;
    grid-row: auto;
    justify-self: center;
    aspect-ratio: 4 / 5;
    max-width: 320px;
  }
  .case-stats { flex-direction: column; }
  .also-list li > span { min-width: 0; }
  .photo-frame.is-hero { width: 100%; }
}
