/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    --bg: #111111;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --accent: #007cf0;
    --border: #333333;
    --font-family: 'Plus Jakarta Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--bg);
    color: var(--text-primary);
    font-family: var(--font-family);
    overscroll-behavior-x: contain;
    height: 100vh;
    overflow: hidden; /* Hide vertical scrollbar */
}
h1, h2, h3 { font-weight: 800; }
p { color: var(--text-secondary); line-height: 1.7; }

/* ==========================================================================
   2. MAIN HORIZONTAL LAYOUT
   ========================================================================== */
.main-wrapper {
    display: flex;
    width: 500vw; /* 100vw for each of the 5 sections */
    height: 100vh;
    transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}
.panel {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6rem;
    position: relative;
    overflow: hidden;
}
h2 {
    font-size: 3rem;
    position: absolute;
    top: 6rem;
    left: 6rem;
    color: var(--border);
    z-index: 1;
}

/* ==========================================================================
   3. FIXED UI ELEMENTS
   ========================================================================== */
.fixed-ui {
    position: fixed;
    z-index: 100;
}
.logo {
    position: fixed;
    top: 2rem;
    left: 2rem;
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-primary);
}
.cv-button {
    position: fixed;
    top: 2rem;
    right: 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--border);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    transition: background 0.3s;
}
.cv-button:hover { background: var(--accent); }

.main-nav {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.nav-dot {
    width: 12px;
    height: 12px;
    border: 2px solid var(--text-secondary);
    border-radius: 50%;
    transition: background-color 0.3s, border-color 0.3s, transform 0.3s;
}
.nav-dot:hover { border-color: var(--accent); transform: scale(1.2); }
.nav-dot.active { background-color: var(--accent); border-color: var(--accent); }

/* ==========================================================================
   4. HOME PANEL
   ========================================================================== */
.home-content { display: flex; align-items: center; gap: 4rem; }
.profile-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--border);
}
.profile-image img { width: 100%; height: 100%; object-fit: cover; }
.home-text { max-width: 500px; }
.home-text h1 { font-size: 5rem; margin-bottom: 1rem; position: relative; }
.home-text p { font-size: 1.25rem; }

.scroll-down-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}
.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--text-secondary);
    border-radius: 20px;
}
.mouse::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 2px;
    transform: translateX(-50%);
    animation: scroll-anim 2s infinite;
}
@keyframes scroll-anim {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 15px); opacity: 0; }
}

/* ==========================================================================
   5. ABOUT & CONTACT PANELS
   ========================================================================== */
.about-container, .contact-content { max-width: 700px; text-align: center; }
.about-container h2, .contact-content h2 { position: static; margin-bottom: 2rem; color: var(--text-primary); }
.about-text { text-align: left; }
.about-text p:not(:last-child) { margin-bottom: 1.5rem; }

.social-links { display: flex; justify-content: center; gap: 2rem; margin-top: 3rem; }
.social-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    transition: color 0.3s;
}
.social-links a:hover { color: var(--accent); }

/* ==========================================================================
   6. SKILLS PANEL (INTERACTIVE)
   ========================================================================== */
.skills-container { width: 100%; max-width: 900px; position: relative; }
.skills-container h2 { left: 0; }
.skills-layers {
    position: relative;
    width: 100%;
    height: 400px;
    margin-top: 5rem;
}
.skill-category {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 1rem 2rem;
    cursor: pointer;
    z-index: 10;
}
.skill-category h3 {
    font-size: 2rem;
    transition: color 0.4s;
    color: var(--border);
}
.skill-category:hover h3, .skill-category.active h3 { color: var(--text-primary); }

.skill-category[data-category="frontend"] { left: 5%; }
.skill-category[data-category="backend"] { left: 30%; }
.skill-category[data-category="ml"] { left: 55%; }
.skill-category[data-category="tools"] { left: 80%; }

.skill-list {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9);
    transition: opacity 0.4s, transform 0.4s, visibility 0.4s;
    z-index: 5;
}
.skill-list.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}
.skill-list ul {
    list-style: none;
    text-align: center;
    font-size: 1.5rem;
    line-height: 2;
    color: var(--text-secondary);
}

/* ==========================================================================
   7. PORTFOLIO PANEL (FILM STRIP)
   ========================================================================== */
.portfolio { display: block; padding-top: 15rem; }
.portfolio h2 { top: 6rem; left: 6rem; z-index: 20; }
.portfolio-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    padding: 2rem 6rem;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}
.portfolio-track::-webkit-scrollbar { display: none; /* Chrome, Safari, Opera */ }

.portfolio-project {
    width: 400px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: 1rem;
    transition: background 0.4s;
}
.portfolio-project:hover { background: #1a1a1a; }

.project-image { height: 250px; }
.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1rem 1rem 0 0;
}
.project-info { padding: 1.5rem; }
.project-info h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.project-links { margin-top: 1.5rem; }
.project-links a { color: var(--accent); text-decoration: none; margin-right: 1rem; font-weight: 600; }
.project-links a:hover { text-decoration: underline; }

.more-projects { display: flex; justify-content: center; align-items: center; text-align: center; }

/* ==========================================================================
   8. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
    body { overflow-y: auto; overflow-x: hidden; } /* Switch to vertical scroll on mobile */
    .main-wrapper { flex-direction: column; width: 100vw; height: auto; }
    .panel { width: 100vw; height: auto; min-height: 100vh; padding: 6rem 1.5rem; }
    h2 { font-size: 2rem; position: static; margin-bottom: 2rem; text-align: center; color: var(--text-primary); }
    .fixed-ui { display: none; } /* Hide fixed UI on mobile for simplicity */
    
    .home-content { flex-direction: column; text-align: center; gap: 2rem; }
    .home-text h1 { font-size: 3rem; }
    .scroll-down-hint { display: none; }
    
    .skills-container { height: auto; }
    .skills-layers { display: flex; flex-direction: column; height: auto; gap: 1rem; margin-top: 0; }
    .skill-category { position: static; transform: none; text-align: center; padding: 0.5rem; border-bottom: 1px solid var(--border); }
    .skill-category h3 { font-size: 1.25rem; color: var(--text-primary); }
    .skill-list { position: static; transform: none; visibility: visible; opacity: 1; display: none; } /* Initially hide lists */
    .skill-list.active { display: block; }
    .skill-list ul { font-size: 1rem; padding: 1rem 0; }

    .portfolio { padding: 6rem 0; }
    .portfolio h2 { margin-bottom: 2rem; }
    .portfolio-track { flex-direction: column; padding: 0 1.5rem; width: 100%; }
    .portfolio-project { width: 100%; }
}