/* ========================================
   JANUS — YIN YANG DRAGON PORTFOLIO
   Premium White/Black Minimal
   ======================================== */

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

:root {
    --white: #ffffff;
    --off-white: #f8f8f8;
    --ghost: #f0f0f0;
    --silver: #c8c8c8;
    --mid: #888;
    --charcoal: #444;
    --dark: #1a1a1a;
    --black: #0a0a0a;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--silver) transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--white);
    color: var(--black);
    overflow-x: hidden;
    cursor: none;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; cursor: none; }
button { cursor: none; border: none; background: none; }
::selection { background: var(--black); color: var(--white); }

/* ---- Preloader ---- */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--white);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.preloader-circle {
    animation: preloaderDraw 1.5s var(--ease) forwards;
    transform-origin: center;
}

@keyframes preloaderDraw {
    to { stroke-dashoffset: 0; }
}

.preloader-text {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 8px;
    opacity: 0;
    animation: fadeUp 0.6s var(--ease) 0.5s forwards;
}

/* ---- Canvas ---- */
#particleCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ---- Custom Cursor ---- */
.cursor {
    width: 8px;
    height: 8px;
    background: var(--white);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10001;
    transition: transform 0.15s ease, background 0.3s;
    will-change: transform;
    box-shadow: 0 0 10px rgba(255,255,255,0.5), 0 0 3px rgba(0,0,0,0.3);
}

.cursor.on-light {
    background: var(--black);
    box-shadow: 0 0 10px rgba(0,0,0,0.15), 0 0 3px rgba(0,0,0,0.2);
}

.cursor-ring {
    width: 44px;
    height: 44px;
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transition: width 0.4s var(--ease), height 0.4s var(--ease), border-color 0.4s;
    will-change: transform;
}

.cursor-ring.on-light {
    border-color: rgba(0,0,0,0.15);
}

.cursor.hovering { transform: scale(4); background: var(--white); box-shadow: none; }
.cursor.hovering.on-light { background: var(--black); }
.cursor-ring.hovering { width: 70px; height: 70px; border-color: rgba(255,255,255,0.5); }
.cursor-ring.hovering.on-light { border-color: rgba(0,0,0,0.4); }
.cursor.clicking { transform: scale(0.5); }

/* ---- Navigation ---- */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    padding: 28px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.5s var(--ease);
    mix-blend-mode: difference;
}

.nav.solid {
    mix-blend-mode: normal;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 18px 48px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.nav-logo {
    color: var(--white);
    transition: transform 0.4s var(--ease);
}

.nav.solid .nav-logo { color: var(--black); }

.nav-logo:hover { transform: rotate(-15deg) scale(1.1); }

.nav-yinyang-mini {
    animation: slowSpin 20s linear infinite;
}

@keyframes slowSpin {
    to { transform: rotate(360deg); }
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
    position: relative;
    overflow: hidden;
    padding: 4px 0;
    transition: color 0.3s;
}

.nav.solid .nav-link { color: var(--mid); }
.nav.solid .nav-link:hover { color: var(--black); }
.nav-link:hover { color: var(--white); }

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s var(--ease);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Language Toggle */
.lang-toggle {
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 100px;
    padding: 6px 16px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.6);
    cursor: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav.solid .lang-toggle {
    border-color: rgba(0,0,0,0.1);
    color: var(--mid);
}

.nav.solid .lang-toggle:hover {
    border-color: var(--black);
    color: var(--black);
}

.lang-toggle:hover {
    border-color: rgba(255,255,255,0.5);
    color: var(--white);
}

.lang-active { opacity: 1; }
.lang-inactive { opacity: 0.4; }
.lang-divider { opacity: 0.3; }

.nav-burger {
    display: none;
    flex-direction: column;
    gap: 8px;
    cursor: none;
    width: 28px;
    padding: 4px 0;
}

.nav-burger span {
    height: 1.5px;
    background: var(--white);
    transition: all 0.4s var(--ease);
    transform-origin: center;
}

.nav.solid .nav-burger span { background: var(--black); }

.nav-burger.active span:first-child { transform: rotate(45deg) translate(3px, 5px); }
.nav-burger.active span:last-child { transform: rotate(-45deg) translate(3px, -5px); }

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--white);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s var(--ease);
}

.mobile-menu.active { opacity: 1; pointer-events: all; }

.mobile-link {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -1px;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.5s var(--ease);
    position: relative;
}

.mobile-link::before {
    content: attr(data-index);
    font-size: 12px;
    font-weight: 400;
    color: var(--silver);
    position: absolute;
    left: -30px;
    top: 8px;
    letter-spacing: 0;
}

.mobile-menu.active .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.active .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-link:nth-child(4) { transition-delay: 0.25s; }

