:root {
    --bg: #0c0709;
    --bg-elevated: #1a0e13;
    --bg-card: #21131a;
    --text: #eef2ff;
    --text-muted: #d1b7c1;
    --accent: #ff384f;
    --accent-soft: #ff6c7b;
    --border: #4a2730;
    --shadow: 0 18px 38px rgba(0, 0, 0, 0.35);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

body {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 66, 88, 0.24), transparent 36%),
        radial-gradient(circle at 85% 85%, rgba(143, 39, 67, 0.2), transparent 34%),
        linear-gradient(160deg, #080507 0%, #12080d 52%, #170b11 100%);
    display: flex;
    flex-direction: column;
    position: relative;
}

body::before,
body::after {
    content: "";
    position: fixed;
    left: 0;
    width: 100%;
    height: 110px;
    pointer-events: none;
    z-index: 12;
}

body::before {
    top: 0;
    background: linear-gradient(180deg, rgba(10, 5, 8, 0.62) 0%, rgba(10, 5, 8, 0) 100%);
}

body::after {
    bottom: 0;
    background: linear-gradient(0deg, rgba(10, 5, 8, 0.65) 0%, rgba(10, 5, 8, 0) 100%);
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 34;
    pointer-events: none;
}

.scroll-progress__bar {
    width: 100%;
    height: 100%;
    transform-origin: left center;
    transform: scaleX(0);
    background: linear-gradient(90deg, rgba(255, 116, 132, 0.9), rgba(255, 70, 92, 0.95));
    box-shadow: 0 0 10px rgba(255, 88, 106, 0.5);
}

.wireframe-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    opacity: 0.9;
}

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

