/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables for Theme */
:root {
    --bg-primary: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #3a3a3a 100%);
    --bg-secondary: rgba(26, 26, 26, 0.95);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-tertiary: rgba(255, 255, 255, 0.7);
    --accent-primary: #4a5568;
    --accent-secondary: #2d3748;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
    --bg-primary: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    --bg-secondary: rgba(255, 255, 255, 0.6);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.9);
    --text-tertiary: rgba(255, 255, 255, 0.8);
    --accent-primary: #3b82f6;
    --accent-secondary: #1d4ed8;
    --border-color: rgba(255, 255, 255, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 0;
    overflow-x: hidden !important;
    overflow-y: auto;
    width: 100%;
    max-width: 100vw;
    /* Extend background to cover iOS safe areas */
    margin: 0;
    padding: 0;
}

/* Ensure page starts at top */
html, body {
    scroll-behavior: smooth;
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

/* Enhanced smooth scrolling */
* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-primary);
    overflow-x: hidden !important;
    overflow-y: auto;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
    scroll-behavior: smooth;
    /* Background extends to cover iOS safe areas (status bar, notch, etc.) */
    position: relative;
}

/* Extend background to cover safe areas on all devices */
body::before {
    content: '';
    position: fixed;
    top: calc(-1 * env(safe-area-inset-top, 0px));
    left: calc(-1 * env(safe-area-inset-left, 0px));
    right: calc(-1 * env(safe-area-inset-right, 0px));
    bottom: calc(-1 * env(safe-area-inset-bottom, 0px));
    background: var(--bg-primary);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

/* Light mode button icon color */
[data-theme="light"] .theme-toggle {
    color: #0f172a;
}

/* Modern Tooltip */
.theme-toggle::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -45px;
    right: 0;
    transform: translateX(0);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    box-shadow: 0 4px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

/* Light mode tooltip text color */
[data-theme="light"] .theme-toggle::after {
    color: #0f172a;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 15px;
    transform: translateX(0);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--bg-secondary);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.theme-toggle:hover::after,
.theme-toggle:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(-5px);
}

