@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800;900&display=swap');

:root {
    --bg-deep: #050505;
    --card-bg: rgba(20, 20, 22, 0.98);
    --card-hover: rgba(25, 25, 28, 0.95);
    --border: #1f1f23;
    
    /* Brand Palette */
    --accent: #a7f3d0;      /* Emerald Accent */
    --accent-red: #aa2222;  /* Brand Red */
    
    /* Typography */
    --text-primary: #ffffff;
    --text-secondary: #e4e4e7; /* High-readability light gray */
    --text-dim: #71717a;
}

/* Base Resets */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    -webkit-tap-highlight-color: transparent; 
}

body { 
    background-color: var(--bg-deep); 
    color: var(--text-secondary); 
    font-family: 'Inter', sans-serif; 
    line-height: 1.8;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Fullscreen Hardware Glow */
.bg-glow-container {
    position: fixed; 
    inset: 0; 
    z-index: -1; 
    pointer-events: none;
    background: radial-gradient(circle at 50% -10%, rgba(167, 243, 208, 0.05), transparent 60%);
}

/* Unified Back Button (Pill Style) */
.back-btn {
    position: fixed; 
    top: 20px; 
    left: 20px; 
    color: var(--text-secondary); 
    text-decoration: none;
    font-size: 0.8rem; 
    font-weight: 800; 
    display: flex; 
    align-items: center; 
    gap: 8px;
    z-index: 1000; 
    background: rgba(15, 15, 17, 0.7); 
    padding: 8px 16px; 
    border-radius: 100px;
    border: 1px solid var(--border); 
    transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-btn:hover { 
    color: var(--text-primary); 
    border-color: var(--accent-red); 
    box-shadow: 0 0 15px rgba(170, 34, 34, 0.3); 
    transform: translateY(-1px);
}

/* Sticky Navigation Bar */
.sticky-nav {
    position: sticky; 
    top: 0; 
    width: 100%; 
    height: 100px; 
    z-index: 1000; 
    display: flex !important; 
    align-items: center !important; 
    justify-content: space-between !important; 
    padding: 0 25px;
    background: transparent !important; 
    box-sizing: border-box;
    pointer-events: none;
}

@media (max-width: 1200px) {
    .sticky-nav {
        height: 100px;
        background: rgba(5, 5, 5, 0.12) !important; 
        backdrop-filter: blur(16px); 
        -webkit-backdrop-filter: blur(16px);
        -webkit-mask-image: linear-gradient(to bottom, black 0%, black 60px, rgba(0, 0, 0, 0.6) 80px, rgba(0, 0, 0, 0.2) 90px, transparent 100px);
        mask-image: linear-gradient(to bottom, black 0%, black 60px, rgba(0, 0, 0, 0.6) 80px, rgba(0, 0, 0, 0.2) 90px, transparent 100px);
    }
}

/* Sticky Nav Buttons & Switchers overrides */
.sticky-nav .back-btn, 
.sticky-nav .lang-switcher {
    pointer-events: auto !important;
    background: rgba(15, 15, 17, 0.95) !important;
    border: 1px solid var(--border) !important;
    border-radius: 100px !important;
    transition: 0.2s;
    position: relative !important;
    top: auto !important; 
    left: auto !important; 
    bottom: auto !important; 
    right: auto !important;
    transform: none !important;
    z-index: 1001 !important;
    height: 42px; 
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important;
    box-shadow: none;
}

.sticky-nav .back-btn { 
    color: #ffffff !important; 
    text-decoration: none;
    font-size: 0.85rem; 
    font-weight: 800;
    gap: 8px; 
    padding: 0 22px;
}

.sticky-nav .back-btn:hover { 
    color: #ffffff !important; 
    border-color: var(--accent-red) !important; 
    box-shadow: 0 0 15px rgba(170, 34, 34, 0.3) !important; 
    transform: translateY(-1px);
}

.sticky-nav .lang-switcher { 
    padding: 4px !important; 
    gap: 4px !important; 
}

.sticky-nav .lang-btn {
    background: transparent !important; 
    border: none !important; 
    color: var(--text-secondary);
    padding: 0 22px; 
    border-radius: 100px; 
    font-size: 0.75rem; 
    font-weight: 800;
    cursor: pointer; 
    text-transform: uppercase; 
    transition: 0.2s ease;
    height: 100%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.sticky-nav .lang-btn.active { 
    background: var(--text-secondary) !important; 
    color: var(--bg-deep) !important; 
}

/* Unified Language Switcher (Floating Pill - default) */
.lang-switcher {
    position: fixed; 
    bottom: 30px; 
    left: 50%; 
    transform: translateX(-50%); 
    z-index: 1000;
    background: rgba(15, 15, 17, 0.8); 
    backdrop-filter: blur(20px);
    border: 1px solid var(--border); 
    padding: 4px; 
    border-radius: 100px;
    display: flex; 
    gap: 4px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.8);
}

.lang-btn {
    background: transparent; 
    border: none; 
    color: var(--text-secondary); 
    padding: 8px 22px;
    border-radius: 100px; 
    font-size: 0.75rem; 
    font-weight: 800; 
    cursor: pointer; 
    text-transform: uppercase;
    transition: 0.2s ease;
}

.lang-btn.active { 
    background: var(--text-secondary); 
    color: var(--bg-deep); 
}

/* Content Containers */
main, .container { 
    max-width: 720px; 
    margin: 120px auto 140px; 
    padding: 0 20px; 
}

h1 { 
    font-size: 3.5rem; 
    font-weight: 900; 
    color: var(--text-primary); 
    margin-bottom: 2rem; 
    letter-spacing: -0.04em; 
}

/* Section Headers with Accent Line */
h2 {
    font-size: 0.8rem; 
    text-transform: uppercase; 
    letter-spacing: 0.3em;
    color: var(--accent); 
    margin-top: 2rem; 
    margin-bottom: 1.5rem;
    display: flex; 
    align-items: center; 
    gap: 15px;
}

h2::after { 
    content: ""; 
    height: 1px; 
    background: rgba(167, 243, 208, 0.2); 
    flex-grow: 1; 
}

/* Unified Card Styling (About, Experience, Donate) */
.about-card, .experience-section, .link-item, .device-card {
    background: var(--card-bg); 
    border: 1px solid var(--border);
    border-radius: 16px; 
    padding: 32px; 
    margin-bottom: 32px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.about-card:hover, .experience-section:hover, .link-item:hover {
    border-color: rgba(167, 243, 208, 0.3);
    transform: translateY(-2px);
}

/* Typography Details */
strong { color: var(--text-primary); font-weight: 700; }
.dates { font-size: 0.9rem; color: var(--accent); font-weight: 600; margin-bottom: 16px; }

/* Links */
a {
    color: var(--accent); 
    text-decoration: none;
    transition: 0.2s;
}

a:hover { color: var(--text-primary); }

/* Visibility Classes for Language Toggling */
#russian-content, #english-content, .lang-ru, .lang-en { display: none; }

/* SPA Transitions using View Transitions API */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.35s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}