@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@200;300;400;500;600;700&display=swap');

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

body, html {
    width: 100%;
    max-width: 100vw;
    font-family: 'Montserrat', sans-serif;
    background-color: #ededed;
    /* REMOVED overflow-x: hidden on body because it completely breaks
       position: sticky in Chrome/Safari. We rely on .sticky-view's
       overflow:hidden + max-width:100vw to keep horizontal scroll out. */
}

.scroll-container {
    position: relative; /* Must be relative to stretch the body! */
    top: 0;
    left: 0;
    width: 100%;
    height: 1400vh;
}

.sticky-view {
    position: sticky;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* ============================
   BURGER MENU — minimal 2-line toggle, seule nav du site
   ============================ */
.burger-toggle {
    display: flex;
    position: fixed;
    top: 2.2vh;
    right: 4vw;
    z-index: 310;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.burger-line {
    display: block;
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: #111;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
                opacity 0.3s ease,
                background-color 0.35s ease;
}

.burger-line-1 {
    top: 11px;
}

.burger-line-2 {
    top: 21px;
}

/* Dark theme */
.burger-toggle.is-on-dark .burger-line {
    background: #fff;
}

/* Open state — X transformation */
.burger-toggle.is-open .burger-line-1 {
    top: 16px;
    transform: rotate(45deg);
    background: #111;
}

.burger-toggle.is-open .burger-line-2 {
    top: 16px;
    transform: rotate(-45deg);
    background: #111;
}

/* ============================
   OVERLAY NAV — fullscreen with frosted glass
   ============================ */
.overlay-nav {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 300;
    background: rgba(250, 250, 250, 0.92);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    justify-content: center;
    align-items: center;
}

.overlay-nav.is-open {
    opacity: 1;
    pointer-events: auto;
}

.overlay-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.overlay-link {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.8rem, 5vw, 4rem);
    font-weight: 200;
    letter-spacing: 0.08em;
    color: #111;
    text-decoration: none;
    padding: 1.2vh 0;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease, color 0.3s ease;
}

/* Stagger animation on open */
.overlay-nav.is-open .overlay-link {
    opacity: 1;
    transform: translateY(0);
}
.overlay-nav.is-open .overlay-link:nth-child(1) { transition-delay: 0.08s; }
.overlay-nav.is-open .overlay-link:nth-child(2) { transition-delay: 0.14s; }
.overlay-nav.is-open .overlay-link:nth-child(3) { transition-delay: 0.20s; }
.overlay-nav.is-open .overlay-link:nth-child(4) { transition-delay: 0.26s; }
.overlay-nav.is-open .overlay-link:nth-child(5) { transition-delay: 0.32s; }

/* Reset delay when closing so items vanish together */
.overlay-link:nth-child(1) { transition-delay: 0s; }
.overlay-link:nth-child(2) { transition-delay: 0s; }
.overlay-link:nth-child(3) { transition-delay: 0s; }
.overlay-link:nth-child(4) { transition-delay: 0s; }
.overlay-link:nth-child(5) { transition-delay: 0s; }

.overlay-link::after {
    content: '';
    position: absolute;
    bottom: 0.6vh;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 1px;
    background: #111;
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.overlay-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

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

@media (prefers-reduced-motion: reduce) {
    .overlay-link {
        transform: none;
        transition: opacity 0.15s ease;
    }
    .overlay-nav.is-open .overlay-link { transition-delay: 0s; }
    .overlay-link::after { transition: none; }
}

/* ============================
   MINIMAL AUDIO TRIGGER (bottom-right)
   Text on top + play/pause icon below. No button chrome.
   Color switched via JS (.is-on-dark) for crisp rendering.
   ============================ */
.audio-trigger {
    position: fixed;
    bottom: 2.4vh;
    right: 2.4vw;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;     /* icon visually centered under the text block */
    justify-content: flex-end;
    gap: 10px;
    cursor: pointer;
    color: #111;
    transition: color 0.35s ease;
    user-select: none;
    font-family: 'Montserrat', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
}

.audio-trigger.is-on-dark {
    color: #ffffff;
}

/* Editorial typography aligned with hero title style, but small.
   Hidden by default — only shown while .audio-trigger has .show-label
   (toggled by JS, true only during the hero phase). */
.audio-text {
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.85;
    color: inherit;
    padding-left: 0.32em; /* half the letter-spacing on each side → true visual centering */
    padding-right: 0;
    margin-right: -0.32em; /* compensate phantom trailing space from wide tracking */
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    white-space: nowrap;
}

.audio-trigger.show-label .audio-text {
    opacity: 1;
    transform: translateY(0);
}

.audio-play-svg,
.audio-pause-svg {
    display: block;
    color: inherit;
    transition: opacity 0.2s ease;
}

.audio-trigger:hover .audio-play-svg,
.audio-trigger:hover .audio-pause-svg {
    opacity: 0.6;
}

/* Toggle play/pause icon via .is-playing class */
.audio-trigger .audio-pause-svg { display: none; }
.audio-trigger.is-playing .audio-play-svg { display: none; }
.audio-trigger.is-playing .audio-pause-svg { display: block; }

/* Audio trigger — full responsive coverage */
@media (max-width: 1280px) {
    .audio-trigger { bottom: 2.2vh; right: 2.4vw; gap: 9px; }
    .audio-text { font-size: 0.62rem; letter-spacing: 0.3em; padding-left: 0.3em; margin-right: -0.3em; }
    .audio-play-svg, .audio-pause-svg { width: 24px; height: 24px; }
}

@media (max-width: 1024px) {
    .audio-trigger { bottom: 2vh; right: 2.6vw; gap: 8px; align-items: flex-end; }
    .audio-text { font-size: 0.58rem; letter-spacing: 0.28em; line-height: 1.8; padding-left: 0.28em; margin-right: -0.28em; }
    .audio-play-svg, .audio-pause-svg { width: 22px; height: 22px; }
}

@media (max-width: 768px) {
    /* On phones the label always crowds the right edge — hide it entirely
       and only keep the play/pause icon. The "JOUEZ L'AUDIO ET SCROLLEZ"
       hint is desktop-only from here down. */
    .audio-trigger {
        bottom: 18px;
        right: 18px;
        gap: 0;
        padding: 8px;            /* bigger tap target + visual breathing room */
    }
    .audio-text { display: none; }
    .audio-play-svg, .audio-pause-svg { width: 30px; height: 30px; }
}

@media (max-width: 600px) {
    .audio-trigger { bottom: 16px; right: 16px; padding: 8px; }
    .audio-play-svg, .audio-pause-svg { width: 28px; height: 28px; }
}

@media (max-width: 400px) {
    .audio-trigger { bottom: 14px; right: 14px; padding: 6px; }
    .audio-play-svg, .audio-pause-svg { width: 26px; height: 26px; }
}

/* ============================
   SCENE 1: DOTTED CIRCLES HERO
   ============================ */
.hero-scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f7f7f7;
    z-index: 2;
    contain: layout style;
}

.dots-background {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 65vmin;
    height: 65vmin;
    z-index: 1;
    pointer-events: none;
}

#blob-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Text Container - Absolute at the bottom */
.hero-content {
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.hero-top {
    font-size: clamp(0.55rem, 0.9vw, 0.85rem);
    font-weight: 400;
    letter-spacing: 0.4em;
    color: #333;
    text-transform: uppercase;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hero-main {
    font-size: clamp(1.05rem, 2.1vw, 2rem);
    font-weight: 500;
    letter-spacing: 0.6em;
    color: #111;
    text-transform: uppercase;
    margin-left: 0.3em; /* Balance visual centering due to wide tracking */
    white-space: nowrap;
}

.hero-bottom {
    font-size: clamp(0.55rem, 0.9vw, 0.85rem);
    font-weight: 400;
    letter-spacing: 0.4em;
    color: #333;
    text-transform: uppercase;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    max-width: 92vw;
}

/* ============================
   SCENE 2: COMPÉTENCES CARDS GRID
   ============================ */
.cards-scene {
    position: absolute;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: #000;
    z-index: 3;              /* above .hero-scene (z:2) so hover reaches cards */
    opacity: 0;
    pointer-events: none;    /* JS flips this to 'auto' during cards phase */
    color: #111;
    overflow: hidden;
    contain: layout style;
}

/* Vertical side label (like "OUR SERVICES" in the reference) */
.cards-side-label {
    position: absolute;
    top: 50%;
    left: 3.2vw;
    transform: translate(-50%, -50%) rotate(-90deg);
    transform-origin: center center;
    font-size: clamp(0.78rem, 1vw, 1.05rem);
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.92);
    white-space: nowrap;
    pointer-events: none;
}

/* Grid of 6 cards (3 cols × 2 rows on desktop) */
.cards-grid {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(88vw, 1150px);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 18px;
    aspect-ratio: 3 / 2;
    max-height: 78vh;
    pointer-events: auto;
}

/* --- Flip card --- */
.flip-card {
    perspective: 1500px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.9s ease-out;
}

/* CSS-time staggered entry (triggers when scene gains .scene-visible) */
.cards-scene.scene-visible .flip-card { opacity: 1; }
.cards-scene.scene-visible .flip-card:nth-of-type(1) { transition-delay: 0.00s; }
.cards-scene.scene-visible .flip-card:nth-of-type(2) { transition-delay: 0.09s; }
.cards-scene.scene-visible .flip-card:nth-of-type(3) { transition-delay: 0.18s; }
.cards-scene.scene-visible .flip-card:nth-of-type(4) { transition-delay: 0.27s; }
.cards-scene.scene-visible .flip-card:nth-of-type(5) { transition-delay: 0.36s; }
.cards-scene.scene-visible .flip-card:nth-of-type(6) { transition-delay: 0.45s; }

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.85s cubic-bezier(0.6, 0.02, 0.24, 1);
}

/* Hover flip (works on any device that supports hover).
   Touch devices also receive a click handler via JS that toggles .is-flipped. */
.flip-card:hover .flip-card-inner,
.flip-card.is-flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-face {
    position: absolute;
    inset: 0;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: 14px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    padding: 9% 9% 10%;
    box-sizing: border-box;
}

.flip-card-front {
    justify-content: space-between;
    align-items: flex-start;
}

.flip-card-back {
    transform: rotateY(180deg);
    justify-content: flex-start;
    text-align: left;
    padding: 8% 8% 7%;
}

/* --- Front face --- */
.card-illus {
    width: 56%;
    max-width: 160px;
    height: auto;
    aspect-ratio: 1 / 1;
    display: block;
    margin-top: 4%;
    overflow: visible;
    transform-origin: center;
    stroke-linecap: round;
    stroke-linejoin: round;
}
/* Force white stroke on all illustration shapes (overrides inline stroke="#111") */
.card-illus * {
    stroke: #fff !important;
}

/* Illustration animations — continuous, independent of scroll */
@keyframes illusBreathe {
    0%, 100% { transform: scale(1)   rotate(0deg); }
    50%      { transform: scale(1.06) rotate(-1.2deg); }
}

@keyframes illusFloat {
    0%, 100% { transform: translateY(0)   scale(1); }
    50%      { transform: translateY(-3px) scale(1.04); }
}

@keyframes drawStroke {
    0%   { stroke-dashoffset: 220; opacity: 0.25; }
    18%  { opacity: 1; }
    52%  { stroke-dashoffset: 0;   opacity: 1; }
    82%  { stroke-dashoffset: 0;   opacity: 1; }
    100% { stroke-dashoffset: -220; opacity: 0.25; }
}

/* Alternating breathe / float animations for variety */
.flip-card:nth-of-type(1) .card-illus { animation: illusBreathe 4.4s ease-in-out infinite;        }
.flip-card:nth-of-type(2) .card-illus { animation: illusFloat   4.8s ease-in-out infinite 0.3s;   }
.flip-card:nth-of-type(3) .card-illus { animation: illusBreathe 4.2s ease-in-out infinite 0.6s;   }
.flip-card:nth-of-type(4) .card-illus { animation: illusFloat   4.6s ease-in-out infinite 0.9s;   }
.flip-card:nth-of-type(5) .card-illus { animation: illusBreathe 4.5s ease-in-out infinite 1.2s;   }
.flip-card:nth-of-type(6) .card-illus { animation: illusFloat   4.3s ease-in-out infinite 1.5s;   }

/* Per-path stroke draw on the key accent of each illustration */
.anim-draw {
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
    animation: drawStroke 5.5s ease-in-out infinite;
}
.anim-draw-delay-1 { animation-delay: 0.4s; }
.anim-draw-delay-2 { animation-delay: 0.8s; }
.anim-draw-delay-3 { animation-delay: 1.2s; }

.card-info {
    width: 100%;
}

.card-info h3 {
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.005em;
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.2;
}

.card-info p {
    font-size: 0.72rem;
    font-weight: 400;
    color: rgba(255,255,255,0.72);
    letter-spacing: 0.04em;
}

/* --- Back face --- */
.flip-card-back h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.005em;
    margin-bottom: 10px;
    line-height: 1.2;
}

.flip-card-back .back-intro {
    font-size: 0.78rem;
    font-weight: 400;
    color: rgba(255,255,255,0.92);
    line-height: 1.55;
    margin-bottom: 16px;
    letter-spacing: 0.005em;
    flex: 1;
}

.flip-card-back ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-content: flex-end;
}

.flip-card-back li {
    font-size: 0.56rem;
    font-weight: 500;
    color: #fff;
    padding: 4px 8px;
    border: 1px solid rgba(255,255,255,0.45);
    border-radius: 4px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}


/* ============================
   SCENE 3: PROJECTS — FULL PAGE
   ============================ */
.projects-scene {
    position: absolute;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Each project = full viewport page */
.proj-page {
    position: absolute;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    will-change: transform;
    contain: layout style;
    transform: translate3d(0,0,0);
    overflow: hidden;
}

/* --- Split layout: left info + right mockup --- */
.pp-split {
    display: flex;
    width: 100%; height: 100%;
}

/* LEFT: project info */
.pp-left {
    width: 42%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6vh 4vw 6vh 6vw;
    gap: 0;
}

.pp-num {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    opacity: 0.4;
    margin-bottom: 2vh;
}

.pp-title {
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 0.95;
    margin: 0 0 12px;
}

.pp-sub {
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    opacity: 0.5;
    display: block;
    margin-bottom: 3vh;
}

.pp-desc {
    font-size: 0.88rem;
    line-height: 1.75;
    font-weight: 300;
    opacity: 0.8;
    max-width: 400px;
    margin: 0 0 3vh;
}

.pp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4vh;
}

.pp-tags span {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 6px 14px;
    border: 1px solid currentColor;
    opacity: 0.6;
}

.pp-link {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid currentColor;
    padding-bottom: 4px;
    opacity: 0.7;
    transition: opacity 0.3s;
    cursor: pointer;
    width: fit-content;
}

.pp-link:hover { opacity: 1; }

/* Legal line (NINEA / RC) used on the Xel Studio project page */
.pp-legal {
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: currentColor;
    opacity: 0.85;
    margin-top: -0.6vh;
    margin-bottom: 2.2vh;
    padding: 6px 0;
    border-top: 1px solid rgba(17,17,17,0.18);
    border-bottom: 1px solid rgba(17,17,17,0.18);
    display: inline-block;
    padding-left: 10px;
    padding-right: 10px;
}

/* --- Logo stage: replaces the device mockup on logo-led projects (Xel Studio, Kattan) --- */
.pp-logo-stage {
    width: min(520px, 82%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pp-logo-img {
    width: 100%;
    max-width: 380px;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Kattan's mark fills only 52% x 44% of its PNG (black margin baked in), against
   92% x 90% for Xel's — so the stage runs ~1.8x wider for the same optical weight.
   The file is square, so the stage width also caps its height: hence the vh term. */
.pp-logo-stage.is-kattan { width: min(660px, 92%, 74vh); }
.pp-logo-stage.is-kattan .pp-logo-img { max-width: none; }

/* SunuBet's logo is landscape (1.24:1): it runs wider than Xel's portrait mark
   to carry the same visual weight on the page. */
.pp-logo-stage.is-sunubet { width: min(600px, 90%); }
.pp-logo-stage.is-sunubet .pp-logo-img { max-width: 480px; }

/* RIGHT: device mockup */
.pp-right {
    width: 58%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vh 4vw;
    overflow: hidden;
}

/* --- Phone mockup frame --- */
.pp-phone-frame {
    width: min(280px, 36vh);
    aspect-ratio: 9/19.5;
    border-radius: 32px;
    overflow: hidden;
    background: #000;
    padding: 6px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    position: relative;
}

.pp-phone-frame .pp-slider {
    width: 100%; height: 100%;
    border-radius: 26px;
    overflow: hidden;
}

.pp-phone-frame .pp-slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.pp-phone-frame .pp-slider-track img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

/* --- Laptop mockup frame --- */
.pp-laptop-frame {
    width: min(520px, 80%);
    aspect-ratio: 16/10;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
    padding: 3px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    position: relative;
}

.pp-laptop-frame .pp-slider {
    width: 100%; height: 100%;
    border-radius: 9px;
    overflow: hidden;
}

.pp-laptop-frame .pp-slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.pp-laptop-frame .pp-slider-track img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Placeholder for projects without screenshots */
.pp-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pp-placeholder span {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    opacity: 0.3;
    font-family: monospace;
}

/* Slider navigation arrows */
.pp-slider-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 16px;
}

.pp-slider-nav button {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.3s, transform 0.3s;
}

.pp-slider-nav button:hover {
    opacity: 1;
    transform: scale(1.1);
}

.pp-slider-nav button svg {
    width: 14px; height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pp-slider-nav .slide-counter {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    opacity: 0.4;
    font-weight: 500;
    min-width: 32px;
    text-align: center;
}

/* ============================
   SCENE 4: PARCOURS / CURSUS
   ============================ */
.cursus-scene {
    position: absolute;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    background: #FAFAFA;
}

.cursus-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%; height: 100%;
    padding-top: 5vh;
}

.cursus-grid {
    position: relative;
    width: 100%;
    max-width: 980px;
    height: 480px;
}

/* Base properties for isometric squares */
.cursus-layer {
    width: 120px;
    height: 120px;
    position: absolute;
    left: 110px; /* Aligned left box */
    /* Start from lowest point */
    transform: translateY(50px) rotateX(60deg) rotateZ(-45deg);
    opacity: 0;
    transition: transform 1s cubic-bezier(0.165, 0.84, 0.44, 1),
                opacity 1s cubic-bezier(0.165, 0.84, 0.44, 1),
                top 1s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: -15px 15px 30px rgba(0,0,0,0.03);
    will-change: transform, opacity;
}

/* Active states (sliding up and appearing) — 5 layers, tighter 58px spacing */
.scene-active .layer-5 { top: 252px; transform: rotateX(60deg) rotateZ(-45deg); opacity: 1; z-index: 1; background: #FAFAFA; border: 1px solid #ECECEC; transition-delay: 0.0s;}
.scene-active .layer-4 { top: 194px; transform: rotateX(60deg) rotateZ(-45deg); opacity: 1; z-index: 2; background: #FFF; border: 1px solid #ddd; transition-delay: 0.15s;}
.scene-active .layer-3 { top: 136px; transform: rotateX(60deg) rotateZ(-45deg); opacity: 1; z-index: 3; background: #F0F0F0; border: 1px solid #CCC; transition-delay: 0.3s;}
.scene-active .layer-2 { top: 78px;  transform: rotateX(60deg) rotateZ(-45deg); opacity: 1; z-index: 4; background: #E0E0E0; border: 1px solid #AAA; transition-delay: 0.45s;}
.scene-active .layer-1 { top: 20px;  transform: rotateX(60deg) rotateZ(-45deg); opacity: 1; z-index: 5; background: #111; border: 1px solid #111; transition-delay: 0.6s;}

/* Connecting text block */
.cursus-item {
    position: absolute;
    left: 290px;
    display: flex;
    align-items: center;
    width: calc(100% - 310px);
    max-width: 620px;
    opacity: 0;
    transform: translateX(30px);
    transition: all 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.scene-active .cursus-item {
    opacity: 1;
    transform: translateX(0);
}

/* Exactly mapping to Layer heights visually — 5 items, 58px spacing */
.item-1 { top: 38px;  transition-delay: 0.7s; } /* Master DIT (top, most recent) */
.item-2 { top: 96px;  transition-delay: 0.55s; } /* Licence ISM */
.item-3 { top: 154px; transition-delay: 0.4s; }  /* Biologie UQAM */
.item-4 { top: 212px; transition-delay: 0.25s; } /* Bac ENKO */
.item-5 { top: 270px; transition-delay: 0.1s; }  /* Lycée Blaise Pascal (bottom, oldest) */

/* Connector line */
.cursus-line {
    width: 40px;
    height: 1px;
    background: #111;
    margin-right: 25px;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
    transition-delay: inherit; /* inherit delay from item */
}
.scene-active .cursus-line {
    transform: scaleX(1);
}

.cursus-text {
    flex: 1;
    min-width: 0;
}

.cursus-text h3 {
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #111;
    margin-bottom: 4px;
    line-height: 1.25;
}

.cursus-text .cursus-date {
    display: block;
    font-size: 0.6rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin-bottom: 5px;
}

.cursus-text p {
    font-size: 0.74rem;
    color: #555;
    font-weight: 300;
    line-height: 1.5;
    max-width: 540px;
    /* Hidden on the isometric desktop layout (vertical spacing too tight
       for 5 items + paragraphs). Re-enabled in the responsive vertical
       timeline below 1024px. */
    display: none;
}

.cursus-title {
    text-align: center;
    margin-bottom: 2rem;
}

.cursus-label {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: #888;
    margin-bottom: 10px;
}

.cursus-heading {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 200;
    letter-spacing: -0.02em;
    line-height: 1;
    color: #111;
}

/* ============================
   SCENE 5: EDITORIAL FOOTER
   ============================ */
.footer-scene {
    position: absolute;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 25;
    opacity: 0;
    pointer-events: none;
    background: #F0F0F0;
}

.footer-container {
    width: 100%; height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    padding: 8vh 6vw 5vh;
    align-items: center;
}

.footer-hero {
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.footer-name {
    font-size: clamp(4rem, 10vw, 9rem);
    font-weight: 700;
    color: #111;
    letter-spacing: -0.03em;
    line-height: 0.95;
}

.footer-collab {
    margin-top: 3vh;
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-weight: 300;
    color: #888;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.footer-bottom {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    justify-content: space-between;
    gap: 3vw;
    padding-top: 4vh;
    border-top: 1px solid #ddd;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.footer-value {
    font-size: 0.8rem;
    font-weight: 400;
    color: #111;
    text-decoration: none;
    line-height: 1.6;
    transition: opacity 0.3s;
}
a.footer-value:hover {
    opacity: 0.4;
}

/* Footer inner — slides up from below */
.footer-inner {
    width: 100%; height: 100%;
    transform: translateY(100%);
    transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.footer-scene.scene-active .footer-inner {
    transform: translateY(0);
}
.footer-cta:hover {
    opacity: 0.4;
}

/* ============================
   RESPONSIVE
   ============================ */

/* --- Narrow desktop / large tablet (max 1280px) --- */
@media (max-width: 1280px) {
    .cards-grid { width: min(90vw, 980px); gap: 16px; }
    .card-info h3 { font-size: 0.98rem; }
    .card-info p { font-size: 0.68rem; }
    .pp-left { padding: 6vh 3vw 6vh 5vw; }
    .pp-desc { font-size: 0.82rem; }
    .pp-phone-frame { width: min(260px, 34vh); }
    .pp-laptop-frame { width: min(480px, 78%); }
}

/* --- Tablet (max 1024px) — biggest layout shift breakpoint --- */
@media (max-width: 1024px) {
    /* Hero — slightly tighter so the long subtitle fits */
    .hero-main { font-size: clamp(1.2rem, 3vw, 1.8rem); letter-spacing: 0.45em; }
    .hero-top, .hero-bottom { font-size: clamp(0.72rem, 1.3vw, 0.92rem); letter-spacing: 0.32em; }

    /* Cards — switch to 2 cols × 3 rows on tablet (was happening at 768px,
       too cramped between 1024-768) */
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 16px;
        aspect-ratio: 2 / 2.6;
        width: min(82vw, 640px);
        max-height: 84vh;
    }
    .card-info h3 { font-size: 0.95rem; }
    .card-info p  { font-size: 0.66rem; }
    .card-illus   { width: 52%; max-width: 130px; }
    .flip-card-back h3 { font-size: 0.92rem; margin-bottom: 9px; }
    .flip-card-back .back-intro { font-size: 0.72rem; line-height: 1.55; margin-bottom: 14px; }
    .flip-card-back li { font-size: 0.52rem; padding: 3px 7px; }
    .flip-card-face { padding: 7% 7% 8%; }
    .flip-card-back { padding: 7% 7% 7%; }
    .cards-side-label { left: 4.2vw; font-size: 0.92rem; letter-spacing: 0.28em; }

    /* Projects: stack vertically */
    .pp-split { flex-direction: column; }
    .pp-left {
        width: 100%;
        height: auto;
        flex: 0 0 auto;
        padding: 5vh 5vw 2vh;
    }
    .pp-right {
        width: 100%;
        flex: 1 1 auto;
        padding: 1vh 5vw 4vh;
        min-height: 0;
    }
    .pp-title { font-size: clamp(1.8rem, 5vw, 2.6rem); }
    .pp-num { margin-bottom: 1.2vh; }
    .pp-sub { margin-bottom: 1.6vh; }
    .pp-desc { font-size: 0.84rem; max-width: 100%; margin-bottom: 2vh; }
    .pp-tags { margin-bottom: 2vh; }
    .pp-phone-frame { width: min(220px, 32vh); }
    .pp-laptop-frame { width: min(520px, 80%); }
    .pp-logo-stage { width: min(360px, 64vw); }
    .pp-logo-img { max-width: 320px; }
    .pp-logo-stage.is-kattan { width: min(520px, 86%, 46vh); }
    .pp-logo-stage.is-sunubet { width: min(440px, 80vw); }
    .pp-logo-stage.is-sunubet .pp-logo-img { max-width: 400px; }
    .pp-legal { font-size: 0.56rem; margin-bottom: 1.6vh; }

    /* Footer — keep row layout at 1024 but tighter */
    .footer-container { padding: 7vh 5vw 4vh; }
    .footer-name {
        font-size: clamp(3rem, 10vw, 6rem);
        text-align: center;
    }
    .footer-bottom {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start;
        gap: 24px 40px;
        text-align: center;
    }
    .footer-col { align-items: center; }

    /* Cursus — switch to vertical timeline at 1024 (was still isometric).
       Cleaner and avoids overflow at this awkward width range. */
    .cursus-container { padding: 4vh 6vw; }
    .cursus-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
        max-width: 600px;
        height: auto;
    }
    .cursus-layer { display: none; }
    .cursus-line { display: none; }
    .cursus-item {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        padding: 22px 0 22px 28px;
        border-left: 1px solid #ccc;
        opacity: 1;
        transform: translateX(0);
    }
    .item-1, .item-2, .item-3, .item-4, .item-5 { top: auto; transition-delay: 0s; max-width: 100%; }
    .cursus-item { width: 100%; max-width: 100%; }
    .cursus-text h3 { font-size: 0.92rem; letter-spacing: 0.08em; }
    .cursus-text .cursus-date { font-size: 0.6rem; }
    .cursus-text p { display: block; font-size: 0.74rem; max-width: 100%; margin-top: 4px; }
    .cursus-heading { font-size: clamp(2.4rem, 7vw, 3.6rem); }
}

/* --- Small tablet / large phone (max 768px) --- */
@media (max-width: 768px) {
    /* Hero — tighter tracking & smaller dots blob */
    .hero-main {
        font-size: clamp(1.05rem, 3.8vw, 1.5rem);
        letter-spacing: 0.3em;
    }
    .hero-top, .hero-bottom {
        font-size: clamp(0.65rem, 1.7vw, 0.85rem);
        letter-spacing: 0.26em;
    }
    .hero-content { bottom: 6%; gap: 0.9rem; }
    .dots-background { width: 75vmin; height: 75vmin; top: 44%; }

    /* Cards — 2 cols × 3 rows already from 1024px, tighten here */
    .cards-grid {
        gap: 12px;
        aspect-ratio: 2 / 2.9;
        width: min(86vw, 540px);
        max-height: 86vh;
    }
    .card-info h3 { font-size: 0.86rem; }
    .card-info p  { font-size: 0.62rem; }
    .card-illus   { width: 48%; max-width: 100px; }
    .flip-card-back h3 { font-size: 0.84rem; margin-bottom: 7px; }
    .flip-card-back .back-intro { font-size: 0.66rem; line-height: 1.5; margin-bottom: 11px; }
    .flip-card-back li { font-size: 0.48rem; padding: 3px 6px; letter-spacing: 0.05em; }
    .flip-card-back { padding: 7% 7% 6%; }
    .flip-card-face { padding: 8% 8% 9%; }
    /* Switch the rotated side label to a small horizontal label at the
       top-left of the cards scene. Avoids overlap with the grid. */
    .cards-side-label {
        top: 2.6vh;
        left: 5vw;
        transform: none;
        font-size: 0.66rem;
        letter-spacing: 0.3em;
    }

    /* Burger — slightly smaller */
    .burger-toggle { width: 28px; height: 28px; top: 2vh; right: 5vw; }
    .burger-line-1 { top: 10px; }
    .burger-line-2 { top: 18px; }
    .burger-toggle.is-open .burger-line-1 { top: 14px; }
    .burger-toggle.is-open .burger-line-2 { top: 14px; }

    /* Projects */
    .pp-left { padding: 4vh 5vw 1.2vh; }
    .pp-right { padding: 0.8vh 5vw 3vh; }
    .pp-title { font-size: clamp(1.5rem, 6.2vw, 2rem); }
    .pp-num { font-size: 0.62rem; margin-bottom: 1vh; }
    .pp-sub { font-size: 0.55rem; margin-bottom: 1.4vh; }
    .pp-desc { font-size: 0.76rem; max-width: 100%; margin-bottom: 1.8vh; line-height: 1.65; }
    .pp-tags { margin-bottom: 2vh; gap: 6px; }
    .pp-tags span { font-size: 0.52rem; padding: 4px 9px; }
    .pp-link { font-size: 0.62rem; }
    .pp-phone-frame { width: min(180px, 28vh); }
    .pp-laptop-frame { width: min(400px, 86%); }
    .pp-logo-stage { width: min(280px, 64vw); }
    .pp-logo-img { max-width: 240px; }
    .pp-logo-stage.is-kattan { width: min(420px, 88%, 42vh); }
    .pp-logo-stage.is-sunubet { width: min(340px, 80vw); }
    .pp-logo-stage.is-sunubet .pp-logo-img { max-width: 300px; }
    .pp-legal { font-size: 0.5rem; letter-spacing: 0.06em; padding: 5px 8px; }

    /* Cursus — vertical timeline (already enabled at 1024) */
    .cursus-container { padding: 3vh 6vw; }
    .cursus-grid { max-width: 100%; }
    .cursus-item { padding: 18px 0 18px 22px; }
    .cursus-text h3 { font-size: 0.84rem; letter-spacing: 0.08em; }
    .cursus-text .cursus-date { font-size: 0.58rem; }
    .cursus-text p { font-size: 0.74rem; }
    .cursus-heading { font-size: clamp(2.2rem, 9vw, 3.4rem); }

    /* Footer — name on one line, columns stack */
    .footer-container { padding: 6vh 5vw 4vh; }
    .footer-name br { display: none; }
    .footer-name { font-size: clamp(2.5rem, 12vw, 4rem); }
    .footer-collab { font-size: 0.85rem; margin-top: 2vh; }
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        gap: 18px;
        padding-top: 3vh;
    }
    .footer-label { font-size: 0.55rem; }
    .footer-value { font-size: 0.75rem; }
}

/* --- Mobile (max 600px) — covers most phones --- */
@media (max-width: 600px) {
    /* Burger */
    .burger-toggle { width: 26px; height: 26px; top: 1.8vh; right: 5vw; }
    .burger-line-1 { top: 9px; }
    .burger-line-2 { top: 17px; }
    .burger-toggle.is-open .burger-line-1 { top: 13px; }
    .burger-toggle.is-open .burger-line-2 { top: 13px; }

    /* Overlay link size on mobile */
    .overlay-link {
        font-size: clamp(1.5rem, 7vw, 2.2rem);
        padding: 1vh 0;
    }

    /* Hero — collapse letter-spaced name so it fits narrow phones */
    .hero-main {
        font-size: clamp(0.95rem, 5vw, 1.2rem);
        letter-spacing: 0.2em;
    }
    .hero-top, .hero-bottom {
        font-size: clamp(0.58rem, 2.2vw, 0.72rem);
        letter-spacing: 0.2em;
    }
    .hero-content { bottom: 5.5%; gap: 0.85rem; padding: 0 4vw; }
    .dots-background { width: 80vmin; height: 80vmin; top: 44%; }

    /* Cards — mobile compact, still 2 cols × 3 rows */
    .cards-grid {
        gap: 10px;
        aspect-ratio: 2 / 3;
        width: 92vw;
        max-height: 82vh;
    }
    .card-info h3 { font-size: 0.74rem; line-height: 1.18; }
    .card-info p  { font-size: 0.54rem; letter-spacing: 0.03em; }
    .card-illus   { width: 46%; max-width: 78px; margin-top: 2%; }
    .flip-card-back h3 { font-size: 0.7rem; margin-bottom: 5px; }
    .flip-card-back .back-intro { font-size: 0.55rem; margin-bottom: 8px; line-height: 1.45; }
    .flip-card-back li { font-size: 0.42rem; padding: 2px 5px; letter-spacing: 0.04em; }
    .flip-card-back ul { gap: 4px; }
    .flip-card-back { padding: 6% 6% 5%; }
    .flip-card-face { padding: 7% 7% 8%; border-radius: 10px; }
    .cards-side-label {
        top: 2.4vh;
        left: 5.5vw;
        transform: none;
        font-size: 0.58rem;
        letter-spacing: 0.26em;
    }

    /* Projects — compact to fit 100vh */
    .pp-left { padding: 3vh 5vw 1vh; }
    .pp-right { padding: 0.5vh 5vw 2.4vh; }
    .pp-num { font-size: 0.58rem; margin-bottom: 0.8vh; }
    .pp-title { font-size: clamp(1.3rem, 6.4vw, 1.7rem); margin-bottom: 6px; }
    .pp-sub { font-size: 0.48rem; margin-bottom: 1vh; letter-spacing: 0.18em; }
    .pp-desc { font-size: 0.7rem; line-height: 1.55; margin-bottom: 1.5vh; }
    .pp-tags { gap: 5px; margin-bottom: 1.5vh; }
    .pp-tags span { font-size: 0.48rem; padding: 3px 7px; letter-spacing: 0.08em; }
    .pp-link { font-size: 0.58rem; }
    .pp-phone-frame { width: min(150px, 24vh); }
    .pp-laptop-frame { width: min(310px, 88%); }
    .pp-logo-stage { width: min(220px, 58vw); }
    .pp-logo-img { max-width: 180px; }
    .pp-logo-stage.is-kattan { width: min(320px, 86%, 36vh); }
    .pp-logo-stage.is-sunubet { width: min(270px, 76vw); }
    .pp-logo-stage.is-sunubet .pp-logo-img { max-width: 230px; }
    .pp-legal { font-size: 0.46rem; padding: 4px 7px; margin-bottom: 1.4vh; }
    .pp-slider-nav { margin-top: 10px; gap: 14px; }
    .pp-slider-nav button { width: 30px; height: 30px; }
    .pp-slider-nav .slide-counter { font-size: 0.52rem; }

    /* Cursus — tighter vertical timeline */
    .cursus-container { padding: 2.5vh 5vw; }
    .cursus-title { margin-bottom: 1rem; }
    .cursus-heading { font-size: clamp(2rem, 9vw, 2.8rem); }
    .cursus-label { font-size: 0.6rem; letter-spacing: 0.2em; }
    .cursus-item { padding: 14px 0 14px 18px; }
    .cursus-text h3 { font-size: 0.74rem; letter-spacing: 0.05em; }
    .cursus-text .cursus-date { font-size: 0.52rem; margin-bottom: 4px; }
    .cursus-text p { display: none; }

    /* Footer */
    .footer-container { padding: 6vh 5vw 4vh; }
    .footer-name { font-size: clamp(2rem, 11vw, 3rem); }
    .footer-collab { font-size: 0.78rem; letter-spacing: 0.06em; margin-top: 1.6vh; }
    .footer-bottom { gap: 14px; padding-top: 3vh; }
    .footer-label { font-size: 0.5rem; }
    .footer-value { font-size: 0.7rem; }
}

/* --- Very small screens (max 380px) --- */
@media (max-width: 380px) {
    .burger-toggle { width: 24px; height: 24px; }
    .burger-line-1 { top: 8px; }
    .burger-line-2 { top: 16px; }
    .burger-toggle.is-open .burger-line-1 { top: 12px; }
    .burger-toggle.is-open .burger-line-2 { top: 12px; }
    .overlay-link { font-size: clamp(1.2rem, 6.5vw, 1.8rem); }

    .hero-main { font-size: clamp(0.85rem, 4.6vw, 1.05rem); letter-spacing: 0.14em; }
    .hero-top, .hero-bottom { font-size: clamp(0.54rem, 2vw, 0.66rem); letter-spacing: 0.16em; }

    .cards-grid { gap: 8px; width: 94vw; }
    .card-info h3 { font-size: 0.64rem; }
    .card-info p  { font-size: 0.48rem; }
    .card-illus { max-width: 60px; }
    .flip-card-back h3 { font-size: 0.62rem; }
    .flip-card-back .back-intro { font-size: 0.5rem; line-height: 1.4; }
    .flip-card-back li { font-size: 0.38rem; padding: 2px 4px; }

    .pp-title { font-size: 1.25rem; }
    .pp-desc { font-size: 0.66rem; }
    .pp-tags span { font-size: 0.44rem; padding: 2px 6px; }
    .pp-phone-frame { width: min(130px, 22vh); }
    .pp-laptop-frame { width: min(260px, 92%); }
    .pp-logo-stage { width: min(180px, 56vw); }
    .pp-logo-img { max-width: 150px; }
    .pp-logo-stage.is-kattan { width: min(265px, 86%, 32vh); }
    .pp-logo-stage.is-sunubet { width: min(220px, 74vw); }
    .pp-logo-stage.is-sunubet .pp-logo-img { max-width: 190px; }

    .cursus-heading { font-size: 2rem; }
    .cursus-text h3 { font-size: 0.66rem; }
    .footer-name { font-size: clamp(1.8rem, 11vw, 2.5rem); }
}

/* Landscape phone — viewport too short for stacked project layout.
   Switch back to side-by-side and shrink everything. */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-main { font-size: clamp(0.85rem, 2.6vw, 1.2rem); letter-spacing: 0.2em; }
    .hero-top, .hero-bottom { font-size: 0.5rem; letter-spacing: 0.18em; }
    .hero-content { bottom: 4%; gap: 0.5rem; }
    .dots-background { width: 60vmin; height: 60vmin; }

    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
        aspect-ratio: 3 / 1.4;
        width: min(92vw, 820px);
        max-height: 82vh;
        gap: 10px;
    }
    .card-info h3 { font-size: 0.72rem; }
    .card-info p  { font-size: 0.54rem; }
    .card-illus { width: 38%; max-width: 70px; }
    .flip-card-back h3 { font-size: 0.7rem; }
    .flip-card-back .back-intro { font-size: 0.56rem; line-height: 1.4; margin-bottom: 6px; }
    .flip-card-back li { font-size: 0.42rem; padding: 2px 5px; }
    .flip-card-face, .flip-card-back { padding: 5% 6% 5%; }

    .pp-split { flex-direction: row; }
    .pp-left  { width: 46%; height: 100%; flex: 0 0 46%; padding: 2.5vh 3vw; }
    .pp-right { width: 54%; height: 100%; flex: 1 1 54%; padding: 2.5vh 3vw; }
    .pp-title { font-size: clamp(1.3rem, 4.6vw, 1.8rem); }
    .pp-desc { font-size: 0.66rem; line-height: 1.5; margin-bottom: 1vh; max-width: 100%; }
    .pp-num { margin-bottom: 0.6vh; }
    .pp-sub { margin-bottom: 0.8vh; }
    .pp-tags { margin-bottom: 1vh; }
    .pp-phone-frame { width: min(120px, 60vh); }
    .pp-laptop-frame { width: min(280px, 80%); }
    .pp-logo-stage { width: min(220px, 80%); }
    .pp-logo-img { max-width: 200px; }
    .pp-logo-stage.is-kattan { width: min(330px, 95%, 76vh); }
    .pp-logo-stage.is-sunubet { width: min(280px, 90%); }
    .pp-logo-stage.is-sunubet .pp-logo-img { max-width: 260px; }
    .pp-legal { margin-bottom: 0.8vh; }

    .cursus-grid { max-width: 520px; }
    .cursus-item { padding: 8px 0 8px 18px; }
    .cursus-text h3 { font-size: 0.7rem; }
    .cursus-text .cursus-date { font-size: 0.5rem; }
    .cursus-text p { display: none; }
    .cursus-heading { font-size: clamp(1.6rem, 5vw, 2.2rem); }
    .cursus-title { margin-bottom: 0.6rem; }
    .cursus-container { padding-top: 2vh; }

    .footer-name { font-size: clamp(2.2rem, 8vw, 4rem); }
    .footer-collab { font-size: 0.7rem; margin-top: 1vh; }
    .footer-bottom { flex-direction: row; flex-wrap: wrap; gap: 12px 28px; padding-top: 1.6vh; }
    .footer-container { padding: 3vh 5vw 2vh; }

    .overlay-link { font-size: 1.3rem; padding: 0.5vh 0; }
}