.theme-toggle:hover::before {
    transform: translateY(-2px);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px var(--shadow-color);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Container */
.container {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden !important;
    overflow-y: visible;
    width: 100%;
    max-width: 100vw;
    position: relative;
    margin: 0;
    padding: 0;
    /* Background extends to cover iOS safe areas (status bar, notch, etc.) */
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    box-shadow: 2px 0 20px var(--shadow-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    /* Hide scrollbar for Chrome, Safari and Opera */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.sidebar::-webkit-scrollbar {
    display: none;
}

/* Light mode sidebar text overrides */
[data-theme="light"] .sidebar {
    color: #0f172a;
}

[data-theme="light"] .profile-name,
[data-theme="light"] .nav-link,
[data-theme="light"] .nav-link span,
[data-theme="light"] .copyright,
[data-theme="light"] .social-link {
    color: #0f172a;
}

[data-theme="light"] .nav-link {
    color: rgba(15, 23, 42, 0.7);
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
    color: #0f172a;
}

[data-theme="light"] .copyright {
    color: rgba(15, 23, 42, 0.6);
}

[data-theme="light"] .social-link {
    color: rgba(15, 23, 42, 0.7);
}

/* Light mode main content text overrides for better visibility */
[data-theme="light"] .first-name,
[data-theme="light"] .subtitle,
[data-theme="light"] .description,
[data-theme="light"] .section-text,
[data-theme="light"] .contact-text {
    color: #ffffff !important;
    text-shadow: 0 3px 15px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

/* Dark mode main content text with glowing effect */
[data-theme="dark"] .first-name,
[data-theme="dark"] .subtitle,
[data-theme="dark"] .description,
[data-theme="dark"] .section-text,
[data-theme="dark"] .contact-text {
    color: #ffffff !important;
    text-shadow: 0 3px 15px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

[data-theme="light"] .subtitle {
    font-weight: 500;
}

[data-theme="light"] .description {
    font-weight: 500;
}

/* Dark mode main content text overrides for better visibility */
[data-theme="dark"] .first-name,
[data-theme="dark"] .subtitle,
[data-theme="dark"] .description,
[data-theme="dark"] .section-text,
[data-theme="dark"] .contact-text {
    color: #ffffff !important;
    text-shadow: 0 3px 15px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

[data-theme="dark"] .subtitle {
    font-weight: 500;
}

[data-theme="dark"] .description {
    font-weight: 500;
}

/* Section titles with glowing effect */
[data-theme="light"] .section-title {
    color: #ffffff !important;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    text-shadow: 0 3px 15px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.3);
    font-weight: 800;
}

[data-theme="dark"] .section-title {
    color: #ffffff !important;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    text-shadow: 0 3px 15px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.3);
    font-weight: 800;
}

/* Smooth gradient transition for both themes */
.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: -50px;
    width: 50px;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* Light mode gradient */
[data-theme="light"] .sidebar::after {
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 0.6) 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        rgba(255, 255, 255, 0.1) 80%, 
        transparent 100%
    );
}

/* Dark mode gradient */
[data-theme="dark"] .sidebar::after {
    background: linear-gradient(to right, 
        rgba(26, 26, 26, 0.95) 0%, 
        rgba(26, 26, 26, 0.7) 50%, 
        rgba(26, 26, 26, 0.3) 80%, 
        transparent 100%
    );
}

/* Profile Section */
.profile-section {
    padding: 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.profile-image-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.profile-image-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    filter: grayscale(100%);
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 2.5rem;
}

.profile-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px var(--shadow-color);
}

/* Navigation Styles */
.navigation {
    flex: 1;
    padding: 2rem 0;
}

.nav-list {
    list-style: none;
    padding: 0 1rem;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--text-tertiary);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--text-primary);
    transform: translateX(5px);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.nav-link i {
    font-size: 1.2rem;
    margin-right: 1rem;
    width: 20px;
    text-align: center;
}

.nav-link span {
    font-weight: 500;
    font-size: 1rem;
}

/* Social Footer */
.social-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--border-color);
    color: var(--text-tertiary);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.copyright {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    gap: 0.5rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    position: relative;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    min-height: 100dvh;
    background: #1a1a1a;
    overflow-x: hidden !important;
    overflow-y: visible;
    width: 100%;
    max-width: 100vw;
}

/* Subtle color filter for background image */
.main-content::after {
    content: '';
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    bottom: 0;
    width: calc(100% - 280px);
    height: 100vh;
    background: url('workstation-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: grayscale(60%) contrast(1.1) brightness(0.85) sepia(20%) hue-rotate(200deg) saturate(1.2);
    z-index: 0;
    pointer-events: none;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    opacity: 0.5;
    backdrop-filter: blur(1px);
    z-index: 1;
}

[data-theme="light"] .main-content::before {
    background: var(--bg-secondary);
    opacity: 0.3;
}

.main-content > * {
    position: relative;
    z-index: 2;
}

.content-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

.content-section.active {
    opacity: 1;
    transform: translateY(0);
}

/* Home page specific - no bumpy effects */
#home.content-section {
    opacity: 0;
    transform: translateY(0);
    transition: opacity 0.8s ease-in-out;
}

#home.content-section.active {
    opacity: 1;
    transform: translateY(0);
}

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

/* Hero Content */
.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 80vh;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-section.active .hero-content {
    opacity: 1;
    transform: translateY(0);
}

/* Home page hero content - smoother */
#home .hero-content {
    opacity: 0;
    transform: translateY(0);
    transition: opacity 0.8s ease-in-out;
}

#home.content-section.active .hero-content {
    opacity: 1;
    transform: translateY(0);
}

.main-title {
    font-family: 'Playfair Display', serif;
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

.content-section.active .main-title {
    opacity: 1;
    transform: translateY(0);
}

/* Home page title - smoother */
#home .main-title {
    opacity: 0;
    transform: translateY(0);
    transition: opacity 0.8s ease-in-out 0.2s;
}

#home.content-section.active .main-title {
    opacity: 1;
    transform: translateY(0);
}

.first-name {
    color: var(--text-primary);
    margin-right: 0.2em;
}

.last-name {
    color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
    font-weight: 700;
}

/* Light mode accent color override */
[data-theme="light"] .last-name {
    color: #ffffff !important;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    text-shadow: 0 3px 15px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.3);
    font-weight: 800;
}

/* Dark mode accent color override */
[data-theme="dark"] .last-name {
    color: #ffffff !important;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    text-shadow: 0 3px 15px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.3);
    font-weight: 800;
}

