/* ─── RESET & TOKENS (AURORA GLASS) ─────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Aurora Palette */
    --c-bg: #030305;            /* Deep Obsidian */
    --c-surface: rgba(255, 255, 255, 0.02); /* Glass background */
    --c-surface-hover: rgba(255, 255, 255, 0.04);
    --c-ink: #ffffff;           /* Pure White Text */
    --c-muted: #a1a1aa;         /* Zinc 400 for secondary text */
    
    /* Neon Accents */
    --c-cyan: #00f2fe;
    --c-blue: #4facfe;
    --c-violet: #8b5cf6;
    --c-emerald: #10b981;
    
    --c-line: rgba(255, 255, 255, 0.08); /* Very subtle borders */
    
    --f-display: 'Plus Jakarta Sans', sans-serif;
    --f-body: 'Inter', sans-serif;
    --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

html {
    scroll-behavior: smooth;
    background: var(--c-bg);
}

body {
    font-family: var(--f-body);
    background: var(--c-bg);
    color: var(--c-ink);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

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

/* ─── SCROLLBAR ──────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--c-bg); }
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 100px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ─── AMBIENT GLOW (BACKGROUND) ──────────────── */
.ambient-wrapper {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out alternate;
}

.glow-1 {
    top: -10%; left: -10%;
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, var(--c-cyan) 0%, transparent 60%);
    animation-delay: 0s;
}

.glow-2 {
    bottom: -20%; right: -10%;
    width: 70vw; height: 70vw;
    background: radial-gradient(circle, var(--c-violet) 0%, transparent 60%);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, 5%) scale(1.1); }
    100% { transform: translate(-5%, -5%) scale(0.95); }
}

/* ─── NAV ─────────────────────────────────────── */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 48px;
    background: rgba(3, 3, 5, 0.5);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--c-line);
    transition: all 0.3s ease;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 48px;
    mix-blend-mode: normal !important; /* Fix lỗi tàng hình trên nền đen */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(3, 3, 5, 0.5); /* Semi-transparent dark background */
    border-bottom: 1px solid var(--c-line);
}

.nav-logo {
    font-family: var(--f-display);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.04em;
    color: var(--c-ink);
}

.nav-links {
    display: flex;
    gap: 48px;
    list-style: none;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--c-muted);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-links a:hover {
    color: var(--c-ink);
    text-shadow: 0 0 12px rgba(255,255,255,0.4);
}

/* ─── LANG SWITCHER ──────────────────────────── */
.lang-switcher {
    display: flex;
    gap: 4px;
    background: var(--c-surface);
    border-radius: 100px;
    padding: 4px;
    margin-right: 24px;
    border: 1px solid var(--c-line);
}

.lang-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--f-body);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--c-muted);
    padding: 8px 16px;
    border-radius: 100px;
    transition: all 0.3s;
}

.lang-btn.active {
    background: rgba(255,255,255,0.1);
    color: var(--c-ink);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}

/* ─── BUTTONS ─────────────────────────────────── */
.btn-primary {
    background: linear-gradient(135deg, var(--c-cyan), var(--c-blue));
    color: #000;
    padding: 16px 40px;
    border-radius: 100px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: var(--f-display);
    transition: transform 0.4s var(--ease-spring), box-shadow 0.4s, filter 0.4s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.2);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 242, 254, 0.4);
    filter: brightness(1.1);
}

.btn-secondary {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--c-ink);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    transition: color 0.3s;
}

.btn-secondary:hover {
    color: var(--c-cyan);
}

.btn-secondary .arrow {
    display: inline-flex;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--c-line);
    align-items: center;
    justify-content: center;
    transition: transform 0.4s var(--ease-spring), border-color 0.3s, background 0.3s;
}

.btn-secondary:hover .arrow {
    transform: translateX(8px);
    border-color: var(--c-cyan);
    background: rgba(0, 242, 254, 0.1);
}

