:root {
    --bg: #0d1117;
    --panel: #161b22;
    --border: #30363d;
    --text: #e6edf3;
    --muted: #8b949e;
    --accent: #58a6ff;
    --nav-h: 56px;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 16px);
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header / nav */
header {
    position: sticky;
    top: 0;
    z-index: 10;
    height: var(--nav-h);
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.nav {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
}
.logo:hover { text-decoration: none; }

.nav-links { display: flex; gap: 4px; margin-left: auto; }

.nav-links a {
    color: var(--muted);
    padding: 8px 12px;
    border-radius: 6px;
}
.nav-links a:hover {
    color: var(--text);
    background: var(--panel);
    text-decoration: none;
}

/* Language switcher */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--panel);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}
.lang-switch:hover {
    color: var(--text);
    border-color: var(--accent);
    text-decoration: none;
}

.lang-switch .flag {
    display: block;
    width: auto;
    height: 13px;
    border-radius: 2px;
}

/* Sections */
section {
    padding: 80px 0;
    border-bottom: 1px solid var(--border);
}
section:last-of-type { border-bottom: none; }

h2 {
    font-size: 28px;
    margin: 0 0 24px;
}

.tribe-icon {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    vertical-align: -6px;
}

/* Hero / About */
#about h1 {
    font-size: clamp(36px, 7vw, 72px);
    margin: 0 0 8px;
}

#about .subtitle {
    color: var(--text);
    font-size: 20px;
    margin: 0 0 6px;
}

#about .roles {
    color: var(--muted);
    font-weight: 600;
    margin: 0 0 20px;
}

#about p { max-width: 640px; }
#about .chips { max-width: 640px; }

.interests {
    max-width: 640px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.interests h3 {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.interests .chips { margin-bottom: 0; }
.interests .chips li { color: var(--accent); }

code {
    color: var(--accent);
    font-size: 0.9em;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }

/* Tribe */
.tribe {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.tribe p { margin: 0 0 16px; color: var(--muted); }
.tribe p.lead { color: var(--text); font-size: 18px; }

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}
.chips li {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    color: var(--muted);
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: var(--bg);
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
}
.btn:hover { text-decoration: none; filter: brightness(1.12); }

.tribe-shot {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: 12px;
}

/* Contacts */
.contacts {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 480px;
}

.contacts a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 20px;
    color: var(--text);
			margin: 5px;
}
.contacts a:hover {
    border-color: var(--accent);
    text-decoration: none;
}
.contacts span { color: var(--muted); font-size: 14px; }

footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

footer p { margin: 0 0 6px; }
footer p:last-child { margin: 0; }

@media (max-width: 760px) {
    .tribe { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 520px) {
    section { padding: 56px 0; }
    .nav-links { font-size: 14px; }
    .nav-links a { padding: 8px 6px; white-space: nowrap; }
    .logo-text { display: none; }
    .nav { gap: 8px; }
    .lang-switch { padding: 5px 8px; }
    .lang-switch span { display: none; }
}
