/* =====================================================
   Serg Markovich Portfolio - Tech Minimalist Theme
   ===================================================== */

/* --- CSS Variables (легко менять цвета) --- */
:root {
    --bg-primary: #0d1117;        /* GitHub dark bg */
    --bg-secondary: #161b22;      /* Darker sections */
    --text-primary: #c9d1d9;      /* Light gray text */
    --text-secondary: #8b949e;    /* Muted gray */
    --accent-primary: #58a6ff;    /* Azure blue */
    --accent-secondary: #1f6feb;  /* Darker blue */
    --border-color: #30363d;      /* Subtle borders */
    --code-bg: #161b22;           /* Code block bg */
    
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
}

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

/* --- Base Styles --- */
body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
}

/* --- Typography --- */
h1, h2, h3 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.75rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

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

a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* --- Layout --- */
header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Добавить эти строки: */
header > * {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

nav {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

nav a:hover {
    color: var(--accent-primary);
    text-decoration: none;
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

section {
    margin-bottom: 3rem;
}

footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- Components --- */

/* About Section */
.about p {
    font-size: 1.05rem;
    line-height: 1.7;
}

/* =====================================================
   Terminal Section (Interactive accent)
   ===================================================== */

.terminal-section {
    margin: 3rem 0;
}

.terminal-window {
    background-color: #0d1117;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Terminal Header (macOS-style) */
.terminal-header {
    background: linear-gradient(to bottom, #2d2d2d, #1e1e1e);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #0d1117;
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
}

.terminal-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.btn-red {
    background-color: #ff5f56;
}

.btn-yellow {
    background-color: #ffbd2e;
}

.btn-green {
    background-color: #27c93f;
}

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #8b949e;
    flex: 1;
    text-align: center;
}

/* Terminal Body */
.terminal-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    line-height: 1.8;
    color: #c9d1d9;
}

.terminal-body p {
    margin-bottom: 0.5rem;
}

/* Prompt styling */
.prompt {
    color: #4ec9b0;
    font-weight: 600;
    user-select: none;
}

.path {
    color: #569cd6;
    user-select: none;
}

/* Output styling */
.output {
    color: #d4d4d4;
    padding-left: 0;
    margin-left: 0;
}

/* Git status specific */
.git-status {
    color: #8b949e;
}

.branch {
    color: #f97583;
    font-weight: 600;
}

.available {
    color: #85e89d;
    font-weight: 600;
}

/* Blinking cursor */
.cursor {
    color: #c9d1d9;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Links Section */
.links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.links li {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem 1.5rem;
    transition: all 0.2s ease;
}

.links li:hover {
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.links a {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    display: block;
}

/* Status/Coming Soon */
.status {
    background-color: var(--code-bg);
    border-left: 3px solid var(--accent-primary);
    padding: 1rem 1.5rem;
    border-radius: 4px;
}

.status em {
    color: var(--text-secondary);
    font-style: normal;
    font-family: var(--font-mono);
}

/* Contact Page */
.contact-info ul {
    list-style: none;
    margin-top: 1.5rem;
}

.contact-info li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.contact-info li:last-child {
    border-bottom: none;
}

.contact-info strong {
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.availability {
    background-color: var(--bg-secondary);
    border-radius: 6px;
    padding: 1.5rem;
    margin-top: 2rem;
}

/* 404 Page */
.error-page {
    text-align: center;
    padding: 4rem 0;
}

.error-page h1 {
    font-size: 6rem;
    color: var(--accent-primary);
    font-family: var(--font-mono);
}

.error-page h2 {
    border: none;
    margin-top: 0;
}

.btn {
    display: inline-block;
    background-color: var(--accent-primary);
    color: var(--bg-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    margin-top: 1rem;
    transition: background-color 0.2s ease;
}

.btn:hover {
    background-color: var(--accent-secondary);
    text-decoration: none;
    color: #fff;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    nav {
        gap: 1rem;
    }
    
    main {
        padding: 2rem 1rem;
    }
    
    .terminal-body {
        padding: 1rem;
        font-size: 0.85rem;
    }
    
    .terminal-header {
        padding: 0.6rem 0.8rem;
    }
    
    .terminal-buttons span {
        width: 10px;
        height: 10px;
    }
    
    .error-page h1 {
        font-size: 4rem;
    }
}

/* =====================================================
   Language Switcher
   ===================================================== */

.lang-dropdown {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.lang-btn {
    background: rgba(22, 27, 34, 0.9);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 18px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

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

.lang-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    min-width: 160px;
}

.lang-dropdown:hover .lang-menu {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.lang-option:hover {
    background: var(--bg-primary);
    color: var(--accent-primary);
}

.lang-option.active {
    background: rgba(88, 166, 255, 0.1);
    color: var(--accent-primary);
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }
    
    .hero .subtitle {
        font-size: 1rem;
    }
    
    .terminal-body {
        font-size: 0.75rem;
        padding: 0.75rem;
    }
}