.mobile-socials {
    display: flex;
    gap: 24px;
    margin-top: 40px;
    opacity: 0;
    transition: opacity 0.5s 0.3s;
}

.mobile-menu.active .mobile-socials { opacity: 1; }

.mobile-socials a {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--mid);
    transition: color 0.3s;
}

.mobile-socials a:hover { color: var(--black); }

/* ---- Sections ---- */
.section {
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 140px 48px;
    width: 100%;
}

/* ---- HERO ---- */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: var(--black);
    overflow: hidden;
}

/* Dragon */
.dragon-container {
    position: relative;
    z-index: 2;
}

.dragon-svg {
    width: clamp(280px, 45vw, 420px);
    height: auto;
    animation: dragonFloat 6s ease-in-out infinite;
}

@keyframes dragonFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-12px) rotate(1deg); }
    75% { transform: translateY(8px) rotate(-1deg); }
}

.yinyang-group {
    animation: yinyangSpin 30s linear infinite;
    transform-origin: 250px 250px;
}

@keyframes yinyangSpin {
    to { transform: rotate(360deg); }
}

.outer-ring {
    animation: ringPulse 4s ease-in-out infinite;
    transform-origin: center;
}

.outer-ring-2 {
    animation: ringPulse 4s ease-in-out infinite 1s;
    transform-origin: center;
}

.outer-ring-3 {
    animation: ringRotate 60s linear infinite;
    transform-origin: center;
}

@keyframes ringPulse {
    0%, 100% { opacity: 0.08; transform: scale(1); }
    50% { opacity: 0.15; transform: scale(1.02); }
}

@keyframes ringRotate {
    to { transform: rotate(360deg); }
}

/* Dragon eye glow */
.dragon-eye {
    animation: eyeGlow 3s ease-in-out infinite;
}

@keyframes eyeGlow {
    0%, 100% { opacity: 0.8; r: 2; }
    50% { opacity: 1; r: 2.5; }
}

/* Whisker sway */
.whisker {
    animation: whiskerSway 4s ease-in-out infinite;
    transform-origin: left center;
}

@keyframes whiskerSway {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(3deg); }
}

/* Orbiting particles */
.op-1 { animation: orbit1 8s linear infinite; }
.op-2 { animation: orbit2 12s linear infinite; }
.op-3 { animation: orbit3 10s linear infinite reverse; }
.op-4 { animation: orbit4 7s linear infinite; }

@keyframes orbit1 {
    from { cx: 250; cy: 5; transform: rotate(0deg); transform-origin: 250px 250px; }
    to { transform: rotate(360deg); transform-origin: 250px 250px; }
}
@keyframes orbit2 {
    from { cx: 490; cy: 250; transform: rotate(0deg); transform-origin: 250px 250px; }
    to { transform: rotate(360deg); transform-origin: 250px 250px; }
}
@keyframes orbit3 {
    from { cx: 250; cy: 490; transform: rotate(0deg); transform-origin: 250px 250px; }
    to { transform: rotate(360deg); transform-origin: 250px 250px; }
}
@keyframes orbit4 {
    from { cx: 10; cy: 250; transform: rotate(0deg); transform-origin: 250px 250px; }
    to { transform: rotate(360deg); transform-origin: 250px 250px; }
}

/* Hero text */
.hero-text {
    text-align: center;
    position: relative;
    z-index: 3;
    margin-top: 48px;
}

.hero-tag {
    font-size: 13px;
    letter-spacing: 6px;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(56px, 12vw, 140px);
    font-weight: 900;
    color: var(--white);
    letter-spacing: -3px;
    line-height: 1;
    margin-bottom: 16px;
}

.title-line { display: block; overflow: hidden; }
.title-word {
    display: inline-block;
    transform: translateY(100%);
    animation: revealWord 1s var(--ease) 1.8s forwards;
}

@keyframes revealWord {
    to { transform: translateY(0); }
}

.hero-subtitle {
    font-size: 15px;
    color: rgba(255,255,255,0.35);
    font-weight: 300;
    letter-spacing: 3px;
}

/* Scroll CTA */
.scroll-cta {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 5;
}

.scroll-dot {
    width: 1px;
    height: 50px;
    background: rgba(255,255,255,0.15);
    position: relative;
    overflow: hidden;
}

.scroll-dot::after {
    content: '';
    position: absolute;
    top: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.6);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { top: -100%; }
    50% { top: 100%; }
    100% { top: 100%; }
}

.scroll-cta span {
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.25);
    font-weight: 500;
}

/* Side Socials */
.side-socials {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 100;
    mix-blend-mode: difference;
}

.social-link {
    width: 20px;
    height: 20px;
    color: rgba(255,255,255,0.4);
    transition: all 0.4s var(--ease);
    position: relative;
}

.social-link:hover {
    color: var(--white);
    transform: scale(1.3);
}

