:root {
    --line: rgba(233, 241, 248, 0.14);
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }

body {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--deep), var(--night)) fixed;
    color: var(--frost);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
}

/* Снег */
body::before, body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}
body::before {
    background-image:
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(1.5px 1.5px at 90px 140px, #fff, transparent),
        radial-gradient(2.5px 2.5px at 160px 70px, #fff, transparent),
        radial-gradient(1px 1px at 230px 200px, #fff, transparent),
        radial-gradient(2px 2px at 270px 260px, #fff, transparent);
    background-size: 300px 300px;
    opacity: 0.5;
    animation: fall 28s linear infinite;
}
body::after {
    background-image:
        radial-gradient(3px 3px at 60px 80px, #fff, transparent),
        radial-gradient(2px 2px at 220px 190px, #fff, transparent),
        radial-gradient(3px 3px at 380px 330px, #fff, transparent);
    background-size: 500px 500px;
    opacity: 0.22;
    animation: fall-large 52s linear infinite;
}
@keyframes fall { to { background-position: 0 300px; } }
@keyframes fall-large { to { background-position: 0 500px; } }

.glow {
    position: fixed;
    right: -10vmax;
    bottom: -14vmax;
    width: 60vmax;
    height: 60vmax;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--lamp-rgb), 0.26), transparent 65%);
    pointer-events: none;
    animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: 0.6; transform: scale(1.06); } }

.wrap {
    position: relative;
    z-index: 1;
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 5vw, 2.5rem);
}

/* Шапка */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.75rem 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--frost);
    font-family: var(--serif);
    font-size: 1.3rem;
    text-decoration: none;
}
.brand::before {
    content: "";
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--lamp);
    box-shadow: 0 0 0.9rem 0.15rem rgba(var(--lamp-rgb), 0.6);
}
nav { display: flex; flex-wrap: wrap; gap: clamp(0.9rem, 3vw, 1.75rem); }
nav a {
    color: var(--mist);
    text-decoration: none;
    transition: color 0.2s;
}
nav a:hover, nav a.active { color: var(--frost); }
nav a.lang { color: var(--lamp); }

/* Приветствие */
.hero {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: clamp(1.5rem, 5vw, 4rem);
    padding: clamp(3rem, 12vh, 7rem) 0 clamp(3rem, 8vh, 5rem);
}
.hero-text { order: 1; }
h1 {
    font-family: var(--serif);
    font-size: clamp(2.6rem, 8vw, 5.5rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.02em;
}
h1 span { color: var(--lamp); }
.lead {
    max-width: 34rem;
    margin-top: 1.25rem;
    color: var(--mist);
    font-size: 1.2rem;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--frost);
    font-weight: 500;
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--lamp); }
.btn.primary { background: var(--lamp); border-color: var(--lamp); color: var(--night); }
.btn.primary:hover { filter: brightness(1.1); }

.avatar {
    order: 2;
    display: grid;
    place-items: center;
    width: clamp(7rem, 20vw, 14rem);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: radial-gradient(circle at 30% 25%, #24405f, var(--deep));
    font-family: var(--serif);
    font-size: clamp(3rem, 9vw, 6rem);
    color: var(--lamp);
    box-shadow: 0 0 4rem rgba(var(--lamp-rgb), 0.18);
}

/* Карточки */
h2 {
    margin-bottom: 1.25rem;
    color: var(--mist);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
}
.card {
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.035);
    transition: border-color 0.3s, transform 0.3s;
}
.card:hover { border-color: rgba(var(--lamp-rgb), 0.5); transform: translateY(-3px); }
.card h3 { margin-bottom: 0.4rem; font-family: var(--serif); font-size: 1.35rem; font-weight: 400; }
.card p { color: var(--mist); }

/* Подвал */
footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-top: clamp(3rem, 10vh, 6rem);
    padding: 1.75rem 0 2.5rem;
    border-top: 1px solid var(--line);
    color: var(--mist);
    font-size: 0.95rem;
}
.social { display: flex; gap: 1.25rem; }
.social a { color: var(--mist); text-decoration: none; transition: color 0.2s; }
.social a:hover { color: var(--lamp); }

@media (max-width: 640px) {
    .hero { grid-template-columns: 1fr; }
    .avatar { order: 0; }
}
@media (prefers-reduced-motion: reduce) {
    body::before, body::after, .glow { animation: none; }
    .btn, .card { transition: none; }
}