/* ================================================================
    1. CORE & RESET (WALNUT NOIR SYSTEM)
================================================================ */
:root {
    --bg: #0f0a09;
    --dark: #2E1F1B;
    --mid: #5E4B43;
    --accent: #bca89f;
    --glass: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.16);
    --text: #f0e6e2;
    --shadow: rgba(0, 0, 0, 0.7);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    cursor: none !important;
    user-select: none; 
    outline: none; 
    -webkit-font-smoothing: antialiased;
}

html { 
    scroll-behavior: smooth; 
    overflow-x: hidden; 
}

body { 
    background: var(--bg); 
    color: var(--accent); 
    font-family: "Comic Sans MS", "Comic Sans", cursive !important; /* Принудительный бабл-шрифт везде */
    line-height: 1.6; 
}

/* КУРСОР */
.cursor {
    width: 10px; 
    height: 10px; 
    background: #fff; 
    border-radius: 50%;
    position: fixed; 
    z-index: 10000000 !important; 
    pointer-events: none;
    transform: translate(-50%, -50%); 
    box-shadow: 0 0 15px #fff;
}

/* ФОНОВЫЕ ЭЛЕМЕНТЫ */
.ornament { 
    position: fixed; 
    border-radius: 50%; 
    filter: blur(140px); 
    z-index: -1; 
    opacity: 0.15; 
    pointer-events: none; 
}
.sphere-1 { width: 700px; height: 700px; background: var(--mid); top: -150px; left: -150px; }
.sphere-2 { width: 900px; height: 900px; background: var(--dark); bottom: -200px; right: -200px; }

/* HERO СЕКЦИЯ */
.hero { 
    height: 100vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    padding: 0 20px;
}

.main-title { 
    font-size: clamp(3.5rem, 15vw, 11rem); 
    font-weight: 700;
    background: linear-gradient(to bottom, #ffffff 40%, var(--accent));
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 25px 50px rgba(0,0,0,0.7));
    line-height: 1.4; 
    padding-bottom: 20px;
}

.welcome-label { 
    font-size: 1.4rem; 
    letter-spacing: 20px; 
    text-transform: uppercase; 
    opacity: 0.4; 
    display: block; 
}

.scroll-btn {
    text-decoration: none; 
    color: var(--text); 
    padding: 20px 50px;
    background: var(--glass); 
    backdrop-filter: blur(30px);
    border: 2px solid var(--border); 
    border-radius: 30px;
    display: inline-block; 
    margin-top: 30px; 
    transition: 0.4s ease;
}
.scroll-btn:hover { transform: translateY(-5px); border-color: var(--accent); }

/* МАТОВОЕ СТЕКЛО (GLASS CARDS) */
.container { max-width: 1300px; margin: 0 auto; padding: 0 40px; }
.main-content { padding: 100px 0; }

.glass-card {
    background: var(--glass); 
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 2px solid var(--border); 
    border-radius: 50px; 
    padding: 50px;
    transition: 0.5s cubic-bezier(0.2, 1, 0.2, 1);
}
.glass-card:hover { border-color: rgba(255, 255, 255, 0.25); transform: translateY(-8px); }

.grid-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; }
.card-head h3 { font-size: 2.8rem; margin-bottom: 40px; font-family: 'Montserrat', sans-serif; color: var(--text); }

.user-data { display: flex; flex-direction: column; gap: 20px; }
.data-row { display: flex; align-items: center; gap: 25px; }
.data-row i { font-size: 2rem; width: 35px; text-align: center; }
.val span { font-size: 0.8rem; opacity: 0.4; text-transform: uppercase; display: block; }
.val p { font-size: 1.4rem; color: var(--text); }

.quote { font-size: 2.2rem; font-style: italic; color: var(--text); line-height: 1.3; margin-bottom: 30px; }
.location-badge { display: inline-flex; align-items: center; gap: 15px; background: rgba(0,0,0,0.35); padding: 12px 25px; border-radius: 40px; border: 1px solid var(--border); }

/* ПАНЕЛЬ УПРАВЛЕНИЯ (АДМИНКА) */
.admin-panel { margin-top: 40px; }
.admin-grid { display: grid; grid-template-columns: 1fr 320px; gap: 40px; }
.admin-inputs h4 { font-family: 'Montserrat', sans-serif; margin-bottom: 15px; color: var(--text); text-transform: uppercase; font-size: 1.1rem; }
.admin-inputs input, .admin-inputs textarea {
    width: 100%; padding: 18px; background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border); border-radius: 18px; color: #fff; margin-bottom: 15px; font-family: inherit;
}
.admin-inputs textarea { height: 100px; resize: none; }

