/* ===== BASE STYLES ===== */
:root {
    /* Light Theme (Default) */
    --bg-primary: #ffffff;
    --bg-sidebar: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --sidebar-width: 320px;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-sidebar: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --accent-color: #60a5fa;
    --accent-hover: #3b82f6;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.theme-toggle:hover {
    transform: rotate(180deg);
    background: var(--accent-color);
    color: white;
}

/* ===== LAYOUT ===== */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR - FIXED WITH BACKGROUND ===== */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background-image: url('images/bk-default.WEBP');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-right: 1px solid var(--border-color);
}

/* Dark overlay for text readability */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.sidebar-content {
    position: relative;
    z-index: 2;
    padding: 2rem 1.5rem;
    color: white;
}

/* Profile */
.profile {
    text-align: center;
    margin-bottom: 2rem;
}

.profile-photo-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    cursor: pointer;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    transition: transform 0.3s;
}

.profile-img:hover {
    transform: scale(1.05);
}

.photo-hint {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}

.profile-photo-container:hover .photo-hint {
    opacity: 1;
}

.profile h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: white;
}

.profile-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.profile-bio {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.social-links a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.social-links a:hover {
    background: white;
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.nav-link {
    padding: 0.7rem 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.nav-link.active {
    background: var(--accent-color);
    color: white;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem 3rem;
    max-width: 900px;
}

/* Sections */
.section {
    margin-bottom: 3rem;
    scroll-margin-top: 2rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
    color: var(--text-primary);
}

/* About Section (Right Side Only) */
.about-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.work-interest {
    margin-top: 2rem;
}

.work-interest h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.interest-tag {
    padding: 0.4rem 1rem;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Education */
.education-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.edu-date {
    min-width: 140px;
    font-weight: 600;
    color: var(--accent-color);
}

.edu-details h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.edu-details p a {
    color: var(--text-secondary);
    text-decoration: none;
}

.edu-details p a:hover {
    color: var(--accent-color);
}

/* Experience */
.experience-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.exp-date {
    min-width: 140px;
    font-weight: 600;
    color: var(--accent-color);
}

.exp-details h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.exp-company {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.exp-list {
    list-style: none;
    margin-bottom: 1rem;
}

.exp-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.exp-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.cert-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
}

/* Projects */
.project-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.project-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.project-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.project-item p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-tag {
    padding: 0.2rem 0.8rem;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    font-size: 0.8rem;
}

.project-links {
    display: flex;
    gap: 1.5rem;
}

.project-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

.project-links a:hover {
    color: var(--accent-color);
}

/* Skills */
.skills-category {
    margin-bottom: 1.5rem;
}

.skills-category h3 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skills-tags .skill-tag {
    padding: 0.4rem 1rem;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Misc */
.misc-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.misc-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-sidebar);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 1.2rem;
}

.misc-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.misc-content p {
    color: var(--text-secondary);
}

.friend-gate-btn {
    padding: 0.4rem 1rem;
    background: transparent;
    border: 1px solid var(--accent-color);
    border-radius: 20px;
    color: var(--accent-color);
    cursor: pointer;
    margin-top: 0.5rem;
}

.friend-gate-btn:hover {
    background: var(--accent-color);
    color: white;
}

/* Contact */
.schedule-section,
.message-section {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.schedule-btn {
    padding: 0.75rem 1.5rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.schedule-btn:hover {
    background: var(--accent-hover);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 0.8rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
}

.send-btn {
    padding: 0.8rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* Footer */
footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

footer a:hover {
    color: var(--accent-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 1.5rem;
}

/* Responsive */
@media (max-width: 900px) {
    .wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }
    
    .education-item,
    .experience-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .edu-date,
    .exp-date {
        min-width: auto;
    }
}