/* ==========================================================================
   MUTOUAICG Personal Homepage - Core Stylesheet
   Theme: Sci-Fi Neon Cyberpunk & High-End VFX Portals
   ========================================================================== */

/* 1. Global Variables & Design Tokens */
:root {
    /* Color Palette */
    --bg-dark: #040408;
    --panel-bg: rgba(14, 12, 19, 0.58);
    --panel-border: rgba(255, 255, 255, 0.1);
    --panel-border-glow: rgba(0, 210, 255, 0.15);
    
    /* Neon Accents */
    --cyan: #00d2ff;
    --cyan-rgb: 0, 210, 255;
    --magenta: #ff2a4b;
    --magenta-rgb: 255, 42, 75;
    --purple: #dfb56c;
    --purple-rgb: 223, 181, 108;
    --green: #00ff88;
    --green-rgb: 0, 255, 136;
    --blue: #0a84ff;
    --blue-rgb: 10, 132, 255;

    /* Prompt Lab preview surface — unified inner/outer/scan bg */
    --lab-preview-surface: #020208;
    
    /* Fonts & Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-sci-fi: 'Cinzel', 'Outfit', 'Segoe UI', serif;
    
    /* Functional Text Colors */
    --text-light: #f1f5f9;
    --text-mid: #cbd5e1;
    --text-muted: #64748b;
    --text-dark: #0f172a;
    
    /* Animation Timings */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-mid: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    --bg-fade-duration: 3.2s;
    --cursor-reveal-x: 50vw;
    --cursor-reveal-y: 42vh;
    --cursor-reveal-opacity: 0;
}

/* 2. Reset & Base Settings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html {
    background-color: var(--bg-dark);
}

body {
    background: transparent !important; /* Body MUST be transparent - do NOT add any background here! */
    color: var(--text-light);
    font-family: var(--font-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================================
   BACKGROUND LAYER STACK
   The blurred-bg-container is a fixed full-viewport element.
   It carries its own dark background-color, and the blurred
   image layers render INSIDE it (on top of its dark bg).
   This avoids ALL z-index stacking context issues.
   ============================================================ */

.blurred-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background-color: var(--bg-dark); /* Dark base rendered INSIDE this container */
    isolation: isolate;
}

.blurred-bg-container::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.01), transparent 34%),
        linear-gradient(180deg, rgba(2, 2, 6, 0.52) 0%, rgba(2, 2, 6, 0.74) 58%, rgba(2, 2, 6, 0.88) 100%);
    backdrop-filter: blur(4px) saturate(78%);
    -webkit-backdrop-filter: blur(4px) saturate(78%);
}

.blurred-bg-container::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0, 210, 255, 0.012), transparent 28%, transparent 72%, rgba(255, 42, 75, 0.012)),
        radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.66) 100%),
        rgba(0, 0, 0, 0.34);
}

.blurred-bg-layer {
    position: absolute;
    top: -3%;
    left: -3%;
    width: 106%;
    height: 106%;
    z-index: 0;
    opacity: 0;
    transition: opacity var(--bg-fade-duration) ease-in-out;
    will-change: opacity, transform;
    transform: translate3d(0, 0, 0);
}

.blurred-bg-layer img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(14px) saturate(0.72) brightness(0.28) contrast(0.9);
    transform: scale(1.008);
    transition: transform 15s ease-out;
}

.blurred-bg-layer.active {
    opacity: 1;
}

.blurred-bg-layer.active img {
    transform: scale(1.035);
}

.bg-reveal-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    opacity: var(--cursor-reveal-opacity);
    pointer-events: none;
    transition: opacity 360ms cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, -webkit-mask-image, mask-image;
    -webkit-mask-image: radial-gradient(
        ellipse 310px 220px at var(--cursor-reveal-x) var(--cursor-reveal-y),
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.82) 28%,
        rgba(0, 0, 0, 0.46) 58%,
        rgba(0, 0, 0, 0.16) 82%,
        transparent 100%
    );
    mask-image: radial-gradient(
        ellipse 310px 220px at var(--cursor-reveal-x) var(--cursor-reveal-y),
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.82) 28%,
        rgba(0, 0, 0, 0.46) 58%,
        rgba(0, 0, 0, 0.16) 82%,
        transparent 100%
    );
}

.bg-reveal-layer img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(0.35px) saturate(1.18) brightness(0.88) contrast(1.12);
    transform: scale(1.015);
}

/* Particle canvas - above blurred bg, below page content */
#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* Custom Scrollbar */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--cyan-rgb), 0.55) rgba(255, 255, 255, 0.04);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(var(--cyan-rgb), 0.7) 0%, rgba(var(--cyan-rgb), 0.45) 100%);
    border-radius: 4px;
    border: 1px solid rgba(var(--cyan-rgb), 0.35);
    box-shadow: 0 0 8px rgba(var(--cyan-rgb), 0.5), 0 0 16px rgba(var(--cyan-rgb), 0.25);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(var(--cyan-rgb), 0.9) 0%, rgba(var(--cyan-rgb), 0.65) 100%);
    box-shadow: 0 0 10px rgba(var(--cyan-rgb), 0.6), 0 0 20px rgba(var(--cyan-rgb), 0.35);
}

/* 3. Helper Classes & Typography Utilities */
.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 10; /* Above bg layers (z:0) and particle canvas (z:1) */
}

.text-cyan { color: var(--cyan); }
.text-magenta { color: var(--magenta); }
.text-purple { color: var(--purple); }
.text-green { color: var(--green); }
.text-blue { color: var(--blue); }

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-glow-cyan {
    color: var(--cyan);
    text-shadow: 0 0 15px rgba(var(--cyan-rgb), 0.7), 0 0 30px rgba(var(--cyan-rgb), 0.3);
}

.text-glow-gradient {
    background: linear-gradient(135deg, var(--cyan) 0%, var(--magenta) 50%, var(--purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(var(--magenta-rgb), 0.3));
}

.glass-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    transition: var(--transition-mid);
}

