/* ====== Base ====== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #e5ecff;
    background: #050814;
    position: relative;
    overflow-x: hidden;
}

/* фон с лёгкой 3D-текстурой */
.page-bg {
    position: fixed;
    inset: -40px;
    background:
        radial-gradient(circle at 0% 0%, rgba(52, 172, 224, 0.20), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(155, 89, 182, 0.18), transparent 55%),
        radial-gradient(circle at 20% 80%, rgba(46, 204, 113, 0.12), transparent 60%),
        linear-gradient(145deg, #020411, #050814, #060b1c);
    filter: blur(0.2px);
    z-index: -2;
}

/* лёгкий шум для глубины */
.page-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='noStitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
    pointer-events: none;
}

/* ====== Layout helpers ====== */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.4rem;
}

.section {
    padding: 5rem 0;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

/* ====== Header ====== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    background: linear-gradient(to bottom, rgba(5, 10, 30, 0.95), rgba(5, 10, 30, 0.65));
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.9rem;
}
.logo-img {
    width: 62px;
    height: 62px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

.logo-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 20%, #8bd5ff, #3e9cff);
    box-shadow: 0 0 12px rgba(62, 156, 255, 0.7);
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    font-size: 0.9rem;
    text-decoration: none;
    color: #d7e2ff;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.07);
}

/* ====== Buttons ====== */
.btn-primary,
.btn-ghost,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.4rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #22c1c3);
    color: #f9fbff;
    box-shadow: 0 18px 35px rgba(23, 121, 255, 0.45);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(23, 121, 255, 0.6);
}

.btn-ghost {
    border: 1px solid rgba(148, 163, 184, 0.6);
    color: #e5ecff;
    background: transparent;
}

.btn-ghost:hover {
    background: rgba(15, 23, 42, 0.75);
}

.btn-outline {
    border: 1px solid rgba(94, 234, 212, 0.7);
    color: #a5f3fc;
    background: transparent;
}

.btn-outline:hover {
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.15), rgba(56, 189, 248, 0.18));
}

/* ====== Hero ====== */
.hero {
    padding: 4.5rem 0 3rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
    gap: 3rem;
    align-items: center;
}

.hero-photo-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-ring {
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: conic-gradient(from 140deg, #22c1c3, #3b82f6, #6366f1, #22c1c3);
    opacity: 0.85;
    filter: blur(1px);
    animation: spin 14s linear infinite;
}

.photo-card {
    position: relative;
    width: 230px;
    height: 310px;
    border-radius: 26px;
    padding: 6px;
    background: radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.6), rgba(15, 23, 42, 0.98));
    box-shadow:
        0 22px 40px rgba(15, 23, 42, 0.9),
        0 0 0 1px rgba(148, 163, 184, 0.2);
    transform: translateY(0);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 26px 50px rgba(15, 23, 42, 0.95),
        0 0 0 1px rgba(148, 163, 184, 0.25);
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 22px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.hero-content {
    max-width: 560px;
}

.hero-kicker {
    font-size: 0.85rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 0.75rem;
}

.hero h1 {
    font-size: clamp(2.2rem, 3vw, 2.7rem);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.accent {
    color: #38bdf8;
}

.hero-text {
    font-size: 0.98rem;
    color: #cbd5f5;
    max-width: 32rem;
    line-height: 1.7;
}

.hero-actions {
    margin-top: 1.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.hero-badges {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.badge {
    padding: 0.8rem 1rem;
    border-radius: 16px;
    background: radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.45), rgba(15, 23, 42, 0.95));
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.9);
    min-width: 110px;
}

.badge-number {
    display: block;
    font-size: 1.3rem;
    font-weight: 600;
}

.badge-label {
    font-size: 0.8rem;
    color: #cbd5f5;
}

/* ====== Cards (glassmorphism) ====== */
.glass-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.82));
    border-radius: 26px;
    padding: 1.8rem 1.8rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.95),
        0 0 0 1px rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(16px);
}

.glass-card h2,
.glass-card h3 {
    margin-bottom: 0.8rem;
}

.glass-card p {
    font-size: 0.95rem;
    color: #d1ddff;
    line-height: 1.7;
}

/* ====== About section ====== */
.section-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr);
    gap: 2rem;
}

.mini-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
}

.mini-card {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 20px;
    padding: 1.3rem 1.4rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.mini-card h3 {
    font-size: 1rem;
    margin-bottom: 0.6rem;
}

.mini-card p,
.mini-card li {
    font-size: 0.9rem;
    color: #d1ddff;
}

.mini-card ul {
    margin-left: 1.1rem;
    list-style: disc;
}

/* ====== Skills ====== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.tag-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.6rem;
}

.tag-list li {
    font-size: 0.85rem;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.85);
}

/* ====== Experience (timeline) ====== */
.timeline {
    display: grid;
    gap: 1.3rem;
}

.timeline-item ul {
    margin-top: 0.6rem;
    margin-left: 1.2rem;
    list-style: disc;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.timeline-role {
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 0.3rem;
}

.timeline-period {
    font-size: 0.85rem;
    color: #9ca3af;
}

/* ====== Contact ====== */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 1.8rem;
}

.contact-list {
    list-style: none;
    margin: 1rem 0 1.4rem;
}

.contact-list li {
    font-size: 0.92rem;
    margin-bottom: 0.3rem;
}

.contact-list span {
    color: #9ca3af;
    margin-right: 0.3rem;
}

/* letter page */
.letter-card h1 {
    margin-bottom: 1.4rem;
}

.letter-card p {
    margin-bottom: 1rem;
}

.letter-sign {
    margin-top: 1.2rem;
    line-height: 1.6;
}

.letter-actions {
    margin-top: 1.5rem;
}

/* ====== Footer ====== */
.site-footer {
    padding: 1.4rem 0 1.8rem;
    border-top: 1px solid rgba(15, 23, 42, 0.95);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #9ca3af;
}

/* ====== Responsive ====== */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .hero-photo-wrap {
        order: -1;
        margin-bottom: 2rem;
    }

    .section-grid,
    .skills-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .nav-links {
        justify-content: flex-start;
    }

    .photo-ring {
        width: 220px;
        height: 220px;
    }

    .photo-card {
        width: 200px;
        height: 280px;
    }

    .section {
        padding: 3.5rem 0;
    }

    .glass-card {
        padding: 1.5rem 1.3rem;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
}
