*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Pixelify Sans",sans-serif;
}
#entry-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0a0a0a; 
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    overflow: hidden;
}

.entry-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    display: none; 
    flex-direction: column;
    justify-content: center; 
    align-items: center;     
    padding: 20px;
    text-align: center;
    background: #0a0a0a; 
}

.entry-slide.active {
    display: flex; 
}
.slide-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 600px;
}
.profile-img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 20px; 
    border: 4px solid var(--accent);
}
.board-img {
    width: 600px;
    height: 200px;
    object-fit: cover;
    border-radius: 20px; 
    border: 4px solid var(--accent);
}
.board-part-img {
    width: 400px;
    height: 300px;
    object-fit: cover;
    border-radius: 20px; 
    border: 4px solid var(--accent);
}
#enter-btn {
    font-family: "Pixelify Sans", sans-serif;
    padding: 25px 50px;
    font-size: 2rem;
    background: var(--accent);
    color: #000;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

#enter-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--accent);
}
.entry-slide h1, .entry-slide h2 {
    margin-bottom: 20px;
    font-size: 3rem; 
}

.entry-slide p {
    font-size: 1.5rem;
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 40px; 
}
.next-arrow {
    background: rgba(153, 170, 255, 0.1);
    border: 2px solid var(--accent);
    color: var(--accent);
    width: 80px;  
    height: 80px; 
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-top: 20px; 
}

.next-arrow:hover {
    background: var(--accent);
    color: #000;
    transform: scale(1.2); 
    box-shadow: 0 0 20px var(--accent);
}
#enter-btn {
    margin-top: 50px; 
    padding: 30px 60px;
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 10px 0 #5566ff;
    transition: all 0.1s;
}

#enter-btn:active {
    transform: translateY(5px);
    box-shadow: 0 5px 0 #5566ff;
}
#chat-container {
    position: fixed;
    bottom: 20px;
    right: 80px; 
    z-index: 2001;
}

#chat-window {
    width: 300px;
    height: 400px;
    background: var(--modal-bg);
    border: 3px solid var(--modal-border);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}
.hidden {
    display: none !important;
}
#chat-header {
    background: var(--modal-border);
    padding: 10px;
    display: flex;
    justify-content: space-between;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    font-size: 0.8rem;
}

#chat-input-area {
    display: flex;
    padding: 10px;
    border-top: 1px solid var(--modal-border);
}
#chat-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 2px solid var(--modal-border);
}

.opt-btn {
    flex: 1 1 45%; 
    background: var(--modal-bg);
    border: 2px solid var(--accent);
    color: white;
    padding: 6px;
    font-size: 0.7rem;
    cursor: pointer;
    font-family: "Pixelify Sans", sans-serif;
    transition: all 0.2s;
}

.opt-btn:hover {
    background: var(--accent);
    color: #000;
}
#chat-input-area { display: none; }
#user-input {
    flex: 1;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--accent);
    color: white;
    padding: 5px;
}
.msg {
    margin: 8px 0;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    max-width: 85%;
    line-height: 1.4;
    word-wrap: break-word;
}
.bot-msg {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--modal-border);
    color: #ffffff;
}
.user-msg {
    align-self: flex-end;
    background: var(--accent); 
    color: #000000;            
    border: 1px solid #ffffff;
    font-weight: bold;
    text-align: right;
}
#experience{
    position: fixed;
    height: 100%;
    width: 100%;
    top:0;
    left: 0;
    overflow: hidden;
}
#experience-canvas{
    width: 100%;
    height: 100%;
}
.hidden{
    display:none;
}
#theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    border-radius: 50%; 
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 2px solid var(--accent);
    cursor: pointer;
    overflow: hidden; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.25);
}

.icon-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    transition: transform 0.5s ease;
}

.sun-icon, .moon-icon {
    font-size: 1.8rem;
    position: absolute;
    transition: opacity 0.3s, transform 0.5s;
}
.moon-icon {
    opacity: 0;
    transform: translateY(40px);
}

.sun-icon {
    opacity: 1;
    transform: translateY(0);
}

body.night-mode .sun-icon {
    opacity: 0;
    transform: translateY(-40px);
}

body.night-mode .moon-icon {
    opacity: 1;
    transform: translateY(0); 
}

