/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* --- COLOR PALETTE (Steel Horizon) --- */
    --bg-dark: #06090f;
    --bg-mid: #0b1220;
    --card-bg: rgba(14, 22, 36, 0.78);
    --card-bg-solid: #0f1728;
    --border-color: rgba(166, 195, 255, 0.18);
    --border-strong: rgba(166, 195, 255, 0.35);
    --primary: #3dd6b5;
    --primary-strong: #18c7a3;
    --accent: #ffb259;
    --primary-glow: rgba(61, 214, 181, 0.35);
    --accent-glow: rgba(255, 178, 89, 0.35);
    --text-main: #ecf2ff;
    --text-soft: #c8d3e6;
    --text-muted: #92a2bd;

    /* --- TYPOGRAPHY --- */
    --font-heading: "Sora", sans-serif;
    --font-body: "Manrope", sans-serif;
    --font-reading: "Newsreader", serif;

    /* --- SIZING & RADIUS --- */
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 9px;
    --sidebar-width: 330px;
}

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

/* =========================================
   2. BODY & LAYOUT ARCHITECTURE
   ========================================= */
body {
    background:
        radial-gradient(
            circle at 12% 8%,
            rgba(61, 214, 181, 0.14),
            transparent 34%
        ),
        radial-gradient(
            circle at 86% 18%,
            rgba(255, 178, 89, 0.12),
            transparent 30%
        ),
        radial-gradient(
            circle at 50% 120%,
            rgba(92, 137, 255, 0.16),
            transparent 40%
        ),
        linear-gradient(135deg, #05070d 0%, #08101b 45%, #0a1421 100%);
    color: var(--text-main);
    font-family: var(--font-body);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    padding: clamp(14px, 2.6vh, 34px);
    display: flex;
    justify-content: center;
    align-items: center;
    letter-spacing: 0.01em;
}

/* Background Effects */
.bg-noise {
    position: fixed;
    inset: 0;
    opacity: 0.022;
    pointer-events: none;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.bg-gradient {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(
            circle at 16% 60%,
            rgba(61, 214, 181, 0.18),
            transparent 34%
        ),
        radial-gradient(
            circle at 84% 30%,
            rgba(255, 178, 89, 0.12),
            transparent 30%
        );
    filter: blur(4px);
    z-index: -2;
}

/* MAIN CONTAINER (The Grid) */
.app-container {
    width: 100%;
    height: 100%;
    max-width: 1620px;
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: 24px;
    position: relative;
}

/* =========================================
   3. SIDEBAR (LEFT)
   ========================================= */
.sidebar {
    background: linear-gradient(
        165deg,
        rgba(17, 27, 43, 0.72),
        rgba(10, 15, 26, 0.88)
    );
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
    border: 1px solid var(--border-color);
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    padding: 36px 30px;
    height: 100%;
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.profile-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
}

.avatar-container {
    position: relative;
    margin-bottom: 22px;
    flex-shrink: 0;
}

.avatar {
    width: 156px;
    height: 156px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(191, 212, 255, 0.35);
    box-shadow:
        0 16px 28px rgba(0, 0, 0, 0.42),
        0 0 0 8px rgba(61, 214, 181, 0.06);
    padding: 4px;
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

.avatar:hover {
    transform: translateY(-3px) scale(1.03);
    border-color: var(--primary);
    box-shadow:
        0 20px 34px rgba(0, 0, 0, 0.5),
        0 0 0 10px rgba(61, 214, 181, 0.14);
}

.status-dot {
    width: 15px;
    height: 15px;
    background-color: #11d899;
    border: 3px solid var(--card-bg-solid);
    border-radius: 50%;
    position: absolute;
    bottom: 10px;
    right: 12px;
    box-shadow: 0 0 0 8px rgba(17, 216, 153, 0.16);
}

.identity h1 {
    font-family: var(--font-heading);
    font-size: 1.88rem;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
    color: #f4f8ff;
}

.identity p {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.bio-short {
    margin: 56px 0;
    color: var(--text-muted);
    line-height: 1.72;
    font-size: 0.95rem;
    text-wrap: pretty;
}

.social-row {
    display: flex;
    gap: 12px;
    margin-top: auto;
    margin-bottom: 18px;
    flex-shrink: 0;
}

.social-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(
        150deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.03)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    text-decoration: none;
    transition: all 0.32s ease;
    border: 1px solid rgba(198, 216, 255, 0.12);
}

.social-btn:hover {
    background: linear-gradient(
        135deg,
        rgba(61, 214, 181, 0.85),
        rgba(24, 199, 163, 0.86)
    );
    color: #021912;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 18px var(--primary-glow);
}

.sidebar-footer {
    color: rgba(166, 182, 208, 0.55);
    font-size: 0.77rem;
    flex-shrink: 0;
    letter-spacing: 0.04em;
}

/* =========================================
   4. CONTENT MAIN (RIGHT)
   ========================================= */
.main-content {
    background: linear-gradient(
        165deg,
        rgba(14, 22, 36, 0.72),
        rgba(10, 16, 30, 0.86)
    );
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
    border: 1px solid var(--border-color);
    box-shadow:
        0 20px 44px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* --- NAVIGATION (Top Bar on Desktop) --- */
.top-bar {
    height: 82px;
    border-bottom: 1px solid rgba(166, 195, 255, 0.16);
    display: flex;
    align-items: center;
    padding: 0 38px;
    background: rgba(10, 17, 30, 0.72);
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.nav-link {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 999px;
    transition: all 0.28s ease;
}

.nav-link i {
    font-size: 1rem;
}

.nav-link:hover {
    color: var(--text-main);
    border-color: rgba(166, 195, 255, 0.24);
    background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
    background: linear-gradient(
        135deg,
        rgba(61, 214, 181, 0.96),
        rgba(24, 199, 163, 0.9)
    );
    color: #052018;
    border-color: rgba(61, 214, 181, 0.9);
    box-shadow: 0 8px 22px rgba(61, 214, 181, 0.34);
}

/* --- PAGE VIEWER (Scroll Area) --- */
.page-viewer {
    flex: 1;
    overflow-y: auto;
    padding: 42px 50px;
    scroll-behavior: smooth;
    position: relative;
}

.page-viewer::-webkit-scrollbar {
    width: 9px;
}

.page-viewer::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        rgba(61, 214, 181, 0.5),
        rgba(61, 214, 181, 0.18)
    );
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.page-viewer::-webkit-scrollbar-track {
    background: transparent;
}

/* --- SECTIONS COMMON --- */
.page {
    display: none;
    animation: fadeIn 0.55s cubic-bezier(0.21, 0.85, 0.34, 1) forwards;
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 54px;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.992);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes textRise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 2.1vw, 2.25rem);
    margin-bottom: 38px;
    padding-left: 14px;
    border-left: 4px solid var(--primary);
    letter-spacing: -0.02em;
}

/* =========================================
   5. HOME PAGE & MARQUEE
   ========================================= */
.hero-section {
    padding-top: 14px;
}

.hero-section h2 {
    font-size: clamp(2.35rem, 5vw, 4.4rem);
    line-height: 1.05;
    margin-bottom: 16px;
    font-family: var(--font-heading);
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.animate-text {
    animation: textRise 0.8s cubic-bezier(0.2, 0.82, 0.28, 1) both;
}

.gradient-text {
    background: linear-gradient(95deg, #e9f3ff, #71e8cf 54%, #f5c989);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: 1.02rem;
    color: rgba(180, 196, 220, 0.84);
    margin-bottom: 46px;
    max-width: 620px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.stats-container {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.stat-box {
    min-width: 160px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.05),
        rgba(255, 255, 255, 0.02)
    );
    border: 1px solid rgba(166, 195, 255, 0.18);
    transition: all 0.28s ease;
}

.stat-box:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.stat-box h3 {
    font-size: clamp(2rem, 3.2vw, 2.8rem);
    color: var(--primary);
    font-family: var(--font-heading);
    margin-bottom: 6px;
    line-height: 1;
}

.stat-box p {
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
}

/* --- REPERTOIRE MARQUEE --- */
.repertoire-wrapper {
    margin-top: 150px;
    width: 100%;
}

.rep-title {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 3px solid var(--accent);
    line-height: 1;
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(
        to right,
        transparent,
        black 12%,
        black 88%,
        transparent
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent,
        black 12%,
        black 88%,
        transparent
    );
}

.mt-small {
    margin-top: 14px;
}

.marquee-track {
    display: flex;
    gap: 14px;
    width: max-content;
    padding: 4px 0;
}

.scroll-left {
    animation: scrollLeft 58s linear infinite;
}

.scroll-right {
    animation: scrollRight 58s linear infinite;
}

.repertoire-wrapper:hover .marquee-track {
    animation-play-state: paused;
}

.tech-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 0.87rem;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(166, 195, 255, 0.16);
    padding: 9px 16px;
    border-radius: 999px;
    white-space: nowrap;
    transition: all 0.27s ease;
}

.tech-tag i {
    color: var(--accent);
    font-size: 1.02rem;
}

.tech-tag:hover {
    border-color: rgba(255, 178, 89, 0.58);
    color: #fff4e4;
    background: rgba(255, 178, 89, 0.14);
    box-shadow: 0 0 18px rgba(255, 178, 89, 0.22);
    transform: translateY(-2px);
}

@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes scrollRight {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* =========================================
   6. PROJECTS GRID (Cards)
   ========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: stretch;
}

.project-card {
    background: linear-gradient(
        165deg,
        rgba(21, 33, 53, 0.86),
        rgba(13, 22, 36, 0.88)
    );
    border: 1px solid rgba(166, 195, 255, 0.2);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    transition:
        transform 0.32s ease,
        box-shadow 0.32s ease,
        border-color 0.32s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 14px 28px rgba(0, 0, 0, 0.38),
        0 0 0 1px rgba(61, 214, 181, 0.45);
    border-color: rgba(61, 214, 181, 0.45);
}

.card-image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 10;
    min-height: 200px;
    overflow: hidden;
    border-bottom: 1px solid rgba(166, 195, 255, 0.14);
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.project-card:hover .card-image-wrapper img {
    transform: scale(1.07);
}

.card-content {
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-content h3 {
    font-size: 1.2rem;
    font-family: var(--font-heading);
    margin-bottom: 8px;
}

.tech-stack {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.card-buttons {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

@media (min-width: 861px) {
    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-card {
        box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
    }
}

.btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.22s ease;
}

.btn-outline {
    border: 1px solid rgba(166, 195, 255, 0.26);
    color: var(--text-main);
    background: transparent;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(225, 236, 255, 0.64);
}

.btn-fill {
    background: linear-gradient(
        135deg,
        rgba(61, 214, 181, 0.94),
        rgba(24, 199, 163, 0.92)
    );
    color: #042017;
    border: 1px solid rgba(61, 214, 181, 0.94);
}

.btn-fill:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 16px rgba(61, 214, 181, 0.28);
}

/* =========================================
   7. CONTACT + BLOG
   ========================================= */
.contact-wrapper {
    max-width: 780px;
    border-radius: 18px;
    padding: clamp(22px, 4vw, 32px);
    border: 1px solid rgba(166, 195, 255, 0.2);
    background: linear-gradient(
        155deg,
        rgba(17, 26, 41, 0.84),
        rgba(12, 20, 32, 0.92)
    );
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
}

.contact-intro {
    color: var(--text-soft);
    line-height: 1.75;
    max-width: 640px;
    margin-bottom: 22px;
    font-size: clamp(0.95rem, 1.8vw, 1.03rem);
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.contact-link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 140px;
    text-decoration: none;
    padding: 18px;
    border-radius: 14px;
    border: 1px solid rgba(166, 195, 255, 0.2);
    background: linear-gradient(
        150deg,
        rgba(255, 255, 255, 0.06),
        rgba(255, 255, 255, 0.02)
    );
    transition: all 0.25s ease;
}

.contact-link i {
    font-size: 1.2rem;
    color: var(--primary);
}

.contact-link:hover {
    transform: translateY(-3px);
    border-color: rgba(61, 214, 181, 0.5);
    box-shadow: 0 12px 24px rgba(61, 214, 181, 0.18);
}

.link-label {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.13em;
    font-size: 0.72rem;
    font-weight: 700;
}

.link-value {
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: clamp(1rem, 1.8vw, 1.16rem);
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.blog-wrapper {
    padding: 2px 0 6px;
}

.blog-intro {
    color: var(--text-soft);
    font-size: clamp(0.98rem, 1.6vw, 1.05rem);
    line-height: 1.7;
    max-width: 680px;
    margin-bottom: 24px;
}

.blog-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.blog-card {
    border: 1px solid rgba(166, 195, 255, 0.22);
    border-radius: 16px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    min-height: 250px;
    background: linear-gradient(
        165deg,
        rgba(19, 31, 49, 0.82),
        rgba(14, 22, 38, 0.9)
    );
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
    transition:
        transform 0.28s ease,
        border-color 0.28s ease,
        box-shadow 0.28s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(61, 214, 181, 0.48);
    box-shadow:
        0 16px 28px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(61, 214, 181, 0.25);
}

.blog-card-meta {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.68rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.blog-card-title {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 2.4vw, 1.45rem);
    line-height: 1.3;
    margin-bottom: 11px;
    letter-spacing: -0.01em;
}

.blog-card-excerpt {
    color: var(--text-muted);
    line-height: 1.72;
    margin-bottom: 18px;
}

.blog-read-btn {
    margin-top: auto;
    width: fit-content;
    border: 1px solid rgba(166, 195, 255, 0.3);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    border-radius: 999px;
    padding: 9px 14px;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    display: inline-flex;
    gap: 7px;
    align-items: center;
    cursor: pointer;
    transition: all 0.24s ease;
}

.blog-read-btn:hover {
    color: #031911;
    background: linear-gradient(
        135deg,
        rgba(61, 214, 181, 0.94),
        rgba(24, 199, 163, 0.9)
    );
    border-color: rgba(61, 214, 181, 0.9);
}

.blog-empty {
    border-radius: 14px;
    border: 1px dashed rgba(166, 195, 255, 0.3);
    padding: 26px;
    color: var(--text-muted);
}

.blog-empty code {
    color: #f4d6af;
}

/* =========================================
   8. BLOG READER
   ========================================= */
body.reader-open {
    overflow: hidden;
}

.blog-reader {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(
            circle at 10% 8%,
            rgba(17, 136, 112, 0.22),
            transparent 30%
        ),
        linear-gradient(140deg, #020409 0%, #050a12 48%, #0b1422 100%);
    z-index: 12000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.blog-reader.active {
    opacity: 1;
    pointer-events: auto;
}

.blog-reader-panel {
    height: 100vh;
    overflow-y: auto;
    padding: clamp(20px, 3vw, 38px) clamp(16px, 3vw, 48px) 72px;
}

.blog-reader-close {
    border: 1px solid rgba(166, 195, 255, 0.3);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    border-radius: 999px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    margin-bottom: 24px;
}

.blog-reader-close:hover {
    border-color: rgba(61, 214, 181, 0.7);
    color: #dcfff5;
}

.blog-reader-article {
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(16px, 3vw, 36px);
}

.blog-reader-meta {
    color: #7ba2c6;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 16px;
    font-weight: 700;
}

.blog-reader-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.4rem);
    letter-spacing: -0.03em;
    line-height: 1.06;
    margin-bottom: 26px;
    color: #f0f7ff;
}

.blog-reader-content p {
    font-family: var(--font-reading);
    color: #d8e3f3;
    font-size: clamp(1.14rem, 2.4vw, 1.42rem);
    line-height: 1.9;
    margin-bottom: 1.3em;
    letter-spacing: 0.005em;
}

/* =========================================
   9. FLUID RESPONSIVENESS
   ========================================= */
@media (max-height: 800px) {
    body {
        padding: 12px;
    }

    .app-container {
        gap: 14px;
    }

    .sidebar {
        padding: 22px 18px;
    }

    .avatar {
        width: 100px;
        height: 100px;
    }

    .bio-short {
        margin: 14px 0;
        font-size: 0.84rem;
    }

    .top-bar {
        height: 62px;
    }
}

@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 264px 1fr;
    }

    .page-viewer {
        padding: 32px;
    }

    .nav-menu {
        gap: 8px;
    }

    .nav-link {
        padding: 9px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 860px) {
    body {
        padding: 0;
        height: auto;
        overflow-y: auto;
        display: block;
    }

    .app-container {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: auto;
        border: none;
        gap: 0;
    }

    .sidebar {
        border-radius: 0;
        border: none;
        border-bottom: 1px solid rgba(166, 195, 255, 0.16);
        background: linear-gradient(
            180deg,
            rgba(8, 12, 20, 0.96),
            rgba(7, 11, 18, 0.95)
        );
        backdrop-filter: none;
        padding: 28px 20px;
        align-items: center;
        text-align: center;
        position: relative;
        z-index: 2;
    }

    .avatar {
        width: 112px;
        height: 112px;
    }

    .bio-short {
        display: block;
        margin: 15px 0;
        padding: 0 10px;
    }

    .sidebar-footer {
        display: none;
    }

    .main-content {
        border-radius: 0;
        border: none;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        padding-bottom: 102px;
    }

    .top-bar {
        height: 0;
        padding: 0;
        overflow: visible;
        border: none;
    }

    .nav-menu {
        position: fixed;
        bottom: 22px;
        left: 50%;
        transform: translateX(-50%);
        width: 88%;
        max-width: 420px;
        background: rgba(12, 20, 32, 0.94);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(198, 219, 255, 0.18);
        border-radius: 999px;
        padding: 10px 16px;
        justify-content: space-between;
        z-index: 9999;
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.46);
    }

    .nav-link {
        flex-direction: column;
        gap: 4px;
        padding: 0;
        background: transparent !important;
        box-shadow: none !important;
        color: #8ca1c2;
        border-radius: 0;
        border: none;
    }

    .nav-link i {
        font-size: 1.32rem;
    }

    .nav-link span {
        font-size: 0.63rem;
        font-weight: 600;
        letter-spacing: 0.02em;
    }

    .nav-link.active {
        color: var(--primary) !important;
    }

    .page-viewer {
        padding: 30px 20px;
    }

    .hero-section h2 {
        font-size: clamp(2.2rem, 8vw, 3rem);
    }

    .stats-container {
        gap: 12px;
    }

    .stat-box {
        min-width: 0;
        flex: 1;
    }

    .stat-box h3 {
        font-size: 2rem;
    }

    .repertoire-wrapper {
        margin-top: 58px;
    }

    .tech-tag {
        padding: 8px 14px;
        font-size: 0.81rem;
    }

    .scroll-left,
    .scroll-right {
        animation-duration: 42s;
    }

    .card-image-wrapper {
        min-height: 170px;
    }

    .contact-links,
    .blog-list {
        grid-template-columns: 1fr;
    }

    .contact-link {
        min-height: 120px;
    }

    .blog-card {
        min-height: 0;
    }

    .blog-reader-panel {
        padding: 18px 12px 60px;
    }

    .blog-reader-article {
        padding: 10px 6px;
    }
}

@media (max-width: 370px) {
    .nav-menu {
        width: 95%;
        padding: 9px 12px;
    }

    .nav-link i {
        font-size: 1.16rem;
    }

    .hero-section h2 {
        font-size: 2rem;
    }

    .sidebar {
        padding: 20px 14px;
    }
}

.tech-tag img {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    filter: saturate(1.08) contrast(1.02);
}
