
:root {
    --bg: #f7f7f5;
    --surface: #ffffff;
    --text: #111111;
    --muted: #707070;
    --line: #deded9;
    --accent: #111111;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.7;
}

a { color: inherit; }

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(247,247,245,.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: "Space Grotesk", sans-serif;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -.04em;
    text-decoration: none;
}

.back {
    text-decoration: none;
    font-size: 14px;
    color: var(--muted);
}

.container-custom {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.hero {
    padding: 100px 0 80px;
    border-bottom: 1px solid var(--line);
}

.kicker {
    margin: 0 0 18px;
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.hero h1 {
    max-width: 850px;
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(44px, 8vw, 88px);
    line-height: .98;
    letter-spacing: -.055em;
    font-weight: 600;
}

.hero-lead {
    max-width: 720px;
    margin: 34px 0 0;
    font-size: 20px;
    color: #4f4f4f;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 30px;
}

.meta span, .tag {
    display: inline-flex;
    padding: 6px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-size: 13px;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 30px;
}

.project-links a {
    text-decoration: none;
    border-bottom: 1px solid #111;
}

.cover {
    margin-top: 70px;
    min-height: 430px;
    border: 1px solid var(--line);
    background: #ecece8;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.cover img {
    width: 100%;
    height: auto;
    display: block;
    min-width: 451px;
}

.placeholder {
    width: 100%;
    min-height: 430px;
    display: grid;
    place-items: center;
    text-align: center;
    color: #777;
    padding: 30px;
}

.content {
    display: grid;
    grid-template-columns: 180px minmax(0, 760px);
    gap: 60px;
    padding: 90px 0;
}

.content + .content {
    border-top: 1px solid var(--line);
}

.section-num {
    font-size: 13px;
    color: var(--muted);
    position: sticky;
    top: 100px;
    align-self: start;
}

.content h2 {
    margin: 0 0 24px;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.content h3 {
    margin: 44px 0 14px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 24px;
}

.content p { margin: 0 0 20px; color: #3f3f3f; }

.content ul { padding-left: 22px; color: #3f3f3f; }

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 28px;
}

.figure {
    margin: 38px 0;
    border: 1px solid var(--line);
    background: #ecece8;
}

.figure img {
    display: block;
    width: 100%;
}

.figure figcaption {
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

.code {
    overflow-x: auto;
    padding: 22px;
    margin: 28px 0;
    background: #171717;
    color: #eee;
    border-radius: 4px;
    font: 13px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.note {
    margin: 28px 0;
    padding: 22px 24px;
    border-left: 3px solid #111;
    background: #fff;
}

.footer {
    border-top: 1px solid var(--line);
    padding: 50px 0 80px;
    color: var(--muted);
}

@media (max-width: 760px) {
    .container-custom { width: min(100% - 28px, 1120px); }
    .hero { padding: 70px 0 55px; }
    .hero-lead { font-size: 17px; }
    .cover, .placeholder { min-height: 260px; }
    .content {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 60px 0;
    }
    .section-num { position: static; }
    .content h3 { margin-top: 34px; }
}

/* Language switcher */
.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: 22px;
  white-space: nowrap;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}
.language-switcher a {
  color: inherit;
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}
.language-switcher a:hover,
.language-switcher a.active {
  opacity: 1;
}
.language-switcher span {
  opacity: 0.25;
}