.glass-panel:hover {
    border-color: var(--panel-border-glow);
    box-shadow: 0 12px 40px 0 rgba(var(--cyan-rgb), 0.08);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: 6px;
    font-family: var(--font-sci-fi);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-mid);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--cyan);
    box-shadow: inset 0 0 8px rgba(var(--cyan-rgb), 0.2), 0 0 10px rgba(var(--cyan-rgb), 0.1);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--cyan-rgb), 0.25), transparent);
    transition: 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    box-shadow: 0 0 20px rgba(var(--cyan-rgb), 0.5), inset 0 0 12px rgba(var(--cyan-rgb), 0.3);
    border-color: var(--cyan);
    transform: translateY(-2px);
    text-shadow: 0 0 5px rgba(var(--cyan-rgb), 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, rgba(var(--cyan-rgb), 0.1) 0%, rgba(var(--magenta-rgb), 0.1) 100%);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    border-color: var(--magenta);
    box-shadow: 0 0 25px rgba(var(--magenta-rgb), 0.4);
    transform: translateY(-2px);
}

/* 4. Header & Navbar Style */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(5, 5, 18, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-mid);
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-svg {
    filter: drop-shadow(0 0 8px rgba(var(--cyan-rgb), 0.4));
    transition: var(--transition-slow);
}

.logo-area:hover .logo-svg {
    transform: rotate(180deg);
    filter: drop-shadow(0 0 12px rgba(var(--magenta-rgb), 0.6));
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-sci-fi);
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: 1px;
    background: linear-gradient(90deg, var(--text-light), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-sub {
    font-size: 0.7rem;
    font-family: var(--font-sci-fi);
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Nav Links */
.main-nav ul {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-mid);
    position: relative;
    padding: 0.25rem 0;
    transition: var(--transition-fast);
}

.nav-en {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: var(--font-sci-fi);
    letter-spacing: 0.5px;
    margin-top: 1px;
    transition: var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    box-shadow: 0 0 8px var(--cyan);
    transition: var(--transition-mid);
}

.nav-link:hover {
    color: var(--cyan);
    text-shadow: 0 0 8px rgba(var(--cyan-rgb), 0.4);
}

.nav-link:hover .nav-en {
    color: var(--magenta);
}

.nav-link:hover::after {
    width: 100%;
}

/* 5. Hero Section Style */
.hero-section {
    padding: 7rem 0 3rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: center;
}

.hero-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-tag-badge {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-family: var(--font-sci-fi);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 1px;
    background: rgba(var(--cyan-rgb), 0.08);
    padding: 0.35rem 0.85rem;
    border-radius: 4px;
    border: 1px solid rgba(var(--cyan-rgb), 0.2);
}

.tag-bracket {
    opacity: 0.5;
}

.hero-title {
    font-family: var(--font-sci-fi);
    font-size: clamp(2rem, 3.2vw, 2.6rem);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -0.015em;
    overflow: visible;
    padding-top: 0.12em;
}

.hero-intro {
    font-size: 1.05rem;
    color: var(--text-mid);
    max-width: 580px;
    line-height: 1.75;
    text-align: justify;
}

.hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0;
}

.pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-mid);
    cursor: default;
    transition: var(--transition-fast);
}

.pill-badge svg {
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.pill-badge:hover {
    background: rgba(157, 0, 255, 0.1);
    border-color: rgba(157, 0, 255, 0.4);
    box-shadow: 0 0 15px rgba(157, 0, 255, 0.15);
    color: var(--text-light);
    transform: translateY(-2px);
}

.pill-badge:hover svg {
    color: var(--cyan);
    filter: drop-shadow(0 0 4px var(--cyan));
}

/* Portal System (Energy Core) */
.portal-wrapper {
    position: relative;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

/* Tech corners styling */
.tech-corner {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1px solid var(--purple); /* Bronze Gold filigree */
    pointer-events: none;
    box-shadow: 0 0 6px rgba(223, 181, 108, 0.35);
}
.tech-corner.tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.tech-corner.tr { top: 10px; right: 10px; border-left: none; border-bottom: none; border-color: var(--magenta); }
.tech-corner.bl { bottom: 10px; left: 10px; border-right: none; border-top: none; border-color: var(--purple); }
.tech-corner.br { bottom: 10px; right: 10px; border-left: none; border-top: none; }

.portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.75rem;
}

.tech-label {
    display: block;
    font-family: var(--font-sci-fi);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 1px;
    color: var(--text-light);
}

.tech-sub {
    font-family: var(--font-sci-fi);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.portal-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.2);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
}

.indicator-dot {
    width: 6px;
    height: 6px;
    background-color: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--green);
}

.indicator-text {
    font-family: var(--font-sci-fi);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--green);
}

.canvas-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    background: radial-gradient(circle, #090924 0%, #03030d 100%);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

#energyCoreCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.portal-silhouette {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 110px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 240'%3E%3Cpath d='M50 20c-8 0-14 6-14 14v16c-10 6-16 16-16 28v56c0 10 6 18 14 22v64c0 8 6 14 14 14s14-6 14-14v-64c8-4 14-12 14-22V78c0-12-6-22-16-28V34c0-8-6-14-14-14z' fill='%23000000' opacity='0.8'/%3E%3C/svg%3E") no-repeat center bottom;
    background-size: contain;
    pointer-events: none;
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.8));
    opacity: 0.9;
}

.portal-footer {
    display: grid;
    grid-template-columns: 0.9fr 1.2fr 0.9fr;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.75rem;
}

.footer-stat {
    display: flex;
    flex-direction: column;
}

.stat-lbl {
    font-family: var(--font-sci-fi);
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.stat-val {
    font-family: var(--font-sci-fi);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.power-bar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.power-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.power-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--magenta));
    box-shadow: 0 0 8px var(--magenta);
    border-radius: 10px;
}

.portal-tags {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
}

.p-tag {
    font-family: var(--font-sci-fi);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    color: var(--text-mid);
}

/* 6. Section Header Utility */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3.5rem;
}

.section-header.block-mode {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.section-title {
    font-family: var(--font-sci-fi);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-light);
}

.section-bracket {
    color: var(--cyan);
    opacity: 0.85;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-family: var(--font-sci-fi);
    color: var(--text-muted);
    font-weight: 600;
    transition: var(--transition-fast);
}

.section-link svg {
    transition: var(--transition-fast);
}

.section-link:hover {
    color: var(--cyan);
    text-shadow: 0 0 8px rgba(var(--cyan-rgb), 0.4);
}

.section-link:hover svg {
    transform: translateX(5px);
    color: var(--cyan);
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
}

/* 7. Featured Works Section Style */
.works-section {
    padding: 6rem 0;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
}

.work-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-mid);
    position: relative;
}

.work-img-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.work-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 3, 12, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-mid);
    backdrop-filter: blur(2px);
}

.play-btn-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
    border: none;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(var(--cyan-rgb), 0.6);
    transform: scale(0.85);
    transition: var(--transition-mid);
}

.play-btn-circle svg {
    margin-left: 3px;
    transition: var(--transition-fast);
}

.work-info {
    padding: 1.25rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.work-title {
    font-family: var(--font-sci-fi);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-light);
    transition: var(--transition-fast);
}

.work-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.work-arrow {
    position: absolute;
    bottom: 1.25rem;
    right: 1.25rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition-mid);
}

/* Card Hover Interactions */
.work-card:hover {
    border-color: var(--cyan);
    box-shadow: 0 10px 30px rgba(var(--cyan-rgb), 0.15);
    transform: translateY(-5px);
}

.work-card:hover .work-img-container img {
    transform: scale(1.08);
}

.work-card:hover .work-overlay {
    opacity: 1;
}

.work-card:hover .play-btn-circle {
    transform: scale(1);
}

.work-card:hover .work-title {
    color: var(--cyan);
    text-shadow: 0 0 8px rgba(var(--cyan-rgb), 0.3);
}

.work-card:hover .work-arrow {
    background: rgba(var(--cyan-rgb), 0.15);
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 0 10px rgba(var(--cyan-rgb), 0.4);
    transform: rotate(45deg);
}

/* 8. Knowledge Sharing Section Style */
.knowledge-section {
    padding: 6rem 0;
}

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

.knowledge-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: var(--transition-mid);
}

.k-icon-glow {
    align-self: flex-start;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-mid);
}

.k-icon-glow.green {
    background: rgba(0, 255, 136, 0.06);
    border: 1px solid rgba(0, 255, 136, 0.2);
    color: var(--green);
}
.k-icon-glow.blue {
    background: rgba(0, 119, 255, 0.06);
    border: 1px solid rgba(0, 119, 255, 0.2);
    color: var(--blue);
}
.k-icon-glow.purple {
    background: rgba(157, 0, 255, 0.06);
    border: 1px solid rgba(157, 0, 255, 0.2);
    color: var(--purple);
}

.k-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-light);
    font-family: var(--font-sci-fi);
}

.k-desc {
    font-size: 0.95rem;
    color: var(--text-mid);
    line-height: 1.65;
    text-align: justify;
    flex-grow: 1;
}

.k-link {
    align-self: flex-start;
    font-family: var(--font-sci-fi);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

/* Card Hover States */
.knowledge-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.12);
}

.knowledge-card:hover .k-icon-glow.green {
    background: rgba(0, 255, 136, 0.15);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.35);
    border-color: var(--green);
}
.knowledge-card:hover .k-icon-glow.blue {
    background: rgba(0, 119, 255, 0.15);
    box-shadow: 0 0 20px rgba(0, 119, 255, 0.35);
    border-color: var(--blue);
}
.knowledge-card:hover .k-icon-glow.purple {
    background: rgba(157, 0, 255, 0.15);
    box-shadow: 0 0 20px rgba(157, 0, 255, 0.35);
    border-color: var(--purple);
}

.knowledge-card:hover .k-link {
    color: var(--cyan);
    text-shadow: 0 0 8px rgba(var(--cyan-rgb), 0.4);
}

/* 9. Prompt Lab Section Style */
.prompt-lab-section {
    padding: 6rem 0;
}

.prompt-lab-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ── 整个运行框（红框概念） ── */
.lab-run-frame {
    display: flex;
    flex-direction: column;
    min-height: 520px;
    border: 1px solid rgba(220, 38, 68, 0.22);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(220, 38, 68, 0.04) 0%, transparent 18%),
        #060614;
    box-shadow:
        0 0 0 1px rgba(220, 38, 68, 0.08),
        0 0 28px rgba(220, 38, 68, 0.06),
        0 18px 48px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

.lab-run-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 40px rgba(220, 38, 68, 0.03);
}

.lab-run-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.lab-run-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    flex: 1;
}

.lab-run-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
    padding: 0.65rem 1rem 0.75rem;
    border-top: 1px solid rgba(56, 189, 248, 0.12);
    background:
        linear-gradient(180deg, transparent 0%, rgba(56, 189, 248, 0.04) 100%),
        rgba(6, 10, 22, 0.55);
}

.lab-shortcuts-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.65rem 0.85rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(4, 4, 14, 0.65);
}

.lab-pagination-tabs .lab-shortcut-card {
    min-height: 46px;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-sm, 6px);
    border-color: rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
        rgba(8, 12, 22, 0.55);
}

.lab-pagination-tabs .lab-shortcut-card:hover {
    border-color: rgba(var(--cyan-rgb), 0.38);
    background: rgba(8, 8, 28, 0.72);
    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.35),
        0 0 18px rgba(var(--cyan-rgb), 0.1);
}

.lab-pagination-tabs .lab-shortcut-icon {
    width: 26px;
    height: 26px;
    border-radius: 5px;
}

.lab-pagination-tabs .lab-shortcut-title {
    font-size: 0.72rem;
}

.lab-pagination-tabs .lab-shortcut-desc {
    font-size: 0.58rem;
}

/* Prompt Lab Preview Lightbox — PhotoSwipe-style dark stage */
.lab-preview-lightbox {
    z-index: 210;
    padding: 1.5rem;
    cursor: zoom-out;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(22px) saturate(120%);
    -webkit-backdrop-filter: blur(22px) saturate(120%);
}

.lab-preview-lightbox.active {
    opacity: 1;
}

.lab-preview-lightbox-close {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 2;
}

.lab-preview-lightbox-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(96vw, 1400px);
    max-height: 92vh;
    cursor: default;
}

.lab-preview-lightbox-img {
    display: block;
    max-width: 100%;
    max-height: 92vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(56, 189, 248, 0.08);
    background: rgba(10, 10, 32, 0.55);
}

/* Prompt Lab History Modal */
.lab-history-modal .lab-history-content {
    max-width: 920px;
    padding: 2rem 2.25rem 2.25rem;
}

.lab-history-header {
    margin-bottom: 1.25rem;
    padding-right: 2.5rem;
}

.lab-history-title {
    margin: 0.65rem 0 0.35rem;
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-primary, #f4f4ff);
}

.lab-history-subtitle {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.55));
    line-height: 1.5;
}

.lab-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.85rem;
    max-height: min(60vh, 520px);
    overflow-y: auto;
    padding-right: 0.35rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--cyan-rgb, 0, 255, 255), 0.35) transparent;
}

.lab-history-grid::-webkit-scrollbar {
    width: 6px;
}

.lab-history-grid::-webkit-scrollbar-thumb {
    background: rgba(var(--cyan-rgb, 0, 255, 255), 0.35);
    border-radius: 999px;
}

.lab-history-item {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.55rem;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
        rgba(8, 8, 24, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm, 10px);
    text-align: left;
    color: inherit;
    cursor: pointer;
    transition: border-color var(--transition-mid), box-shadow var(--transition-mid), background-color var(--transition-mid);
}

.lab-history-item:hover,
.lab-history-item:focus-visible {
    border-color: rgba(var(--cyan-rgb), 0.45);
    box-shadow:
        0 0 18px rgba(var(--cyan-rgb), 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    outline: none;
}

.lab-history-thumb {
    position: relative;
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.lab-history-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lab-history-meta {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-height: 0;
}

.lab-history-prompt {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.82);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lab-history-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.62rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

.lab-history-ratio {
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(var(--magenta-rgb, 255, 0, 255), 0.35);
    color: rgba(var(--magenta-rgb, 255, 0, 255), 0.9);
    font-family: var(--font-mono, monospace);
    letter-spacing: 0.04em;
}

.lab-history-empty {
    margin: 0;
    padding: 2.5rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 640px) {
    .lab-history-modal .lab-history-content {
        padding: 1.5rem 1.25rem;
    }

    .lab-history-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        max-height: 55vh;
    }
}

.lab-shortcut-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 68px;
    padding: 0.65rem 0.85rem;
    background: rgba(6, 6, 20, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: var(--transition-mid);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lab-shortcut-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-mid);
}

.lab-shortcut-icon.cyan {
    background: rgba(0, 240, 255, 0.04);
    border: 1px solid rgba(0, 240, 255, 0.14);
    color: var(--cyan);
}

.lab-shortcut-icon.magenta {
    background: rgba(255, 0, 153, 0.04);
    border: 1px solid rgba(255, 0, 153, 0.14);
    color: var(--magenta);
}

.lab-shortcut-icon.green {
    background: rgba(0, 255, 136, 0.04);
    border: 1px solid rgba(0, 255, 136, 0.14);
    color: var(--green);
}

.lab-shortcut-icon.amber {
    background: rgba(251, 191, 36, 0.04);
    border: 1px solid rgba(251, 191, 36, 0.14);
    color: #fbbf24;
}

.lab-shortcut-icon.purple {
    background: rgba(167, 139, 250, 0.04);
    border: 1px solid rgba(167, 139, 250, 0.14);
    color: #a78bfa;
}

.lab-shortcut-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.lab-shortcut-title {
    font-family: var(--font-sci-fi);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 0.04em;
    transition: var(--transition-fast);
}

.lab-shortcut-desc {
    font-size: 0.62rem;
    color: var(--text-muted);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lab-shortcut-card:hover {
    border-color: rgba(var(--cyan-rgb), 0.28);
    background: rgba(8, 8, 28, 0.72);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    transform: translateY(-1px);
}

.lab-shortcut-card:hover .lab-shortcut-title {
    color: var(--cyan);
}

.lab-shortcut-card:hover .lab-shortcut-icon.cyan {
    background: rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.35);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.lab-shortcut-card:hover .lab-shortcut-icon.magenta {
    background: rgba(255, 0, 153, 0.1);
    border-color: rgba(255, 0, 153, 0.35);
    box-shadow: 0 0 10px rgba(255, 0, 153, 0.15);
}

.lab-shortcut-card:hover .lab-shortcut-icon.green {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.35);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.15);
}

.lab-shortcut-card:hover .lab-shortcut-icon.amber {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.35);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.15);
}

.lab-shortcut-card:hover .lab-shortcut-icon.purple {
    background: rgba(167, 139, 250, 0.1);
    border-color: rgba(167, 139, 250, 0.35);
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.15);
}

/* Code Terminal Structure */
.prompt-terminal {
    background: #060614;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.lab-run-frame.prompt-terminal {
    background:
        linear-gradient(180deg, rgba(220, 38, 68, 0.04) 0%, transparent 18%),
        #060614;
    border: 1px solid rgba(220, 38, 68, 0.22);
    box-shadow:
        0 0 0 1px rgba(220, 38, 68, 0.08),
        0 0 28px rgba(220, 38, 68, 0.06),
        0 18px 48px rgba(0, 0, 0, 0.55);
}

.lab-editor-pane,
.lab-preview-pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
}

/* 生成预览：16:9 居中预览框，与扫描层同色深底 */
.lab-preview-pane {
    flex: 0 0 auto;
    align-items: center;
    padding: 0.75rem clamp(0.75rem, 2vw, 1.25rem) 0;
    background: var(--lab-preview-surface);
}

.lab-pane-header--input {
    background: rgba(10, 10, 32, 0.72);
}

.lab-pane-label--preview {
    color: #fbbf24;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.25);
}

/* 提示词输入：次区域 ~35% 高度，冷蓝调 */
.lab-editor-pane {
    flex: 1;
    min-height: 160px;
    background:
        linear-gradient(180deg, rgba(56, 189, 248, 0.06) 0%, rgba(56, 189, 248, 0.015) 50%, transparent 100%),
        rgba(6, 10, 22, 0.65);
}

.lab-pane-header--input {
    border-bottom-color: rgba(56, 189, 248, 0.12);
}

.lab-pane-label--input {
    color: #38bdf8;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}

.lab-pane-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background: rgba(10, 10, 32, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}

.lab-preview-header {
    justify-content: space-between;
    width: 100%;
    align-self: stretch;
    flex-shrink: 0;
    border-top: 1px solid rgba(251, 191, 36, 0.1);
    border-bottom: 1px solid rgba(56, 189, 248, 0.12);
    background:
        linear-gradient(90deg, rgba(251, 191, 36, 0.05), rgba(56, 189, 248, 0.05)),
        rgba(10, 10, 32, 0.72);
}

.lab-pane-label {
    font-family: var(--font-sci-fi);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--cyan);
    text-transform: none;
}

.lab-pane-hint {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-left: auto;
}

.lab-preview-status {
    font-family: var(--font-sci-fi);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    margin-left: auto;
    margin-right: 0.5rem;
    transition: var(--transition-fast);
}

.lab-preview-status.is-generating {
    color: var(--cyan);
    border-color: rgba(var(--cyan-rgb), 0.35);
    background: rgba(var(--cyan-rgb), 0.08);
    box-shadow: 0 0 12px rgba(var(--cyan-rgb), 0.15);
}

.lab-preview-status.is-done {
    color: var(--green);
    border-color: rgba(0, 255, 136, 0.35);
    background: rgba(0, 255, 136, 0.06);
}

.lab-preview-status.is-error {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.35);
    background: rgba(248, 113, 113, 0.06);
}

.lab-editor-pane .terminal-body {
    flex: 1;
    min-height: 120px;
    max-height: none;
    overflow-y: auto;
    border-bottom: none;
}

.lab-aspect-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem 0.75rem;
    flex-shrink: 0;
    padding: 0.55rem 1rem 0.6rem;
    border-top: 1px solid rgba(56, 189, 248, 0.1);
    background:
        linear-gradient(180deg, rgba(56, 189, 248, 0.04) 0%, rgba(6, 10, 22, 0.45) 100%);
}

.lab-aspect-label {
    font-family: var(--font-sci-fi);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #38bdf8;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
    flex-shrink: 0;
}

.lab-aspect-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.lab-aspect-chip {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm, 999px);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-mid);
    font-family: var(--font-sci-fi);
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    line-height: 1;
    padding: 0.38rem 0.72rem;
    cursor: pointer;
    transition: transform 160ms ease, color 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.lab-aspect-chip:hover:not(:disabled),
.lab-aspect-chip.active {
    color: #061018;
    border-color: rgba(var(--cyan-rgb), 0.72);
    background: linear-gradient(135deg, rgba(var(--cyan-rgb), 0.9), rgba(223, 181, 108, 0.82));
    box-shadow: 0 0 12px rgba(var(--cyan-rgb), 0.18);
}

.lab-aspect-chip:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.lab-preview-pane .terminal-output {
    flex: 0 0 auto;
    aspect-ratio: 16 / 9;
    width: 100%;
    max-width: min(100%, 800px);
    min-height: unset;
    margin: 0 auto;
    border-top: none;
}

.lab-preview-pane .output-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lab-preview-surface);
}

.lab-preview-pane .output-img {
    object-fit: contain;
}

.lab-preview-header .expand-btn {
    position: static;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm, 6px);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-mid);
}

.lab-preview-header .expand-btn:hover {
    color: #061018;
    background: linear-gradient(135deg, rgba(var(--cyan-rgb), 0.92), rgba(223, 181, 108, 0.78));
    border-color: rgba(var(--cyan-rgb), 0.72);
    box-shadow: 0 0 14px rgba(var(--cyan-rgb), 0.28);
}

.terminal-header {
    background: #0a0a20;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    height: 48px;
}

.terminal-title {
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    font-family: var(--font-sci-fi);
    font-size: 0.85rem;
    color: var(--cyan);
    position: relative;
    height: 100%;
}

.terminal-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
}

.terminal-actions {
    display: flex;
    gap: 0.5rem;
}

.t-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 4px;
    font-family: var(--font-sci-fi);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--transition-fast);
}

.t-btn.btn-run {
    background: rgba(0, 240, 255, 0.1);
    color: var(--cyan);
    border: 1px solid rgba(0, 240, 255, 0.2);
}

.t-btn.btn-run:hover {
    background: var(--cyan);
    color: var(--text-dark);
    box-shadow: 0 0 15px rgba(var(--cyan-rgb), 0.5);
    transform: translateY(-1px);
}

.t-btn.btn-copy {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-mid);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.t-btn.btn-copy:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-light);
}

.terminal-body {
    display: flex;
    padding: 1.25rem 1rem;
    background: #04040e;
    min-height: 120px;
    font-family: Consolas, Monaco, "Lucida Console", Courier New, monospace;
    font-size: 0.9rem;
    line-height: 1.8;
}

.line-numbers {
    display: flex;
    flex-direction: column;
    color: rgba(255, 255, 255, 0.12);
    text-align: right;
    padding-right: 1.25rem;
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    user-select: none;
}

.code-editor {
    flex-grow: 1;
    padding-left: 1.25rem;
    outline: none;
    color: #a5b4fc;
    white-space: pre-wrap;
}

/* Syntax Highlighting */
.c-keyword { color: var(--cyan); font-weight: bold; }
.c-tag { color: var(--magenta); }
.c-color { color: #facc15; }
.c-val { color: var(--green); }
.c-param { color: #38bdf8; }
.c-neg { color: #f87171; text-decoration: line-through; }

/* Interactive Terminal Visual Output Window */
.terminal-output {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--lab-preview-surface);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.output-image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.output-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: filter var(--transition-slow);
}

/* Interactive matrix scanning overlay */
.scan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(var(--cyan-rgb), 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--cyan-rgb), 0.035) 1px, transparent 1px),
        radial-gradient(circle at 50% 40%, rgba(var(--cyan-rgb), 0.08), transparent 55%),
        var(--lab-preview-surface);
    background-size: 24px 24px, 24px 24px, 100% 100%, auto;
    display: none; /* Controlled by JS */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    overflow: hidden;
}

.scan-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 60px rgba(var(--cyan-rgb), 0.06);
}

.scanner-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(180deg, rgba(var(--cyan-rgb), 0), var(--cyan), rgba(var(--cyan-rgb), 0));
    box-shadow: 0 0 15px var(--cyan);
    animation: matrixScan 2.5s infinite linear;
}

.scan-matrix-text {
    position: relative;
    z-index: 1;
    font-family: Consolas, monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(var(--cyan-rgb), 0.8);
    text-align: center;
    max-width: 80%;
    word-break: break-all;
}

.expand-btn {
    position: absolute;
    bottom: 1.25rem;
    right: 1.25rem;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(9, 9, 26, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-mid);
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 5;
}

.expand-btn:hover {
    background: var(--cyan);
    color: var(--text-dark);
    box-shadow: 0 0 15px var(--cyan);
    border-color: var(--cyan);
}

/* Compact Lab Guide Sidebar — removed from Prompt Lab layout */

/* 10. About Me Section Style */
.about-section {
    padding: 6rem 0;
}

.about-container {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 4rem;
    align-items: center;
}

/* Avatar Frame Radar Scan System */
.about-avatar-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    max-width: 420px;
    margin: 0 auto;
    border-radius: 50%;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-scanline {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(var(--cyan-rgb), 0.1) 0%, transparent 50%);
    border: 1px solid rgba(var(--cyan-rgb), 0.05);
    animation: rotate 8s infinite linear;
    pointer-events: none;
}

.tech-hud-circle {
    position: absolute;
    border: 1px dashed rgba(var(--cyan-rgb), 0.15);
    border-radius: 50%;
    pointer-events: none;
}

.tech-hud-circle.outer {
    width: 105%;
    height: 105%;
    border-style: double;
    border-width: 3px;
    border-color: rgba(var(--purple-rgb), 0.15);
    animation: rotate 20s infinite linear reverse;
}

.tech-hud-circle.inner {
    width: 95%;
    height: 95%;
    animation: rotate 12s infinite linear;
}

.avatar-holder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 4px solid var(--panel-border);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    background: radial-gradient(circle, #090924 0%, #03030d 100%);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
    filter: saturate(1.05) contrast(1.02);
}

.about-avatar-wrapper:hover .avatar-img {
    transform: scale(1.04);
}

/* Avatar hud square corner points */
.avatar-hud-corners {
    position: absolute;
    width: 110%;
    height: 110%;
    pointer-events: none;
}

.hud-c {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 1px solid var(--purple); /* Bronze Gold filigree */
    box-shadow: 0 0 6px rgba(223, 181, 108, 0.4);
}
.hud-c.tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.hud-c.tr { top: 0; right: 0; border-left: none; border-bottom: none; border-color: var(--magenta); }
.hud-c.bl { bottom: 0; left: 0; border-right: none; border-top: none; border-color: var(--purple); }
.hud-c.br { bottom: 0; right: 0; border-left: none; border-top: none; }

/* Bio and Skill bar systems */
.about-details {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.about-name {
    font-family: var(--font-sci-fi);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: -0.5px;
}

.about-name .nickname {
    font-size: 1.5rem;
    color: var(--cyan);
    font-weight: 700;
}

.about-role {
    font-family: var(--font-sci-fi);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--magenta);
    text-transform: uppercase;
    margin-top: -0.5rem;
}

.about-bio {
    font-size: 1rem;
    color: var(--text-mid);
    line-height: 1.7;
    text-align: justify;
}

.about-bio strong {
    color: var(--cyan);
}

.skills-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin-top: 1.5rem;
}

.skills-section-title {
    font-family: var(--font-sci-fi);
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-sci-fi);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-mid);
}

.skill-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    border-radius: 10px;
    box-shadow: 0 0 10px currentColor;
    transition: width var(--transition-slow);
}

.skill-fill.cyan-glow { background: var(--cyan); color: rgba(var(--cyan-rgb), 0.6); }
.skill-fill.purple-glow { background: var(--purple); color: rgba(var(--purple-rgb), 0.6); }
.skill-fill.magenta-glow { background: var(--magenta); color: rgba(var(--magenta-rgb), 0.6); }
.skill-fill.blue-glow { background: var(--blue); color: rgba(var(--blue-rgb), 0.6); }

/* 11. Contact Banner Style */
.contact-section {
    padding: 6rem 0 10rem;
}

.glass-contact-panel {
    background: linear-gradient(135deg, rgba(var(--cyan-rgb), 0.03) 0%, rgba(var(--purple-rgb), 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 3.5rem 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.glass-contact-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(var(--cyan-rgb), 0.05) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(var(--magenta-rgb), 0.05) 0%, transparent 40%);
    pointer-events: none;
}

.contact-header-text {
    flex: 1.1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-title {
    font-family: var(--font-sci-fi);
    font-size: 2.1rem;
    font-weight: 800;
}

.contact-subtitle {
    font-size: 1.05rem;
    color: var(--text-mid);
    line-height: 1.6;
}

.contact-actions {
    flex: 0.9;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    width: 100%;
}

.contact-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.9rem 1.5rem;
    border-radius: 8px;
    font-family: var(--font-sci-fi);
}

.info-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 1px;
}

.info-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.btn-glow-anim {
    justify-content: center;
    background: linear-gradient(90deg, var(--cyan) 0%, var(--purple) 100%);
    color: var(--text-light);
    border: none;
    box-shadow: 0 4px 20px rgba(var(--purple-rgb), 0.35);
}

.btn-glow-anim:hover {
    box-shadow: 0 0 30px rgba(var(--cyan-rgb), 0.55);
    transform: translateY(-2px);
}

/* 12. Footer Section Style */
.site-footer {
    background: #030309;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding: 3rem 0;
    position: relative;
    z-index: 10; /* Above background layers */
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 0.9fr 1.2fr 0.9fr;
    align-items: center;
    gap: 2rem;
}

.footer-social {
    display: flex;
    gap: 1.25rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition-mid);
}

.social-icon:hover {
    color: var(--cyan);
    border-color: var(--cyan);
    background: rgba(var(--cyan-rgb), 0.08);
    box-shadow: 0 0 15px rgba(var(--cyan-rgb), 0.3);
    transform: translateY(-3px);
}

.footer-copyright {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-copyright .icp {
    font-family: var(--font-sci-fi);
}

.footer-quote {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.quote-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

.footer-mini-logo {
    filter: drop-shadow(0 0 6px rgba(var(--cyan-rgb), 0.5));
}

/* 13. Dynamic Modal Overlay Style (Glassmorphic) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 3, 10, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 200;
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity var(--transition-mid);
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 100%;
    max-width: 960px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: zoomIn var(--transition-mid) forwards;
}

.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 10;
}

.modal-close-btn:hover {
    background: rgba(248, 113, 113, 0.15);
    border-color: #f87171;
    color: #f87171;
    box-shadow: 0 0 15px rgba(248, 113, 113, 0.4);
    transform: rotate(90deg);
}

.modal-body-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: flex-start;
}

.modal-visual {
    width: 100%;
}

.modal-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/11;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-img-wrapper .glow-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid var(--cyan);
    box-shadow: inset 0 0 15px rgba(var(--cyan-rgb), 0.25);
    pointer-events: none;
    border-radius: 10px;
    opacity: 0.5;
}

.modal-play-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background-color: var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--cyan);
}

.badge-txt {
    font-family: var(--font-sci-fi);
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 0.5px;
}

/* Modal Right side Details */
.modal-details {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.tech-hud-tag {
    align-self: flex-start;
    font-family: var(--font-sci-fi);
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--magenta);
    letter-spacing: 1.5px;
    border-bottom: 2px solid var(--magenta);
    padding-bottom: 2px;
}

.modal-project-title {
    font-family: var(--font-sci-fi);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-light);
}

/* Modal Tab Bar */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 1rem;
}

.m-tab-btn {
    background: none;
    border: none;
    font-family: var(--font-sci-fi);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 0.6rem 0.25rem;
    cursor: pointer;
    position: relative;
    transition: var(--transition-fast);
}

.m-tab-btn.active {
    color: var(--cyan);
}

.m-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
}

.modal-tab-content-container {
    min-height: 180px;
}

.modal-tab-pane {
    display: none;
    animation: fadeIn 0.3s forwards;
}

.modal-tab-pane.active {
    display: block;
}

.modal-text {
    font-size: 0.95rem;
    color: var(--text-mid);
    line-height: 1.65;
    text-align: justify;
}

.modal-text-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.font-small {
    font-size: 0.75rem;
}

/* Specs */
.tech-specs {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 6px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.spec-lbl {
    color: var(--text-muted);
    font-weight: 500;
}

.spec-val {
    color: var(--text-light);
    font-weight: 600;
}

/* Workflow steps list */
.workflow-steps-list {
    padding-left: 1.25rem;
    color: var(--text-mid);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.workflow-steps-list li {
    text-align: justify;
    line-height: 1.55;
}

/* Code copy block inside modal */
.modal-code-block {
    position: relative;
    background: #03030a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 1.25rem;
    font-family: Consolas, monospace;
    font-size: 0.85rem;
    color: var(--cyan);
    word-break: break-all;
    line-height: 1.5;
}

.copy-btn-inside-modal {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-mid);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    font-family: var(--font-sci-fi);
    transition: var(--transition-fast);
}

.copy-btn-inside-modal:hover {
    background: var(--cyan);
    color: var(--text-dark);
    box-shadow: 0 0 10px var(--cyan);
    border-color: var(--cyan);
}

/* 14. Holographic Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1000;
}

.toast {
    background: rgba(9, 9, 29, 0.85);
    border: 1px solid var(--cyan);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 6px;
    padding: 0.9rem 1.5rem;
    color: var(--text-light);
    font-family: var(--font-sci-fi);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 8px 30px rgba(var(--cyan-rgb), 0.25);
    transform: translateY(20px);
    opacity: 0;
    animation: toastIn var(--transition-mid) forwards;
}

.toast-icon {
    color: var(--cyan);
    filter: drop-shadow(0 0 4px var(--cyan));
}

.toast-msg {
    letter-spacing: 0.5px;
}

/* 15. Keyframes & Animation Declarations */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes blinking {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.blinking {
    animation: blinking 1.8s infinite ease-in-out;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes matrixScan {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}

@keyframes toastIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==========================================================================
   16. Full Cross-Device Responsive Styles
   ========================================================================== */

/* Laptop / Medium Screen sizes */
@media (max-width: 1200px) {
    .container {
        padding: 0 1.5rem;
    }
    .hero-title {
        font-size: clamp(1.85rem, 3.5vw, 2.35rem);
        line-height: 1.22;
    }
    .hero-section {
        gap: 1.5rem;
    }
    .about-container {
        gap: 2.5rem;
    }
    .glass-contact-panel {
        padding: 3rem;
        gap: 2.5rem;
    }
}

/* Tablet Layout (Landscape & Portrait) */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        padding-top: 6.5rem;
        padding-bottom: 3rem;
        gap: 1.5rem;
    }
    .hero-left {
        align-items: center;
        text-align: center;
    }
    .hero-tag-badge {
        align-self: center;
    }
    .hero-intro {
        margin: 0 auto;
    }
    .hero-pills {
        justify-content: center;
    }
    .hero-right {
        display: none;
    }
    .knowledge-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    .knowledge-card:last-child {
        grid-column: span 2;
    }
    .prompt-lab-container {
        gap: 1.25rem;
    }
    .lab-shortcuts-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .lab-preview-pane {
        flex: 0 0 auto;
        min-height: unset;
        padding-inline: 0.85rem;
    }
    .lab-preview-pane .terminal-output {
        max-width: min(100%, 640px);
    }
    .lab-editor-pane {
        max-height: none;
        min-height: 200px;
    }
    .lab-editor-pane .terminal-body {
        min-height: 220px;
    }
    .lab-pane-hint {
        display: none;
    }
    .about-container {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }
    .about-avatar-wrapper {
        max-width: 320px;
    }
    .about-details {
        text-align: center;
    }
    .about-role {
        align-self: center;
    }
    .about-bio {
        text-align: center;
    }
    .glass-contact-panel {
        flex-direction: column;
        text-align: center;
        padding: 2.5rem;
        gap: 2rem;
    }
    .contact-actions {
        width: 100%;
        max-width: 480px;
    }
}

/* Phone Layout */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    .header-container {
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }
    .main-nav {
        display: none; /* Hide standard nav list on mobile for cleaner aesthetic */
    }
    .logo-area,
    .logo-text {
        min-width: 0;
    }
    .brand-name {
        font-size: 1.25rem;
    }
    .brand-sub {
        font-size: 0.65rem;
    }
    .hero-title {
        font-size: clamp(1.55rem, 5.5vw, 2rem);
        line-height: 1.22;
        width: 100%;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: normal;
        line-break: auto;
    }
    .hero-intro {
        font-size: 0.95rem;
        text-align: left;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-all;
    }
    .pill-badge {
        padding: 0.42rem 0.8rem;
        font-size: 0.8rem;
    }
    .hero-section,
    .hero-left,
    .hero-right,
    .hero-pills {
        min-width: 0;
        max-width: 100%;
    }
    .works-grid {
        grid-template-columns: 1fr;
    }
    .knowledge-grid {
        grid-template-columns: 1fr;
    }
    .knowledge-card:last-child {
        grid-column: span 1;
    }
    .prompt-terminal {
        border-radius: 8px;
    }
    .lab-run-frame {
        min-height: unset;
    }
    .lab-preview-pane {
        padding-inline: 0.65rem;
    }
    .lab-preview-pane .terminal-output {
        max-width: 100%;
    }
    .lab-shortcuts-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
        padding: 0.55rem 0.65rem 0.65rem;
    }
    .lab-pagination-tabs .lab-shortcut-card {
        min-height: 40px;
        padding: 0.4rem 0.55rem;
    }
    .lab-shortcut-desc {
        display: none;
    }
    .lab-run-actions {
        padding: 0.55rem 0.75rem 0.65rem;
    }
    .lab-aspect-bar {
        padding: 0.5rem 0.75rem 0.55rem;
        gap: 0.45rem 0.55rem;
    }
    .lab-aspect-label {
        width: 100%;
    }
    .lab-aspect-chip {
        font-size: 0.64rem;
        padding: 0.34rem 0.62rem;
    }
    .lab-pane-header {
        padding: 0.5rem 0.75rem;
    }
    .terminal-title {
        padding: 0 0.75rem;
        font-size: 0.75rem;
    }
    .t-btn span {
        display: none; /* Hide button text on mobile to save horizontal space */
    }
    .t-btn {
        padding: 0.4rem 0.5rem;
    }
    .line-numbers {
        padding-right: 0.75rem;
    }
    .code-editor {
        padding-left: 0.75rem;
        font-size: 0.8rem;
    }
    .terminal-body {
        padding: 1rem 0.75rem;
    }
    .scan-matrix-text {
        font-size: 0.85rem;
    }
    .modal-content {
        padding: 1.5rem;
        max-height: 90vh;
    }
    .modal-body-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .modal-project-title {
        font-size: 1.6rem;
    }
    .modal-close-btn {
        top: 1rem;
        right: 1rem;
    }
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    .footer-quote {
        justify-content: center;
    }
    .toast-container {
        bottom: 1.5rem;
        right: 1.5rem;
        left: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0.7rem 0.85rem;
    }
    .brand-name {
        font-size: 1.08rem;
    }
    .brand-sub {
        display: none;
    }
    .header-cta .btn {
        padding: 0.5rem 0.65rem;
        gap: 0.35rem;
        font-size: 0.78rem;
        white-space: nowrap;
    }
    .header-cta .btn span {
        display: none;
    }
    .header-cta {
        display: none;
    }
    .hero-section {
        padding-top: 4.75rem;
    }
    .hero-title {
        font-size: clamp(1.4rem, 6vw, 1.85rem);
        line-height: 1.22;
        max-width: 100%;
        margin: 0 auto;
        padding-top: 0.1em;
    }
    .hero-title .text-glow-gradient {
        display: block;
    }
    .hero-tag-badge {
        max-width: 100%;
        font-size: 0.78rem;
    }
    .hero-intro {
        max-width: 300px;
        margin: 0 auto;
    }
    .hero-pills {
        max-width: 290px;
        margin-left: auto;
        margin-right: auto;
    }
    .hero-right {
        display: none;
    }
    .portal-wrapper {
        display: none;
    }
    .portal-header {
        gap: 0.75rem;
    }
    .portal-indicator {
        padding: 0.25rem 0.45rem;
    }
    .indicator-text {
        display: none;
    }
}

/* Shared small-window entrance motion */
.mutou-enter {
    opacity: 0;
    transform: translate3d(0, 22px, 0) scale(0.985);
    filter: blur(8px);
    transition:
        opacity 680ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 760ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 760ms cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--mutou-enter-delay, 0ms);
    will-change: opacity, transform, filter;
}

.mutou-enter.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
    .mutou-enter,
    .mutou-enter.is-visible {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
    }
}
