@font-face {
    font-family: "JetBrains Sans";
    src: url("fonts/JetBrainsSans-Regular.woff2");
    font-display: swap;
}

@font-face {
    font-family: "JetBrains Mono";
    src: url("fonts/JetBrainsMono-Regular.woff2");
    font-display: swap;
}

:root {
    --font-sans: "JetBrains Sans", Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
    --font-mono: "JetBrains Mono", monospace;
    --bg-color: #f5f5f5;
    --app-bg: #ffffff;
    --text-color: #333333;
    --text-secondary: #555555;
    --text-muted: #666666;
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --header-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

[data-theme="dark"] {
    --bg-color: #121212;
    --app-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #888888;
    --primary-color: #bb86fc;
    --secondary-color: #03dac6;
    --border-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --header-gradient: linear-gradient(135deg, #1e1e1e 0%, #333333 100%);
}

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

:root {
    font-family: var(--font-sans), serif;
    color: var(--text-color);
    background-color: var(--bg-color);
}

body {
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .cv-section {
        opacity: 1 !important;
        transform: none !important;
    }
}

#app {
    max-width: 900px;
    margin: 0 auto;
    background: var(--app-bg);
    box-shadow: 0 0 20px var(--shadow-color);
    min-height: 100vh;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.cv-header {
    background: var(--header-gradient);
    color: white;
    padding: 60px 40px;
    text-align: center;
    position: relative;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: background-color 0.3s;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

[data-theme="dark"] .sun-icon {
    display: block;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.cv-header h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 20px;
    opacity: 0.9;
}

.contact-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
}

.contact-info a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.contact-info a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.contact-info span {
    opacity: 0.7;
}

.cv-section {
    padding: 40px;
    border-bottom: 1px solid var(--border-color);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-bottom-color 0.3s;
}

.cv-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.cv-section:last-child {
    border-bottom: none;
}

.cv-section h2 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.cv-section h3 {
    font-size: 20px;
    color: var(--text-color);
    margin-bottom: 5px;
}

.cv-section p {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.experience-item, .education-item, .project-item {
    margin-bottom: 30px;
}

.experience-item:last-child, .project-item:last-child {
    margin-bottom: 0;
}

.company {
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 10px;
}

.cv-section ul {
    margin-left: 20px;
    color: var(--text-secondary);
}

.cv-section li {
    margin-bottom: 8px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.skill-category h3 {
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.skill-category p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.8;
}

@media print {
    body {
        background: white;
        color: black;
    }

    #app {
        box-shadow: none;
        background: white;
    }

    .cv-header {
        background: white !important;
        color: black !important;
        padding: 20px 0;
    }

    .cv-header h1 {
        color: black;
    }

    .subtitle {
        color: #333;
    }

    .contact-info a {
        color: black !important;
    }

    .contact-info a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    .contact-info a[href^="mailto:"]::after {
        content: "";
    }

    .theme-toggle {
        display: none !important;
    }

    .cv-section {
        opacity: 1;
        transform: none;
        page-break-inside: avoid;
        border-bottom-color: #eee;
    }

    .cv-section h2 {
        color: black;
        border-bottom-color: black;
    }

    .company {
        color: #333;
    }
}

@media (max-width: 768px) {
    .cv-header {
        padding: 40px 20px;
    }

    .cv-header h1 {
        font-size: 36px;
    }

    .subtitle {
        font-size: 20px;
    }

    .cv-section {
        padding: 30px 20px;
    }

    .cv-section h2 {
        font-size: 24px;
    }

    .contact-info {
        flex-direction: column;
        gap: 5px;
    }

    .contact-info span {
        display: none;
    }

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