.file-zone { border: 2px dashed var(--border); padding: 30px; border-radius: 20px; text-align: center; }
.file-label { color: var(--accent); font-weight: bold; }
#p-file { display: none; }
.preview-box { margin-top: 20px; border-radius: 20px; overflow: hidden; border: 2px solid var(--border); height: 160px; }
#img-preview { width: 100%; height: 100%; object-fit: cover; }

/* ОКНО ВХОДА */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 9999990; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(25px); padding: 20px; }
.login-box { width: 420px; text-align: center; border: 2px solid var(--border); }
.login-inputs input { width: 100%; padding: 18px; background: rgba(0, 0, 0, 0.5); border: 1px solid var(--border); border-radius: 18px; color: #fff; margin-bottom: 15px; }

.action-btn { width: 100%; padding: 18px; background: var(--accent); border: none; border-radius: 18px; font-weight: 700; color: var(--bg); text-transform: uppercase; transition: 0.3s; }
.action-btn:hover { background: #fff; transform: scale(1.02); }
.close-link { background: none; border: none; color: var(--accent); opacity: 0.5; margin-top: 25px; text-decoration: underline; font-family: inherit; }

/* РАЗДЕЛ АКТИВНЫХ ПРОЕКТОВ */
.projects-section { margin-top: 100px; }
.section-header { display: flex; justify-content: space-between; align-items: center; }
.section-header h2 { font-size: 3.5rem; color: var(--text); font-family: 'Montserrat', sans-serif; }
.admin-link { background: transparent; border: 1px dashed var(--accent); color: var(--accent); padding: 10px 20px; border-radius: 12px; opacity: 0.5; font-family: inherit; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 40px; margin-top: 40px; }
.p-img { width: 100%; height: 220px; object-fit: cover; border-radius: 25px; margin-bottom: 20px; border: 1px solid var(--border); }

/* КНОПКИ УПРАВЛЕНИЯ ПОСТАМИ */
.edit-btn { background: none; border: 1px solid var(--accent); color: var(--accent); padding: 6px 15px; border-radius: 10px; transition: 0.2s; }
.edit-btn:hover { background: var(--accent); color: var(--bg); }
.del-btn { background: none; border: 1px solid rgba(255,0,0,0.2); color: #ff6b6b; padding: 6px 15px; border-radius: 10px; transition: 0.2s; }
.del-btn:hover { background: #ff6b6b; color: #fff; border-color: #ff6b6b; }

/* УТИЛИТАРНЫЕ КЛАССЫ И АНИМАЦИИ */
.hidden { display: none !important; }
.fade-in { animation: fadeIn 1s ease forwards; }
.scale-up { animation: scaleUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(25px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleUp { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

.footer { text-align: center; padding: 60px 0; opacity: 0.5; }
.social-icons { display: flex; justify-content: center; gap: 30px; margin-top: 15px; font-size: 2rem; }
.social-icons a { color: var(--accent); }

/* КАСТОМНЫЙ СКРОЛЛБАР */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--dark); border-radius: 10px; }

/* ================================================================
    13. ЖЕСТКАЯ ОПТИМИЗАЦИЯ ПОД МОБИЛЬНЫЕ УСТРОЙСТВА (АДАПТИВ)
================================================================ */
@media (max-width: 1024px) {
    .container { padding: 0 20px; }
    .grid-layout { grid-template-columns: 1fr; gap: 30px; }
    .admin-grid { grid-template-columns: 1fr; gap: 30px; }
    .glass-card { padding: 30px; border-radius: 35px; }
    .main-title { font-size: 5.5rem; }
    .card-head h3 { font-size: 2.2rem; margin-bottom: 25px; }
    .quote { font-size: 1.8rem; }
    .projects-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
    
    /* Отключение кастомного курсора на сенсорных экранах */
    .cursor { display: none !important; }
    * { cursor: auto !important; }
}

@media (max-width: 600px) {
    .main-title { font-size: 3.5rem; line-height: 1.3; }
    .welcome-label { font-size: 1rem; letter-spacing: 10px; }
    .scroll-btn { padding: 15px 35px; font-size: 1rem; }
    .section-header h2 { font-size: 2.2rem; }
    .admin-link { padding: 8px 15px; font-size: 0.85rem; }
    .val p { font-size: 1.1rem; }
    .val span { font-size: 0.7rem; letter-spacing: 2px; }
    .data-row { gap: 15px; }
    .data-row i { font-size: 1.5rem; width: 25px; }
    .login-box { padding: 35px 20px !important; }
}