:root {
    --bg-color: #ffffff;
    --bg-light: #f5f5f5;
    --text-color: #111111;
    --text-muted: #666666;
    --border-color: #e5e5e5;
    --card-bg: #ffffff;

    --accent-green: #10b981;
    --accent-green-bg: rgba(16, 185, 129, 0.1);
    --accent-green-border: rgba(16, 185, 129, 0.3);

    --font-primary: 'DM Sans', sans-serif;

    --radius: 8px;
    --max-width: 1200px;
}

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

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* === Layout & Utilities === */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 80px 0;
}

main>section {
    border-bottom: 1px solid var(--border-color);
}

.bg-light {
    background-color: var(--bg-light);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: left;
}

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

/* === Header & Logo === */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    pointer-events: none;
    /* Let clicks pass through except on logo */
}

.header-container {
    padding-top: 24px;
    padding-bottom: 24px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    transition: padding 0.3s ease;
}

.text-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    color: #ffffff;
    pointer-events: auto;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    background-color: transparent;
    border-radius: 50%;
    padding: 0;
    width: auto;
    height: auto;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.logo-word {
    display: inline-flex;
    overflow: hidden;
}

.logo-initial {
    display: inline-block;
}

.logo-rest {
    display: inline-block;
    max-width: 100px;
    /* arbitrary max width that fits the word */
    transition: max-width 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    transform-origin: left center;
    opacity: 1;
}

.main-header.scrolled .header-container {
    padding-top: 16px;
    padding-bottom: 16px;
}

.main-header.scrolled .text-logo {
    font-size: 1.25rem;
    color: #ffffff;
    text-shadow: none;
    background-color: var(--text-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    /* Jemný rozptýlený tieň */
    width: 44px;
    /* Kruh maximálne o 12px väčší než text (~32px text + 12px) */
    height: 44px;
}

.main-header.scrolled .logo-rest {
    max-width: 0;
    opacity: 0;
    transform: translateX(-10px);
}

/* === Hero Section === */
.hero-section {
    position: relative;
    padding-bottom: 80px;
}

.hero-background {
    position: relative;
    height: flex;
    /* Slightly taller to accommodate multi-line title */
    background-image: url('assets/backround.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-bg-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 1024px;
}

.hero-title {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    margin-top: 100px;
    margin-bottom: 140px;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
        margin-top: 140px;
        margin-bottom: 100px;
    }
}

.hero-content {
    position: relative;
    z-index: 20;
    margin-top: 80px;
    display: flex;
    justify-content: flex-start;
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0;
    margin-top: -170px;
}

@media (min-width: 768px) {
    .profile-info {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 40px;
        margin-top: -20px;
    }
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--card-bg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 24px;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .profile-photo {
        width: 220px;
        height: 220px;
        margin-bottom: 0;
    }
}

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

@media (min-width: 768px) {
    .profile-text {
        align-items: flex-start;
    }
}

.card-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0px;
}

.card-role {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.card-bio {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.5;
    max-width: 700px;
}

.card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
}

@media (min-width: 768px) {
    .card-links {
        justify-content: flex-start;
    }
}

.status-box {
    display: inline-flex;
    align-items: center;
    background-color: var(--card-bg);
    border: 2px solid var(--accent-green-border);
    color: var(--accent-green);
    padding: 6px 14px;
    border-radius: 999px;
    /* Fully rounded */
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    /* Same as blog subtle shadow later */
}

.status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 9px;
    margin-left: -3px;
    color: var(--accent-green);
}

/* === Footer === */
/* Reveal effect */
main {
    position: relative;
    z-index: 2;
    background-color: var(--bg-color);
    margin-bottom: 100px;
    /* Has to match the height of fixed footer approx */
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    z-index: 1;

    background-image: url('assets/backround.webp');
    background-size: cover;
    background-position: center;
    color: #ffffff;

    display: flex;
    align-items: center;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 0;
}

.footer-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 18px 24px;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        align-items: flex-end;
        padding: 36px 24px;
    }
}

.footer-links {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .footer-links {
        margin-top: 0;
        margin-bottom: 0;
    }
}

/* === Top References === */
.top-refs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 992px) {
    .top-refs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ref-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ref-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ref-text {
    font-size: 0.95rem;
    color: var(--text-color);
    font-style: italic;
    margin-bottom: 24px;
    line-height: 1.6;
    flex-grow: 1;
}

.ref-author {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 0;
}

.ref-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.ref-author-info {
    display: flex;
    flex-direction: column;
}

.ref-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 2px;
}

.ref-position {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.ref-stars {
    font-size: 0.9rem;
}

/* === Project Logos Carousel === */
.project-logos-section {
    height: 120px;
    background-color: var(--bg-color);
    /* Match background */
    padding: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .project-logos-section {
        height: 90px;
    }
}

.carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
    font-size: 0;
}

