/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */
:root {
    --bg-color: #050505;
    --text-primary: #F4F4F5;
    --text-secondary: #888888;
    --accent: #333333;
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html.lenis {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    line-height: 1.5;
}

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

li {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 4vw;
}

.section {
    padding: 15vh 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    margin-bottom: 4rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.title1 {
    font-family: var(--font-heading);
    margin-bottom: 2rem;
    color: var(--text-secondary);
    letter-spacing: -0.02em;
}
/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 4vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    mix-blend-mode: difference;
}

.logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.4s ease;
}

.logo-img {
    height: 48px;
    width: auto;
}

body.menu-open .logo {
    opacity: 0;
    pointer-events: none;
}

.menu-toggle {
    position: relative;
    z-index: 101;
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    margin-left: auto;
}

.menu-toggle .line {
    display: block;
    width: 32px;
    height: 2px;
    background-color: var(--text-primary);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), width 0.4s;
}

.menu-toggle .line-2 {
    width: 24px;
}

.menu-toggle:hover .line-2 {
    width: 32px;
}

/* Overlay Nav */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: circle(0% at 100% 0%);
    transition: clip-path 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.nav-overlay.active {
    clip-path: circle(150% at 100% 0%);
}

.nav-links {
    text-align: center;
    padding: 10vh 0;
}

.nav-links li {
    overflow: hidden;
    margin: 2vh 0;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 5rem);
    font-weight: 500;
    letter-spacing: -0.04em;
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--text-secondary);
}

.nav-overlay.active .nav-link {
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s;
}

.nav-overlay.active li:nth-child(1) .nav-link { transition-delay: 0.2s; }
.nav-overlay.active li:nth-child(2) .nav-link { transition-delay: 0.3s; }
.nav-overlay.active li:nth-child(3) .nav-link { transition-delay: 0.4s; }
.nav-overlay.active li:nth-child(4) .nav-link { transition-delay: 0.5s; }
.nav-overlay.active li:nth-child(5) .nav-link { transition-delay: 0.6s; }

/* Hamburger Active State */
.menu-toggle.active .line-1 {
    transform: translateY(5px) rotate(45deg);
}

.menu-toggle.active .line-2 {
    width: 32px;
    transform: translateY(-5px) rotate(-45deg);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.anime-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

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

/* To ensure abstract elements fade nicely */
.anime-el {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 70%);
}

.hero-content {
    position: absolute;
    bottom: 2rem;
    left: 0;
    width: 100%;
    padding: 0 4vw;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 2;
}

.hero-top-left {
    position: absolute;
    top: 120px; /* Below header */
    left: 4vw;
    z-index: 10;
}

.live-clock {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.clock-label {
    font-size: 0.7rem;
    opacity: 0.7;
}

#bratislava-time {
    color: var(--text-primary);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.hero-left-bottom {
    flex: 1;
}

.hero-title {
    font-family: 'Playfair Display', serif; /* More professional serif font */
    font-size: clamp(4rem, 10vw, 12rem);
    font-weight: 400;
    font-style: italic;
    line-height: 0.9;
    letter-spacing: -0.02em;
    margin: 0;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}

.hero-title .char {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
}

.hero-right-bottom {
    text-align: right;
    max-width: 300px;
    padding-bottom: 1rem;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 400;
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.projects-list {
    border-top: 1px solid var(--accent);
}

.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--accent);
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    z-index: 2;
}

.project-item:hover {
    padding-left: 2vw;
    padding-right: 2vw;
}

.project-item:hover .project-name {
    color: var(--text-primary);
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-name {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.4s;
    letter-spacing: -0.02em;
}

.project-role {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-secondary);
}

.project-tech {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: right;
}

.projects-visual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.project-visual-card {
    display: block;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/10;
    background-color: var(--accent);
}

.card-img-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.card-overlay .project-name {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.card-overlay .project-role {
    color: #fff;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.project-visual-card:hover .card-img-wrapper img {
    opacity: 0.8;
    transform: scale(1.05);
}

.project-visual-card:hover .card-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Cursor Preview (custom logic in JS) */
.project-preview-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 350px;
    height: 450px;
    background-color: var(--accent);
    border-radius: 8px;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.4s, transform 0.4s;
    background-size: cover;
    background-position: center;
}

.project-preview-cursor.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-section {
    background-color: #080808;
}

.about-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

