:root {
  --bg: #f5f1e8;
  --bg-deep: #ece5d7;
  --surface: rgba(255, 252, 246, 0.8);
  --surface-strong: rgba(255, 252, 246, 0.95);
  --text: #182131;
  --muted: #687386;
  --line: rgba(24, 33, 49, 0.1);
  --navy: #1f3f78;
  --copper: #c47a39;
  --copper-soft: rgba(196, 122, 57, 0.13);
  --navy-soft: rgba(31, 63, 120, 0.12);
  --mint: #d8ebe2;
  --shadow: 0 30px 90px rgba(25, 33, 48, 0.1);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 20px;
  --container: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(31, 63, 120, 0.09), transparent 24%),
    radial-gradient(circle at 85% 14%, rgba(196, 122, 57, 0.14), transparent 22%),
    radial-gradient(circle at 80% 72%, rgba(216, 235, 226, 0.3), transparent 24%),
    linear-gradient(180deg, #f7f3eb 0%, #f2ece1 52%, #ede5d9 100%);
}

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

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(31, 63, 120, 0.72);
  outline-offset: 3px;
}

.page-orb {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(60px);
  opacity: 0.58;
}

.orb-a {
  width: 280px;
  height: 280px;
  left: -90px;
  top: 80px;
  background: rgba(31, 63, 120, 0.12);
}

.orb-b {
  width: 360px;
  height: 360px;
  right: -140px;
  top: 420px;
  background: rgba(196, 122, 57, 0.13);
}

.site-shell {
  position: relative;
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
  padding: 18px 0 36px;
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  margin-bottom: 28px;
  background: rgba(251, 247, 239, 0.78);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  box-shadow: 0 16px 44px rgba(18, 24, 37, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(22, 53, 107, 0.14);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 1rem;
}

.brand-copy span,
.section-head p,
.hero-text,
.signal-row span,
.work-card p,
.work-points,
.principle-card p,
.collab-card li,
.about-card p,
.contact-card p,
.footer,
.footer-legal,
.mini-card-copy span {
  color: var(--muted);
}

.brand-copy span {
  font-size: 0.78rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

.nav a:hover,
.footer a:hover,
.contact-list a:hover,
.work-links a:hover {
  color: var(--navy);
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 33, 49, 0.08);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.lang-btn.is-active {
  background: var(--navy);
  color: white;
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.nav-cta,
.button.primary {
  color: white;
  background: linear-gradient(135deg, #16356b 0%, #446fb7 100%);
  box-shadow: 0 14px 30px rgba(31, 63, 120, 0.2);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
}

.nav-cta:hover,
.button:hover {
  transform: translateY(-1px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 34px;
  align-items: center;
  padding: 18px 0 48px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--navy);
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-size: 0.74rem;
}

.hero h1,
.section-head h2,
.about-card h2,
.contact-card h2,
.not-found-card h1 {
  margin: 0;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.hero h1 {
  max-width: 10ch;
  font-size: clamp(3.2rem, 7vw, 6.2rem);
}

.hero h1 span {
  display: block;
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  color: #36517c;
}

.hero-text {
  max-width: 60ch;
  margin: 24px 0 0;
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.signal-row span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(24, 33, 49, 0.07);
  font-size: 0.9rem;
}

.hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.75fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  min-height: 720px;
}

.hero-grid-card,
.work-card,
.principle-card,
.collab-card,
.about-card,
.contact-card {
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.hero-grid-card {
  overflow: hidden;
  border-radius: 30px;
}

.hero-grid-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-grid-card-main {
  grid-row: 1 / span 2;
}

.hero-card-head,
.mini-card-copy {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 18px 10px;
}

.hero-card-head span,
.mini-card-copy span {
  font-size: 0.82rem;
}

.mini-card-copy {
  flex-direction: column;
  align-items: flex-start;
  padding-bottom: 8px;
}

.mini-card-copy strong,
.hero-card-head strong,
.work-card h3,
.principle-card h3,
.collab-card h3 {
  font-size: 1.34rem;
  letter-spacing: -0.03em;
}

.section {
  padding: 56px 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 26px;
}

.section-head h2 {
  font-size: clamp(2.2rem, 4vw, 4rem);
}

.section-head p {
  margin-top: 14px;
  line-height: 1.75;
}

.left-align {
  margin-bottom: 0;
}

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

.work-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-radius: var(--radius-xl);
  padding: 24px;
}

.work-card-featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: 24px;
}

.pill-row,
.work-links,
.footer-links,
.footer-main,
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--navy-soft);
  color: var(--navy);
  font-size: 0.8rem;
  font-weight: 800;
}

.pill.subtle {
  background: rgba(24, 33, 49, 0.07);
  color: #526177;
}

.work-points {
  margin: 0;
  padding-left: 18px;
  line-height: 1.8;
}

.work-links a {
  color: var(--navy);
  font-weight: 700;
}

.phone-pair {
  position: relative;
  min-height: 520px;
}

.phone-shot {
  position: absolute;
  top: 0;
  width: min(44%, 300px);
  margin: 0;
  padding: 10px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(24, 33, 49, 0.08);
  box-shadow: 0 30px 80px rgba(20, 30, 48, 0.12);
}

.phone-shot img,
.mini-shot img,
.fulu-shot img {
  width: 100%;
  border-radius: 26px;
}

.phone-shot.offset {
  right: 0;
  top: 60px;
}

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

.mini-shot,
.fulu-shot {
  margin: 0;
  padding: 8px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(24, 33, 49, 0.08);
}

.fulu-shot {
  padding: 10px;
}

.github-callout {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(31, 63, 120, 0.08), rgba(216, 235, 226, 0.16));
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
}

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

