/* Design System */


:root {
    /* Dark Desaturated Violet — H≈267° S≈28% */
    --bg-color: #13101e;
    --surface-raised: #19162a;
    --surface-card: #1f1c33;
    --input-bg: #100e1b;
    --border-color: rgba(148, 163, 184, 0.08);

    /* Accent — White */
    --accent-color: #FFFFFF;
    --accent-dim: rgba(255, 255, 255, 0.7);
    --accent-glow: rgba(255, 255, 255, 0.15);
    --accent-bg: rgba(255, 255, 255, 0.06);
    --accent-border: rgba(255, 255, 255, 0.20);

    /* Text */
    --text-color: #FFFFFF;
    --dim-text: rgba(255, 255, 255, 0.8);

    /* Glass / Surface System (no blur) */
    --glass-bg: #1f1c33;
    --glass-blur: 0px;
    --glass-border: rgba(148, 163, 184, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.7);

    /* Hero Carousel */
    --carousel-shadow-1: rgba(0, 0, 0, 0.45);
    --carousel-shadow-2: rgba(0, 0, 0, 0.65);
    --bg-tint-opacity: 0;

    /* Spacing */
    --container-width: 1300px;

    /* Hover Animation System */
    --glass-glow: 0 0 20px rgba(255, 255, 255, 0.15);
    --liquid-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


html {
    min-height: 100vh;
    overflow-x: hidden;
    overscroll-behavior: none;
    background: #000000;
    zoom: 0.9;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

body.articles-mode:not(.mosaic-mode)::before {
    background: #000000;
}

body.writeups-mode:not(.mosaic-mode)::before {
    background-image: linear-gradient(rgba(0,0,0,0.67), rgba(0,0,0,0.67)), url('../assets/sable.webp');
    background-size: cover;
    background-position: center center;
    background-attachment: scroll;
}

body.articles-mode.mosaic-mode::before,
body.writeups-mode.mosaic-mode::before {
    background-image: url('../assets/grn.webp');
    background-size: cover;
    background-position: center center;
    background-attachment: scroll;
}

/* =============================================
   HOME PAGE BACKGROUND LAYERS
   ============================================= */

.bg-image-layer {
    position: fixed;
    inset: 0;
    background: #000000;
    z-index: -3;
    pointer-events: none;
}

.bg-text-layer {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: calc(8vh + 2px);
    z-index: -2;
    pointer-events: none;
    user-select: none;
}

.bg-text-inner {
    text-align: justify;
    max-width: 700px;
    padding: 0 2rem;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 2;
    color: rgba(255, 255, 255, 0.7);
}

.reveal-line {
    margin: 0;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-line.visible {
    opacity: 1;
    transform: translateY(0);
}

.home-scroll-chevron {
    position: fixed;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.55);
    padding: 8px;
    transition: color 0.3s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: chevron-bounce 2s ease-in-out infinite;
}

.home-scroll-chevron:hover {
    color: #fff;
    transform: translateX(-50%) scale(1.15);
    animation: none;
}

@keyframes chevron-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(8px); }
}

.photos-layer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    z-index: -1; /* same z-index as moon but before it in DOM → moon paints on top */
}

.photo-frame {
    width: 160px;
    flex-shrink: 0;
    background: #f4efe8;
    padding: 10px 10px 10px 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.2);
    margin-bottom: 48px;
    margin-left: 12px;
    margin-right: 12px;
    transform-origin: bottom center;
    will-change: transform;
}

.photo-caption {
    display: block;
    text-align: center;
    font-family: 'Caveat', cursive;
    font-style: italic;
    font-size: 14px;
    color: #3a2f28;
    padding: 6px 4px 4px;
    letter-spacing: 0.02em;
    line-height: 1;
}

.photo-frame img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    filter: sepia(0.18) contrast(1.06) brightness(0.94) saturate(0.88);
}

#photo-cyber img {
    aspect-ratio: auto;
    object-fit: contain;
}

.photo-frame--bare {
    background: transparent;
    padding: 0;
    box-shadow: none;
    width: 120px;
}

.photo-frame--bare img {
    aspect-ratio: auto;
    object-fit: contain;
    filter: none;
}

.moon-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/moon_cutout.webp');
    background-size: cover;
    background-position: center center;
    z-index: -1;
    pointer-events: none;
    will-change: transform;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    background: transparent;
}

.wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    box-sizing: border-box;
    background: transparent !important; /* Force transparency */
}

