:root {
    --bg-color: #050505;
    --text-color: #f1f1f1;
    --text-secondary: #a0a0a0;
    --accent-color: #ffffff;

    /* Responsive Typography */
    --font-size-h1: clamp(2.3rem, 5vw, 6rem);
    --font-size-h2: clamp(2rem, 3vw, 3.5rem);
    --font-size-p: clamp(1rem, 1.1vw, 1.2rem);

    --font-main: 'Inter', sans-serif;
    --transition-speed: 0.4s;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- Utilities --- */
.mobile-break {
    display: none;
}

.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-frosted {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}


.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.section {
    padding: 120px 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.section-title {
    font-size: var(--font-size-h2);
    text-align: center;
    margin-bottom: 80px;
    font-weight: 200;
    letter-spacing: -1px;
    text-transform: uppercase;
    background: var(--accent-color);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    /* Animated later */
    transform: translateY(30px);
}

/* --- Loader --- */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--text-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Navigation --- */
.floating-nav {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 12px 30px;
    border-radius: 100px;
    width: max-content;
    background: rgba(0, 0, 0, 0.5);
}

.floating-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.floating-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.6;
    transition: all var(--transition-speed);
    font-weight: 500;
    position: relative;
}

.floating-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%;
    height: 1px;
    background: var(--accent-color);
    transition: transform var(--transition-speed) var(--ease-out-expo);
    transform-origin: center;
}

.floating-nav a:hover,
.floating-nav a.active {
    opacity: 1;
}

.floating-nav a:hover::after,
.floating-nav a.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* --- Hero Section --- */
#hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    text-align: center;
    z-index: 1;
    /*mix-blend-mode: overlay;
    /* Create nice interaction with video */
}

.hero-content h1 {
    font-size: var(--font-size-h1);
    font-weight: 800;
    letter-spacing: -3px;
    line-height: 0.9;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: var(--font-size-p);
    font-weight: 400;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 1);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
}

.arrow-down {
    width: 15px;
    height: 15px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) rotate(45deg);
    }

    40% {
        transform: translateY(-10px) rotate(45deg);
    }

    60% {
        transform: translateY(-5px) rotate(45deg);
    }
}

/* --- Portfolio --- */
#portfolio {
    background-image: url('../assets/rudolfinum.webp');
    background-size: cover;
    background-position: center;
    position: relative;

}

#portfolio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.toggle-container {
    display: flex;
    justify-content: center;
    width: fit-content;
    margin: 0 auto 50px;
    border-radius: 30px;
    padding: 5px;
    position: relative;
    z-index: 1;
}

.toggle-container2 {
    display: flex;
    justify-content: center;
    width: fit-content;
    margin: 0 auto 50px;
    margin-top: 30px;
    border-radius: 30px;
    padding: 15px;
    position: relative;
    z-index: 1;
    font-size: 1rem;
}


.toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 10px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: background var(--transition-speed);
}

.toggle-btn.active {
    background: rgba(255, 255, 255, 0.1);
}

.gallery-grid {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /* Slightly smaller base width standard */
    gap: 30px;
    margin: 0 auto;
    padding-left: 100px;
    padding-right: 100px;
    width: 100%;
    justify-content: center;
    grid-auto-flow: dense;
}

.gallery-grid.active {
    display: grid;
}

.gallery-item {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    aspect-ratio: 4/5;
    /* Modern portrait ratio */
    border-radius: 10px;
    /* Sharper corners for a cleaner look */
    overflow: hidden;
    transition: transform 0.6s var(--ease-out-expo), filter 0.6s ease;
    cursor: pointer;
}

a.gallery-item {
    text-decoration: none;
    color: inherit;
    display: block;
}


.grid-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    padding: 15px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s var(--ease-out-expo);
    z-index: 2;
    background: rgba(0, 0, 0, 0.2);
    /* Fallback */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}


.gallery-item:hover {
    filter: brightness(1.1);
}

.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 50%);
    opacity: 0.6;
    transition: opacity 0.6s ease;
    z-index: 1;
}

.gallery-item:hover .item-overlay {
    opacity: 1;
}

.gallery-item:hover .grid-content {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item .item-overlay h3 {
    display: none;
    /* Removing the old "More" overlay style */
}

/* --- About --- */


#about {
    background-image: url('../assets/zare.webp');
    background-size: cover;
    background-position: center;
    position: relative;
}


.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
    padding: 50px;
    border-radius: 20px;
}

.profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.placeholder-avatar {
    width: 100%;
    height: 100%;
    background-image: url("../assets/me.webp");
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    color: #777;
}

