:root {
  color-scheme: dark;
  --bg: #120b06;
  --bg-deep: #0d0805;
  --surface: #1a120c;
  --surface-strong: #22170e;
  --text: #fbf1e2;
  --muted: #c3ad91;
  --dim: #89745c;
  --line: rgba(232, 196, 141, 0.16);
  --line-strong: rgba(232, 196, 141, 0.28);
  --accent: #f0913c;
  --accent-strong: #ffb16b;
  --accent-deep: #d75f25;
  --green: #7fce7f;
  --cyan: #20aeea;
  --purple: #8b5cf6;
  --content: 1080px;
  --wide: 1180px;
  --radius: 8px;
  --shadow: 0 24px 54px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: linear-gradient(180deg, #16100a 0%, var(--bg) 45%, #0f0905 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.dialog-open {
  overflow: hidden;
}

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

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

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

::selection {
  background: var(--accent-deep);
  color: #211207;
}

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 4px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 68px;
  border-bottom: 1px solid rgba(232, 196, 141, 0.1);
  background: rgba(18, 11, 6, 0.82);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(100% - 48px, 1380px);
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-family: Fraunces, Georgia, serif;
  font-size: 21px;
  font-style: italic;
  font-weight: 500;
}

.brand-dot,
.status-dot {
  flex: 0 0 auto;
  border-radius: 50%;
}

.brand-dot {
  width: 9px;
  height: 9px;
  background: #ff9a45;
  box-shadow: 0 0 12px 3px rgba(255, 138, 55, 0.72);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.site-nav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.site-nav .contact-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  box-shadow: 0 0 8px rgba(127, 206, 127, 0.7);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  content: "";
  width: 17px;
  height: 1px;
  margin: 4px auto;
  display: block;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle[aria-expanded="true"] span {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"]::before {
  transform: translateY(5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"]::after {
  transform: translateY(-5px) rotate(-45deg);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 24px;
  color: #e7c9a0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.section-note {
  margin: 0 0 18px;
  color: var(--accent);
  font-family: Fraunces, Georgia, serif;
  font-size: 14px;
  font-style: italic;
}

.section-heading {
  margin: 0;
  color: var(--text);
  font-family: Fraunces, Georgia, serif;
  font-size: 42px;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-family: Newsreader, Georgia, serif;
  font-size: 20px;
  line-height: 1.65;
}

.button,
.button-secondary,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  font-size: 14px;
  font-weight: 600;
}

.button {
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  box-shadow: 0 12px 32px rgba(224, 104, 42, 0.32);
  color: #211207;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(224, 104, 42, 0.4);
}

.button-secondary {
  padding: 0 24px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 180ms ease, background 180ms ease;
}

.button-secondary:hover {
  border-color: var(--accent-strong);
  background: rgba(240, 145, 60, 0.07);
}

.text-link {
  min-height: 32px;
  color: var(--accent-strong);
}

.text-link:hover {
  color: #ffd9a6;
}

.hero {
  position: relative;
  min-height: calc(100svh - 68px);
  overflow: hidden;
  display: grid;
  place-items: start center;
  padding: 110px 24px 250px;
  text-align: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: radial-gradient(60% 120% at 50% 100%, rgba(255, 130, 45, 0.15), rgba(255, 130, 45, 0) 70%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 960px;
}

.hero h1 {
  margin: 0;
  color: var(--text);
  font-family: Fraunces, Georgia, serif;
  font-size: 86px;
  font-weight: 400;
  line-height: 0.99;
  letter-spacing: 0;
}

.hero h1 em {
  color: var(--accent);
  font-weight: 400;
}

.hero-description {
  max-width: 650px;
  margin: 30px auto 34px;
  color: #d9c7ad;
  font-family: Newsreader, Georgia, serif;
  font-size: 21px;
  line-height: 1.58;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.fire-canvas {
  position: absolute;
  z-index: 1;
  bottom: -42px;
  left: 50%;
  width: min(760px, 98vw);
  height: 520px;
  max-width: none;
  transform: translateX(-50%);
  pointer-events: none;
}

.proof-strip {
  border-top: 1px solid rgba(232, 196, 141, 0.08);
  border-bottom: 1px solid rgba(232, 196, 141, 0.08);
  background: rgba(255, 255, 255, 0.012);
}

.proof-strip-inner {
  width: min(100% - 80px, var(--content));
  margin: 0 auto;
  padding: 22px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.proof-strip p {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.proof-strip strong {
  flex: 0 0 auto;
  color: var(--text);
  font-family: Fraunces, Georgia, serif;
  font-size: 17px;
  font-weight: 400;
}

.proof-strip span {
  color: var(--dim);
  font-size: 11px;
  line-height: 1.5;
  text-transform: uppercase;
}

.content-section {
  width: min(100% - 80px, var(--content));
  margin: 0 auto;
  padding: 94px 0;
}

.content-section + .content-section {
  border-top: 1px solid rgba(232, 196, 141, 0.08);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 64px;
  align-items: center;
}

.about-copy {
  margin: 0;
  color: var(--text);
  font-family: Newsreader, Georgia, serif;
  font-size: 32px;
  line-height: 1.42;
}

.about-copy span {
  color: var(--dim);
}

.about-visual {
  height: 330px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 42px rgba(224, 122, 46, 0.1);
  background: var(--bg-deep);
}

.about-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% center;
}

.section-header {
  margin-bottom: 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.work-list {
  border-bottom: 1px solid var(--line);
}

.work-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 220px 34px;
  gap: 28px;
  align-items: center;
  padding: 30px 18px;
  border-top: 1px solid var(--line);
  transition: background 200ms ease;
}

.work-row:hover {
  background: linear-gradient(90deg, rgba(224, 122, 46, 0.09), rgba(224, 122, 46, 0));
}

.work-index {
  color: #6f5c46;
  font-family: Fraunces, Georgia, serif;
  font-size: 30px;
}

.work-row h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-family: Fraunces, Georgia, serif;
  font-size: 27px;
  font-weight: 400;
}

.work-row p {
  max-width: 540px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.work-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-deep);
}

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.work-row:hover .work-thumb img {
  transform: scale(1.04);
}

.work-arrow {
  color: var(--dim);
  font-size: 21px;
  transition: transform 180ms ease, color 180ms ease;
}

.work-row:hover .work-arrow {
  color: var(--accent-strong);
  transform: translateX(4px);
}

.stack-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  color: #e8dcc8;
  font-family: Fraunces, Georgia, serif;
  font-size: 34px;
  line-height: 1.4;
}

.stack-cloud i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-deep);
}

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