/* Home page needs height to enable moon scroll */
body.home-mode .wrapper {
    min-height: 210vh;
}

/* @import url('https://cdn.jsdelivr.net/npm/@fontsource/cascadia-code@5.0.0/index.min.css'); */

.interface-frame {
    width: 100%;
    max-width: var(--container-width);
    padding: 0;
    position: relative;
    background: transparent !important; /* Wrapper disappears */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

.inner-frame {
    border: none; /* Removed inner border for cleaner look */
    padding: 3rem;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: transparent !important; /* Force transparency for blur to work */
}

/* Removed decorative corners for Glass style */
.corner-tl, .corner-tr, .corner-bl, .corner-br {
    display: none;
}

/* =============================================
   HEADER / NAV
   ============================================= */

header {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem; /* Reduced to bring content up */
    position: relative;
    padding-top: 100px; /* Space for the fixed nav-row */
}

.nav-pills-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1;
    justify-content: flex-end;
}

.header-left {
    flex: 1;
    text-align: center; /* Centered globally */
    width: 100%;
}
.desktop-only {
    display: flex; /* Default to visible */
}
.mobile-only {
    display: none; /* Hide by default */
}

/* Specific hiding rule for content-heavy pages on mobile */
.writeups-mode .nav-link.art-link.mobile-only {
    display: none !important;
}

.header-left h1 {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 3.5rem; 
    margin: 0 auto; /* Horizontal centering */
    line-height: 1.1;
    color: var(--accent-color);
    text-transform: none; 
    letter-spacing: 0.5px;
    font-weight: 600;
    /* Soft permanent glow */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.15); 
    transition: text-shadow 0.4s ease;
    width: 100%;
}

.header-left h1:hover {
    /* Slightly more pronounced but still subtle glow on hover */
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.25);
}

.header-left .subtitle {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 1.1rem;
    color: var(--dim-text);
    letter-spacing: 0;
    text-transform: none;
    margin-top: 10px;
    display: block;
    max-width: 600px;
}

.nav-pills-group {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

/* NAVBAR PILL STYLE (Grouped links) */
.nav-links, .back-pill {
    display: flex;
    gap: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: transform 0.2s ease-out, box-shadow 0.3s ease;
}

.nav-links {
    border-radius: 100px;
    padding: 6px;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.275);
    perspective: 1000px;
    transform-style: preserve-3d;
}

.back-pill {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid transparent; /* Prepare for hover border-glow */
}

