:root {
    --black: #050505;
    --white: #ffffff;
    --accent: #ff3e00; 
}

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

body {
    background: var(--black);
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
}

/* --- HERO --- */
.hero-extreme {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mtn-hero {
    position: absolute;
    inset: 0;
    background: url('mountains-1.jpg') center/cover no-repeat;
    background-attachment: fixed;
    filter: brightness(0.3) contrast(1.2);
    z-index: 1;
}

.hero-content { z-index: 10; text-align: center; }
.glitch-text {
    font-family: 'Syne', sans-serif;
    font-size: 20vw;
    letter-spacing: -1vw;
    line-height: 0.8;
    text-shadow: 5px 5px 0px var(--accent);
}
.hero-sub { font-size: 1rem; letter-spacing: 15px; margin-top: 20px; opacity: 0.6; }

/* --- MANIFESTO --- */
.manifesto {
    padding: 100px 10%;
    background: var(--white);
    color: var(--black);
    transform: skewY(-3deg);
}

.manifesto-box {
    transform: skewY(3deg);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.manifesto a { color: var(--accent); font-weight: 900; text-decoration: none; }

/* --- WILD SECTIONS --- */
.wild-wrap {
    min-height: 120vh;
    position: relative;
    display: flex;
    align-items: center;
    padding: 100px 5%;
}

.parallax-bg {
    position: absolute;
    inset: 0;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    filter: brightness(0.4);
    z-index: 1;
    clip-path: polygon(0 10%, 100% 0, 100% 90%, 0 100%);
}

.mtn-1 { background-image: url('mountains-1.jpg'); }
.mtn-2 { background-image: url('mountains-2.jpg'); }

.huge-rotated-name {
    position: absolute;
    font-family: 'Syne', sans-serif;
    font-size: 20vw;
    color: var(--white);
    opacity: 0.1;
    z-index: 2;
    pointer-events: none;
    white-space: nowrap;
}

.v-section .huge-rotated-name { top: 10%; left: -5%; transform: rotate(-8deg); }
.y-section .huge-rotated-name { bottom: 10%; right: -5%; transform: rotate(8deg); }

/* --- FLOATING CONTAINER --- */
.floating-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.floating-container.reverse { flex-direction: row-reverse; }

.portrait-frame {
    flex: 0 1 500px;
    border: 15px solid var(--white);
    transform: rotate(-2deg);
    box-shadow: 30px 30px 0px rgba(255, 62, 0, 0.4);
    z-index: 5;
}

.portrait-frame img {
    width: 100%;
    height: auto;
    display: block;
}

.info-card-wild {
    flex: 0 1 450px;
    background: var(--white);
    color: var(--black);
    padding: 50px;
    margin-left: -80px;
    transform: rotate(1deg);
    box-shadow: 20px 20px 0px var(--black);
    z-index: 10;
}

.reverse .info-card-wild { margin-left: 0; margin-right: -80px; transform: rotate(-1deg); }

.info-card-wild h3 { font-family: 'Syne', sans-serif; font-size: 1.4rem; margin-bottom: 15px; border-left: 5px solid var(--accent); padding-left: 15px; }

/* --- LINKS --- */
.wild-links { display: flex; gap: 20px; align-items: center; margin-top: 25px; }
.mail-link { background: var(--black); color: var(--white); padding: 12px 25px; text-decoration: none; font-weight: 900; font-size: 0.7rem; letter-spacing: 2px; }
.ln-link { font-size: 1.4rem; color: var(--accent); }

/* --- FOOTER --- */
.footer-dark { padding: 80px 10% 40px; background: #000; }
.footer-top { display: flex; justify-content: space-between; padding-bottom: 40px; border-bottom: 1px solid #222; margin-bottom: 20px; }
.text-right { text-align: right; }
.footer-bottom { text-align: center; opacity: 0.3; font-size: 0.6rem; letter-spacing: 4px; }

/* --- MOBILE OPTIMIZATION --- */
@media (max-width: 900px) {
    body {
        overflow-x: hidden;
    }

    /* 1. HERO adjustments */
    .hero-extreme {
        height: auto;
        min-height: 100dvh; /* Use dynamic viewport height for mobile */
        padding: 20px;
    }

    .glitch-text {
        font-size: 18vw; /* Slightly smaller to prevent cutting off */
        letter-spacing: -2px;
    }
    
    .hero-sub {
        letter-spacing: 5px; /* Reduced from 15px to 5px to fit on one line */
        font-size: 0.9rem;
    }

    /* 2. MANIFESTO : Flatten to save space */
    .manifesto {
        transform: skewY(0deg);
        padding: 60px 20px;
    }

    .manifesto-box {
        transform: skewY(0deg);
        padding: 0;
    }

    /* 3. SECTIONS : Vertical structure */
    .wild-wrap { 
        min-height: auto; 
        padding: 60px 15px; 
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    .huge-rotated-name { 
        position: static; /* Remove absolute positioning causing issues */
        font-size: 15vw; 
        opacity: 0.15; 
        text-align: center; 
        transform: none !important; 
        margin-bottom: -20px; /* Stick the name under the photo */
        margin-top: 0;
        z-index: 1;
        width: 100%;
    }

    /* 4. CARDS & PHOTOS */
    .floating-container, 
    .floating-container.reverse { 
        flex-direction: column; 
        width: 100%;
        max-width: 450px; 
        align-items: center; /* Center elements */
    }

    .portrait-frame { 
        /* CRITICAL FIX: cancel desktop flex-basis of 500px */
        flex: 0 0 auto; 
        height: auto;
        
        /* Controlled dimensions for mobile */
        width: 80%; 
        max-width: 320px; 
        
        /* Centering and margin */
        margin: 0 auto; 
        
        /* Style */
        transform: rotate(-2deg); 
        z-index: 2;
        border: 10px solid var(--white);
        box-shadow: 10px 10px 0px rgba(255, 62, 0, 0.4);
        
        /* Safety */
        overflow: hidden;
        display: block;
    }

    .portrait-frame img {
        width: 100%;
        height: auto;
        display: block; /* Remove ghost space under image */
        object-fit: cover;
    }

    .info-card-wild { 
        width: 95%; /* Takes almost full available width */
        max-width: none;
        margin: -30px auto 0 !important; /* Slightly overlaps the photo */
        transform: rotate(1deg) !important; 
        padding: 30px 20px; 
        text-align: center;
        position: relative;
        z-index: 10; 
        box-shadow: 10px 10px 0px var(--black);
    }

    /* Specific reset for reverse section (Ysaline) */
    .reverse .info-card-wild { 
        margin-right: auto !important; 
        margin-left: auto !important;
        transform: rotate(-1deg) !important;
    }

    .info-card-wild h3 {
        border-left: none; /* Remove left border */
        border-bottom: 3px solid var(--accent); /* Add bottom border for centered style */
        padding-left: 0;
        padding-bottom: 10px;
        display: inline-block;
    }

    .wild-links { 
        justify-content: center; 
        flex-wrap: wrap; /* Allow links to wrap on very small screens */
    }

    /* 5. FOOTER & BACKGROUNDS */
    .footer-top { 
        flex-direction: column; 
        gap: 30px; 
        text-align: center; 
    }
    
    .text-right { text-align: center; }

    .parallax-bg, .mtn-hero { 
        background-attachment: scroll; /* Vital for iOS smoothness */
    }
}

/* Languages row (mobile friendly) */
.lang-row{
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap; /* key for mobile */
}

.lang-label{
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
}

.lang-badges{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap; /* wraps nicely on small screens */
}

.lang-badge{
  width: 34px;
  height: 22px;
  border-radius: 6px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}

.lang-badge img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Slightly smaller on very small screens */
@media (max-width: 420px){
  .lang-badge{ width: 30px; height: 20px; border-radius: 5px; }
}