.cert-card {
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface-strong), var(--surface));
}

.cert-mark {
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: rgba(32, 174, 234, 0.14);
  color: #8ad8ff;
  font-weight: 700;
}

.cert-mark.aws {
  background: rgba(245, 182, 66, 0.14);
  color: #f5b642;
  font-size: 12px;
}

.cert-card h3 {
  margin: 0 0 7px;
  font-family: Fraunces, Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.28;
}

.cert-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.cert-card a,
.cert-status {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 600;
}

.cert-status {
  color: var(--dim);
}

.contact-section {
  width: min(100% - 48px, 820px);
  margin: 0 auto;
  padding: 112px 0 120px;
  text-align: center;
}

.contact-orb {
  width: 44px;
  height: 44px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #ffd58a, #e0682a 70%);
  box-shadow: 0 0 34px rgba(224, 104, 42, 0.5);
}

.contact-section h2 {
  max-width: 620px;
  margin: 0 auto 20px;
  font-family: Fraunces, Georgia, serif;
  font-size: 44px;
  font-weight: 400;
  line-height: 1.16;
}

.contact-section h2 em {
  color: var(--accent);
  font-weight: 400;
}

.contact-section p {
  max-width: 520px;
  margin: 0 auto 32px;
  color: var(--muted);
  font-family: Newsreader, Georgia, serif;
  font-size: 18px;
  line-height: 1.6;
}

.contact-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.error-main {
  width: min(100% - 40px, 760px);
  min-height: calc(100svh - 128px);
  margin: 0 auto;
  padding: 110px 0;
  display: grid;
  align-content: center;
  text-align: center;
}

