/* --- Proměnné a Reset --- */
:root {
    --bg-dark: #0d1117;
    --bg-card: #161b22;
    --bg-card-hover: #1c2333;
    --accent: #00f3ff;
    --accent-glow: rgba(0, 243, 255, 0.3);
    --text-main: #e6edf3;
    --text-muted: #8b949e;
    --border: #30363d;
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none; /* Skrytí výchozího kurzoru */
}

/* --- Vlastní Kurzor --- */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s, background-color 0.3s;
}

/* Stav kurzoru při najetí na interaktivní prvek */
body.cursor-hover .cursor-dot {
    width: 12px;
    height: 12px;
    background-color: #fff;
}

body.cursor-hover .cursor-ring {
    width: 60px;
    height: 60px;
    border-color: var(--accent);
    background-color: rgba(0, 243, 255, 0.1);
}

/* Skrytí vlastního kurzoru na dotykových zařízeních */
body.touch-device .cursor-dot,
body.touch-device .cursor-ring {
    display: none;
}
body.touch-device {
    cursor: auto;
}
body.touch-device a, body.touch-device button, body.touch-device .tilt-card {
    cursor: auto;
}

/* --- Canvas Pozadí --- */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, #111922 0%, var(--bg-dark) 100%);
}

/* --- Navigace --- */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    z-index: 1000;
    background: rgba(13, 17, 23, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.3s;
}

#navbar.scrolled {
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: none;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    transition: all 0.3s;
}

/* --- Třídy a Komponenty --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.section-title {
    font-family: var(--font-mono);
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-main);
    position: relative;
    display: inline-block;
}

.section-title::before {
    content: '> ';
    color: var(--accent);
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--accent);
    color: var(--bg-dark);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: none;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-outline:hover {
    background-color: var(--accent);
    color: var(--bg-dark);
}

/* Tilt karty - společný styl */
.tilt-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: border-color 0.3s, box-shadow 0.3s;
    will-change: transform;
}

/* Glow efekt uvnitř karty sledující myš */
.tilt-card::before {
    content: '';
    position: absolute;
    top: var(--mouse-y, 50%);
    left: var(--mouse-x, 50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 0;
}

.tilt-card:hover::before {
    opacity: 1;
}

.tilt-card > * {
    position: relative;
    z-index: 1;
}

.tilt-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
}

/* --- Hero Sekce --- */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    max-width: 800px;
}

.greeting {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 1s 0.5s forwards;
}

#hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 1s 0.8s forwards;
}

.motto {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeInUp 1s 1.1s forwards;
}

#hero .btn {
    opacity: 0;
    animation: fadeInUp 1s 1.4s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Vzdělání --- */
.education-card {
    max-width: 800px;
    margin: 0 auto;
}

.edu-date {
    font-family: var(--font-mono);
    color: var(--accent);
    margin-bottom: 0.5rem;
    display: inline-block;
    border: 1px solid var(--accent);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.edu-field {
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-style: italic;
}

.edu-desc {
    margin-top: 1rem;
}

/* --- Zkušenosti (Timeline) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background-color: var(--border);
}

.timeline-item {
    position: relative;
    padding-left: 30px;
    margin-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    left: -36px;
    top: 20px;
    width: 14px;
    height: 14px;
    background-color: var(--bg-dark);
    border: 3px solid var(--accent);
    border-radius: 50%;
    z-index: 2;
}

.timeline-date {
    font-family: var(--font-mono);
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.timeline-date span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.timeline-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.timeline-item h4 {
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 1rem;
}

.timeline-item ul {
    list-style: none;
}

.timeline-item li {
    margin-bottom: 0.8rem;
    padding-left: 1.2rem;
    position: relative;
}

.timeline-item li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-family: var(--font-mono);
}

/* --- Projekty --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card h3 {
    margin: 1rem 0 0.5rem 0;
    color: var(--accent);
    font-size: 1.1rem;
}

.project-icon {
    font-size: 2rem;
}

/* --- Dovednosti --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background-color: rgba(0, 243, 255, 0.1);
    color: var(--accent);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    transition: background-color 0.3s, transform 0.3s;
}

.tag:hover {
    background-color: var(--accent);
    color: var(--bg-dark);
    transform: translateY(-2px);
}

/* --- Certifikáty a Jazyky --- */
.cert-lang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.cert-card ul, .lang-card ul {
    list-style: none;
}

.cert-card li, .lang-card li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.cert-card li::before, .lang-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* --- Kontakt / Patička --- */
#kontakt {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border);
    padding-top: 6rem;
}

.contact-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-info p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-info span {
    color: var(--text-muted);
    font-weight: bold;
    display: inline-block;
    width: 100px;
}

.contact-info a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Responzivita --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hamburger {
        display: flex;
    }
    #hero h1 {
        font-size: 2.5rem;
    }
    .motto {
        font-size: 1rem;
    }
    .cert-lang-grid {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Mobilní menu otevřené */
.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(12px);
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
}