.profile-pic:hover {
    filter: brightness(1.06);
    scale: 1.05;
    transition: all 0.2s ease-in-out;
}




.about-text p {
    font-size: 1.2rem;
    line-height: 1.8;
}

/* --- Pricing --- */

#pricing {
    background-image: url('../assets/norsko.webp');
    background-size: cover;
    background-position: center;
    position: relative;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.pricing-card {
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    transition: transform var(--transition-speed);
}

.pricing-card:hover {
    transform: scale(1.02);
}

.pricing-card h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.pricing-card .price {
    font-size: 1.5rem;
    color: #aaa;
    margin-bottom: 30px;
}

.pricing-card ul {
    list-style: none;
    text-align: left;
}

.pricing-card li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.pricing-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--text-color);
}


#contact {
    background-image: url('../assets/madeira.webp');
    background-size: cover;
    background-position: center;
    position: relative;
}

.contact-card {
    max-width: 500px;
    margin: 0 auto 50px;
    padding: 50px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    color: white;
    text-align: center;
}

.contact-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 10px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.contact-avatar:hover {
    filter: brightness(1.1);
    scale: 1.1;
    transition: all 0.2s ease-in-out;
}


.contact-details h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: -1px;
}

.contact-details p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.contact-details .icon {
    font-size: 1.2rem;
}

.contact-details a {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    padding-bottom: 2px;
}

.contact-details a:hover {
    border-bottom-color: white;
    opacity: 0.8;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.social-links a {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.4s var(--ease-out-expo);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

footer {
    text-align: center;
    padding: 50px 20px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Animations --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease, transform 1s var(--ease-out-expo);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-delay-1 {
    transition-delay: 0.1s;
}

.stagger-delay-2 {
    transition-delay: 0.2s;
}

.stagger-delay-3 {
    transition-delay: 0.3s;
}


footer {
    text-align: center;
    padding: 30px;
    font-size: 0.9rem;
    color: #666;
}



/* --- Responsive --- */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .section {
        padding: 60px 0;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .mobile-break {
        display: block;
    }

    /* Mobile Navigation */
    .floating-nav {
        position: fixed;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1000;
        padding: 10px 15px;
        border-radius: 50px;
        width: 92%;
        max-width: 400px;
        background: rgba(0, 0, 0, 0.65);
        /* Darker semi-transparent bg */
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        justify-content: center;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .floating-nav ul {
        gap: 0;
        width: 100%;
        justify-content: space-evenly;
    }

    .floating-nav a {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    .floating-nav.hidden {
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
    }



    .about-content {
        flex-direction: column;
        text-align: left;
        padding: 30px;
        /* Reducing padding inside glass panel */
        gap: 30px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        /* Allow smaller items on mobile */
        margin-left: 0;
        margin-right: 0;
        padding: 0 80px;
        /* Use padding instead of margin for gutter */
        gap: 20px;
    }

    .gallery-item .grid-content {
        opacity: 1;
        transform: translateY(0);
    }

    .gallery-item .item-overlay {
        opacity: 1;
    }
}


.submit-btn {
    color: var(--text-color);
    padding: 10px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: background var(--transition-speed);
    margin-top: 10px;


    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.submit-btn:hover {
    transform: scale(1.05);
    transition: all 0.3s ease;
}



.submit-btn2 {
    color: var(--text-color);
    padding: 10px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 10px;
    background: transparent;
    border: 1px solid rgb(255, 255, 255);
}

.submit-btn2:hover {
    transform: scale(1.05);
    transition: all 0.3s ease;
}

/* --- Lenis Smooth Scroll --- */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* --- Avatar Flip Animation --- */
.profile-pic {
    perspective: 1000px;
    cursor: pointer;
}

.profile-pic-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.profile-pic.flipped .profile-pic-inner {
    transform: rotateY(180deg);
}

.profile-pic-front,
.profile-pic-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 50%;
    overflow: hidden;
}

.profile-pic-back {
    transform: rotateY(180deg);
}

/* Optional: Style for the alternate avatar to distinguish it if it's the same image */
.alt-avatar {
    background-image: url("../assets/fujifilm.png");
}

/* Text Transition - Stacking */
.about-text {
    display: grid;
    grid-template-areas: "stack";
    align-items: center;
    /* or start, depending on preference */
}

.text-side {
    grid-area: stack;
    opacity: 0;
    pointer-events: none;

}

.text-side.active {
    opacity: 1;
    pointer-events: auto;
}

/* Remove old p transition to avoid conflict */
.about-text p {
    margin: 0;
}