/*
Theme Name: Portfolio
Theme URI: https://example.com/
Author: Sergey
Description: Custom portfolio theme.
Version: 0.1.0
*/

:root {
    --bg: #0a0d12;
    --surface: #11161d;
    --text: #f2f4f7;
    --muted: #8d98a6;
    --accent: #8fa8c4;
    --border: rgba(255, 255, 255, 0.09);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    background: rgba(10, 13, 18, 0.82);
    backdrop-filter: blur(16px);
}

.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.nav {
    display: flex;
    gap: 28px;
    color: var(--muted);
    font-size: 14px;
}

.nav a:hover {
    color: var(--text);
}

.hero {
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    padding: 180px 28px 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.eyebrow {
    margin-bottom: 24px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 950px;
    margin: 0;
    font-size: clamp(48px, 8vw, 104px);
    line-height: 0.98;
    letter-spacing: -0.045em;
    font-weight: 650;
}

.hero-lead {
    max-width: 680px;
    margin-top: 34px;
    color: var(--muted);
    font-size: clamp(18px, 2vw, 24px);
}

.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 28px;
}

.section-label {
    margin-bottom: 40px;
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.projects {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.project {
    min-height: 280px;
    padding: 32px;
    border: 1px solid var(--border);
    background: var(--surface);
    transition:
        transform 180ms ease,
        border-color 180ms ease;
}

.project:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
}

.project h2 {
    margin: 0 0 14px;
    font-size: 28px;
    letter-spacing: -0.02em;
}

.project p {
    margin: 0;
    color: var(--muted);
}

.site-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 28px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 700px) {
    .site-header-inner {
        padding: 16px 20px;
    }

    .nav {
        display: flex;
        gap: 14px;
        flex-wrap: wrap;
        justify-content: flex-end;
        font-size: 12px;
    }

    .theme-toggle {
        width: 32px;
        height: 32px;
    }

    .hero {
        padding: 140px 20px 80px;
    }

    .section {
        padding: 70px 20px;
    }

    .projects {
        grid-template-columns: 1fr;
    }

    .project {
        min-height: 220px;
        padding: 26px;
    }
}

/* Theme switcher */

.theme-toggle {
    width: 36px;
    height: 36px;
    padding: 0;
    margin-left: 4px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition:
        background 180ms ease,
        border-color 180ms ease,
        transform 180ms ease;
}

.theme-toggle:hover {
    background: var(--surface);
    border-color: rgba(255, 255, 255, 0.2);
    transform: rotate(12deg);
}

/* Light theme */

html[data-theme="light"] {
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #111111;
    --muted: #5c626a;
    --accent: #435b73;
    --border: rgba(0, 0, 0, 0.10);
}

html[data-theme="light"] body {
    background: #ffffff;
    color: #111111;
}

html[data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.94);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .project {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.10);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .project:hover {
    border-color: rgba(0, 0, 0, 0.20);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.07);
}

html[data-theme="light"] .theme-toggle {
    color: #111111;
    border-color: rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .theme-toggle:hover {
    background: #f5f5f5;
    border-color: rgba(0, 0, 0, 0.20);
}

html[data-theme="light"] .site-footer {
    border-top-color: rgba(0, 0, 0, 0.08);
}