a:hover,
a:focus-visible {
    color: #ffffff;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(16, 8, 12, 0.88);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.site-header-inner {
    width: calc(100% - 4rem);
    margin: 0 auto;
    padding: 0.85rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.site-brand {
    color: #b14a65;
    font-family: inherit;
    font-size: 1rem;
    letter-spacing: 0;
}

.site-nav {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.site-nav a {
    color: var(--text-muted);
    padding: 0.4rem 0.72rem;
    border-radius: 999px;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
    color: #ffffff;
    background: rgba(255, 56, 79, 0.28);
}

main {
    width: calc(100vw - 4rem);
    margin: 2rem auto 3rem;
    flex: 1;
}

.home-main {
    width: calc(100vw - 4rem);
}

.wide-main {
    width: calc(100vw - 4rem);
}

.full-screen-main {
    width: calc(100vw - 4rem);
    min-height: calc(100vh - 88px - 74px);
    margin: 1.2rem auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    background: linear-gradient(180deg, rgba(36, 17, 25, 0.1), rgba(22, 10, 16, 0.08));
    border: 1px solid rgba(255, 196, 206, 0.22);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
    padding: clamp(1.25rem, 3vw, 2.25rem);
}

.error-full {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero {
    text-align: center;
    margin-bottom: 2rem;
}

.hero img {
    width: 136px;
    height: 136px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(255, 56, 79, 0.82);
    box-shadow: 0 12px 30px rgba(255, 56, 79, 0.32);
}

.profile-hero {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.4rem;
    align-items: stretch;
    margin-bottom: 1.35rem;
}

.profile-media {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 170, 182, 0.22);
    border-radius: var(--radius-md);
    background: rgba(28, 12, 18, 0.2);
    padding: 0;
    min-height: 260px;
    overflow: hidden;
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.profile-media img {
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
    object-position: center 26%;
    display: block;
    border: 0;
    box-shadow: none;
}

.profile-content {
    border: 1px solid rgba(255, 170, 182, 0.2);
    border-radius: var(--radius-md);
    background: rgba(29, 13, 19, 0.42);
    padding: 1.1rem 1.2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.eyebrow {
    margin: 0;
    color: var(--accent-soft);
    font-size: 0.84rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-title {
    margin: 0.35rem 0 0.2rem;
}

.profile-title,
.page-title {
    color: #ffffff;
}

.profile-summary {
    margin: 0;
    color: var(--text-muted);
    max-width: 58ch;
}

.profile-meta {
    margin: 1rem 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.profile-meta div {
    border: 1px solid rgba(255, 170, 182, 0.18);
    border-radius: var(--radius-sm);
    background: rgba(28, 13, 18, 0.44);
    padding: 0.55rem 0.65rem;
}

.profile-meta .meta-wide {
    grid-column: 1 / -1;
}

.profile-meta dt {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #c799a7;
}

.profile-meta dd {
    margin: 0.25rem 0 0;
    color: #f5dfe5;
    font-size: 0.96rem;
}

h1,
h2,
h3 {
    color: #ffffff;
    line-height: 1.25;
}

h1 {
    margin: 1rem 0 0.35rem;
    font-size: clamp(1.9rem, 4vw, 2.7rem);
}

.subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 1.02rem;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.card {
    border: 1px solid rgba(255, 170, 182, 0.2);
    border-radius: var(--radius-md);
    padding: 1rem;
    background: rgba(33, 16, 23, 0.46);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.card h2 {
    margin: 0 0 0.7rem;
    font-size: 1.25rem;
}

.card p {
    margin: 0;
    color: var(--text-muted);
}

.home-grid .card,
.interactive-cards .card {
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-grid {
    gap: 1.35rem;
}

.home-grid .card:hover,
.home-grid .card:focus-within,
.interactive-cards .card:hover,
.interactive-cards .card:focus-within {
        background: rgba(45, 20, 30, 0.56);
    border-color: rgba(255, 170, 182, 0.34);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.reveal-item {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    will-change: opacity, transform;
}

.reveal-item.is-visible {
    opacity: 1;
    transform: none;
}

.list-clean {
    margin: 0;
    padding: 0;
    list-style: none;
}

.list-clean li {
    margin-top: 0.75rem;
}

.list-clean li:first-child {
    margin-top: 0;
}

.pill-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1rem;
}

.pill-links a {
    border: 1px solid rgba(255, 170, 182, 0.2);
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    color: var(--text);
    background: rgba(35, 16, 23, 0.42);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.pill-links a:hover,
.pill-links a:focus-visible {
    border-color: rgba(255, 108, 123, 0.85);
    background: rgba(255, 56, 79, 0.24);
    transform: translateY(-1px) scale(1.04);
}

.site-footer {
    border-top: 1px solid var(--border);
    text-align: left;
    color: var(--text-muted);
    font-size: 0.95rem;
    padding: 1rem 0 1.4rem;
    position: relative;
    z-index: 8;
}

.site-footer-inner {
    width: calc(100% - 4rem);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer-copyright {
    margin: 0;
    color: var(--text-muted);
    white-space: nowrap;
}

.footer-contacts {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding-right: 0;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.1rem 0.2rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.contact-link svg {
    display: block;
}

.contact-link:hover,
.contact-link:focus-visible {
    color: #ffffff;
}

main {
    position: relative;
    z-index: 8;
}

@media (max-width: 820px) {
    .site-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .site-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-contacts {
        width: 100%;
        justify-content: flex-start;
    }

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

    .profile-hero {
        grid-template-columns: 1fr;
    }

    .profile-media {
        min-height: 300px;
    }

    .profile-meta {
        grid-template-columns: 1fr;
    }

}

@media (prefers-reduced-motion: reduce) {
    .home-grid .card,
    .interactive-cards .card,
    .project-post {
        transition: none;
    }

    .home-grid .card:hover,
    .home-grid .card:focus-within,
    .interactive-cards .card:hover,
    .interactive-cards .card:focus-within,
    .project-post:hover,
    .project-post:focus-within {
        transform: none;
    }

    .reveal-item {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .site-nav a,
    .pill-links a {
        transition: none;
    }

    .site-nav a:hover,
    .site-nav a:focus-visible,
    .site-nav a[aria-current="page"],
    .pill-links a:hover,
    .pill-links a:focus-visible {
        transform: none;
    }
}
