/* ========================================
   František Hampl — Personal Portfolio
   Modern Dark Theme with Glassmorphism
   ======================================== */

/* === Reset & Base === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark palette */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a28;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);

    /* Accent gradient — electric blue to purple */
    --accent-1: #6366f1;
    --accent-2: #8b5cf6;
    --accent-3: #a78bfa;
    --gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));

    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);

    /* Sizing */
    --nav-height: 72px;
    --container-max: 1200px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Transition */
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-1);
    border-radius: 4px;
}

/* === Utilities === */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.accent {
    color: var(--accent-1);
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.4s var(--ease);
}

.glass-card:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    box-shadow: var(--glass-shadow), 0 0 60px rgba(99, 102, 241, 0.06);
    transform: translateY(-2px);
}

/* === Cursor Glow === */
.cursor-glow {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    /* Vibrant center fading out gently */
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.05) 30%, transparent 65%);
    z-index: 9999;
    /* Sit on top to interact with colors of elements */
    mix-blend-mode: color-dodge;
    /* Interact beautifully with backgrounds */
    will-change: transform;
    /* Hardware acceleration */
    transition: opacity 0.5s var(--ease);
    opacity: 0;
}

.cursor-glow.visible {
    opacity: 1;
}

/* === Navigation === */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: all 0.4s var(--ease);
}

.nav--scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.nav__links {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
}

.nav__links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.3s var(--ease);
    position: relative;
}

.nav__links a:hover {
    color: var(--text-primary);
    background: var(--surface);
}

.nav__cta {
    background: var(--gradient) !important;
    color: #fff !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    border-radius: var(--radius-md) !important;
}

.nav__cta:hover {
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4) !important;
    transform: translateY(-1px);
}

/* Hamburger */
.nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav__hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s var(--ease);
}

.nav__hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav__hamburger.active span:nth-child(2) {
    opacity: 0;
}

.nav__hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease);
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu__links {
    list-style: none;
    text-align: center;
}

.mobile-menu__links li {
    margin: 16px 0;
}

.mobile-menu__links a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 600;
    transition: color 0.3s;
}

.mobile-menu__links a:hover {
    color: var(--accent-1);
}

/* === Hero === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-height) + 40px) 24px 60px;
    max-width: var(--container-max);
    margin: 0 auto;
    gap: 60px;
    position: relative;
}

.hero__particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
}

.hero__content {
    flex: 1;
    z-index: 1;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-3);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 8px 18px;
    border-radius: 100px;
    margin-bottom: 24px;
}

.hero__title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.hero__subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: 36px;
    line-height: 1.8;
}

.hero__subtitle strong {
    color: var(--text-primary);
}

.hero__actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    border: none;
    font-family: inherit;
}

.btn--primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn--primary:hover {
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.btn--outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn--outline:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: rgba(99, 102, 241, 0.05);
}

/* Stats */
.hero__stats {
    display: flex;
    gap: 40px;
    align-items: flex-end;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat__number {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat__suffix {
    font-size: 1.2rem;
    font-weight: 600;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat__label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

.stat__context {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-bottom: 2px;
}

/* Hero Image */
.hero__image {
    flex-shrink: 0;
    z-index: 1;
}

.hero__image-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
}

.hero__image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    border: 3px solid rgba(99, 102, 241, 0.3);
}

.hero__image-ring {
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    border: 1px solid rgba(99, 102, 241, 0.2);
    animation: pulse-ring 3s ease-in-out infinite;
}

.hero__image-ring--2 {
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border-color: rgba(139, 92, 246, 0.1);
    animation-delay: 1.5s;
}

@keyframes pulse-ring {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.04);
        opacity: 0.5;
    }
}

/* Scroll indicator */
.hero__scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.scroll-indicator__line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent-1), transparent);
    animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    51% {
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

/* === Sections === */
.section {
    padding: 120px 0;
    position: relative;
}

.section__header {
    text-align: center;
    margin-bottom: 64px;
}

.section__tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-1);
    margin-bottom: 16px;
}

.section__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

/* === About === */
.about__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: start;
}

.about__text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.about__text strong {
    color: var(--text-primary);
}

.about__values-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.values-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.value-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 10px 16px;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s var(--ease);
}

.value-chip:hover {
    border-color: var(--accent-1);
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.08);
}

.value-chip__icon {
    font-size: 1rem;
}

/* === Timeline === */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-1), var(--accent-2), transparent);
}