.error-code {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.error-main h1 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 58px;
  font-weight: 400;
}

.error-main p:not(.error-code) {
  max-width: 540px;
  margin: 22px auto 30px;
  color: var(--muted);
  font-family: Newsreader, Georgia, serif;
  font-size: 19px;
  line-height: 1.6;
}

.site-footer {
  padding: 24px;
  border-top: 1px solid rgba(232, 196, 141, 0.09);
  color: var(--dim);
  font-size: 12px;
  text-align: center;
}

/* Secondary page structure */
.page-main {
  width: min(100% - 64px, var(--wide));
  margin: 0 auto;
  padding: 72px 0 110px;
}

.page-hero {
  max-width: 900px;
  padding: 44px 0 66px;
}

.page-hero h1 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 68px;
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: 0;
}

.page-hero h1 em {
  color: var(--accent);
  font-weight: 400;
}

.page-hero p:last-child {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-family: Newsreader, Georgia, serif;
  font-size: 20px;
  line-height: 1.65;
}

.project-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface-strong), var(--surface));
}

.project-feature-media {
  min-height: 440px;
  background: #080706;
}

.project-feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-feature-copy {
  padding: 42px;
  align-self: center;
}

.project-label {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-feature h2,
.project-card h2,
.ai-feature h2 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-weight: 400;
}

.project-feature h2 {
  font-size: 42px;
  line-height: 1.08;
}

.project-feature-copy > p:not(.project-label),
.project-card > p,
.ai-feature-copy > p {
  color: var(--muted);
  line-height: 1.7;
}

.project-feature-copy > p:not(.project-label) {
  margin: 18px 0 24px;
}

.project-facts {
  margin: 0 0 28px;
  display: grid;
  gap: 12px;
}

.project-facts div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.project-facts dt {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-facts dd {
  margin: 0;
  color: #dccbb5;
  font-size: 13px;
  line-height: 1.55;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface-strong), var(--surface));
  transition: transform 180ms ease, border-color 180ms ease;
}

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

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #080706;
}

.project-card-content {
  padding: 26px;
}

.project-card h2 {
  font-size: 28px;
}

.project-card p {
  margin: 12px 0 18px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #d9c9b4;
  font-size: 11px;
  font-weight: 600;
}

.section-bridge {
  margin-top: 72px;
  padding: 34px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.section-bridge h2 {
  margin: 0 0 8px;
  font-family: Fraunces, Georgia, serif;
  font-size: 30px;
  font-weight: 400;
}

.section-bridge p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

/* Case study */
.case-main {
  width: min(100% - 64px, var(--wide));
  margin: 0 auto;
  padding: 42px 0 100px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

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

.case-hero {
  display: grid;
  grid-template-columns: minmax(340px, 0.82fr) minmax(460px, 1.18fr);
  gap: 58px;
  align-items: center;
  padding-bottom: 58px;
}

.case-hero h1 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 58px;
  font-weight: 400;
  line-height: 1.04;
}

.case-summary {
  margin: 22px 0 0;
  color: var(--muted);
  font-family: Newsreader, Georgia, serif;
  font-size: 19px;
  line-height: 1.65;
}

.architecture-button {
  position: relative;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #080706;
  box-shadow: var(--shadow);
  cursor: zoom-in;
}

.architecture-button img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
}

.architecture-button span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(9, 7, 5, 0.86);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}