.subtitle {
    font-size: 1.7rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 300;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.content-section.active .subtitle {
    opacity: 1;
    transform: translateY(0);
}

.description {
    font-size: 1.3rem;
    color: var(--text-tertiary);
    max-width: 600px;
    line-height: 1.6;
    font-weight: 400;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

.content-section.active .description {
    opacity: 1;
    transform: translateY(0);
}

/* Home page subtitle and description - smoother */
#home .subtitle {
    opacity: 0;
    transform: translateY(0);
    transition: opacity 0.8s ease-in-out 0.4s;
}

#home.content-section.active .subtitle {
    opacity: 1;
    transform: translateY(0);
}

#home .description {
    opacity: 0;
    transform: translateY(0);
    transition: opacity 0.8s ease-in-out 0.6s;
}

#home.content-section.active .description {
    opacity: 1;
    transform: translateY(0);
}

/* Section Content */
.section-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.15s;
}

.content-section.active .section-content {
    opacity: 1;
    transform: translateY(0);
}

/* About Me Section */
.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    margin-top: 2rem;
}

.about-text {
    text-align: center;
}

.about-image {
    display: flex;
    justify-content: center;
}

.about-profile-image {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
    border: 3px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
    filter: grayscale(100%);
}

.about-profile-image:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.4);
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

.section-text {
    font-size: 1.3rem;
    color: var(--text-secondary);
    line-height: 1.8;
    text-align: center;
}

/* Portfolio Links */
.portfolio-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    align-items: center;
}

.portfolio-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: 500;
    max-width: 400px;
    width: 100%;
    justify-content: center;
}