body.night-mode #theme-toggle {
    background: rgba(20, 20, 35, 0.6);
    box-shadow: 0 0 15px var(--accent);
}

.modal {
  z-index: 999;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 500px;
  background-color: #c19a6b;
  border: 4px solid #7e481c;
  color: #fff;
  transition-delay: 0.1s;
}
.modal-header {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 2px solid #7e481c;
  margin-bottom: 12px;
}
:root {
    --modal-bg: #c19a6b;
    --modal-border: #7e481c;
    --text-color: #fff;
    --accent: #99aaff;
}

body.night-mode {
    --modal-bg: rgba(20, 20, 35, 0.85);
    --modal-border: #3a3a5a;
    --text-color: #e0e0e0;
    --accent: #5566ff;
}

.modal {
    z-index: 999;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 500px;
    background-color: var(--modal-bg);
    border: 4px solid var(--modal-border);
    color: var(--text-color);
    backdrop-filter: blur(10px); 
    padding: 20px;
}

.modal-header {
    border-bottom: 2px solid var(--modal-border);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
}
#camera-toggle {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 2px solid #99aaff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

#camera-toggle.free-mode {
    background: #99aaff;
    color: #14141e;
}
.modal-content {
    max-height: 300px; 
    overflow-y: auto; 
    padding-right: 10px; 
    margin-top: 10px;
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}
@media (max-width: 768px) {
    .modal {
        width: 90%;
        max-height: 80vh; 
        padding: 15px;
    }

    .modal-title {
        font-size: 1.2rem;
    }

    #theme-toggle, #camera-toggle {
        width: 50px;
        height: 50px;
        right: 10px;
    }

    #camera-toggle {
        top: 80px; 
    }

    .modal-project-description {
        font-size: 0.9rem;
        max-height: 250px;
    }
}
#controls-wrapper {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none; 
}

.horizontal-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    pointer-events: auto; 
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 2px solid var(--accent);
    color: white;
    border-radius: 12px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.control-btn:active {
    background: var(--accent);
    transform: scale(0.9);
}

@media (min-width: 769px) {
    #controls-wrapper {
        display: none;
    }
}
#controls-wrapper {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 2000; 
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.horizontal-controls {
    display: flex;
    gap: 5px;
}

.control-btn {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: 2px solid #99aaff;
    border-radius: 8px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation; 
}

.control-btn:active {
    background: #99aaff;
}
.quick-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1002;
    display: flex;
    justify-content: space-between;
    padding: 15px 25px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
    pointer-events: none; 
}

.nav-group {
    display: flex;
    gap: 15px;
    pointer-events: auto; 
}

.quick-nav button, .resume-dl {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--accent);
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.8rem;
    transition: 0.3s;
}

.quick-nav button:hover, .resume-dl:hover {
    background: var(--accent);
    color: #000;
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.5rem;
}
.top-right-controls {
    position: fixed;
    top: 110px; 
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1005;
}

#theme-toggle, #camera-toggle {
    position: static; 
    width: 50px;
    height: 50px;
}

/* --- BASE NAV (Shared) --- */
.quick-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1010;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(153, 170, 255, 0.2);
    min-height: 60px;
    pointer-events: auto;
}

/* --- DESKTOP LAYOUT (Default) --- */
.nav-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.menu-toggle {
    display: none; 
}

/* --- MOBILE LAYOUT (Only kicks in below 768px) --- */
@media (max-width: 768px) {

#theme-toggle, #camera-toggle {
        position: static; 
        margin: 0;
    }

    .top-right-controls {
        top: auto;          
        bottom: 20px;       
        right: 20px;        
        flex-direction: column-reverse; 
        gap: 15px;
    }
#controls-wrapper {
    position: fixed;
    bottom: 30px;
     left: 100px; 
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none; 
}

.menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        color: var(--accent); 
        font-size: 2.5rem;    
        cursor: pointer;
        pointer-events: auto;
        z-index: 1100;
        line-height: 1;
    }

    .menu-toggle .close {
        display: none;
    }

    .menu-toggle.active .hamburger {
        display: none;
    }

    .menu-toggle.active .close {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 60px; 
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        gap: 20px;
        
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease-in-out;
    }
    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .nav-group {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 15px;
    }
    .nav-btn, .resume-dl {
        width: 100%;
        text-align: left;
    }
}