.back-pill:hover {
    background: var(--accent-color) !important;
    color: #000 !important;
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.back-pill svg {
    transition: stroke 0.3s ease;
}

.nav-link {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    color: var(--dim-text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 10px 24px;
    border-radius: 100px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: capitalize;
    letter-spacing: 0;
}

.nav-link:hover {
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.14);
}

.nav-link.active {
    color: #000;
    background: var(--accent-color);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* Portfolio Link as a standalone glass pill */
.art-link:hover {
    color: #000 !important;
    background: var(--accent-color) !important;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.35);
}

/* Social icon linkbar */
.nav-social {
    padding: 6px 8px;
    gap: 2px;
    align-items: center;
}

.nav-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 36px;
    border-radius: 100px;
    color: var(--dim-text);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.nav-icon-link:hover {
    color: #ffffff;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 12px rgba(255, 255, 255, 0.5));
}

.nav-icon-link[href*="linkedin"]:hover {
    color: #0a66c2;
    filter: drop-shadow(0 0 4px rgba(10, 102, 194, 0.9)) drop-shadow(0 0 14px rgba(10, 102, 194, 0.6));
}

.nav-icon-link[href*="hackthebox"]:hover {
    color: #9fef00;
    filter: drop-shadow(0 0 4px rgba(159, 239, 0, 0.9)) drop-shadow(0 0 14px rgba(159, 239, 0, 0.6));
}

.nav-icon-link[href*="discord"]:hover {
    color: #5865f2;
    filter: drop-shadow(0 0 4px rgba(88, 101, 242, 0.9)) drop-shadow(0 0 14px rgba(88, 101, 242, 0.6));
}

/* =============================================
   MAIN CONTENT
   ============================================= */

main {
    flex: 1;
}

h2 {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 2.2rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    text-transform: none;
    letter-spacing: -0.5px;
    border: none;
    padding: 0;
}

/* =============================================
   FOOTER
   ============================================= */

footer {
    position: fixed;
    bottom: 10px; /* Really at the bottom */
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 1000;
    pointer-events: none;
    margin-bottom: 20px;
}

footer * {
    pointer-events: auto; /* Enable clicks on links */
}

.footer-credit {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.footer-credit a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-credit a:hover {
    color: var(--accent-color);
}

.footer-status {
    display: flex;
    gap: 1rem;
}

.footer-status span::before {
    content: '■ ';
    color: var(--accent-color);
}

.social-links {
    display: flex;
    align-items: center;
}

.social-links a {
    margin-left: 1.5rem;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
}

.social-links img {
    height: 16px; /* Reduced from 20px per user request */
    width: auto;
    /* Force white icons manually using filters if they are black/colored */
    filter: brightness(0) invert(1); 
    opacity: 0.6;
    transition: all 0.3s;
}

/* Default White Hover (GitHub, Root-Me) */
.social-links a:hover img, .home-link:hover img {
    opacity: 1;
    filter: brightness(0) invert(1) drop-shadow(0 0 5px var(--accent-color));
    transform: scale(1.1);
}

.home-link, .hashle-icon-link {
    display: flex;
    align-items: center;
}

.home-link img, .hashle-icon-link img {
    height: 16px;
    width: auto;
    filter: brightness(0) invert(1); 
    opacity: 0.6;
    transition: all 0.3s;
}

.home-link:hover, .hashle-icon-link:hover {
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.35);
}

.home-link:hover svg,
.hashle-icon-link:hover svg {
    filter: brightness(0);
}

.home-link:hover svg, .hashle-icon-link:hover svg {
    transform: scale(1.1);
}

.footer-status a {
    transition: all 0.3s ease;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* LinkedIn Blue Hover */
.social-links a[href*="linkedin"]:hover img {
    opacity: 1;
    filter: brightness(0) invert(1) drop-shadow(0 0 5px var(--accent-color));
    transform: scale(1.1);
}

/* HackTheBox Green Hover */
.social-links a[href*="hackthebox"]:hover img {
    filter: invert(80%) sepia(49%) saturate(763%) hue-rotate(46deg) brightness(101%) contrast(104%) drop-shadow(0 0 5px #9fef00);
}

/* =============================================
   UTILITIES
   ============================================= */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.glitch-text {
    position: relative;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #13101e;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
}
/* =============================================
   ANIMATIONS & MICRO-INTERACTIONS
   ============================================= */

@keyframes glitch-skew {
    0% { transform: skew(0deg); }
    20% { transform: skew(-2deg); }
    40% { transform: skew(2deg); }
    60% { transform: skew(-1deg); }
    80% { transform: skew(1deg); }
    100% { transform: skew(0deg); }
}

@keyframes scanline {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}

@keyframes pulse-status {
    0% { opacity: 0.5; box-shadow: 0 0 0 var(--accent-color); }
    50% { opacity: 1; box-shadow: 0 0 5px var(--accent-color); }
    100% { opacity: 0.5; box-shadow: 0 0 0 var(--accent-color); }
}

/* Glitch Effect Class - REMOVED per user request */
.glitch-hover:hover {
    /* animation: glitch-skew 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite; */
    color: var(--accent-color);
    /* text-shadow: 2px 0 #333, -2px 0 #ccc; */
    text-shadow: none;
}

/* Status Indicator Pulse */
.footer-status span::before {
    content: '■ ';
    color: var(--accent-color);
    display: inline-block;
    animation: pulse-status 2s infinite;
}

/* =============================================
   HERO SECTION (Index)
   ============================================= */

.hero-container {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 3rem;
}

.profile-pic-container {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
    background: #000000;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    perspective: 1000px;
}

.coin-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 50%;
}

.profile-pic-container:hover .coin-inner {
    transform: rotateY(180deg);
}

.coin-front, .coin-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 50%;
    object-fit: cover;
    top: 0;
    left: 0;
}

.coin-back {
    transform: rotateY(180deg);
}

.hero-text {
    flex: 1;
    color: #FFFFFF;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.7;
    text-align: justify;
}

.links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.links-grid a {
    flex: 1 1 200px; /* Permet 4 cartes sur la même ligne */
    display: flex;   /* Flex constraint transferé au a */
    text-decoration: none;
}

.link-card {
    background: #1f1c33;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.link-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.link-logo {
    display: block;
    margin-bottom: 0.8rem;
    width: 40px;
    height: auto;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.link-card h3 {
    margin: 0;
    color: var(--accent-color);
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    transition: color 0.2s;
    font-size: 1.1rem;
}

.link-card p {
    margin: 0.3rem 0 0 0;
    color: var(--dim-text);
    font-size: 0.8rem;
    transition: color 0.2s;
}

/* Hover effects handled via CSS with a cool animation on desktop */
@media (min-width: 769px) {
    .link-card {
        position: relative;
        overflow: hidden;
    }

    .link-logo {
        display: block !important;
        position: absolute;
        bottom: -50px;
        left: 50%;
        transform: translateX(-50%);
        opacity: 0;
        transition: all 0.2s linear;
        width: 35px;
        z-index: 5;
    }

    .link-card:hover .link-logo {
        bottom: 50%;
        transform: translate(-50%, 50%);
        opacity: 1;
        filter: brightness(0); /* Black icon on white background */
    }

    .link-card h3, 
    .link-card p {
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .link-card:hover h3, 
    .link-card:hover p {
        opacity: 0;
        transform: translateY(-10px);
        color: #000 !important;
    }

    .link-card:hover {
        background: var(--accent-color) !important;
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    }

    /* Specific size for Portfolio logo to make it more prominent */
    .link-card .link-logo.portfolio-logo {
        width: 50%;
        max-width: 80px;
    }
}

/* Hover effects fallback/base */
.link-card:hover {
    background: var(--accent-color) !important;
}

.link-card:hover h3, 
.link-card:hover p {
    color: #000 !important;
}

/* =============================================
   HAMBURGER MENU BUTTON
   ============================================= */

.mobile-menu-btn {
    display: none; /* Hidden on desktop */
    background: none;
    border: 1px solid var(--border-color);
    width: 44px;
    height: 44px;
    cursor: pointer;
    position: relative;
    z-index: 1001;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.mobile-menu-btn:hover,
.mobile-menu-btn.active {
    border-color: var(--accent-color);
}

.mobile-menu-btn span {
    display: block;
    position: absolute;
    left: 50%;
    width: 20px;
    height: 2px;
    background: var(--accent-color);
    transform: translateX(-50%);
    transition: top 0.3s cubic-bezier(0.25, 1, 0.5, 1),
                transform 0.3s cubic-bezier(0.25, 1, 0.5, 1),
                opacity 0.2s ease;
}

.mobile-menu-btn span:nth-child(1) { top: 14px; }
.mobile-menu-btn span:nth-child(2) { top: 21px; }
.mobile-menu-btn span:nth-child(3) { top: 28px; }

.mobile-menu-btn.active span:nth-child(1) {
    top: 21px;
    transform: translateX(-50%) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    top: 21px;
    transform: translateX(-50%) rotate(-45deg);
}

/* Mobile overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
}

/* =============================================
   MOBILE RESPONSIVENESS (Global)
   ============================================= */

@media (max-width: 768px) {
    /* RESET & CORE MOBILE LAYOUT */
    * { -webkit-tap-highlight-color: transparent; }
    html { background-attachment: scroll; }

    body::before {
        background-attachment: scroll !important;
    }
    
    .wrapper { padding: 0; min-height: 100vh; display: flex; flex-direction: column; }
    .interface-frame { border: none; padding: 0; flex: 1; display: flex; flex-direction: column; }
    .inner-frame { border: none; flex: 1; display: flex; flex-direction: column; position: relative; z-index: 5; }
    .corner-tl, .corner-tr, .corner-bl, .corner-br { display: none !important; }

    /* Hide elements properly by default on mobile */
    .desktop-only { display: none !important; }
    .mobile-only { display: flex !important; }

    header { padding-top: 0 !important; margin-bottom: 1rem !important; }
    
    main { flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 10; padding-bottom: 151px; }

    /* FLOATING IDENTITY (NO BOX) ON MOBILE */
    .hero-pile {
        display: block !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 1vh auto 2rem !important;
        width: 100% !important;
        max-width: none !important;
        text-align: center !important;
        backdrop-filter: none !important;
    }

    .hero-pile h1 { 
        font-size: clamp(2.2rem, 14vw, 3rem) !important; 
        line-height: 1.1;
        margin-bottom: 0.5rem !important;
        color: var(--text-color) !important;
        text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6); /* Better legibility on photo background */
    }

    .hero-pile .subtitle { 
        font-size: 0.9rem !important; 
        margin-bottom: 0 !important;
        opacity: 0.8;
    }

    .hero-section { display: none !important; } 

    /* CENTERED & UNROLLED SIDE DOCK FOR MOBILE */
    .dock-wrapper {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        margin: 0 auto !important; 
        width: 100% !important;
        max-width: 320px !important;
        z-index: 1100 !important;
        order: 1;
        min-height: calc(100vh - 120px); /* Fill screen minus header offset */
    }

    .scroll-chevron-wrapper {
        margin-top: 2rem;
        margin-bottom: 11rem;
        cursor: pointer;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        justify-content: center;
    }

    .scroll-chevron-wrapper:active {
        transform: rotate(180deg);
    }

    .tiles-pile {
        order: 2;
        margin: 2rem auto 40px;
        gap: 1rem;
    }

    .tile {
        padding: 1.2rem;
        border-radius: 16px;
    }

    .tile-content h2 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .tile-content p {
        font-size: 0.9rem;
    }

    .tile-image {
        max-height: 160px;
    }

    .side-dock {
        width: 100% !important;
        background: #000000;
        border: 1px solid var(--glass-border);
        border-radius: 28px;
        padding: 1rem;
        margin-top: 9rem;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
        transform: none !important;
    }

    /* HIDE DOCK ON READING PAGES */
    .writeups-mode .dock-wrapper,
    .articles-mode .dock-wrapper {
        display: none !important;
    }

    /* Exceptions for mosaic/index pages where the dock contains the Portfolio link */
    .mosaic-mode .dock-wrapper {
        display: block !important;
    }

    .dock-item {
        padding: 12px 18px;
        display: flex;
        align-items: center;
        gap: 1rem;
        background: rgba(255, 255, 255, 0.04);
        margin-bottom: 8px;
        border-radius: 20px;
    }

    .dock-item:last-child { margin-bottom: 0; }

    .dock-label {
        opacity: 1 !important;
        transform: none !important;
        font-size: 1rem;
        color: var(--text-color);
        pointer-events: auto;
    }

    .dock-icon-box img {
        width: 24px;
        height: 24px;
    }

    /* FIXED BOTTOM NAVIGATION */
    .nav-row {
        top: auto !important;
        bottom: 0 !important;
        margin-top: 0 !important;
        padding: 0 1rem 30px !important; 
        justify-content: center !important;
        background: transparent !important;
    }

    .header-right, .mobile-menu-btn { display: none !important; }
    .profile-pic-container.avatar-nav { display: none !important; }

    /* Unified Bottom Tab-Bar */
    .nav-pills-group {
        position: relative;
        transform: none;
        left: auto;
        width: auto;
        gap: 0.5rem;
        justify-content: center;
        align-items: center;
    }

    .nav-links {
        position: static;
        transform: none;
        flex-direction: row;
        padding: 5px;
        background: #000000;
        backdrop-filter: none;
        border-radius: 100px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    }

    .nav-link {
        padding: 10px 16px;
        font-size: 0.85rem;
        border-radius: 100px;
        border: none;
    }

    /* Hide back button on mobile (browser back gesture is sufficient) */
    .nav-pills-group > .nav-links:has(.back-pill) {
        display: none !important;
    }

    /* REMOVE MASK ON MOBILE */
    .top-nav-mask {
        display: none !important;
    }

    /* Footer cleanup */
    footer { display: none !important; }

    .article-card, .writeup-card { padding: 1.2rem; }
    .article-card-header h3 { font-size: 1.2rem; }
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* =============================================
   CODE WINDOW — Canonical Mac-style
   (shared between articles and writeups)
   ============================================= */

.code-window {
    background: #080808;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.window-header {
    background: rgba(255, 255, 255, 0.032);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding: 0.65rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.window-controls {
    display: flex;
    gap: 7px;
    align-items: center;
    width: 68px;
}

.window-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    opacity: 0.9;
    flex-shrink: 0;
}

.dot-red    { background: #444444; }
.dot-yellow { background: #6e6e6e; }
.dot-green  { background: #a0a0a0; }

.window-title {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 0.70rem;
    color: rgba(255, 255, 255, 0.38);
    letter-spacing: 2px;
    font-weight: 700;
    text-transform: uppercase;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    white-space: nowrap;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.72);
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 0.68rem;
    padding: 4px 14px;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 10;
    position: relative;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.92);
    color: #000;
    border-color: transparent;
}

.copy-btn.copied {
    background: #27c93f;
    border-color: #27c93f;
    color: #fff;
}


/* Fixed Navigation Row */
.nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 68px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 6px 40px;
    box-sizing: border-box;
    margin-top: 22px;
    /* We don't add background here as the user wants only the pills to have glassmorphism */
}

/* =============================================
   FLOATING SIDE DOCK (Apple-inspired)
   ============================================= */
.dock-wrapper {
    position: fixed;
    left: 20px; /* Anchored to left */
    top: 50%;
    transform: translateY(-50%);
    z-index: 1100; /* Float above content */
    margin-left: 67px;
}

.side-dock {
    display: flex;
    flex-direction: column;
    background: #000000;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--glass-border);
    border-radius: 36px; /* Sharper precise look */
    padding: 6px;
    width: 64px; /* Icon-only width */
    transition: width 0.4s cubic-bezier(0.19, 1, 0.22, 1),
                background 0.3s ease,
                transform 0.2s ease-out;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    /* 3D Tilt Support */
    perspective: 1000px;
    transform-style: preserve-3d;
}

.side-dock:hover {
    width: 200px; /* Expand to the right */
    }

.dock-item {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    padding: 10px;
    border-radius: 30px;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
}

.dock-item:hover {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.25);
}

.dock-item:hover img,
.dock-item:hover svg {
    filter: brightness(0); /* Clean black on hover over white background */
}

/* Reduced size specifically for LinkedIn SVG in dock */
.dock-item[href*="linkedin"] svg {
    transform: scale(0.75); /* Reduced further for "legèrement" based on visual feedback */
}

.dock-icon-box {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dock-icon-box img {
    width: 22px; /* Precision uniform size */
    height: 22px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Forces all icons to pure white */
    opacity: 0.85;
    transition: all 0.3s ease;
}

.dock-item:hover .dock-icon-box img {
    transform: scale(1.1);
    opacity: 1;
}

.dock-label {
    margin-left: 15px;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.4s ease;
}

.side-dock:hover .dock-label {
    opacity: 1;
    transform: translateX(0);
}

/* Active/Selected dock item if needed */
.dock-item.active {
    background: rgba(255, 255, 255, 0.15);
}


/* =============================================
   HERO CAROUSEL SYSTEM (Massive & Dynamic)
   ============================================= */
.hero-carousel-container {
    width: calc(100% - 60px); /* 30px margin left/right */
    height: 500px; /* Reduced from 100vh calc */
    margin: 30px auto;
    background: #1f1c33;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--glass-border);
    border-radius: 36px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    transform-style: preserve-3d;
    will-change: transform;
}

/* GLOBAL CAROUSEL FRAME SHADOW (In Front of Slides) */
.hero-carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Dual Inset Shadow controlled by variables */
    box-shadow: 
        inset 0 0 180px var(--carousel-shadow-1),
        inset 0 0 80px var(--carousel-shadow-2);
    z-index: 115; /* Fixed stage frame */
    pointer-events: none;
    border-radius: 36px;
}

.carousel-viewport {
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

.carousel-slide-wrapper {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

.carousel-slide::after {
    display: none !important; /* Disabling individual slide shadows */
}

.slide-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.5s ease-out;
}

.carousel-slide:hover .slide-bg-image {
    transform: scale(1.02); /* Only zoom interaction remains */
}

/* Side Panel Glass Overlay (Full Height) */
.slide-content {
    position: absolute !important;
    z-index: 120; /* Above the global frame shadow (115) */
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 33.33% !important; /* Exactly one third */
    padding: 4rem 3.5rem !important;
    background: rgba(8, 12, 24, 0.75) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center text vertically in the pane */
    align-items: flex-start;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.4) !important;
}

.slide-label {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 0.8rem;
    display: block;
}

.carousel-slide h2 {
    font-size: 2.0rem; /* Reduced to balance with full-length titles */
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    margin: 0 0 0.8rem 0;
    line-height: 1.1;
    color: #FFF;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.carousel-slide p {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-size: 1.1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    max-width: 800px;
}

.carousel-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 100;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.dot.active {
    width: 30px;
    background: var(--accent-color);
    border-radius: 100px;
}

/* CAROUSEL NAV ARROWS (PURE ICONS) */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 100px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 125; /* Above shadow (115), dots, etc. */
    transition: all 0.3s;
    color: rgba(255, 255, 255, 0.4);
}

.carousel-nav-btn:hover {
    color: var(--accent-color);
    transform: translateY(-50%) scale(1.2);
}

.carousel-nav-btn.prev { left: 10px; }
.carousel-nav-btn.next { right: 10px; }

.carousel-nav-btn svg {
    width: 42px;
    height: 42px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.5));
}