.social-link::after {
    content: attr(data-label);
    position: absolute;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    letter-spacing: 2px;
    white-space: nowrap;
    color: rgba(255,255,255,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s var(--ease);
    transform: translateY(-50%) translateX(10px);
}

.social-link:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.social-link svg {
    width: 100%;
    height: 100%;
}

.social-line {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    margin-top: 4px;
}

/* ---- Reveal Animations ---- */
.anim-reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s var(--ease) forwards;
}

.anim-reveal.delay-1 { animation-delay: 2s; }
.anim-reveal.delay-2 { animation-delay: 2.3s; }

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

.anim-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.anim-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Typography ---- */
.label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--silver);
    margin-bottom: 24px;
}

.heading-lg {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.15;
}

.heading-xl {
    font-size: clamp(44px, 7vw, 96px);
    font-weight: 800;
    letter-spacing: -3px;
    line-height: 1.1;
    margin-bottom: 64px;
}

.text-outline {
    -webkit-text-stroke: 1.5px var(--black);
    color: transparent;
}

.text-body {
    font-size: 17px;
    line-height: 1.8;
    color: var(--charcoal);
    margin-bottom: 24px;
}

/* ---- About ---- */
.about {
    background: var(--white);
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: start;
}

.stats-row {
    display: flex;
    gap: 48px;
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--ghost);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-num {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -2px;
    font-variant-numeric: tabular-nums;
}

.stat-desc {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--mid);
    font-weight: 500;
}