.timeline__item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 40px;
}

.timeline__item:last-child {
    margin-bottom: 0;
}

.timeline__marker {
    position: absolute;
    left: 12px;
    top: 24px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-1);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
    z-index: 1;
}

.timeline__marker--edu {
    background: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

.timeline__card {
    padding: 28px;
}

.timeline__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 16px;
}

.timeline__date {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-3);
    letter-spacing: 0.02em;
}

.timeline__role {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 4px 0;
}

.timeline__company {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.timeline__badge {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 100px;
    flex-shrink: 0;
}

.timeline__badge--current {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-1);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.timeline__badge--edu {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-2);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.timeline__list {
    list-style: none;
    padding: 0;
}

.timeline__list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.timeline__list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-1);
    font-weight: 600;
}

/* === Skills === */
.skills__grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

/* First 4 cards: 3 cols each = full row */
.skills__grid .skill-card:nth-child(-n+4) {
    grid-column: span 3;
}

/* Last 3 cards: 4 cols each = full row, centred */
.skills__grid .skill-card:nth-child(n+5) {
    grid-column: span 4;
}

.skill-card {
    padding: 28px;
    text-align: center;
}

.skill-card__icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.skill-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.skill-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

/* Tags */
.tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    padding: 5px 12px;
    border-radius: 100px;
    transition: all 0.3s var(--ease);
}

.tag:hover {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-3);
    border-color: rgba(99, 102, 241, 0.3);
}

.tag--sm {
    font-size: 0.75rem;
    padding: 3px 10px;
}

/* === Projects === */
.projects__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.project-card {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-card__number {
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.4;
    line-height: 1;
}

.project-card__title {
    font-size: 1.15rem;
    font-weight: 700;
}

.project-card__text {
    color: var(--text-secondary);
    font-size: 0.93rem;
    flex: 1;
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* === Interests === */
.interests__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.interest-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 14px 24px;
    border-radius: var(--radius-xl);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.4s var(--ease);
    cursor: default;
}

.interest-chip:hover {
    border-color: var(--accent-1);
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.08);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
}

.interest-chip__icon {
    font-size: 1.3rem;
}

/* === Contact === */
.contact__grid {
    max-width: 600px;
    margin: 0 auto;
}

.contact__intro {
    color: var(--text-secondary);
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 40px;
}

.contact__links {
    display: grid;
    gap: 16px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    text-decoration: none;
    color: var(--text-primary);
    cursor: pointer;
}

.contact-link__icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-link__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.contact-link__value {
    display: block;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s;
}

a.contact-link:hover .contact-link__value {
    color: var(--accent-1);
}

/* === Footer === */
.footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer__logo {
    font-size: 1.2rem;
    font-weight: 800;
}

.footer__copy {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer__socials {
    display: flex;
    gap: 16px;
}

.footer__socials a {
    color: var(--text-muted);
    transition: color 0.3s;
}

.footer__socials a:hover {
    color: var(--accent-1);
}

/* === Reveal Animation === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    will-change: opacity, transform;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* === Floating Particles === */
.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--accent-1);
    opacity: 0.08;
    pointer-events: none;
    animation: float-particle linear infinite;
}

@keyframes float-particle {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 0.08;
    }

    90% {
        opacity: 0.08;
    }

    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* === Responsive === */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        gap: 40px;
        padding-top: calc(var(--nav-height) + 60px);
    }

    .hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__stats {
        justify-content: center;
    }

    .hero__image-wrapper {
        width: 260px;
        height: 260px;
    }

    .about__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .skills__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skills__grid .skill-card:nth-child(-n+4),
    .skills__grid .skill-card:nth-child(n+5) {
        grid-column: span 1;
    }

    .projects__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav__links {
        display: none;
    }

    .nav__hamburger {
        display: flex;
    }

    .section {
        padding: 80px 0;
    }

    .hero__title {
        font-size: 2.2rem;
    }

    .hero__image-wrapper {
        width: 220px;
        height: 220px;
    }

    .skills__grid {
        grid-template-columns: 1fr;
    }

    .skills__grid .skill-card:nth-child(-n+4),
    .skills__grid .skill-card:nth-child(n+5) {
        grid-column: span 1;
    }

    .projects__grid {
        grid-template-columns: 1fr;
    }

    .hero__stats {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .footer__inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 1.8rem;
    }

    .hero__subtitle {
        font-size: 0.95rem;
    }

    .hero__actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 260px;
    }
}