/* CAROUSEL MOBILE ADAPTATION */
@media (max-width: 768px) {
    .hero-carousel-container {
        width: calc(100% - 20px);
        height: auto;
        min-height: 500px;
        margin: 20px auto;
        padding-bottom: 2rem;
    }

    .carousel-slide {
        flex-direction: column;
        padding: 3rem 2rem;
        text-align: center;
    }

    .slide-content {
        max-width: 100%;
    }

    .carousel-slide h2 {
        font-size: 2.2rem;
    }

    .carousel-slide p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .slide-image-area {
        width: 100%;
        margin-top: 2rem;
        height: 250px;
    }

    .slide-image-wrapper {
        width: 100%;
        height: 100%;
    }
}


/* =============================================
   TOP NAVIGATION MASK (Black Fade to Transparent)
   ============================================= */
.top-nav-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 180px; /* Large smooth fade */
    background: linear-gradient(
        to bottom, 
        rgba(0, 0, 0, var(--bg-tint-opacity)) 0%, /* Managed by Global Variable */
        rgba(0, 0, 0, calc(var(--bg-tint-opacity) / 2)) 40%,
        rgba(0, 0, 0, 0) 100%
    );
    z-index: 950;
    pointer-events: none;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.4s ease; /* Smooth fade in/out */
}