.case-fact-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.case-fact-band div {
  min-height: 126px;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.case-fact-band div:last-child {
  border-right: 0;
}

.case-fact-band dt {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.case-fact-band dd {
  margin: 0;
  color: #e4d4c0;
  font-family: Fraunces, Georgia, serif;
  font-size: 18px;
  line-height: 1.35;
}

.case-section {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 68px;
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

.case-section h2 {
  position: sticky;
  top: 98px;
  align-self: start;
  margin: 0;
  color: var(--accent);
  font-family: Fraunces, Georgia, serif;
  font-size: 24px;
  font-weight: 400;
}

.case-copy > p {
  max-width: 760px;
  margin: 0 0 22px;
  color: #dccbb5;
  font-size: 16px;
  line-height: 1.78;
}

.case-copy > p:last-child {
  margin-bottom: 0;
}

.case-copy h3 {
  margin: 34px 0 12px;
  font-family: Fraunces, Georgia, serif;
  font-size: 25px;
  font-weight: 400;
}

.decision-list,
.evidence-list,
.sequence-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.decision-list li {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
  line-height: 1.65;
}

.decision-list strong,
.evidence-list strong,
.sequence-list strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-weight: 600;
}

.sequence-list {
  counter-reset: step;
  display: grid;
}

.sequence-list li {
  counter-increment: step;
  position: relative;
  padding: 0 0 26px 54px;
  color: var(--muted);
  line-height: 1.65;
}

.sequence-list li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-family: Fraunces, Georgia, serif;
  font-size: 22px;
}

.sequence-list li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 31px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}

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

.evidence-list li {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.6;
}

.privacy-note {
  margin-top: 28px;
  padding: 18px 20px;
  border-left: 2px solid var(--accent);
  background: rgba(240, 145, 60, 0.055);
  color: #d9c6ae;
  font-size: 14px;
  line-height: 1.65;
}

.case-navigation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-top: 54px;
}

.case-navigation a {
  min-height: 122px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  align-content: center;
  transition: border-color 180ms ease, background 180ms ease;
}

.case-navigation a:hover {
  border-color: var(--line-strong);
  background: rgba(240, 145, 60, 0.04);
}

.case-navigation span {
  margin-bottom: 7px;
  color: var(--dim);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.case-navigation strong {
  font-family: Fraunces, Georgia, serif;
  font-size: 23px;
  font-weight: 400;
}

/* AI workflows */
.ai-feature {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
  gap: 70px;
  align-items: center;
  padding: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--surface-strong), #17100a);
}

.phone-frame {
  width: 260px;
  aspect-ratio: 9 / 17;
  margin: 0 auto;
  padding: 9px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: #080706;
  box-shadow: var(--shadow), 0 0 46px rgba(240, 145, 60, 0.08);
}

.phone-screen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: #f5f1e9;
}

.phone-screen img {
  width: 217%;
  max-width: none;
  height: auto;
}

.ai-feature h2 {
  font-size: 46px;
}

.ai-feature-copy > p {
  margin: 18px 0 24px;
  font-size: 16px;
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.workflow-strip div {
  min-height: 114px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.workflow-strip div:last-child {
  border-right: 0;
}

.workflow-strip strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-family: Fraunces, Georgia, serif;
  font-size: 20px;
  font-weight: 400;
}

.workflow-strip span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.workflow-cases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 72px;
}

.workflow-case {
  padding: 32px;
  border-top: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.012);
}

.workflow-case h2 {
  margin: 0 0 14px;
  font-family: Fraunces, Georgia, serif;
  font-size: 31px;
  font-weight: 400;
}

.workflow-case > p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.7;
}

.qa-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.qa-matrix div {
  min-height: 110px;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.qa-matrix div:nth-child(2n) {
  border-right: 0;
}

.qa-matrix div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.qa-matrix strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}

.qa-matrix span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.ai-method {
  margin-top: 72px;
  padding-top: 54px;
  border-top: 1px solid var(--line);
}

.method-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.method-step {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.method-step strong {
  display: block;
  margin-bottom: 18px;
  color: var(--accent);
  font-family: Fraunces, Georgia, serif;
  font-size: 24px;
  font-weight: 400;
}

.method-step p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

/* Resume */
.resume-main {
  width: min(100% - 64px, 980px);
  margin: 0 auto;
  padding: 62px 0 100px;
}

.resume-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
  align-items: start;
  padding-bottom: 42px;
  border-bottom: 1px solid var(--line);
}

.resume-header h1 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 62px;
  font-weight: 400;
  line-height: 1;
}

