/* ========== ПЕРЕМЕННЫЕ ========== */
:root {
    --bg-primary: #0B0E14;
    --bg-secondary: #131820;
    --bg-tertiary: #1A2030;
    --text-primary: #E8ECF1;
    --text-secondary: #8B95A5;
    --text-muted: #555E6B;
    --accent: #00C8E0;
    --accent-hover: #00E5FF;
    --accent-glow: rgba(0, 200, 224, 0.15);
    --border: rgba(255, 255, 255, 0.06);
    --radius: 8px;
    --radius-lg: 14px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --font-heading: 'Exo 2', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-reading: 'Source Serif 4', serif;
    --header-height: 64px;
    --max-width: 1100px;
}

/* ========== СБРОС И БАЗА ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
	transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
	transition: width 0.3s ease, height 0.3s ease;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.01em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }

/* ========== ШАПКА ========== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 14, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.03em;
}

.logo:hover {
    color: var(--accent);
}

.main-nav {
    display: flex;
    gap: 24px;
}

.main-nav a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    padding: 4px 0;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text-primary);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* ========== КОНТЕЙНЕР ========== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 24px;
	transition: padding 0.3s ease;
}

/* ========== КНОПКИ ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #0B0E14;
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 20px var(--accent-glow);
    color: #0B0E14;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* ========== HERO ========== */
.hero {
    position: relative;
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 30% 50%, rgba(0, 200, 224, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 30%, rgba(100, 140, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 25% 55%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 40% 15%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 55% 70%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 70% 35%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 85% 60%, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 15% 80%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 60% 10%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 90% 25%, rgba(255,255,255,0.3), transparent);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 650px;
}

.hero-photo {
    margin: 0 auto 32px;
    width: 330px;
    height: 330px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent);
    box-shadow: 0 0 40px var(--accent-glow);
	transition: width 0.4s ease, height 0.4s ease, box-shadow 0.4s ease, border-width 0.4s ease, margin 0.4s ease;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.7;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.hero-socials {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
}

.hero-socials img {
    height: 28px;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.hero-socials img:hover {
    opacity: 1;
}

/* ========== СЕКЦИИ ========== */
.section {
    padding: 60px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 36px;
}

.section-header h2 {
    position: relative;
    padding-left: 16px;
}

.section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--accent);
    border-radius: 2px;
}

/* ========== НОВОСТИ ========== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-item-details {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.2s;
}

.news-item-details:hover {
    border-color: var(--accent);
}

.news-item-details summary {
    padding: 20px 24px;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.news-item-details summary::-webkit-details-marker {
    display: none;
}

.news-item-details summary time {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 130px;
}

.news-item-details summary h3 {
    font-size: 1.05rem;
    color: var(--text-primary);
    font-weight: 500;
}

.news-details-content {
    padding: 0 24px 20px 170px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.news-details-content p {
    margin-bottom: 12px;
}

/* ========== ОБО МНЕ ========== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.about-block h2,
.hobbies-block h2 {
    margin-bottom: 20px;
}

.about-block p {
    color: var(--text-secondary);
    margin-bottom: 14px;
    line-height: 1.8;
}

.hobbies-block ol {
    color: var(--text-secondary);
    padding-left: 20px;
}

.hobbies-block li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* ========== РАБОТЫ ========== */
.works-category {
    color: var(--accent);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 36px 0 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
	justify-content: center;   /* ← центрирует всю сетку */
    justify-items: center;     /* ← центрирует элементы внутри ячеек */
	transition: grid-template-columns 0.4s ease, gap 0.4s ease;
}

.book-card-wrapper {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
}

.book-card-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.book-card-cover {
    aspect-ratio: 2/3;
    overflow: hidden;
}

.book-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-card-body {
    padding: 16px;
}

.book-card-body h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.book-card-body .book-annotation {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-card-actions {
    display: flex;
    gap: 10px;
    padding: 0 16px 16px;
}

/* ========== ТВОРЧЕСКИЕ ПЛАНЫ ========== */
.plans-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
    max-width: 800px;
}

/* ========== ПОДВАЛ ========== */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 24px 20px;
    margin-top: 60px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 12px;
    font-family: var(--font-heading);
}

.footer-icon {
    height: 36px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.footer-icon:hover {
    opacity: 1;
}

.footer-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.footer-badges img {
    height: 36px;
    border-radius: var(--radius);
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-badges img:hover {
    opacity: 1;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ========== АДАПТИВ ========== */
@media (max-width: 880px) {
    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 16px 24px;
        gap: 14px;
        border-bottom: 1px solid var(--border);
    }

    .main-nav.open {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 2rem;
    }

   .hero-photo {
		width: 330px;
		height: 330px;
		margin-bottom: 24px;
		border-width: 2px;
		box-shadow: 0 0 25px var(--accent-glow);
	}

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

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

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .news-item-details summary {
        flex-direction: column;
        gap: 6px;
    }

    .news-details-content {
        padding: 0 20px 16px;
    }
}

@media (max-width: 830px) {	
	.hero-photo {
		width: 240px;
		height: 240px;
	}
}
}