:root {
    --bg-color: #f4f4f0;
    --text-color: #1a1a1a;
    --accent-color: #333;
    --secondary-text: #666;
    --font-heading: 'Syne', sans-serif;
    --font-body: 'Inter', sans-serif;
    --gap: 1.5rem;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.5;
    overflow-x: hidden;
}

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

video {
    width: 100%;
    max-width: 100%;
    display: block;
    height: auto;
    object-fit: contain;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
}

/* --- LANGUAGE SWITCH --- */
.language-switch {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    font-family: var(--font-body);
    font-size: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    mix-blend-mode: exclusion;
    color: #fff;
}

.lang-option {
    text-decoration: none;
    color: #fff;
    opacity: 0.4;
    transition: opacity 0.3s;
    font-weight: 500;
}

.lang-option.active,
.lang-option:hover {
    opacity: 1;
}

.separator {
    color: #fff;
    opacity: 0.4;
}

/* --- INTRO SECTION --- */
#intro {
    min-height: 100vh;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.intro-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.intro-header {
    margin-bottom: 2rem;
}

.intro-header h1 {
    font-size: clamp(3rem, 8vw, 8rem);
    line-height: 0.9;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    margin-left: -0.07em;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--secondary-text);
    font-weight: 500;
    min-height: 1.8em;
}

.bento-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: var(--gap);
}

.bento-item {
    background: #fff;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bento-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.photo-block {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    padding: 0;
    min-height: 500px;
}

.photo-block .profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-block {
    grid-column: 2 / 4;
    grid-row: 1 / 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 280px;
}

.about-block h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.about-block p {
    font-size: 1.1rem;
    max-width: 600px;
    min-height: 5.5em;
}

.exp-block {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    min-height: 220px;
}

.exp-block h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.exp-block ul {
    list-style: none;
}

.exp-block li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.tools-block {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
    min-height: 220px;
}

