/* Base Styles */
:root {
    /* Light Theme (default) */
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --text-color: #1f2937;
    --light-text: #6b7280;
    --background-color: #ffffff;
    --light-background: #f9fafb;
    --dark-background: #111827;
    --border-color: #e5e7eb;
    --card-background: #ffffff;
    --card-shadow: rgba(0, 0, 0, 0.05);
    --card-shadow-hover: rgba(0, 0, 0, 0.1);
    --timeline-line: #e5e7eb;
    --timeline-dot: #f59e0b;
    --transition-speed: 0.3s;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary-color: #60a5fa;
    --secondary-color: #93c5fd;
    --accent-color: #fbbf24;
    --text-color: #e5e7eb;
    --light-text: #9ca3af;
    --background-color: #111827;
    --light-background: #1f2937;
    --dark-background: #030712;
    --border-color: #374151;
    --card-background: #1f2937;
    --card-shadow: rgba(0, 0, 0, 0.2);
    --card-shadow-hover: rgba(0, 0, 0, 0.3);
    --timeline-line: #374151;
    --timeline-dot: #fbbf24;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Raleway', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--background-color);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--secondary-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

/* Header & Navigation */
header {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('img/cover.jpeg');
    background-size: cover;
    background-position: center;
    color: white;
    display: flex;
    flex-direction: column;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, padding 0.3s ease;
}

nav.scrolled {
    background-color: var(--background-color);
    padding: 1rem 5%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

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

nav.scrolled .logo {
    color: var(--primary-color);
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: white;
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width var(--transition-speed) ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--accent-color);
}

/* Theme Toggle Switch */
.theme-toggle {
    margin-right: 2rem;
    display: flex;
    align-items: center;
}

@media screen and (max-width: 768px) {
    nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    nav > .logo {
        flex: 1;
    }
    
    .theme-toggle {
        margin-right: 0;
    }
    
    .burger {
        order: 2;
        margin-left: 1rem;
    }
}

#theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: white;
    transition: transform 0.3s ease;
    padding: 5px;
}

#theme-toggle-btn:hover {
    transform: rotate(15deg);
}

#theme-toggle-btn .fa-sun {
    color: #f59e0b;
}

#theme-toggle-btn .fa-moon {
    color: #60a5fa;
}

nav.scrolled #theme-toggle-btn {
    color: var(--text-color);
}

nav.scrolled #theme-toggle-btn .fa-sun {
    color: #f59e0b;
}

nav.scrolled #theme-toggle-btn .fa-moon {
    color: #60a5fa;
}

.burger {
    display: none;
    cursor: pointer;
    padding-left: 10px;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px;
    transition: all 0.3s ease;
}

[data-theme="dark"] .burger div {
    background-color: white;
}

nav.scrolled .burger div {
    background-color: var(--text-color);
}

.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 0.5s;
}

/* Typing Animation */
.typing-container {
    height: 6rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 0.8s;
    width: 90%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.typing-text {
    font-size: 2.2rem;
    font-weight: 300;
    color: white;
    position: relative;
    margin: 0;
    white-space: normal;
    overflow: hidden;
    width: fit-content;
    margin: 0 auto;
    font-family: 'Raleway', sans-serif;
}

.typing-text span {
    color: var(--accent-color);
}

.typing-text.fade-out {
    opacity: 0;
    transition: opacity 1s ease-out; /* Plynulé zmizení */
}

.cursor {
    display: inline-block;
    color: black;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}
@media screen and (max-width: 768px) {
    .typing-container {
        height: 6rem;
    }
    
    .typing-text {
        font-size: 1.5rem;
        white-space: normal;
        text-align: center;
        width: 100%;
    }
}

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

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    animation: fadeIn 1s ease forwards 1.5s;
}

.scroll-indicator span {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.scroll-indicator i {
    animation: bounce 2s infinite;
}

/* About Section */
.about-section {
    padding: 6rem 0;
    background-color: var(--light-background);
}

.about-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-text h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.about-text ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.about-text li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.about-text strong {
    color: var(--primary-color);
}

/* Experience Section */
.experience-section {
    padding: 6rem 0;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    left: 0;
    margin-bottom: 2rem;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--accent-color);
    border-radius: 50%;
    top: 15px;
    right: -10px;
    z-index: 1;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

.timeline-content {
    padding: 1.5rem;
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 4px 20px var(--card-shadow);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--card-shadow-hover);
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: var(--secondary-color);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.timeline-date {
    color: var(--light-text);
    font-style: italic;
    margin-bottom: 1rem;
}

/* Skills Section */
.skills-section {
    padding: 6rem 0;
    background-color: var(--light-background);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-item {
    background-color: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px var(--card-shadow);
    text-align: center;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--card-shadow-hover);
}

.skill-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.skill-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Services Section */
.services-section {
    padding: 6rem 0;
    background-color: var(--light-background);
}

.services-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background-color: var(--card-background);
    border-radius: 10px;
    box-shadow: 0 5px 20px var(--card-shadow);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 320px;
    text-align: center;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--accent-color);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--card-shadow-hover);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: transform var(--transition-speed) ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--light-text);
    line-height: 1.6;
}

/* Contact Section */
.contact-section {
    padding: 6rem 0;
}

.contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-intro {
    font-size: 1.2rem;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto 3rem;
    color: var(--text-color);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.2rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--dark-background);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Media Queries */
@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0;
        height: 40vh;
        top: 0;
        background-color: var(--background-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-around;
        width: 85%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        z-index: 999;
    }

    .nav-links li {
        opacity: 0;
        margin: 0;
    }

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

    .burger {
        display: block;
        z-index: 1000;
    }

    .nav-active {
        transform: translateX(0%);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
        background-color: var(--text-color);
    }

    .toggle .line2 {
        opacity: 0;
    }

    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
        background-color: var(--text-color);
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
        left: 0;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item::after,
    .timeline-item:nth-child(even)::after {
        left: 21px;
    }

    .about-content {
        flex-direction: column;
        gap: 2rem;
    }
}

@media screen and (max-width: 480px) {
    .container {
        width: 95%;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero h2 {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

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