:root {
    --night: #0b120d;
    --ink: #142016;
    --moss: #263d28;
    --forest: #3f673d;

    --gold: #d4ad57;
    --gold-light: #f1d486;
    --gold-dark: #765823;

    --wine: #8b3044;
    --plum: #76508a;
    --walnut: #9a6844;

    --cream: #f4e8c3;
    --white: #fff8dd;

    --display-font: 'IM Fell English SC', Georgia, serif;
    --body-font: 'Alegreya', Georgia, serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--cream);
    font-family: var(--body-font);
    background:
        linear-gradient(
            rgba(10, 19, 12, 0.88),
            rgba(10, 19, 12, 0.97)
        ),
        url('assets/background.png') center / cover fixed,
        var(--night);
}

/* Общая зернистая геометрическая текстура фона */
body::before {
    position: fixed;
    z-index: -2;
    inset: 0;
    content: '';
    pointer-events: none;
    opacity: 0.42;
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(241, 212, 134, 0.07) 0 1px,
            transparent 1px 48px
        ),
        repeating-linear-gradient(
            -45deg,
            rgba(241, 212, 134, 0.06) 0 1px,
            transparent 1px 48px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(241, 212, 134, 0.035) 0 1px,
            transparent 1px 10px
        );
}

/* Затемнение краев страницы */
body::after {
    position: fixed;
    z-index: 10;
    inset: 0;
    content: '';
    pointer-events: none;
    box-shadow:
        inset 0 0 110px rgba(0, 0, 0, 0.75),
        inset 0 0 0 1px rgba(212, 173, 87, 0.13);
}

a {
    color: inherit;
}

::selection {
    color: var(--night);
    background: var(--gold-light);
}

.page-shell {
    width: min(100% - 32px, 680px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 48px 0 35px;
}

/* Небольшая верхняя часть страницы */
.site-header {
    position: relative;
    padding: 24px 20px 29px;
    text-align: center;
}

.site-header::before,
.site-header::after {
    position: absolute;
    right: 0;
    left: 0;
    height: 1px;
    content: '';
    background: linear-gradient(
        90deg,
        transparent,
        rgba(212, 173, 87, 0.7),
        transparent
    );
}

.site-header::before {
    top: 0;
}

.site-header::after {
    bottom: 0;
}

.avatar {
    width: 86px;
    height: 86px;
    margin: 0 auto 18px;
    overflow: hidden;
    border: 1px solid var(--gold);
    border-radius: 50%;
    background:
        radial-gradient(
            circle at 45% 35%,
            var(--wine),
            var(--plum) 45%,
            var(--night) 75%
        );
    box-shadow:
        0 0 0 5px rgba(13, 22, 15, 0.78),
        0 0 0 6px rgba(212, 173, 87, 0.32),
        0 0 22px rgba(212, 173, 87, 0.28);
}

.avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-kicker {
    color: var(--gold);
    font-size: 0.75rem;
    letter-spacing: 0.22em;
}

.site-header h1 {
    margin-top: 8px;
    color: var(--gold-light);
    font-family: var(--display-font);
    font-size: clamp(2.25rem, 8vw, 4rem);
    font-weight: 400;
    line-height: 1;
    text-shadow:
        0 2px 0 var(--gold-dark),
        0 0 18px rgba(212, 173, 87, 0.46),
        0 5px 12px rgba(0, 0, 0, 0.72);
}

.header-description {
    max-width: 430px;
    margin: 16px auto 0;
    color: rgba(244, 232, 195, 0.84);
    font-size: 1.05rem;
    line-height: 1.4;
}

.ornament {
    display: flex;
    justify-content: center;
    gap: 13px;
    margin-top: 19px;
    color: var(--gold);
    font-family: Georgia, serif;
    font-size: 0.85rem;
    text-shadow: 0 0 10px rgba(212, 173, 87, 0.7);
}

.ornament span:nth-child(2) {
    color: var(--gold-light);
}

/* Вертикальный список ресурсов */
.link-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 31px 0 12px;
}

