/* Google Dark Theme Color System */
:root {
    /* Google's Official Dark Theme Colors */
    --surface: #202124;
    --surface-light: #303134;
    --surface-dark: #171717;

    --on-surface: #e8eaed;
    --on-surface-variant: #9aa0a6;
    --on-surface-muted: #aab1b9;

    --card-bg: #303134;
    --card-bg-light: #3c4043;

    --primary: #8ab4f8; /* Google Blue */
    --primary-light: #aecbfa;
    --primary-dark: #669df6;

    --secondary: #66b3ff; /* Google Yellow */
    --secondary-light: #fdd663;
    --secondary-dark: #f9ab00;

    --tertiary: #34a853; /* Google Green */
    --tertiary-light: #81c995;
    --tertiary-dark: #1e8e3e;

    --border-color: #5f6368;
    --divider-color: #3c4043;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-elevated: 0 3px 6px rgba(0, 0, 0, 0.3), 0 3px 6px rgba(0, 0, 0, 0.2);
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--surface-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Firefox Scrollbar */
html {
    scrollbar-width: thin;
    scroll-behavior: smooth;
    scrollbar-color: var(--primary) var(--surface-light);
}

body {
    font-family: "Inter", sans-serif;
    background-color: var(--surface);
    color: var(--on-surface);
    line-height: 1.6;
    display: flex;
    min-height: 100%;
    width: 100vw;
    max-width: 100vw;
    min-width: 100%;
    position: relative;
    overflow-x: hidden;
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--primary);
    color: var(--surface-dark);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-elevated);
    transition: var(--transition);
}

/* Overlay for mobile menu */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99;
    display: none;
}

.overlay.active {
    display: block;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem 3rem;
    transition: var(--transition);
}

/* Section Styles */
.section {
    margin-bottom: 3rem;
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.section:hover {
    box-shadow: var(--shadow-elevated);
    transform: translateY(-2px);
}

.section__heading {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
}

.section__heading-icon {
    margin-right: 0.8rem;
}

.section__divider {
    height: 2px;
    background: linear-gradient(to right, var(--primary), transparent);
    margin-bottom: 1.5rem;
}

/* Highlight text */
.highlight {
    color: var(--primary);
    background: rgba(138, 180, 248, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    animation: textGlow 2s ease-in-out infinite;
}

/* Tech tags and badges */
.tech-tag {
    background: rgba(138, 180, 248, 0.1);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(138, 180, 248, 0.2);
    display: inline-block;
    margin-right: 0.3rem;
    margin-bottom: 0.3rem;
}

.tech-badge {
    background: rgba(138, 180, 248, 0.1);
    color: var(--primary);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(138, 180, 248, 0.3);
}

.impact {
    color: var(--primary) !important;
    font-weight: 600;
    font-size: 0.9rem !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Optimize font loading */
body {
    font-display: swap;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Reduce layout shifts */
.section {
    contain: layout style paint;
}

/* Loading Spinner */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--surface);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--surface-light);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;    
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Optional: Add some loading text */
.loading-text {
    position: absolute;
    bottom: 30%;
    color: var(--on-surface-variant);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Force all containers to stay within viewport */
.container, .main-content, .section, 
.about-container, .contact-container,
.projects-container, .skills-container,
.sidebar, .stats-grid {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  transform: translate3d(0, 0, 0);
  will-change: transform;
  backface-visibility: hidden;    
}