@font-face { font-family: Sora; src: url(/fonts/sora.woff2) format('woff2'); font-weight: 100 800; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/inter.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef0fb;
  --text: #161827;
  --muted: #5b5f78;
  --line: #e3e5f0;
  --brand: #4f6bff;
  --brand-strong: #3d4ff2;
  --mark-back: rgba(79, 107, 255, 0.35);
  --mark-mid: rgba(79, 107, 255, 0.65);
  --shadow: 0 1px 2px rgba(22, 24, 39, 0.04), 0 8px 24px rgba(22, 24, 39, 0.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f17;
    --surface: #161827;
    --surface-2: #1c1f33;
    --text: #eceefa;
    --muted: #9ea3c0;
    --line: #262a42;
    --brand: #7486ff;
    --brand-strong: #8b9bff;
    --mark-back: rgba(116, 134, 255, 0.35);
    --mark-mid: rgba(116, 134, 255, 0.7);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand { font-family: Sora, Inter, system-ui, sans-serif; letter-spacing: -0.02em; line-height: 1.2; }
a { color: var(--brand); }
img { max-width: 100%; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

/* Logo */
.mark { display: block; }
.mark-back, .mark-mid { fill: none; stroke-width: 4.5; }
.mark-back { stroke: var(--mark-back); }
.mark-mid { stroke: var(--mark-mid); }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 1.1rem; font-weight: 500; white-space: nowrap; }
.brand .mark { width: 34px; height: 34px; }
.brand b { font-weight: 700; color: var(--brand); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.93rem; font-weight: 500; padding: 8px 10px; border-radius: 8px; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav .lang { border: 1px solid var(--line); margin-left: 6px; }
@media (max-width: 640px) { .nav a:not(.lang) { display: none; } }

/* Hero */
.hero { padding: 56px 0 40px; overflow: hidden; }
.hero-inner { display: grid; gap: 32px; align-items: center; }
@media (min-width: 880px) { .hero { padding: 96px 0 72px; } .hero-inner { grid-template-columns: 1.25fr 1fr; gap: 48px; } }
.kicker { display: inline-block; margin: 0 0 16px; padding: 4px 12px; border-radius: 99px; background: var(--surface-2); color: var(--brand-strong); font-size: 0.85rem; font-weight: 600; }
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); font-weight: 700; margin: 0 0 20px; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 40em; margin: 0 0 28px; }
.button { display: inline-block; padding: 13px 22px; border-radius: 12px; background: linear-gradient(135deg, #6d7dff, #3d4ff2); color: #fff; font-weight: 600; text-decoration: none; box-shadow: 0 6px 20px rgba(61, 79, 242, 0.3); transition: transform 0.15s; }
.button:hover { transform: translateY(-1px); }
.hero-art { position: relative; width: min(100%, 380px); aspect-ratio: 1; margin: 0 auto; }
.hero-art .mark { width: 72%; height: 72%; position: absolute; inset: 14%; }
.float { position: absolute; width: 18%; border-radius: 22%; box-shadow: var(--shadow); animation: bob 6s ease-in-out infinite; }
.f0 { top: 2%; left: 6%; }
.f1 { top: 0; right: 4%; animation-delay: -1.2s; }
.f2 { bottom: 4%; left: 0; animation-delay: -2.4s; }
.f3 { bottom: 0; right: 10%; animation-delay: -3.6s; }
.f4 { top: 42%; right: -2%; width: 15%; animation-delay: -4.8s; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(3deg); } }
@media (max-width: 879px) { .hero-art { width: min(70%, 300px); } }
@media (prefers-reduced-motion: reduce) { .float { animation: none; } html { scroll-behavior: auto; } }

/* Projects */
.projects { padding: 32px 0 24px; }
.group { margin-bottom: 48px; }
.group-head { margin-bottom: 20px; }
.group-head h2 { font-size: 1.7rem; margin: 0 0 6px; }
.group-head p { margin: 0; color: var(--muted); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); transition: transform 0.15s, border-color 0.15s; }
.card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.card::before { content: ''; position: absolute; inset: 0 22px auto; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.card-head img { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.card h3 { margin: 0; font-size: 1.25rem; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a::after { content: ''; position: absolute; inset: 0; border-radius: 18px; }
.tag { margin: 2px 0 0; color: var(--muted); font-size: 0.9rem; }
.card > p { margin: 0 0 16px; flex: 1; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 16px; }
.badges li { font-size: 0.78rem; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.card-cta { position: relative; z-index: 1; font-weight: 600; text-decoration: none; color: var(--brand-strong); }
.card-cta:hover { text-decoration: underline; }

/* Studio */
.studio { padding: 56px 0; background: var(--surface); border-block: 1px solid var(--line); }
.studio-inner { display: grid; gap: 32px; }
@media (min-width: 880px) { .studio-inner { grid-template-columns: 1fr 1.2fr; gap: 56px; } }
.studio h2 { font-size: 1.7rem; margin: 0 0 16px; }
.studio p { color: var(--muted); font-size: 1.05rem; }
.values { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.values li { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.values h3 { margin: 0 0 6px; font-size: 1.02rem; }
.values p { margin: 0; font-size: 0.95rem; }

/* Contact */
.contact { padding: 56px 0; text-align: center; }
.contact h2 { font-size: 1.7rem; margin: 0 0 10px; }
.contact p { color: var(--muted); margin: 0; overflow-wrap: anywhere; }
.contact a { font-weight: 600; }

/* Legal pages */
.prose { max-width: 760px; padding-top: 40px; padding-bottom: 56px; }
.prose h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.prose h2 { font-size: 1.2rem; margin: 32px 0 8px; }
.prose dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0; }
.prose dt { color: var(--muted); }
.prose dd { margin: 0; overflow-wrap: anywhere; }
.back { display: inline-block; margin-bottom: 24px; text-decoration: none; font-weight: 500; }
.muted { color: var(--muted); font-size: 0.9rem; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: 0.88rem; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.foot-links { display: flex; flex-wrap: wrap; gap: 16px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }
