:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #FF4D00; /* Яркий акцент для Johann nine */
    --accent-hover: #E04400;
    --border: #2a2a2a;
    --radius: 8px;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', var(--font-main);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Сетка портфолио 9:16 */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 20px;
}
@media (min-width: 768px) {
    .portfolio-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 40px; }
}
@media (min-width: 1024px) {
    .portfolio-grid { grid-template-columns: repeat(4, 1fr); }
}

.project-card {
    position: relative;
    aspect-ratio: 9 / 16;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
}
.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(255, 77, 0, 0.15);
    border-color: var(--accent);
}
.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.project-card:hover img { transform: scale(1.05); }

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.project-card:hover .card-overlay { opacity: 1; }

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.btn:hover { background: var(--accent-hover); }
.btn-outline {
    background: transparent;
    border: 1px solid var(--text-primary);
}
.btn-outline:hover { background: var(--text-primary); color: var(--bg-primary); }

/* Слайдер До/После */
.ba-slider {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: var(--radius);
    margin: 20px auto;
}
.ba-slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}
.ba-slider .after-img {
    clip-path: inset(0 50% 0 0);
}
.ba-slider input[type="range"] {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: ew-resize;
    opacity: 0;
}
.ba-slider .handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: var(--accent);
    z-index: 5;
    pointer-events: none;
}
.ba-slider .handle::after {
    content: '↔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--accent);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}