/* ============================================================
   PREMIUM PHOTOGRAPHER THEME (Custom Background Image)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* ===== ПРЕМИАЛЬНАЯ ТЁМНАЯ ПАЛИТРА ===== */
    --bg: #181715;
    --text: #F7F3EE;
    --muted: #D2CBC2;
    --small: #AEA49A;
    --accent: #C39A74;
    --accent-glow: rgba(195, 154, 116, 0.28);
    --line: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

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

html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: url('images/bg-dark.webp') no-repeat center center fixed;
    background-size: cover;
    scroll-behavior: smooth;
}

/* Если картинка не загрузится — будет красивый градиент */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at top, rgba(255, 255, 255, 0.05), transparent 35%),
        radial-gradient(circle at bottom, rgba(195, 154, 116, 0.05), transparent 45%),
        linear-gradient(180deg, #1b1917, #181715 45%, #141311);
    z-index: -1;
    pointer-events: none;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    color: var(--text);
    line-height: 1.8;
    min-height: 100vh;
    font-size: 18px;
    padding-top: 70px !important;
}

body:not(.page-home) {
    padding-top: 40px !important;
}

.container {
    width: min(1400px, 94%);
    margin: 0 auto;
}

header {
    position: fixed;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 100 !important;
    background: rgba(18, 18, 18, 0.58) !important;
    backdrop-filter: blur(22px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0 !important;
}

.header-inner {
    width: 100%;
    max-width: 1400px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 35px 40px;
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.nav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 22px;
    transition: 0.35s;
    position: relative;
    padding: 6px 0;
    margin: 0;
    display: inline-block;
    line-height: 1.2;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), #e5c19c);
    transition: 0.3s;
}

.nav a:hover::after,
.nav .active::after {
    width: 100%;
}

.nav a:hover,
.nav .active {
    color: #FFFFFF;
}

h1 span,
.accent {
    color: var(--accent);
}

.hero {
    text-align: center;
    padding: 48px 0 90px;
}

.hero-avatar {
    display: inline-block;
    padding: 8px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.45);
    transition: 0.45s;
    margin-bottom: 16px;
}

.hero-avatar:hover {
    transform: translateY(-5px);
}

.hero-avatar img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 16px;
    display: block;
    margin: 0 auto;
    background: transparent;
}

@media (min-width: 1025px) {
    .hero-avatar img {
        max-height: 50vh;
    }
}

h1 {
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.05;
    margin: 16px 0 12px;
    letter-spacing: -0.5px;
    font-weight: 700;
    color: var(--text);
}