.principle-card,
.collab-card,
.about-card,
.contact-card {
  border-radius: var(--radius-xl);
  padding: 24px;
}

.collaboration-grid,
.about-contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.collab-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
  line-height: 1.8;
}

.contact-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.contact-list a {
  font-weight: 700;
  color: #243244;
}

.footer {
  display: grid;
  gap: 14px;
  padding: 28px 0 18px;
  font-size: 0.92rem;
}

.footer-main,
.footer-links,
.footer-legal {
  row-gap: 8px;
}

.footer-legal {
  padding-top: 12px;
  border-top: 1px solid rgba(24, 33, 49, 0.08);
  font-size: 0.88rem;
}

.not-found-page {
  min-height: 100vh;
}

.not-found-shell {
  width: min(calc(100% - 32px), 860px);
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 0;
}

.not-found-card {
  width: 100%;
  background: var(--surface-strong);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 34px;
  box-shadow: var(--shadow);
  padding: 40px;
}

.not-found-code {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.not-found-card h1 {
  max-width: 12ch;
  font-size: clamp(2.7rem, 6vw, 5rem);
}

.not-found-card p {
  max-width: 54ch;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

@media (max-width: 1140px) {
  .hero,
  .split-layout,
  .work-card-featured,
  .about-contact {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    grid-template-columns: 1fr 1fr;
    min-height: auto;
  }

  .hero-grid-card-main {
    grid-column: 1 / span 2;
    grid-row: auto;
  }

  .work-grid,
  .principle-grid,
  .collaboration-grid {
    grid-template-columns: 1fr 1fr;
  }

  .work-card-featured {
    grid-column: span 1;
  }

  .phone-pair {
    min-height: 470px;
  }
}

@media (max-width: 760px) {
  .site-shell,
  .not-found-shell {
    width: min(calc(100% - 20px), var(--container));
  }

  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    border-radius: 24px;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 14px;
    font-size: 0.86rem;
  }

  .topbar-tools {
    margin-left: auto;
  }

  .nav-cta {
    display: none;
  }

  .hero {
    gap: 22px;
    padding-top: 8px;
  }

  .hero h1 {
    max-width: none;
  }

  .hero-stage,
  .work-grid,
  .principle-grid,
  .collaboration-grid,
  .about-contact,
  .stacked-previews {
    grid-template-columns: 1fr;
  }

  .hero-grid-card-main {
    grid-column: auto;
  }

  .phone-pair {
    min-height: auto;
    display: grid;
    gap: 14px;
  }

  .phone-shot,
  .phone-shot.offset {
    position: static;
    width: 100%;
  }

  .footer {
    gap: 12px;
  }

  .not-found-card {
    padding: 28px 22px;
    border-radius: 26px;
  }
}
