:root {
  --brand: #1677FF;
  --ink: #0B1E3F;
  --paper: #FFFFFF;
  --muted: #5B6B85;
  --rule: #D6DEEC;
  --tint: #EEF4FF;

  --font: "Inter Tight", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 62ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #FFFFFF;
    --paper: #0B1E3F;
    --muted: #A9B6CC;
    --rule: #22365C;
    --tint: #10274D;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand);
  text-decoration: none;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration: underline; }

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

h1, h2, h3, p, dl, dd { margin: 0; }

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px var(--gutter);
}

.brand, .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand-mark { width: 34px; height: 34px; display: block; }

.brand-word {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  position: relative;
  top: 1px;
}

.lang {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 3px;
}

.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Hero ---------- */

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  padding: clamp(40px, 8vw, 112px) 0 clamp(56px, 9vw, 128px);
}

.hero h1 {
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
  max-width: 20ch;
  text-wrap: balance;
}

.lede {
  margin-top: 28px;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 48ch;
}

.hero-mark { display: flex; justify-content: flex-end; }

.hero-q {
  width: 100%;
  max-width: 400px;
  height: auto;
  aspect-ratio: 1;
  display: block;
  overflow: visible;
}

.hero-q .q-card {
  translate: 0 0;
  opacity: 1;
  animation: card-in 900ms cubic-bezier(0.2, 0.8, 0.2, 1) 250ms both;
}

@keyframes card-in {
  from { translate: 46px 66px; opacity: 0; }
  to   { translate: 0 0; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-q .q-card { animation: none; }
  .lang-btn { transition: none; }
}

/* ---------- Sections ---------- */

h2 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.projects { padding-bottom: clamp(48px, 7vw, 96px); }

.project {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 24px clamp(24px, 5vw, 72px);
  align-items: start;
  padding: clamp(32px, 4vw, 48px) 0;
  border-top: 1px solid var(--rule);
}
.projects h2 + .project { margin-top: 32px; }

.project-head {
  display: flex;
  align-items: center;
  gap: 18px;
}

.project-icon {
  flex: none;
  width: 64px;
  height: 64px;
  padding: 4px;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--rule);
  object-fit: contain;
}

.project-name {
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--brand);
}

.project-body { max-width: var(--measure); }

.project-tag {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-bottom: 14px;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, max-content));
  gap: 16px 40px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px dashed var(--rule);
  font-size: 15px;
}
.project-meta dt { color: var(--muted); }
.project-meta dd { font-weight: 500; }

.principles {
  padding: clamp(48px, 7vw, 96px) 0;
  border-top: 1px solid var(--rule);
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px clamp(24px, 4vw, 56px);
  margin-top: 40px;
}

.principles h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}
.principles p { color: var(--muted); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--tint);
  padding: clamp(40px, 6vw, 72px) var(--gutter);
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 1fr);
  gap: 32px clamp(24px, 5vw, 72px);
  align-items: start;
}

.footer-company {
  font-style: normal;
  display: grid;
  gap: 4px;
  font-size: 15px;
  color: var(--muted);
}
.footer-company strong { color: var(--ink); font-weight: 600; font-size: 17px; }

.footer-links {
  display: grid;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  justify-self: end;
  text-align: right;
}

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 24px;
  }
  .hero-mark { order: -1; justify-content: flex-start; }
  .hero-q { max-width: 160px; }

  .project { grid-template-columns: 1fr; gap: 16px; }
  .project-icon { width: 52px; height: 52px; border-radius: 13px; }
  .project-head { gap: 14px; }
  .principles-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-links { justify-self: start; text-align: left; }
}

@media (max-width: 420px) {
  .lang-btn { padding: 6px 10px; }
  .brand-word { font-size: 22px; }
}