/* Corner brackets for the frame */
.about-image-wrapper::before,
.about-image-wrapper::after {
    content: '';
    position: absolute;
    width: 20%;
    height: 20%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 5;
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-image-wrapper::before {
    top: 5%;
    left: 5%;
    border-right: none;
    border-bottom: none;
}

.about-image-wrapper::after {
    bottom: 5%;
    right: 5%;
    border-left: none;
    border-top: none;
}

.about-image-wrapper:hover::before {
    top: 3%;
    left: 3%;
}

.about-image-wrapper:hover::after {
    bottom: 3%;
    right: 3%;
}

/* Bottom fade to blend the cropped portrait */
.bottom-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 25%;
    background: linear-gradient(to top, #080808 5%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
    transform: scale(1.15);
    transform-origin: bottom center;
    position: relative;
    z-index: 1;
}

.about-text-small {
    font-family: var(--font-body);
    font-size: clamp(1.1rem, 1.5vw, 1.5rem);
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================================================
   Creative Gallery
   ========================================================================== */
.creative-grid {
    column-count: 3;
    column-gap: 2rem;
}

.grid-item {
    overflow: hidden;
    position: relative;
    border-radius: 4px;
    margin-bottom: 2rem;
    break-inside: avoid;
    cursor: pointer;
}

.grid-item img {
    width: 100%;
    height: auto;
    display: block;
    transform: scale(1.05);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.grid-item:hover img {
    transform: scale(1);
}

@media (max-width: 1024px) {
    .creative-grid {
        column-count: 2;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    padding: 10vh 0 4vh;
    border-top: 1px solid var(--accent);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 10vh;
}

.footer-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 6rem);
    font-weight: 500;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

.footer-email {
    font-family: var(--font-body);
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: color 0.3s;
    display: inline-block;
    position: relative;
}

.footer-email::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 1px;
    background-color: var(--text-primary);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-email:hover {
    color: var(--text-primary);
}

.footer-email:hover::after {
    width: 100%;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: right;
}

.social-links a {
    font-size: 1.125rem;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }
    
    .hero-right-bottom {
        text-align: left;
    }

    .project-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .projects-visual-grid {
        grid-template-columns: 1fr;
    }

    .project-tech {
        text-align: left;
    }
    
    .creative-grid {
        column-count: 1;
        column-gap: 0;
    }
    
    .grid-item {
        margin-bottom: 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 3rem;
    }

    .social-links {
        text-align: left;
    }
}

/* ==========================================================================
   New Components & Cookie Banner
   ========================================================================== */
/* Removed obsolete hero-image-wrapper */

.view-more-container {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
}

.view-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--text-primary);
    padding: 1rem 2.5rem;
    border: 1px solid var(--accent);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.view-more-btn:hover {
    background-color: var(--text-primary);
    color: var(--bg-color);
}

.view-more-btn .arrow {
    transition: transform 0.3s ease;
}

.view-more-btn:hover .arrow {
    transform: translateX(5px);
}

.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 1.5rem;
    z-index: 1000;
    transform: translateY(150%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    justify-content: center;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1200px;
    width: 100%;
}

.cookie-content p {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.cookie-content a {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.cookie-btn {
    background: var(--text-primary);
    color: var(--bg-color);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.3s;
}

.cookie-btn:hover {
    opacity: 0.9;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    transition: color 0.3s;
}

.footer-legal a:hover {
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .nav-links li {
        margin: 0.5rem 0;
    }
    
    .nav-link {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }
    
    .about-content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-center {
        order: -1;
    }
    
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 5, 5, 0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content-wrapper {
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    z-index: 10000;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--text-secondary);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, color 0.3s;
    z-index: 10000;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

@media (max-width: 768px) {
    .lightbox-prev { left: 1rem; width: 40px; height: 40px; font-size: 1.5rem; }
    .lightbox-next { right: 1rem; width: 40px; height: 40px; font-size: 1.5rem; }
    .lightbox-close { top: 1rem; right: 1rem; font-size: 2.5rem; }
}

/* ==========================================================================
   Initial Loader (Curtain)
   ========================================================================== */
.initial-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.loader-panel {
    position: absolute;
    top: 0;
    width: 50vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 1;
}

.loader-left {
    left: 0;
}

.loader-right {
    right: 0;
}

.loader-content {
    position: relative;
    z-index: 2;
}

.loader-logo {
    height: 80px;
    width: auto;
    opacity: 0;
    transform: scale(0.8);
}