.carousel-track {
    display: inline-block;
    white-space: nowrap;
    animation: scrollCarousel 60s linear infinite;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.project-logo {
    height: 120px;
    width: auto;
    object-fit: contain;
    border-right: 1px solid var(--border-color);
    display: inline-block;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .project-logo {
        height: 90px;
        width: auto;
    }
}

@keyframes scrollCarousel {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

/* === Portfolio === */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.portfolio-item {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    object-fit: cover;
    aspect-ratio: 4/3;
    object-position: top;
}

.portfolio-item.hidden {
    display: none;
}

.portfolio-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* === Lightbox === */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.lightbox-close:hover {
    color: #ccc;
}

/* === Grid for Other References === */
.other-refs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}

@media (min-width: 768px) {
    .other-refs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .other-refs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.other-refs-grid .ref-card {
    margin-bottom: 0;
}

/* === Case Studies === */
.case-studies-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .case-studies-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .case-studies-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.case-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.case-img-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.case-img-wrapper a {
    display: block;
    width: 100%;
    height: 100%;
}

.case-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.3s ease;
}

.case-img-wrapper:hover .case-img {
    transform: scale(1.05);
}

.case-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.case-client {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.case-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

/* === Blog === */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.blog-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.blog-img-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.blog-img-wrapper a {
    display: block;
    width: 100%;
    height: 100%;
}

.blog-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-img-wrapper:hover img {
    transform: scale(1.05);
}

.blog-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.blog-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
    flex-grow: 1;
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
    border: none;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    background: var(--bg-light);
    color: var(--text-color);
    opacity: 1;
}

.btn-primary {
    background: var(--text-color);
    color: var(--bg-color);
    border: 1px solid var(--text-color);
}

.btn-primary:hover {
    background: #333333;
    color: var(--bg-color);
    opacity: 1;
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

/* === Collaboration Section === */
.collaboration-section {
    position: relative;
    overflow: hidden;
    padding: 120px 0;
    background-color: var(--bg-light);
}

.icons-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.floating-icon {
    position: absolute;
    width: 48px;
    height: 48px;
    object-fit: contain;
    opacity: 0.18;
    will-change: transform;
    pointer-events: none;
}

.collab-content-direct {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    /* No card - fully transparent, icons visible behind */
}

.collab-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.collab-desc {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 40px;
    line-height: 1.5;
}

/* Adjust button inside collab */
.collaboration-section .btn-primary {
    position: relative;
    z-index: 10;
}

/* === Blog Post Layout === */
.blog-post-header {
    background-color: var(--bg-light);
    padding: 40px 24px 30px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.blog-post-meta {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.blog-post-meta span {
    display: inline-flex;
    align-items: center;
}

.blog-post-meta svg {
    margin-right: 6px;
}

.blog-post-perex {
    font-size: 1.25rem;
    color: var(--text-color);
    max-width: 752px;
    margin: 0 auto;
    line-height: 1.5;
    font-weight: 500;
}

.blog-post-content {
    max-width: 800px;
    margin: 60px auto 0;
    padding: 0px 24px 20px;
    font-size: 1.1rem;
    line-height: 1.5;
    border-bottom: 0;
}

.blog-post-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 24px;
    margin-top: 48px;
}

.blog-post-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    margin-top: 32px;
}

.blog-post-content p {
    margin-bottom: 24px;
}

.blog-post-content a:not(.btn) {
    color: #0066cc;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.blog-post-content a:not(.btn):hover {
    text-decoration-color: transparent;
    color: #004494;
}

.blog-post-content ul,
.blog-post-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.blog-post-content li {
    margin-bottom: 8px;
}

.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 32px 0;
    border: 1px solid var(--border-color);
}

.blog-post-content blockquote {
    border-left: 4px solid var(--accent-green);
    padding-left: 24px;
    margin: 40px 0;
    font-style: italic;
    font-size: 1.25rem;
    color: var(--text-muted);
}

.author-mini-profile {
    max-width: 752px;
    margin: 0 auto 0;
    padding: 40px;
    background-color: var(--bg-light);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

@media (min-width: 768px) {
    .author-mini-profile {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        border-radius: var(--radius);
        border: 1px solid var(--border-color);
        margin: 0 auto 80px;
    }
}

.author-mini-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 4px solid var(--card-bg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.author-mini-info {
    flex-grow: 1;
}

.author-mini-info h4 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.author-mini-info p {
    font-size: 1.05rem;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.6;
}

.author-mini-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 768px) {
    .author-mini-links {
        justify-content: flex-start;
    }
}