.tools-block h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.tools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tools-list span {
    background: #f0f0f0;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Decorative Elements */
.deco-star {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 80px;
    filter: invert(1);
    mix-blend-mode: difference;
}

.deco-flower {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 150px;
    opacity: 0.1;
    transform: rotate(15deg);
}

.deco-cursor {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    animation: float 3s ease-in-out infinite;
}

.deco-butterfly {
    position: absolute;
    top: 0%;
    left: 2%;
    width: 200px;
    opacity: 0.8;
    pointer-events: none;
    z-index: -1;
    animation: fly 6s ease-in-out infinite;
    transform-origin: center;
    filter: drop-shadow(0 0 20px rgba(64, 156, 255, 0.6));
}

.project-section.reverse .deco-butterfly {
    left: auto;
    right: 2%;
    animation: fly-normal 6s ease-in-out infinite;
}



@keyframes flutter {

    0%,
    100% {
        transform: scaleX(1);
    }

    50% {
        transform: scaleX(0.6);
    }
}

@keyframes flutter-mirrored {

    0%,
    100% {
        transform: scaleX(-1);
    }

    50% {
        transform: scaleX(-0.6);
    }
}

@keyframes fly {

    0%,
    100% {
        transform: scaleX(-1) translate(0, 0);
    }

    33% {
        transform: scaleX(-1) translate(-5px, -15px);
    }

    66% {
        transform: scaleX(-1) translate(5px, 10px);
    }
}

@keyframes fly-normal {

    0%,
    100% {
        transform: scaleX(1) translate(0, 0);
    }

    33% {
        transform: scaleX(1) translate(-5px, -15px);
    }

    66% {
        transform: scaleX(1) translate(5px, 10px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* --- PROJECT SECTIONS --- */
.project-section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.project-container {
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.project-section.reverse .project-container {
    grid-template-columns: 1.2fr 1fr;
}

.project-section.reverse .project-info {
    order: 2;
}

.project-section.reverse .project-visuals {
    order: 1;
}

.project-info {
    padding: 2rem;
}

.project-number {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: #ddd;
    font-weight: 800;
    display: block;
    margin-bottom: 1rem;
}

.project-info h2 {
    font-size: 4rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.project-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.project-desc {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #444;
    max-width: 500px;
    min-height: 7em;
}

.project-tags {
    list-style: none;
    display: flex;
    gap: 1rem;
}

.project-tags li {
    border: 1px solid #ccc;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
}

.project-visuals {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.project-visuals video {
    flex: 0 1 auto;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    align-self: center;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.project-visuals iframe {
    width: 100%;
    max-width: 100%;
    min-height: 500px;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.project-visuals iframe.vertical {
    width: auto;
    height: 85vh;
    max-height: 800px;
    aspect-ratio: 9 / 16;
}

.project-visuals iframe.square {
    width: auto;
    height: 80vh;
    max-height: 750px;
    aspect-ratio: 1 / 1;
}

.secondary-video {
    display: none;
}

@media (min-width: 1200px) {
    video.secondary-video {
        display: block;
        width: 50%;
    }

    iframe.secondary-video {
        display: block;
        height: 65vh;
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .project-visuals iframe.vertical {
        height: 60vh;
        max-height: 450px;
    }

    .project-visuals iframe.square {
        height: 50vh;
        max-height: 400px;
    }
}

/* --- CLIENTS SECTION --- */
#clients {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #111;
    background-image: url('images/hands.png');
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    color: #fff;
    padding: 4rem 2rem;
    position: relative;
    overflow: visible;
}

#clients > picture {
    position: absolute;
    left: 2%;
    bottom: 0;
    transform: translateY(100%);
    width: 120px;
    pointer-events: none;
    z-index: 10;
}

.deco-phone {
    width: 100%;
    height: auto;
}

@media (max-width: 1024px) {
    #clients > picture {
        width: 80px;
    }
}

@media (max-width: 768px) {
    #clients > picture {
        display: none;
    }
}

.section-title {
    font-size: 2rem;
    margin-bottom: 4rem;
    opacity: 0.5;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4rem 6rem;
    text-align: center;
    max-width: 1200px;
}

.clients-grid span {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    opacity: 0.3;
    transition: opacity 0.3s;
    cursor: default;
}

.clients-grid span:hover {
    opacity: 1;
}

/* --- CONTACT SECTION --- */
#contact {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.contact-container {
    text-align: center;
    z-index: 2;
}

.contact-label {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.email-link {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 4rem);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 800;
    margin-bottom: 3rem;
    transition: color 0.3s;
    word-break: break-word;
}

.email-link:hover {
    color: #555;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: 1fr 1fr;
    }

    .photo-block {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
        min-height: 400px;
    }

    .about-block {
        grid-column: 1 / 3;
        grid-row: 2 / 3;
    }

    .exp-block {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
    }

    .tools-block {
        grid-column: 2 / 3;
        grid-row: 3 / 4;
    }

    .project-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-section.reverse .project-container {
        grid-template-columns: 1fr;
    }

    .project-section.reverse .project-info {
        order: 1;
    }

    .project-section.reverse .project-visuals {
        order: 2;
    }

    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .photo-block,
    .about-block,
    .exp-block,
    .tools-block {
        grid-column: 1 / 2;
        grid-row: auto;
    }

    .intro-header h1 {
        font-size: 3.5rem;
    }

    .project-info h2 {
        font-size: 3rem;
    }

    .clients-grid {
        grid-template-columns: 1fr;
    }
}

/* --- YOUTUBE FACADE (Lazy Load) --- */
.youtube-facade {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    background-size: cover;
    background-position: center;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    overflow: hidden;
}

.youtube-facade::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}

.youtube-facade:hover::before {
    background: rgba(0, 0, 0, 0.1);
}

.youtube-facade::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 48"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="%23f00"/><path d="M45 24 27 14v20" fill="%23fff"/></svg>') no-repeat center;
    background-size: contain;
    transition: transform 0.2s ease;
}

.youtube-facade:hover::after {
    transform: translate(-50%, -50%) scale(1.1);
}

.youtube-facade.vertical {
    width: calc(85vh * 9 / 16);
    max-width: 450px;
    height: 85vh;
    max-height: 800px;
    aspect-ratio: 9 / 16;
}

.youtube-facade.square {
    width: 80vh;
    max-width: 750px;
    height: 80vh;
    max-height: 750px;
    aspect-ratio: 1 / 1;
}

.youtube-facade iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 1rem;
}

.youtube-facade.activated::before,
.youtube-facade.activated::after {
    display: none;
}

@media (min-width: 1200px) {
    .youtube-facade.secondary-video {
        display: block;
        height: 65vh;
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .youtube-facade.vertical {
        width: calc(60vh * 9 / 16);
        max-width: 100%;
        height: 60vh;
        max-height: 450px;
    }

    .youtube-facade.square {
        width: 50vh;
        max-width: 100%;
        height: 50vh;
        max-height: 400px;
    }
}