/* ─── HERO ─────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 180px 48px 100px;
    position: relative;
}

.hero-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--c-cyan);
    margin-bottom: 32px;
    padding: 8px 20px;
    border: 1px solid rgba(0,242,254,0.2);
    border-radius: 100px;
    background: rgba(0,242,254,0.05);
    backdrop-filter: blur(10px);
}

.hero-eyebrow-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--c-cyan);
    box-shadow: 0 0 12px var(--c-cyan);
}

.hero-title {
    font-family: var(--f-display);
    font-size: clamp(3.5rem, 8vw, 7.5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    margin-bottom: 40px;
    color: var(--c-ink);
}

.hero-title .accent {
    background: linear-gradient(135deg, var(--c-cyan), var(--c-blue), var(--c-violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 60px;
    border-top: 1px solid var(--c-line);
    padding-top: 40px;
}

.hero-desc {
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--c-muted);
    max-width: 540px;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 24px;
    align-items: center;
}

/* ─── SECTION LABELS ──────────────────────────── */
.section-label {
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--c-cyan);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 700;
}

.section-label::before {
    content: '';
    width: 48px; height: 2px;
    background: linear-gradient(90deg, var(--c-cyan), transparent);
}

/* ─── BENTO GRID (AURORA GLASS) ───────────────── */
.services, .work, .phi {
    padding: 140px 0;
    position: relative;
    z-index: 10;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 48px;
}

.services-header {
    margin-bottom: 80px;
    max-width: 800px;
}

.services-title {
    font-family: var(--f-display);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    line-height: 1.1;
}

.services-sub {
    font-size: 1.2rem;
    color: var(--c-muted);
}

/* ASYMMETRIC GRID */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    grid-auto-rows: minmax(320px, auto);
}

.bento-card {
    background: var(--c-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--c-line);
    border-radius: 32px;
    padding: 48px;
    transition: all 0.5s var(--ease-expo);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Inner glow for true glass effect */
.bento-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.2), rgba(255,255,255,0));
    opacity: 0.5;
}

.bento-card:hover {
    transform: translateY(-8px);
    background: var(--c-surface-hover);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 24px 48px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,242,254,0.1);
}

.bento-large {
    grid-column: span 2;
}

.service-num {
    font-family: var(--f-display);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--c-muted);
    margin-bottom: auto;
    display: block;
    opacity: 0.5;
}

.service-name {
    font-family: var(--f-display);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 24px 0 16px;
}

.bento-large .service-name {
    font-size: 2.8rem;
}

.service-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.tag {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--c-line);
    border-radius: 100px;
    color: var(--c-ink);
    letter-spacing: 0.05em;
}

.bento-card p {
    color: var(--c-muted);
    font-size: 1.05rem;
}

/* ─── WORK / PROJECTS ─────────────────────────── */
.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.work-card {
    background: var(--c-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--c-line);
    border-radius: 40px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s var(--ease-expo);
    position: relative;
}

.work-card:hover {
    transform: translateY(-12px);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.work-card-visual {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid var(--c-line);
    transition: filter 0.5s;
}

.work-card:hover .work-card-visual {
    filter: brightness(1.2) contrast(1.1);
}

.work-card-body {
    padding: 48px;
}

.work-card-type {
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--c-muted);
    margin-bottom: 16px;
    font-weight: 700;
}

.work-card:hover .work-card-type {
    color: var(--c-cyan);
}

.work-card-name {
    font-family: var(--f-display);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

/* ─── PHILOSOPHY ────────────────────────────────── */
.phi-wrap {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
}

.phi-left {
    position: sticky;
    top: 140px;
    align-self: start;
}

.phi-title {
    font-family: var(--f-display);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 40px;
}

.phi-kanji {
    font-family: serif;
    font-size: 8rem;
    opacity: 0.05;
    writing-mode: vertical-rl;
    position: absolute;
    right: 0; top: 0;
}

.phi-items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.phi-item {
    background: var(--c-surface);
    backdrop-filter: blur(24px);
    border: 1px solid var(--c-line);
    border-radius: 32px;
    padding: 48px;
    display: flex;
    gap: 40px;
    transition: transform 0.4s;
}

.phi-item:hover {
    transform: translateX(16px);
    background: rgba(255,255,255,0.04);
}

.phi-item-num {
    font-family: var(--f-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--c-cyan);
    opacity: 0.5;
}

.phi-item-content h3 {
    font-family: var(--f-display);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.phi-item-content p {
    color: var(--c-muted);
    font-size: 1.1rem;
}

/* ─── CTA BAND ────────────────────────────────── */
.cta-band {
    padding: 160px 48px;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.1), rgba(139, 92, 246, 0.1));
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    text-align: center;
    border-radius: 48px;
    margin: 0 48px 120px;
    position: relative;
    overflow: hidden;
}

