:root {
    --bg-color: #0f0f11;
    --text-color: #f3f4f6;
    --card-bg: #1e1e24;
    --accent-color: #3b82f6;
    --sub-text: #9ca3af;
    --border-color: #2e2e38;
    --loading-bg: #050505;
    --bar-bg: #2e2e38;
}

[data-theme="light"] {
    --bg-color: #f4f4f6;
    --text-color: #111827;
    --card-bg: #ffffff;
    --accent-color: #2563eb;
    --sub-text: #4b5563;
    --border-color: #e5e7eb;
    --loading-bg: #fafafa;
    --bar-bg: #e5e7eb;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
}

.top-controls {
    position: fixed;
    top: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    z-index: 100;
}

.nav-menu {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 30px;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--sub-text);
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.nav-btn.active {
    background: var(--accent-color);
    color: #ffffff;
}

.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-section { 
    display: none; 
}
.page-section.active { 
    display: block; 
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 100px 20px;
}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--loading-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.cube-wrapper {
    width: 80px;
    height: 80px;
    perspective: 400px;
    margin-bottom: 30px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 4s infinite linear;
}

.cube-face {
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

body[data-theme="light"] .cube-face {
    background: rgba(0, 0, 0, 0.05);
    border: 2px solid rgba(0, 0, 0, 0.4);
}

.front  { transform: translateZ(40px); }
.back   { transform: rotateY(180deg) translateZ(40px); }
.left   { transform: rotateY(-90deg) translateZ(40px); }
.right  { transform: rotateY(90deg) translateZ(40px); }
.top    { transform: rotateX(90deg) translateZ(40px); }
.bottom { transform: rotateX(-90deg) translateZ(40px); }

@keyframes rotateCube {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

.loading-text { 
    font-size: 24px; 
    font-weight: 700; 
    letter-spacing: 4px; 
    margin-bottom: 10px; 
}

.loading-sub { 
    font-size: 13px; 
    color: var(--sub-text); 
}

.fw-hero-section {
    position: relative;
    width: 100%;
    min-height: 780px;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.fw-hero-bg-text {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 105px;
    font-weight: 900;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.02);
    white-space: nowrap;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

[data-theme="light"] .fw-hero-bg-text { 
    color: rgba(0, 0, 0, 0.02); 
}

.fw-hero-wrap { 
    position: relative; 
    z-index: 1; 
}

.fw-hero-top {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--sub-text);
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fw-profile-logo-wrap { 
    margin-bottom: 15px; 
}

.fw-main-logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.fw-hero-display {
    font-size: 54px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 20px;
}

.fw-hero-line { 
    display: block; 
}

.fw-hero-line-italic {
    font-style: italic;
    font-weight: 300;
    color: var(--sub-text);
}

.fw-hero-tagline { 
    max-width: 480px; 
    margin-bottom: 30px; 
}

.fw-hero-role {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.fw-hero-sub { 
    font-size: 15px; 
    line-height: 1.6; 
    color: var(--sub-text); 
}

.fw-hero-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--sub-text);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 25px;
    margin-bottom: 40px;
}

.fw-hero-status { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.fw-hero-dot { 
    width: 8px; 
    height: 8px; 
    background: #22c55e; 
    border-radius: 50%; 
    display: inline-block; 
}

.fw-hero-scroll { 
    display: flex; 
    align-items: center; 
    gap: 5px; 
}

.fw-lanyard-scene {
    position: relative;
    width: 100%;
    height: 480px;
    background: var(--card-bg);
    border: 1px dashed var(--border-color);
    border-radius: 20px;
    overflow: hidden;
}

.sandbox-hint {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 11px;
    color: var(--sub-text);
    z-index: 5;
    pointer-events: none;
}

.fw-lanyard-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.fw-strap-text { 
    letter-spacing: 2px; 
    text-transform: uppercase; 
}

.fw-avatar-card {
    position: absolute;
    width: 210px;
    background: #e5e0d8;
    color: #2c2b29;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    cursor: grab;
    user-select: none;
    z-index: 10;
    touch-action: none; 
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.fw-avatar-card:active { 
    cursor: grabbing;
    transform: scale(1.02);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.fw-card-clip {
    width: 30px;
    height: 12px;
    background: #a39a86;
    margin: -16px auto 12px auto;
    border-radius: 0 0 4px 4px;
    border: 1px solid rgba(0,0,0,0.1);
}

.fw-card-head {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    font-weight: 700;
    color: #5a5854;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.fw-card-photo {
    width: 100%;
    height: 125px;
    background: #1f1d18;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid rgba(0,0,0,0.05);
}

.fw-card-photo img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.fw-card-name { 
    font-size: 18px; 
    font-weight: 800; 
    text-align: center; 
    margin-bottom: 2px; 
    letter-spacing: -0.5px; 
}

.fw-card-role { 
    font-size: 11px; 
    font-weight: 600; 
    text-align: center; 
    color: #5a5854; 
    text-transform: uppercase; 
    margin-bottom: 12px; 
    letter-spacing: 0.5px; 
}

.fw-card-foot {
    font-size: 10px;
    font-weight: 700;
    color: #2b6636;
    border-top: 1px dashed rgba(0,0,0,0.15);
    padding-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.fw-card-dot { 
    width: 6px; 
    height: 6px; 
    background: #2b6636; 
    border-radius: 50%; 
}

.section { 
    margin-bottom: 45px; 
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    color: var(--accent-color);
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
}

.about-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--sub-text);
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.about-text a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.about-text a:hover {
    text-decoration: underline;
}

.skills-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.skill-info-label {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.skill-info-label .percent {
    color: var(--accent-color);
}

.skill-bar-track {
    width: 100%;
    height: 10px;
    background: var(--bar-bg);
    border-radius: 10px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-color), #60a5fa);
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.1, 0.8, 0.3, 1);
}

.social-list { 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
}

.social-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-color);
    transform: translateY(0);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.social-card:hover { 
    border-color: var(--accent-color); 
    transform: translateY(-2px); 
}

.social-info { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    font-weight: 600; 
}

.social-handle { 
    font-size: 13px; 
    color: var(--sub-text); 
}

.flex-center { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.arrow-icon { 
    font-size: 12px; 
    color: var(--sub-text); 
}

.profile-header {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-name { 
    font-size: 26px; 
    font-weight: 700; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.ai-avatar-icon {
    width: 80px;
    height: 80px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 15px;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.chat-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    height: 450px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.chat-box {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    animation: msgFadeIn 0.25s ease-out forwards;
}

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

.chat-msg.bot {
    background: var(--border-color);
    color: var(--text-color);
    align-self: flex-start;
    border-top-left-radius: 2px;
}

.chat-msg.user {
    background: var(--accent-color);
    color: #ffffff;
    align-self: flex-end;
    border-top-right-radius: 2px;
}

.chat-input-area {
    display: flex;
    padding: 15px;
    border-top: 1px solid var(--border-color);
    background: rgba(0,0,0,0.1);
    gap: 10px;
}

#chat-input {
    flex: 1;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 8px;
    color: var(--text-color);
    outline: none;
    font-size: 14px;
}

#chat-input:focus { 
    border-color: var(--accent-color); 
}

#send-btn {
    background: var(--accent-color);
    border: none;
    color: white;
    width: 45px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: opacity 0.2s ease;
}

#send-btn:hover { 
    opacity: 0.9; 
}