.top-nav-mask.is-visible {
    opacity: 1;
}

/* =============================================
   CONTENT PAGE MODE (Blur + Dark layer for Articles/Writeups)
   ============================================= */
.content-bg-blur {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, var(--bg-tint-opacity)); 
    z-index: -2; /* Move behind body::before to allow backdrop filter to work */
    pointer-events: none;
}

/* =============================================
   GLASS INTERACTION: SPOTLIGHT GLOW
   ============================================= */
.article-card::after, .writeup-card::after, .link-card::after, .hero-carousel-container::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 130;
    background: radial-gradient(
        380px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        var(--spotlight-color, rgba(255, 255, 255, 0.12)),
        transparent 75%
    );
    mix-blend-mode: overlay;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.article-card:hover::after, .writeup-card:hover::after, 
.link-card:hover::after, .hero-carousel-container:hover::before {
    opacity: 1;
}

/* Smooth reset transitions when mouse leaves cards/main container */
.article-card:not(:hover), .writeup-card:not(:hover), 
.link-card:not(:hover), .hero-carousel-container:not(:hover) {
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1) !important;
}

.article-card:hover, .writeup-card:hover, 
.link-card:hover, .hero-carousel-container:hover {
    transition: none !important; /* Instant response while following mouse */
}


/* =============================================
   TILES PILE (Home)
   ============================================= */
