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

:root {
    --bg: #0a0a0f;
    --surface: #12121a;
    --border: #1e1e2e;
    --text: #e0e0e8;
    --text-dim: #8888a0;
    --accent: #00d4ff;
    --accent-glow: rgba(0, 212, 255, 0.15);
    --gold: #ffd700;
    --green: #2ecc71;
    --orange: #e67e22;
    --purple: #9b59b6;
    --pink: #ff6b9d;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Nav */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    padding: 0.8rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

nav .logo { font-weight: 800; font-size: 1.2rem; }
nav .logo span { color: var(--accent); }
nav .links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
nav .links a { color: var(--text-dim); font-size: 0.9rem; }
nav .links a:hover { color: var(--accent); text-decoration: none; }
nav .nav-disabled { color: #444455; font-size: 0.9rem; cursor: default; position: relative; }
.lang-wheel { position: fixed; right: 16px; top: 50%; transform: translateY(-50%); z-index: 200; display: flex; flex-direction: column; gap: 2px; }
.lang-wheel a {
    display: block; padding: 6px 12px; font-size: 0.7rem; color: #333344;
    text-decoration: none; text-align: right; letter-spacing: 1px;
    border-right: 2px solid transparent; transition: all 0.3s;
    cursor: pointer;
}
.lang-wheel a:hover { color: var(--text-dim); border-right-color: var(--text-dim); }
.lang-wheel a.lang-locked {
    color: var(--accent); border-right-color: var(--accent);
    text-shadow: 0 0 10px rgba(0,212,255,0.3);
}
.lang-wheel a.lang-locked::after { content: " ●"; font-size: 6px; vertical-align: middle; }
nav .nav-disabled::after { content: "soon"; font-size: 0.6rem; color: var(--accent); position: absolute; top: -8px; right: -20px; opacity: 0.6; }

/* Container */
.container { max-width: 1100px; margin: 0 auto; padding: 6rem 2rem 4rem; }
.narrow { max-width: 800px; }

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; letter-spacing: -0.02em; }
.hero h1 span { color: var(--accent); }
.hero .tagline { font-size: clamp(1rem, 2.5vw, 1.3rem); color: var(--text-dim); margin: 1rem 0 2rem; max-width: 600px; }

/* Stats */
.stats { display: flex; gap: 2.5rem; flex-wrap: wrap; justify-content: center; margin-bottom: 2.5rem; }
.stat-value { font-size: 2.5rem; font-weight: 800; color: var(--accent); display: block; }
.stat-label { font-size: 0.8rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; }

/* Buttons */
.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.8rem 2rem; border-radius: 8px; font-size: 1rem;
    font-weight: 600; text-decoration: none; transition: all 0.2s;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: #33ddff; transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0, 212, 255, 0.3); text-decoration: none; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }

/* Section */
section { padding: 5rem 0; }
section h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 1rem; text-align: center; }
.section-sub { text-align: center; color: var(--text-dim); margin-bottom: 3rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Grid */
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-4px); }
.card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.card .role { color: var(--accent); font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; }
.card p { color: var(--text-dim); font-size: 0.95rem; }

/* Big number */
.big-number { font-size: clamp(3rem, 8vw, 5rem); font-weight: 800; color: var(--accent); text-align: center; }
.big-label { text-align: center; color: var(--text-dim); margin-bottom: 2rem; }

/* Code */
code { background: var(--surface); padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.9rem; }
pre { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; overflow-x: auto; margin: 1.5rem 0; }
pre code { background: none; padding: 0; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
th, td { padding: 0.8rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--accent); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.highlight { color: var(--accent); font-weight: 700; }

/* Content pages */
.content h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.content h2 { font-size: 1.5rem; margin: 2.5rem 0 1rem; color: var(--accent); text-align: left; }
.content h3 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }
.content p { margin-bottom: 1rem; color: var(--text-dim); }
.content ul, .content ol { margin: 1rem 0 1rem 1.5rem; color: var(--text-dim); }
.content li { margin-bottom: 0.5rem; }
.content img { max-width: 100%; border-radius: 8px; margin: 1.5rem 0; }
.content blockquote { border-left: 3px solid var(--accent); padding-left: 1rem; margin: 1.5rem 0; color: var(--text-dim); font-style: italic; }

/* Blog list */
.post-list { list-style: none; padding: 0; }
.post-list li { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.post-list .date { color: var(--text-dim); font-size: 0.85rem; }
.post-list h3 { margin-bottom: 0.3rem; }

/* Footer */
footer {
    text-align: center; padding: 3rem 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-dim); font-size: 0.9rem;
}
.architect { margin-top: 0.5rem; font-style: italic; }
/* Halo Orb */
.halo-orb { cursor: pointer; margin-bottom: 1rem; transition: transform 0.3s; position: relative; }
.halo-orb:hover { transform: scale(1.08); }
.halo-orb svg { animation: orbBreathe 4s ease-in-out infinite; }
@keyframes orbBreathe {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(0,212,255,0.15)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 25px rgba(0,212,255,0.4)); transform: scale(1.03); }
}
.halo-orb.listening svg { animation: orbListen 1s ease-in-out infinite; }
.halo-orb.listening .orb-bar { opacity: 1; animation: orbVU 0.12s ease-in-out infinite alternate; }
@keyframes orbListen {
    0%, 100% { filter: drop-shadow(0 0 25px rgba(0,212,255,0.6)); }
    50% { filter: drop-shadow(0 0 45px rgba(0,212,255,0.9)); }
}
@keyframes orbVU { 0% { height: 4px; opacity: 0.3; } 100% { height: 14px; opacity: 1; } }
.orb-bar { transition: height 0.08s ease; }
.orb-label { font-size: 10px; color: var(--text-dim); letter-spacing: 2px; text-align: center; margin-top: 4px; }
.halo-orb.listening .orb-label { color: var(--accent); }

/* Halo Chat Dialog */
.halo-chat-dialog {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(10, 10, 15, 0.95); backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.3); border-radius: 16px;
    padding: 32px; max-width: 500px; width: 90%; z-index: 2000;
    display: none; animation: chatIn 0.3s ease;
}
.halo-chat-dialog.show { display: block; }
.halo-chat-dialog.fadeout { animation: chatOut 0.5s ease forwards; }
.halo-chat-user { color: var(--text-dim); font-size: 13px; margin-bottom: 12px; font-style: italic; }
.halo-chat-response { color: var(--accent); font-size: 14px; line-height: 1.6; }
.halo-chat-sig { color: #444455; font-size: 9px; margin-top: 12px; letter-spacing: 2px; }
@keyframes chatIn { from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes chatOut { from { opacity: 1; } to { opacity: 0; } }

.gratitude-link { position: fixed; bottom: 12px; right: 12px; color: #1a1a2e; font-size: 1.5rem; text-decoration: none; opacity: 0.3; transition: opacity 0.3s; line-height: 1; }
.gratitude-link:hover { opacity: 1; color: var(--gold); text-decoration: none; }

/* Responsive */
@media (max-width: 768px) {
    nav { flex-direction: column; gap: 0.5rem; }
    .stats { gap: 1.5rem; }
    .hero { padding-top: 5rem; }
}