/* ---- Projects ---- */
.projects {
    background: var(--white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.project-card {
    background: var(--off-white);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 64px rgba(0,0,0,0.08);
}

.project-preview {
    height: 220px;
    background: linear-gradient(135deg, #111 0%, #2a2a2a 50%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-preview--blue {
    background: linear-gradient(135deg, #0f1a2e 0%, #1a3050 50%, #0d1520 100%);
}

.project-preview--green {
    background: linear-gradient(135deg, #0f1e15 0%, #1a3025 50%, #0d1810 100%);
}

.project-preview--muted {
    background: linear-gradient(135deg, #1a1a1a 0%, #222 50%, #191919 100%);
}

.project-preview--purple {
    background: linear-gradient(135deg, #1a0f2e 0%, #2d1a50 50%, #150d20 100%);
}

.project-preview--cyan {
    background: linear-gradient(135deg, #0f1e2e 0%, #1a3545 50%, #0d1820 100%);
}

.project-icon {
    width: 100px;
    height: 100px;
    opacity: 0.8;
    transition: transform 0.6s var(--ease), opacity 0.4s;
}

.project-card:hover .project-icon {
    transform: scale(1.15);
    opacity: 1;
}

.project-number {
    position: absolute;
    bottom: 16px;
    right: 20px;
    font-size: 48px;
    font-weight: 900;
    font-family: var(--font-serif);
    color: rgba(255,255,255,0.04);
    letter-spacing: -2px;
}

.project-preview::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.4));
}

/* Card as link */
a.project-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card--soon {
    opacity: 0.6;
    cursor: default;
}

.project-body {
    padding: 32px;
}

.project-body h3 {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.project-body p {
    font-size: 15px;
    color: var(--mid);
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-tags span {
    padding: 6px 14px;
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--mid);
    transition: all 0.3s;
}

.project-card:hover .project-tags span {
    border-color: var(--black);
    color: var(--black);
}

/* ---- Philosophy ---- */
.philosophy {
    background: var(--off-white);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.phil-card {
    background: var(--white);
    padding: 48px 36px;
    border-radius: 24px;
    border: 1px solid var(--ghost);
    transition: all 0.5s var(--ease);
    position: relative;
    overflow: hidden;
}

.phil-card::before {
    content: attr(data-symbol);
    position: absolute;
    right: -10px;
    bottom: -20px;
    font-size: 140px;
    font-weight: 900;
    color: rgba(0,0,0,0.02);
    line-height: 1;
    transition: all 0.5s var(--ease);
    pointer-events: none;
}

.phil-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 80px rgba(0,0,0,0.06);
    border-color: transparent;
}

.phil-card:hover::before {
    color: rgba(0,0,0,0.05);
    transform: translate(-5px, -5px);
}

.card-number {
    font-size: 12px;
    font-weight: 600;
    color: var(--silver);
    letter-spacing: 2px;
    margin-bottom: 28px;
}

.phil-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.phil-card p {
    font-size: 15px;
    color: var(--charcoal);
    line-height: 1.7;
}

/* ---- Marquee ---- */
.marquee-section {
    padding: 32px 0;
    overflow: hidden;
    border-top: 1px solid var(--ghost);
    border-bottom: 1px solid var(--ghost);
}

.marquee-track {
    overflow: hidden;
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: marqueeScroll 20s linear infinite;
}

.marquee-content span {
    font-size: clamp(20px, 3vw, 36px);
    font-weight: 800;
    letter-spacing: 4px;
    color: var(--ghost);
    padding-right: 0;
    flex-shrink: 0;
    -webkit-text-stroke: 1px var(--silver);
    color: transparent;
}

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

/* ---- Connect ---- */
.connect {
    background: var(--white);
}

.connect-links {
    display: flex;
    flex-direction: column;
}

.connect-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 0;
    border-top: 1px solid var(--ghost);
    transition: all 0.4s var(--ease);
    position: relative;
}

.connect-row:last-child {
    border-bottom: 1px solid var(--ghost);
}

.connect-row::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--black);
    transition: width 0.6s var(--ease);
}

.connect-row:hover::before {
    width: 100%;
}

.connect-row:hover {
    padding-left: 24px;
}

.connect-platform {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--mid);
    min-width: 120px;
    transition: color 0.3s;
}

.connect-row:hover .connect-platform { color: var(--black); }

.connect-handle {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.connect-arrow {
    font-size: 20px;
    opacity: 0;
    transform: translateX(-15px);
    transition: all 0.4s var(--ease);
}

.connect-row:hover .connect-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ---- Footer ---- */
.footer {
    background: var(--black);
    color: rgba(255,255,255,0.3);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 48px !important;
}

.footer-copy { font-size: 13px; font-weight: 400; }
.footer-philosophy { font-size: 13px; font-weight: 300; letter-spacing: 2px; }

/* ---- Chat Widget ---- */
.chat-bubble {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 60px;
    height: 60px;
    background: var(--black);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.chat-bubble.hidden { display: none; }

.chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: #e53e3e;
    border-radius: 50%;
    border: 2px solid var(--white);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: white;
}

.chat-badge.show { display: flex; }

.chat-widget {
    position: fixed;
    bottom: 100px;
    right: 28px;
    width: 380px;
    max-height: 520px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.chat-widget.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.chat-header {
    background: var(--black);
    color: var(--white);
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
}

.chat-header-name {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.3px;
}

.chat-header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

.chat-status-dot {
    width: 7px;
    height: 7px;
    background: #48bb78;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.chat-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.chat-close:hover { color: var(--white); }

/* Intro screen */
.chat-intro {
    padding: 40px 28px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.chat-intro-icon { font-size: 40px; }

.chat-intro h3 {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
}

.chat-intro p {
    font-size: 14px;
    color: var(--mid);
}

.chat-name-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
    margin-top: 4px;
}

.chat-name-input:focus {
    border-color: var(--black);
}

.chat-start-btn {
    width: 100%;
    padding: 13px;
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
    margin-top: 4px;
}

.chat-start-btn:hover { opacity: 0.85; }

/* Messages */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 280px;
    max-height: 340px;
}

.chat-msg {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.chat-msg--visitor {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-msg--support {
    align-self: flex-start;
    align-items: flex-start;
}

.chat-msg-bubble {
    padding: 10px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.chat-msg--visitor .chat-msg-bubble {
    background: var(--black);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.chat-msg--support .chat-msg-bubble {
    background: var(--off-white);
    color: var(--black);
    border-bottom-left-radius: 4px;
}

.chat-msg-time {
    font-size: 11px;
    color: var(--mid);
    margin-top: 4px;
    padding: 0 4px;
}

/* Input */
.chat-input-wrap {
    padding: 14px 16px;
    border-top: 1px solid rgba(0,0,0,0.06);
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.chat-input:focus { border-color: var(--black); }

.chat-send {
    width: 40px;
    height: 40px;
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.2s;
    flex-shrink: 0;
}

.chat-send:hover { opacity: 0.85; }
.chat-send:active { transform: scale(0.92); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .side-socials { right: 20px; }
}

@media (max-width: 768px) {
    .nav { padding: 20px 24px; }
    .nav-links { display: none; }
    .nav-burger { display: flex; }
    .container { padding: 100px 24px; }
    .split-layout { grid-template-columns: 1fr; gap: 48px; }
    .cards-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .side-socials { display: none; }
    .cursor, .cursor-ring { display: none !important; }
    body { cursor: auto; }
    a, button { cursor: pointer; }
    .hero-title { letter-spacing: -2px; }
    .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
    .stats-row { gap: 32px; }
    .connect-handle { font-size: 15px; }
    .dragon-svg { width: 260px; }
}

@media (max-width: 480px) {
    .stats-row { flex-direction: column; gap: 24px; }
    .connect-platform { min-width: auto; }
    .connect-row { flex-wrap: wrap; gap: 4px; }
    .chat-widget { right: 8px; left: 8px; width: auto; bottom: 80px; }
    .chat-bubble { bottom: 16px; right: 16px; }
}