.resource-link {
    --accent: var(--gold);
    --accent-soft: rgba(212, 173, 87, 0.46);
    --accent-glow: rgba(212, 173, 87, 0.22);

    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 78px;
    padding: 15px 18px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid var(--accent-soft);
    border-radius: 3px;
    background:
        linear-gradient(
            105deg,
            rgba(45, 73, 43, 0.87),
            rgba(14, 27, 16, 0.94)
        );
    box-shadow:
        0 9px 19px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 248, 221, 0.08);
    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        background 0.22s ease;
}

/* Тонкая светящаяся линия сверху каждой ссылки */
.resource-link::before {
    position: absolute;
    top: 0;
    right: 18px;
    left: 18px;
    height: 1px;
    content: '';
    background: linear-gradient(
        90deg,
        transparent,
        var(--accent),
        transparent
    );
    box-shadow: 0 0 12px var(--accent-glow);
}

/* Маленький декоративный круг в правом нижнем углу */
.resource-link::after {
    position: absolute;
    right: -22px;
    bottom: -35px;
    width: 82px;
    height: 82px;
    content: '';
    border: 1px solid var(--accent-soft);
    border-radius: 50%;
    opacity: 0.32;
}

.resource-link:hover {
    border-color: var(--accent);
    background:
        linear-gradient(
            105deg,
            rgba(63, 103, 61, 0.96),
            rgba(19, 34, 21, 0.96)
        );
    box-shadow:
        0 13px 25px rgba(0, 0, 0, 0.56),
        0 0 20px var(--accent-glow),
        inset 0 1px 0 rgba(255, 248, 221, 0.12);
    transform: translateY(-4px);
}

.resource-link:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 4px;
}

.resource-icon {
    position: relative;
    z-index: 1;
    display: grid;
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    place-items: center;
    color: var(--accent);
    font-family: Georgia, serif;
    font-size: 1.45rem;
    text-shadow: 0 0 11px var(--accent-glow);
}

.resource-content {
    position: relative;
    z-index: 1;
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.resource-content strong {
    color: var(--gold-light);
    font-family: var(--display-font);
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1.08;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.75);
}

.resource-content small {
    color: rgba(244, 232, 195, 0.78);
    font-size: 0.94rem;
    line-height: 1.25;
}

.resource-arrow {
    position: relative;
    z-index: 1;
    margin-left: auto;
    color: var(--accent);
    font-size: 1.35rem;
    transition: transform 0.22s ease;
}

.resource-link:hover .resource-arrow {
    transform: translate(3px, -3px);
}

.accent-gold {
    --accent: var(--gold-light);
    --accent-soft: rgba(212, 173, 87, 0.52);
    --accent-glow: rgba(212, 173, 87, 0.3);
}

.accent-plum {
    --accent: #c29ad4;
    --accent-soft: rgba(194, 154, 212, 0.5);
    --accent-glow: rgba(151, 84, 178, 0.32);
}

.accent-wine {
    --accent: #e27d8d;
    --accent-soft: rgba(224, 125, 141, 0.5);
    --accent-glow: rgba(166, 39, 62, 0.3);
}

.accent-forest {
    --accent: #9bc47f;
    --accent-soft: rgba(155, 196, 127, 0.5);
    --accent-glow: rgba(102, 166, 86, 0.3);
}

.accent-walnut {
    --accent: #d49b68;
    --accent-soft: rgba(212, 155, 104, 0.5);
    --accent-glow: rgba(166, 101, 57, 0.3);
}

.site-footer {
    padding: 24px 15px 0;
    color: rgba(244, 232, 195, 0.62);
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
}

@media (max-width: 520px) {
    .page-shell {
        width: min(100% - 22px, 680px);
        padding-top: 26px;
    }

    .site-header {
        padding-right: 8px;
        padding-left: 8px;
    }

    .resource-link {
        min-height: 72px;
        gap: 11px;
        padding: 13px 13px;
    }

    .resource-content strong {
        font-size: 1.2rem;
    }

    .resource-content small {
        font-size: 0.86rem;
    }

    .resource-icon {
        width: 27px;
        flex-basis: 27px;
        font-size: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