.portfolio-link:hover {
    background: rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.portfolio-link i {
    font-size: 1.3rem;
}

/* Contact Section */
.contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.contact-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.contact-link:hover {
    background: rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.contact-icon {
    font-size: 1.5rem;
    width: 30px;
    text-align: center;
}

.contact-text {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    display: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle:hover {
    background: rgba(0, 0, 0, 1);
    transform: scale(1.05);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* Arrow Button Transformation */
.mobile-menu-toggle .fa-chevron-right {
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateX(0);
}

.mobile-menu-toggle .fa-chevron-left {
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-10px);
    position: absolute;
}

.mobile-menu-toggle.open .fa-chevron-right {
    opacity: 0;
    transform: translateX(10px);
}

.mobile-menu-toggle.open .fa-chevron-left {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile Theme Toggle Button */
.mobile-theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: none;
    z-index: 1002;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.mobile-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.mobile-theme-toggle:active {
    transform: scale(0.95);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-theme-toggle {
        display: flex;
    }
    
    /* Hide desktop theme toggle on mobile */
    .theme-toggle {
        display: none !important;
    }
    
    .sidebar {
        width: 280px;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        transform: translateX(-100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        box-shadow: 2px 0 20px var(--shadow-color);
    }
    
    .sidebar.open {
        transform: translateX(0) !important;
    }
    
    /* Overlay for mobile sidebar */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.3s ease;
    }
    
    .sidebar-overlay.active {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .main-content {
        margin-left: 0;
        padding: 0;
        overflow-y: auto;
        overflow-x: hidden !important;
        width: 100%;
        height: 100vh;
        height: -webkit-fill-available;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        flex: 1;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* Internet Explorer 10+ */
        -webkit-overflow-scrolling: touch;
        position: relative;
        /* Ensure content can grow beyond viewport */
        min-height: 100vh;
        /* Add scroll snapping */
        scroll-snap-type: y mandatory;
        scroll-behavior: smooth;
    }
    
    .main-content::-webkit-scrollbar {
        display: none;
    }
    
    /* Fixed background image for all sections on mobile */
    .main-content::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        height: -webkit-fill-available;
        height: 100dvh;
        background: url('workstation-background.jpg');
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
        filter: grayscale(60%) contrast(1.1) brightness(0.85) sepia(20%) hue-rotate(200deg) saturate(1.2);
        z-index: 0;
        pointer-events: none;
        display: block !important;
    }
    
    /* Overlay for all sections on mobile */
    .main-content::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        height: -webkit-fill-available;
        height: 100dvh;
        background: var(--bg-secondary);
        opacity: 0.5;
        backdrop-filter: blur(1px);
        z-index: 1;
        pointer-events: none;
        display: block !important;
    }
    
    /* Make container non-scrollable, main-content scrollable on mobile */
    .container {
        height: 100vh;
        height: -webkit-fill-available;
        height: 100dvh;
        overflow: hidden;
        position: relative;
        display: flex;
        flex-direction: row;
    }
    
    /* Make html/body non-scrollable on mobile */
    html, body {
        overflow-y: hidden;
        overflow-x: hidden !important;
        height: 100vh;
        height: -webkit-fill-available;
        height: 100dvh;
        position: fixed;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    /* Ensure body background covers everything including safe areas */
    body::before {
        top: calc(-1 * env(safe-area-inset-top, 0px));
        bottom: calc(-1 * env(safe-area-inset-bottom, 0px));
        left: calc(-1 * env(safe-area-inset-left, 0px));
        right: calc(-1 * env(safe-area-inset-right, 0px));
    }
    
    /* Home section styling on mobile */
    #home {
        position: relative;
        align-items: flex-start;
        padding-top: 2rem;
    }
    
    #home .hero-content {
        position: relative;
        z-index: 2;
        margin-top: 0;
        padding-top: 2rem;
    }
    
    /* Prevent text jumping on scroll and ensure sections stack properly */
    .content-section {
        -webkit-overflow-scrolling: touch;
        transform: none;
        opacity: 1 !important;
        min-height: 100vh;
        min-height: -webkit-fill-available;
        min-height: 100dvh;
        position: relative;
        display: flex;
        flex-shrink: 0;
        flex-grow: 0;
        flex-basis: auto;
        width: 100%;
        padding: 1rem;
        box-sizing: border-box;
        z-index: 2;
        /* Add scroll snapping */
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
    
    .content-section.active {
        transform: none;
        opacity: 1 !important;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .profile-section {
        padding: 1.5rem 1rem;
    }
    
    .profile-image-container {
        width: 100px;
        height: 100px;
    }
    
    .nav-list {
        padding: 0 0.5rem;
    }
    
    .nav-link {
        padding: 0.8rem 1rem;
    }
}

/* Desktop - Hide mobile theme toggle and ensure scrolling works */
@media (min-width: 769px) {
    .mobile-theme-toggle {
        display: none !important;
    }
    
    .theme-toggle {
        display: flex;
    }
    
    /* Ensure sidebar is visible on desktop */
    .sidebar {
        display: flex !important;
        transform: translateX(0) !important;
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        z-index: 1000 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Hide mobile menu toggle on desktop */
    .mobile-menu-toggle {
        display: none !important;
    }
    
    /* Ensure desktop scrolling works */
    html, body {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        position: static !important;
        height: auto !important;
    }
    
    .container {
        overflow-y: visible !important;
        height: auto !important;
        min-height: 100vh;
    }
    
    /* Add scroll snapping to desktop - more aggressive */
    html {
        scroll-snap-type: y mandatory;
        scroll-behavior: smooth;
        scroll-padding-top: 0;
        overflow-y: scroll;
        overscroll-behavior-y: contain;
    }
    
    body {
        scroll-snap-type: y mandatory;
        scroll-behavior: smooth;
        overscroll-behavior-y: contain;
    }
    
    .content-section {
        scroll-snap-align: start;
        scroll-snap-stop: always;
        scroll-margin-top: 0;
        scroll-snap-margin: 0;
        min-height: 100vh;
    }
    
    /* Ensure smooth momentum scrolling on desktop */
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Prevent scroll jumping */
    .main-content {
        scroll-snap-type: none; /* Disable on main-content for desktop, use html/body instead */
    }
    
    /* Fixed background image for desktop - same as mobile */
    .main-content::after {
        position: fixed;
        top: 0;
        left: 280px;
        right: 0;
        bottom: 0;
        width: calc(100% - 280px);
        height: 100vh;
        background-attachment: fixed;
    }
    
    /* Ensure background overlay is also fixed */
    .main-content::before {
        position: fixed;
        top: 0;
        left: 280px;
        right: 0;
        bottom: 0;
        width: calc(100% - 280px);
        height: 100vh;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .description {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-content {
        gap: 2rem;
    }
    
    .about-profile-image {
        width: 200px;
        height: 200px;
    }
    
    /* Ensure background is removed on small screens too */
    .main-content::after {
        display: none;
    }
}

/* Enhanced smooth scrolling and hide all scrollbars */
* {
    scroll-behavior: smooth;
    box-sizing: border-box;
}

/* Hide scrollbars but keep functionality */
html {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

body {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

/* Hide all scrollbars globally for webkit browsers */
::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}