.tiles-pile {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 700px;
    margin: auto;
    position: relative;
    width: 100%;
}

.tile {
    background: #1f1c33;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: block;
    text-align: left;
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.2);
}

.tile:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
}

.tile-content h2 {
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.tile-content h2 svg {
    height: 1em;
    width: auto;
    flex-shrink: 0;
}

.tile-content p {
    margin: 0;
    color: var(--dim-text);
    line-height: 1.6;
}

.tile-image {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.presentation-text-container {
    max-height: 4.8em; /* 3 lines roughly (1.6 line height * 3) */
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.presentation-text-container.expanded {
    max-height: 1000px; /* Big enough to fit content */
}

.presentation-text-container p {
    margin-bottom: 1rem;
}

.read-more-btn {
    cursor: pointer;
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: #a0a0a0;
}

.presentation-text-container.expanded #dots,
.presentation-text-container.expanded #read-more-btn {
    display: none;
}

.more-text-content {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.presentation-text-container.expanded .more-text-content {
    opacity: 1;
}

/* =============================================
   HOMEPAGE — MOBILE OVERRIDES
   ============================================= */
/* =============================================
   HOMEPAGE — MOBILE OVERRIDES
   ============================================= */
@media (max-width: 768px) {

    /* No moon, no scroll chevron */
    .moon-layer          { display: none !important; }
    .home-scroll-chevron { display: none !important; }

    /* Text always visible */
    .reveal-line {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    /* Make text layer flow in document — enables natural body scroll */
    .bg-text-layer {
        position: static !important;
        height: auto !important;
        overflow: visible !important;
        pointer-events: auto;
        padding: 98px 0 120px;
        align-items: flex-start;
    }

    .bg-text-inner {
        font-size: 0.86rem;
        line-height: 1.75;
        padding: 0 1.4rem 1rem;
        text-align: justify;
        max-width: 100%;
    }

    /* Homepage body no longer needs 210vh */
    body.home-mode .wrapper { min-height: auto; }

    /* Hide photos fixed layer — moved into text by JS */
    .photos-layer { display: none !important; }

    /* Photo rows injected between paragraphs */
    .mobile-photo-row {
        display: flex;
        justify-content: center;
        gap: 22px;
        padding: 18px 0 10px;
    }

    .mobile-photo-row .photo-frame {
        width: 100px;
        flex-shrink: 0;
        margin: 0;
        margin-bottom: 0;
        transform: none !important;
        will-change: auto;
    }

    .mobile-photo-row .photo-frame--bare { width: 80px; }

    .mobile-photo-row-0 .photo-frame:nth-child(1) { transform: rotate(-5deg) !important; }
    .mobile-photo-row-0 .photo-frame:nth-child(2) { transform: rotate(3deg)  !important; }
    .mobile-photo-row-1 .photo-frame:nth-child(1) { transform: rotate(4deg)  !important; }
    .mobile-photo-row-1 .photo-frame:nth-child(2) { transform: rotate(-3deg) !important; }
    .mobile-photo-row-2 .photo-frame:nth-child(1) { transform: rotate(-2deg) !important; }
    .mobile-photo-row-2 .photo-frame:nth-child(2) { transform: rotate(6deg)  !important; }
}

/* =============================================
   MOBILE NAV DRAWER
   ============================================= */

/* Page title — shown on both desktop and mobile */
.mobile-page-title {
    display: block;
    font-family: 'Montserrat', ui-sans-serif, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 1.8rem 0;
    line-height: 1.2;
    opacity: 0.7;
    text-align: center;
}

@media (max-width: 768px) {
    .mobile-page-title {
        font-size: 1.5rem;
        font-weight: 900;
        letter-spacing: 0.04em;
        margin: 0 0 1.6rem 0;
        padding: 0 1.4rem;
        opacity: 1;
    }
}

/* Hidden on desktop */
.mobile-nav-drawer,
.mobile-more-btn { display: none; }

@media (max-width: 768px) {

    /* Nav-row: overflow visible so drawer shows above, flex gap for circle button */
    .nav-row {
        overflow: visible !important;
        gap: 10px;
    }

    /* Toggle pill — même style que .nav-links, sibling naturel dans nav-pills-group */
    .mobile-more-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        border-radius: 100px;
        padding: 6px;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border: 1px solid rgba(255, 255, 255, 0.4);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.275);
        cursor: pointer;
        color: rgba(255, 255, 255, 0.7);
        transition: color 0.2s;
    }

    .mobile-more-btn svg {
        display: block;
        width: 36px;
        height: 36px;
        padding: 10px;
        box-sizing: border-box;
        transition: transform 0.3s ease;
    }

    .mobile-more-btn[aria-expanded="true"] svg {
        transform: rotate(180deg);
    }

    /* Drawer panel — glass blur, same as nav pills */
    .mobile-nav-drawer {
        display: block;
        position: absolute;
        bottom: calc(100% + 8px);
        left: 0;
        right: 0;
        background: rgba(8, 8, 8, 0.6);
        backdrop-filter: blur(24px) saturate(1.4);
        -webkit-backdrop-filter: blur(24px) saturate(1.4);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        padding: 16px;
        transform: translateY(8px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s;
    }

    .mobile-nav-drawer.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* Portfolio pill only */
    .drawer-links {
        display: flex;
        gap: 8px;
        margin-bottom: 12px;
    }

    .drawer-pill {
        flex: 1;
        text-align: center;
        padding: 10px 16px;
        background: rgba(255, 255, 255, 0.07);
        border-radius: 12px;
        color: rgba(255, 255, 255, 0.85);
        font-family: 'Inter', sans-serif;
        font-size: 0.9rem;
        font-weight: 500;
        text-decoration: none;
        white-space: nowrap;
        transition: background 0.15s;
    }

    .drawer-pill:active { background: rgba(255, 255, 255, 0.14); }

    .drawer-socials {
        display: flex;
        justify-content: space-around;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.07);
    }

    .drawer-socials .nav-icon-link {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 8px;
        color: rgba(255, 255, 255, 0.5);
        transition: color 0.15s;
    }

    .drawer-socials .nav-icon-link:active { color: #fff; }
}