.hero-lead {
    color: var(--muted);
    font-size: 20px;
    max-width: 600px;
    margin: 0 auto 24px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.hero-quote {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 40px;
    background: rgba(34, 32, 29, 0.80) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(18px);
    box-shadow: var(--card-shadow);
    font-size: 18px;
    color: var(--small);
    font-style: italic;
    max-width: 100%;
    word-break: break-word;
    margin-top: 6px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.stat-card {
    background: rgba(34, 32, 29, 0.80) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(18px);
    box-shadow: var(--card-shadow);
    border-radius: 16px;
    padding: 28px 20px;
    transition: 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.stat-number {
    font-size: 42px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -1px;
}

.stat-label {
    color: var(--muted);
    font-size: 16px;
    font-weight: 500;
    margin-top: 2px;
    opacity: 0.9;
}

.stat-desc {
    color: var(--small);
    font-size: 14px;
    opacity: 0.6;
    margin-top: 2px;
}

.section {
    padding: 70px 0;
}

.section-title {
    text-align: center;
    font-size: clamp(32px, 4vw, 46px);
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -1px;
    color: var(--text);
}

.section-subtitle {
    text-align: center;
    color: var(--small);
    font-size: 19px;
    max-width: 640px;
    margin: 0 auto 40px;
    opacity: 0.8;
    font-style: italic;
}

.section-text {
    color: var(--muted);
    font-size: 19px;
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.9;
}

.section-text .accent-text {
    color: var(--text);
    font-weight: 500;
}

.card {
    background: rgba(34, 32, 29, 0.80) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(18px);
    box-shadow: var(--card-shadow);
    border-radius: 20px;
    padding: 32px 28px;
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    border-color: rgba(195, 154, 116, 0.45) !important;
}

.card .emoji {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
}

.card h3 {
    font-size: 22px;
    margin: 0 0 8px;
    font-weight: 600;
    color: var(--text);
}

.card p {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
    margin: 0;
    opacity: 0.9;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.project-card {
    background: rgba(34, 32, 29, 0.80) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(18px);
    box-shadow: var(--card-shadow);
    border-radius: 20px;
    padding: 32px 28px;
    transition: 0.3s;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(195, 154, 116, 0.45) !important;
}

.project-card h3 {
    font-size: 22px;
    margin: 0 0 8px;
    color: var(--text);
}

.project-card p {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.8;
    opacity: 0.9;
}

.badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(34, 32, 29, 0.80) !important;
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--accent);
    margin-right: 6px;
    margin-top: 10px;
}

.contacts {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.contacts a {
    color: var(--muted);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    padding: 14px 32px;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 40px;
    transition: 0.3s;
    background: rgba(34, 32, 29, 0.80) !important;
    backdrop-filter: blur(18px);
}

.contacts a:hover {
    border-color: var(--accent) !important;
    transform: translateY(-2px);
}

.achievement-list {
    max-width: 760px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.achievement-list li {
    padding: 16px 22px;
    margin-bottom: 10px;
    border-radius: 12px;
    background: rgba(34, 32, 29, 0.80) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(18px);
    box-shadow: var(--card-shadow);
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
    transition: 0.3s;
}

.achievement-list li:hover {
    border-color: var(--accent) !important;
}

.achievement-list li strong {
    color: var(--text);
}

.timeline {
    max-width: 760px;
    margin: 0 auto;
}

.timeline-item {
    display: flex;
    gap: 30px;
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-year {
    min-width: 80px;
    font-weight: 700;
    font-size: 20px;
    color: var(--accent);
}

.timeline-text {
    color: var(--small);
    font-size: 17px;
    opacity: 0.9;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
    margin-top: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    background: #1e1c19 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: 0.3s;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: transparent;
    transition: transform 0.7s ease, filter 0.5s ease;
}

.gallery-item:hover {
    transform: translateY(-8px);
    border-color: var(--accent) !important;
}

.gallery-item:hover img {
    transform: scale(1.06);
    filter: brightness(0.96);
}

.gallery-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
    color: #fff;
    font-weight: 500;
    font-size: 15px;
    text-align: center;
    opacity: 0;
    transition: 0.3s;
    pointer-events: none;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 8, 8, 0.95);
    backdrop-filter: blur(8px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 98vw;
    max-height: 98vh;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-image-wrapper {
    width: 100%;
    height: calc(100% - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.1s ease;
    user-select: none;
    cursor: zoom-in;
}

.lightbox-content .caption {
    margin-top: 8px;
    text-align: center;
    color: #eee;
    font-size: 18px;
    font-weight: 500;
    opacity: 0.9;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    max-width: 90%;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.2s;
    z-index: 10;
    line-height: 1;
    font-weight: 300;
}

.close-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.lightbox-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 12px;
    background: rgba(0, 0, 0, 0.04);
    padding: 8px 20px;
    border-radius: 30px;
    backdrop-filter: blur(4px);
}

.nav-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 26px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.1);
}

.nav-btn:active {
    transform: scale(0.9);
}

.counter {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    opacity: 0.8;
    min-width: 60px;
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 40px;
    background: linear-gradient(135deg, #C39A74, #A97B56) !important;
    box-shadow: 0 16px 40px rgba(195, 154, 116, 0.28);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 17px;
    text-decoration: none;
    border: none;
    transition: 0.3s;
    cursor: pointer;
}

.btn:hover {
    background: linear-gradient(135deg, #D8B38E, #B48762) !important;
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent !important;
    color: var(--accent);
    border: 1px solid var(--line) !important;
    box-shadow: none !important;
}

.btn-outline:hover {
    background: rgba(34, 32, 29, 0.80) !important;
    border-color: var(--accent) !important;
    box-shadow: none !important;
}

footer {
    padding: 36px 0;
    background: #141311;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--small);
    text-align: center;
}

footer .stardust {
    font-size: 17px;
    font-style: italic;
    opacity: 0.5;
    margin-bottom: 8px;
}

footer p {
    font-size: 16px;
    opacity: 0.6;
}

/* ============= АНИМАЦИЯ ПОЯВЛЕНИЯ БЛОКОВ ============= */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.card:nth-child(2) { transition-delay: 0.1s; }
.card:nth-child(3) { transition-delay: 0.2s; }
.card:nth-child(4) { transition-delay: 0.3s; }
.card:nth-child(5) { transition-delay: 0.4s; }
.card:nth-child(6) { transition-delay: 0.5s; }

/* ============= ЗАЩИТА ВЫДЕЛЕНИЯ НА ТЕЛЕФОНАХ ============= */
img {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.gallery-item img, .home-photo img, .hero-avatar img {
    pointer-events: auto;
}

/* ============= АДАПТИВ ============= */
@media (max-width: 760px) {
    header { height: auto !important; min-height: 72px; padding: 10px 0; }
    body { padding-top: 72px !important; }
    body:not(.page-home) { padding-top: 40px !important; }
    .nav { gap: 14px 26px; }
    .nav a { font-size: 20px; padding: 5px 0; }
    
    .section { padding: 50px 0; }
    body { font-size: 16px; }
    .grid-2 { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr 1fr; gap: 14px; }
    .timeline-item { flex-direction: column; gap: 4px; }
    .contacts { gap: 12px; }
    .contacts a { padding: 12px 22px; font-size: 16px; }
    .gallery { grid-template-columns: 1fr 1fr; }
    
    .hero-avatar img { max-height: 60vh; }
    .hero-avatar { margin-bottom: 16px; }
    .section-text { font-size: 17px; }
    .card p, .project-card p { font-size: 16px; }
}

@media (max-width: 480px) {
    header { height: auto !important; min-height: 62px; padding: 8px 0; }
    body { padding-top: 62px !important; }
    body:not(.page-home) { padding-top: 40px !important; }
    .nav { gap: 8px 16px; }
    .nav a { font-size: 16px; padding: 4px 0; }
    .stats { grid-template-columns: 1fr; }
    .gallery { grid-template-columns: 1fr 1fr; gap: 12px; }
    .gallery-item { aspect-ratio: 1 / 1; }
    
    .hero-avatar img { max-height: 50vh; }
    .hero-quote { font-size: 16px; padding: 10px 16px; }
    .section-title { font-size: 28px; }
    .section-subtitle { font-size: 17px; }
    .hero-lead { font-size: 17px; }
    h1 { font-size: 34px; }
    .lightbox-content img { max-height: 75vh; max-width: 98%; }
    .close-btn { top: 5px; right: 10px; font-size: 2.4rem; }
    .lightbox-nav { gap: 12px; padding: 6px 14px; }
    .nav-btn { width: 38px; height: 38px; font-size: 22px; }
    .counter { font-size: 14px; min-width: 50px; }
    .lightbox-content .caption { font-size: 15px; padding: 6px 14px; margin-top: 4px; }
    .contacts a { font-size: 15px; padding: 10px 18px; }
}

/* ============= ЛАЙКИ (СЕРДЕЧКИ) ============= */
.like-wrapper {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(18, 18, 18, 0.6);
    padding: 6px 12px;
    border-radius: 30px;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: auto;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    min-width: 52px;
    min-height: 34px;
    box-sizing: border-box;
}

.like-wrapper .like-btn {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #D2CBC2;
}

.like-wrapper .like-btn:hover {
    transform: scale(1.15);
}

.like-wrapper .like-count {
    font-size: 14px;
    font-weight: 600;
    color: #D2CBC2;
    margin: 0;
    padding: 0;
    min-width: 16px;
    text-align: center;
    line-height: 1;
    display: flex;
    align-items: center;
}

@media (max-width: 480px) {
    .like-wrapper {
        bottom: 8px;
        right: 8px;
        padding: 4px 8px;
        gap: 4px;
        min-width: 44px;
        min-height: 28px;
    }
    .like-wrapper .like-btn {
        font-size: 16px;
        width: 20px;
        height: 20px;
    }
    .like-wrapper .like-count {
        font-size: 12px;
        min-width: 14px;
    }
}

/* ===== СКРОЛЛБАР ===== */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #171614; }
::-webkit-scrollbar-thumb {
    background: #5b4a3b;
    border-radius: 20px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7a624d;
}

::selection {
    background: #c39a74;
    color: #111;
}