.cta-band::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(0,242,254,0.2) 0%, transparent 50%);
    z-index: -1;
}

.cta-band-title {
    font-family: var(--f-display);
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 32px;
    line-height: 1;
}

.cta-band-sub {
    font-size: 1.3rem;
    color: var(--c-muted);
    max-width: 600px;
    margin: 0 auto 56px;
}

.btn-white {
    background: var(--c-ink);
    color: var(--c-bg);
    padding: 20px 56px;
    border-radius: 100px;
    font-size: 1.15rem;
    font-weight: 800;
    cursor: pointer;
    border: none;
    font-family: var(--f-display);
    transition: transform 0.4s var(--ease-spring), box-shadow 0.4s;
}

.btn-white:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 20px 40px rgba(255,255,255,0.2);
}

/* ─── RESPONSIVE ──────────────────────────────── */
@media (max-width: 1024px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .bento-large { grid-column: span 1; }
    .phi-wrap { grid-template-columns: 1fr; }
    .phi-kanji { display: none; }
}

@media (max-width: 768px) {
    .bento-grid, .work-grid { grid-template-columns: 1fr; }
    
    .hero-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 40px;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .nav-links { display: none; }
    
    .cta-band {
        margin: 0 24px 80px;
        padding: 100px 24px;
        border-radius: 32px;
    }
}

/* ─── THEME TOGGLE & LIGHT MODE ──────────────────────────────── */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--c-line);
    color: var(--c-ink);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.theme-toggle:hover {
    background: var(--c-surface-hover);
    transform: translateY(-2px);
}

:root[data-theme="light"] {
    /* Premium UI/UX Light Mode Palette (Paper/Notion style) */
    --c-bg: #f7f7f5;
    --c-surface: #ffffff;
    --c-surface-hover: #f1f1ef;
    --c-ink: #1f2937;
    --c-muted: #6b7280;
    --c-line: rgba(0, 0, 0, 0.06);

    /* Deepened Accents for High Contrast in Light Mode */
    --c-cyan: #0284c7; /* Sky 600 */
    --c-blue: #2563eb; /* Blue 600 */
    --c-violet: #7c3aed; /* Violet 600 */
    --c-emerald: #059669; /* Emerald 600 */
}
[data-theme="light"] nav {
    background: rgba(247, 247, 245, 0.85);
}

/* Fix hardcoded neon colors in .hero-eyebrow for light mode */
[data-theme="light"] .hero-eyebrow {
    color: var(--c-cyan);
    border-color: rgba(2, 132, 199, 0.25);
    background: rgba(2, 132, 199, 0.08);
}
[data-theme="light"] .hero-eyebrow-dot {
    background: var(--c-cyan);
    box-shadow: 0 0 8px rgba(2, 132, 199, 0.4);
}

[data-theme="light"] .glow-1 {
    background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, transparent 60%);
}
[data-theme="light"] .glow-2 {
    background: radial-gradient(circle, rgba(5, 150, 105, 0.05) 0%, transparent 60%);
}
[data-theme="light"] .bento-card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .bento-card:hover {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .gradient-text {
    background: linear-gradient(135deg, var(--c-blue), var(--c-violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
[data-theme="light"] .nav-links a:hover {
    text-shadow: none;
}
[data-theme="light"] .btn-white {
    background: var(--c-ink);
    color: #ffffff;
}