.resume-header p {
  max-width: 700px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.resume-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.print-button {
  cursor: pointer;
}

.resume-section {
  padding: 42px 0 0;
}

.resume-section h2 {
  margin: 0 0 20px;
  color: var(--accent);
  font-family: Fraunces, Georgia, serif;
  font-size: 25px;
  font-weight: 400;
}

.resume-section > p {
  margin: 0;
  color: #dccbb5;
  font-size: 15px;
  line-height: 1.75;
}

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

.resume-skills article {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.resume-skills h3,
.resume-project h3 {
  margin: 0 0 8px;
  font-family: Fraunces, Georgia, serif;
  font-size: 21px;
  font-weight: 400;
}

.resume-skills p,
.resume-project p,
.resume-project li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.resume-skills p,
.resume-project p {
  margin: 0;
}

.credential-link {
  min-height: 36px;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 600;
}

.resume-projects {
  display: grid;
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.resume-project {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.resume-project ul {
  margin: 14px 0 0;
  padding-left: 18px;
}

.resume-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  color: var(--muted);
  font-size: 13px;
}

/* Dialog */
.image-dialog {
  width: min(94vw, 1280px);
  max-height: 92vh;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #080706;
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
}

.image-dialog::backdrop {
  background: rgba(4, 3, 2, 0.88);
  backdrop-filter: blur(8px);
}

.image-dialog img {
  width: 100%;
  max-height: calc(92vh - 70px);
  object-fit: contain;
}

.dialog-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(8, 7, 6, 0.9);
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
}

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

@media (max-width: 980px) {
  .hero h1 {
    font-size: 68px;
  }

  .content-section,
  .page-main,
  .case-main,
  .resume-main {
    width: min(100% - 48px, var(--content));
  }

  .work-row {
    grid-template-columns: 54px minmax(0, 1fr) 34px;
  }

  .work-thumb {
    display: none;
  }

  .project-feature,
  .case-hero,
  .ai-feature {
    grid-template-columns: 1fr;
  }

  .project-feature-media {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .case-hero {
    gap: 36px;
  }

  .case-fact-band,
  .workflow-strip,
  .method-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-fact-band div:nth-child(2),
  .workflow-strip div:nth-child(2) {
    border-right: 0;
  }

  .case-fact-band div:nth-child(-n + 2),
  .workflow-strip div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .ai-feature {
    gap: 46px;
  }

  .phone-frame {
    width: 230px;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 70px;
  }

  .header-inner {
    width: min(100% - 28px, 720px);
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    inset: 68px 0 auto;
    padding: 14px;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    background: rgba(18, 11, 6, 0.97);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  }

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

  .site-nav a {
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    display: flex;
    align-items: center;
  }

  .site-nav a:hover,
  .site-nav a[aria-current="page"] {
    border-color: var(--line);
    background: rgba(240, 145, 60, 0.05);
  }

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

  .hero {
    min-height: clamp(620px, calc(100svh - 68px), 700px);
    padding: 72px 18px 132px;
  }

  .hero h1 {
    font-size: 44px;
    line-height: 1.02;
  }

  .hero-description {
    max-width: 370px;
    margin: 24px auto 28px;
    font-size: 18px;
    line-height: 1.52;
  }

  .fire-canvas {
    bottom: -10px;
    width: 380px;
    height: 250px;
  }

  .proof-strip-inner {
    width: min(100% - 32px, 680px);
    padding: 18px 0;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .proof-strip p {
    justify-content: space-between;
    gap: 18px;
  }

  .proof-strip strong {
    font-size: 16px;
  }

  .proof-strip span {
    max-width: 170px;
    text-align: right;
  }

  .content-section {
    width: min(100% - 32px, 680px);
    padding: 58px 0;
  }

  .about-grid,
  .project-grid,
  .workflow-cases,
  .resume-header,
  .resume-skills,
  .case-navigation {
    grid-template-columns: 1fr;
  }

  .about-grid {
    gap: 28px;
  }

  .about-copy {
    font-size: 24px;
    line-height: 1.46;
  }

  .about-visual {
    height: 220px;
  }

  .section-heading {
    font-size: 32px;
  }

  .section-header,
  .section-bridge {
    align-items: flex-start;
    flex-direction: column;
  }

  .work-row {
    grid-template-columns: minmax(0, 1fr) 22px;
    gap: 14px;
    padding: 22px 2px;
  }

  .work-index {
    display: none;
  }

  .work-row h3 {
    font-size: 24px;
  }

  .work-tags {
    gap: 5px 9px;
  }

  .stack-cloud {
    gap: 8px 12px;
    font-size: 23px;
  }

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

  .cert-card {
    min-height: 0;
  }

  .contact-section h2 {
    font-size: 33px;
  }

  .page-main,
  .case-main,
  .resume-main {
    width: min(100% - 32px, 680px);
    padding-top: 32px;
    padding-bottom: 72px;
  }

  .page-hero {
    padding: 24px 0 38px;
  }

  .page-hero h1 {
    font-size: 42px;
  }

  .project-feature-copy {
    padding: 24px;
  }

  .project-feature h2 {
    font-size: 34px;
  }

  .section-bridge {
    display: flex;
  }

  .case-hero h1 {
    font-size: 41px;
  }

  .case-fact-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-section {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 44px 0;
  }

  .case-section h2 {
    position: static;
  }

  .decision-list,
  .evidence-list {
    grid-template-columns: 1fr;
  }

  .ai-feature {
    gap: 32px;
    padding: 28px 20px;
  }

  .ai-feature h2 {
    font-size: 35px;
  }

  .phone-frame {
    width: 200px;
  }

  .workflow-cases {
    margin-top: 42px;
  }

  .workflow-case {
    padding: 26px 20px;
  }

  .ai-method {
    margin-top: 50px;
    padding-top: 44px;
  }

  .method-steps {
    grid-template-columns: 1fr;
  }

  .resume-header h1 {
    font-size: 48px;
  }

  .resume-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 460px) {
  .brand {
    font-size: 19px;
  }

  .hero {
    min-height: clamp(620px, calc(100svh - 68px), 700px);
    padding: 62px 16px 126px;
  }

  .hero h1 {
    font-size: 41px;
  }

  .hero-description {
    font-size: 17px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .button,
  .button-secondary {
    padding-inline: 16px;
  }

  .fire-canvas {
    bottom: -8px;
    width: 360px;
    height: 240px;
  }

  .work-row {
    grid-template-columns: minmax(0, 1fr) 18px;
  }

  .work-row p {
    font-size: 13px;
  }

  .work-tags {
    font-size: 10px;
  }

  .page-hero h1 {
    font-size: 38px;
  }

  .page-hero p:last-child {
    font-size: 17px;
  }

  .project-facts div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .case-hero h1 {
    font-size: 36px;
  }

  .case-summary {
    font-size: 17px;
  }

  .case-fact-band div {
    min-height: 0;
    padding: 18px 2px;
  }

  .case-fact-band,
  .workflow-strip {
    grid-template-columns: 1fr;
  }

  .case-fact-band div,
  .workflow-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .case-fact-band div:last-child,
  .workflow-strip div:last-child {
    border-bottom: 0;
  }

  .qa-matrix {
    grid-template-columns: 1fr;
  }

  .qa-matrix div,
  .qa-matrix div:nth-child(2n),
  .qa-matrix div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .qa-matrix div:last-child {
    border-bottom: 0;
  }

  .resume-header h1 {
    font-size: 38px;
  }

  .error-main h1 {
    font-size: 42px;
  }
}

@media (max-width: 350px) {
  .hero h1 {
    font-size: 37px;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }

  .proof-strip p {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .proof-strip span {
    max-width: none;
    text-align: left;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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

@media print {
  :root {
    color-scheme: light;
  }

  body,
  .resume-main {
    background: #fff;
    color: #111;
  }

  body::before,
  .site-header,
  .site-footer,
  .resume-actions {
    display: none !important;
  }

  .resume-main {
    width: 100%;
    padding: 0;
  }

  .resume-main *,
  .resume-section > p,
  .resume-skills p,
  .resume-project p,
  .resume-project li,
  .resume-contact {
    color: #111 !important;
    border-color: #ccc !important;
  }

  .resume-section h2 {
    color: #7a431d !important;
  }

  a {
    color: #111 !important;
  }
}
