/* Base Styles */
:root {
    --primary-color: #0066ff;
    --secondary-color: #00a6ff;
    --accent-color: #0033cc;
    --background-dark: #0a0a0a;
    --text-light: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 32px;
    --spacing-xl: 64px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --font-weight-bold: 700;
    --font-weight-medium: 500;
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
    --gradient-primary: linear-gradient(135deg, #2c3e50, #3498db);
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    color: var(--text-light);
    background: transparent;
    overflow-x: hidden;
    scroll-behavior: smooth;
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Elegant OLED Loader */
.loader {
    position: fixed;
    width: 100%;
    height: 100%;
    background: #000000; /* Pure black for OLED - pixels completely off */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, transform 0.8s ease;
    font-family: 'Poppins', sans-serif;
}

.loader-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    text-align: center;
}

/* Elegant Logo Styling */
.loader-content {
    position: relative;
}

.loader-text {
    font-size: 4rem;
    font-weight: 300;
    letter-spacing: 8px;
    margin-bottom: 16px;
}

.elegant-letter {
    display: inline-block;
    color: #ffffff;
    opacity: 0;
    animation: elegantGlowFadeIn 2.5s ease-out forwards;
    position: relative;
    text-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.6),
        0 0 30px rgba(255, 255, 255, 0.4),
        0 0 40px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.elegant-letter:nth-child(1) { animation-delay: 0.1s; }
.elegant-letter:nth-child(2) { animation-delay: 0.2s; }
.elegant-letter:nth-child(3) { animation-delay: 0.3s; }
.elegant-letter:nth-child(4) { animation-delay: 0.4s; }
.elegant-letter:nth-child(5) { animation-delay: 0.5s; }
.elegant-letter:nth-child(6) { animation-delay: 0.6s; }
.elegant-letter:nth-child(7) { animation-delay: 0.7s; } /* space */
.elegant-letter:nth-child(8) { animation-delay: 0.8s; } /* R */
.elegant-letter:nth-child(9) { animation-delay: 0.9s; } /* . */

.elegant-letter.space {
    width: 0.3em;
}

.elegant-letter:hover {
    text-shadow: 
        0 0 15px rgba(255, 255, 255, 1),
        0 0 30px rgba(255, 255, 255, 0.8),
        0 0 45px rgba(255, 255, 255, 0.6),
        0 0 60px rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.loader-text::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.8), 
        rgba(255, 255, 255, 0.6),
        rgba(255, 255, 255, 0.4),
        transparent);
    transform: translateX(-50%);
    animation: elegantUnderlineGlow 2s ease-out 2s forwards;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.loader-subtitle.elegant-subtitle {
    font-size: 0.95rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0;
    animation: elegantSubtitleGlow 2s ease-out 1.5s forwards;
    text-shadow: 
        0 0 5px rgba(255, 255, 255, 0.3),
        0 0 10px rgba(255, 255, 255, 0.2),
        0 0 15px rgba(255, 255, 255, 0.1);
}

/* Elegant Progress Bar */
.loading-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 320px;
}

.progress-bar.elegant-progress {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0;
    overflow: hidden;
    position: relative;
}

.progress-fill.elegant-fill {
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.8), 
        rgba(255, 255, 255, 0.4),
        transparent);
    width: 0%;
    animation: elegantProgressFill 3s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.loading-text.elegant-loading {
    font-size: 0.8rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0;
    animation: elegantLoadingGlow 3s ease-in-out 2s infinite;
    text-shadow: 
        0 0 3px rgba(255, 255, 255, 0.2),
        0 0 6px rgba(255, 255, 255, 0.1);
}

/* Subtle Floating Elements */
.subtle-particles {
    position: absolute;
    top: -100px;
    left: -100px;
    width: calc(100% + 200px);
    height: calc(100% + 200px);
    pointer-events: none;
}

.subtle-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: subtleFloat 12s linear infinite;
}

.subtle-particle:nth-child(1) {
    left: 20%;
    animation-delay: 0s;
    animation-duration: 15s;
}

.subtle-particle:nth-child(2) {
    left: 50%;
    animation-delay: 3s;
    animation-duration: 18s;
}

.subtle-particle:nth-child(3) {
    left: 70%;
    animation-delay: 6s;
    animation-duration: 12s;
}

.subtle-particle:nth-child(4) {
    left: 30%;
    animation-delay: 9s;
    animation-duration: 20s;
}

/* Minimal Corner Accents */
.minimal-accent {
    position: absolute;
    width: 24px;
    height: 24px;
    opacity: 0;
    animation: accentFadeIn 2s ease-out 2s forwards;
}

.minimal-accent::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.minimal-accent::after {
    content: '';
    position: absolute;
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
}

.minimal-accent.top-left {
    top: 40px;
    left: 40px;
}

.minimal-accent.top-left::before {
    top: 0;
    left: 0;
}

.minimal-accent.top-left::after {
    top: 0;
    left: 0;
}

.minimal-accent.top-right {
    top: 40px;
    right: 40px;
}

.minimal-accent.top-right::before {
    top: 0;
    right: 0;
}

.minimal-accent.top-right::after {
    top: 0;
    right: 0;
}

.minimal-accent.bottom-left {
    bottom: 40px;
    left: 40px;
}

.minimal-accent.bottom-left::before {
    bottom: 0;
    left: 0;
}

.minimal-accent.bottom-left::after {
    bottom: 0;
    left: 0;
}

.minimal-accent.bottom-right {
    bottom: 40px;
    right: 40px;
}

.minimal-accent.bottom-right::before {
    bottom: 0;
    right: 0;
}

.minimal-accent.bottom-right::after {
    bottom: 0;
    right: 0;
}







/* Elegant Keyframe Animations */
@keyframes elegantGlowFadeIn {
    0% { 
        opacity: 0; 
        transform: translateY(30px); 
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    }
    50% {
        text-shadow: 
            0 0 15px rgba(255, 255, 255, 1),
            0 0 25px rgba(255, 255, 255, 0.8),
            0 0 35px rgba(255, 255, 255, 0.6);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0);
        text-shadow: 
            0 0 10px rgba(255, 255, 255, 0.8),
            0 0 20px rgba(255, 255, 255, 0.6),
            0 0 30px rgba(255, 255, 255, 0.4),
            0 0 40px rgba(255, 255, 255, 0.2);
    }
}

@keyframes elegantUnderlineGlow {
    0% { 
        width: 0; 
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    }
    100% { 
        width: 200px;
        box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
    }
}

@keyframes elegantSubtitleGlow {
    0% { 
        opacity: 0; 
        transform: translateY(15px);
        text-shadow: 0 0 3px rgba(255, 255, 255, 0.1);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0);
        text-shadow: 
            0 0 5px rgba(255, 255, 255, 0.3),
            0 0 10px rgba(255, 255, 255, 0.2),
            0 0 15px rgba(255, 255, 255, 0.1);
    }
}

@keyframes elegantProgressFill {
    0% { 
        width: 0%; 
        transform: translateX(-100%); 
    }
    50% { 
        width: 100%; 
        transform: translateX(0%); 
    }
    100% { 
        width: 100%; 
        transform: translateX(100%); 
    }
}

@keyframes elegantLoadingGlow {
    0%, 100% { 
        opacity: 0.4;
        text-shadow: 
            0 0 3px rgba(255, 255, 255, 0.2),
            0 0 6px rgba(255, 255, 255, 0.1);
    }
    50% { 
        opacity: 0.8;
        text-shadow: 
            0 0 6px rgba(255, 255, 255, 0.4),
            0 0 12px rgba(255, 255, 255, 0.3),
            0 0 18px rgba(255, 255, 255, 0.2);
    }
}

@keyframes subtleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% {
        transform: translateY(-100px) translateX(20px);
        opacity: 0;
    }
}

@keyframes accentFadeIn {
    0% { 
        opacity: 0; 
        transform: scale(0.5); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1); 
    }
}

/* Mobile Optimization for Elegant Loader */
@media (max-width: 768px) {
    .loader-text {
        font-size: 2.8rem;
        letter-spacing: 4px;
    }
    
    .loader-subtitle.elegant-subtitle {
        font-size: 0.85rem;
        letter-spacing: 2px;
    }
    
    .loading-progress {
        width: 280px;
    }
    
    .minimal-accent {
        width: 20px;
        height: 20px;
    }
    
    .minimal-accent.top-left,
    .minimal-accent.top-right {
        top: 30px;
    }
    
    .minimal-accent.top-left,
    .minimal-accent.bottom-left {
        left: 30px;
    }
    
    .minimal-accent.top-right,
    .minimal-accent.bottom-right {
        right: 30px;
    }
    
    .minimal-accent.bottom-left,
    .minimal-accent.bottom-right {
        bottom: 30px;
    }
    
    .loader-text::after {
        width: 150px;
    }
}

@media (max-width: 480px) {
    .loader-text {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }
    
    .loader-subtitle.elegant-subtitle {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }
    
    .loading-progress {
        width: 240px;
    }
    
    .minimal-accent {
        width: 16px;
        height: 16px;
    }
    
    .loader-text::after {
        width: 120px;
    }
}

@media (max-width: 360px) {
    .loader-text {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }
    
    .loader-subtitle.elegant-subtitle {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }
    
    .loader-text::after {
        width: 100px;
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(10, 10, 10, 0.8);
    min-height: 60px; /* Ensure minimum navbar height */
    padding: var(--spacing-sm) var(--spacing-md);
    transition: all var(--transition-normal);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    text-decoration: none;
    transition: transform var(--transition-fast);
    margin-left: 12px;  /* Add space from left edge on mobile */
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.nav-item {
    color: var(--text-light);
    text-decoration: none;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.nav-item::after, .nav-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    transition: transform var(--transition-normal);
}

.nav-item::after {
    transform: translateX(-100%);
}

.nav-item:hover::after {
    transform: translateX(0);
}

.nav-item::before {
    transform: scaleX(0);
    transform-origin: right;
}

.nav-item:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-item:hover::before {
    transform: scaleX(1);
}

/* Hero Section */
.hero-section {
    min-height: auto;
    padding: 0;
    margin: 0;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    padding: 20px;
}

.profile-picture {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 30px rgba(0, 102, 255, 0.3);
    margin-bottom: var(--spacing-md);
    transition: all var(--transition-normal);
    filter: grayscale(0.3);
}

.profile-picture:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 0 50px rgba(0, 102, 255, 0.5);
    filter: grayscale(0);
}

/* Update title typography */
.title {
    font-family: 'Poppins', sans-serif;  /* Changed from 'Playfair Display' to 'Poppins' */
    font-size: 2.6rem;
    font-weight: 400;  /* Changed from 600 to 400 for a thinner look */
    letter-spacing: 0.02em;  /* Slightly increased letter spacing for elegance */
    margin-bottom: 0.8rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 400;
    color: #fff;
    margin-bottom: var(--spacing-md);
}

/* Sections */
.section {
    padding: var(--spacing-md) 0;  /* Reduced from spacing-xl to spacing-md */
    position: relative;
    opacity: 1;
    transform: none;
    margin-bottom: var(--spacing-md);  /* Reduced from spacing-xl to spacing-md */
}

.section.in-view {
    animation: fadeInUp 0.8s ease-out forwards;
}

.section-content {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.75);
    padding: var(--spacing-lg);
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-normal);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.section-content:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Education Items */
.education-item {
    background: rgba(255, 255, 255, 0.05);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-md);
    transition: all var(--transition-normal);
}

.education-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

.degree {
    font-size: 1.2rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
}

.institution {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Contact Section */
.contact-section {
    background: none;
}

.contact-content {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
}

.contact-button {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--gradient-primary);
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--border-radius-xl);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.contact-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.linkedin-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #0077b5, #005885);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 119, 181, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 220px;
    justify-content: center;
}

.linkedin-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.linkedin-button:hover::before {
    left: 100%;
}

.linkedin-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 119, 181, 0.4);
    background: linear-gradient(135deg, #0088cc, #006699);
}

.linkedin-button svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.linkedin-button:hover svg {
    transform: scale(1.1);
}

/* Mobile optimizations for LinkedIn button */
@media (max-width: 768px) {
    .linkedin-button {
        padding: 14px 24px;
        font-size: 15px;
        min-width: 200px;
        gap: 10px;
    }
    
    .linkedin-button svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .linkedin-button {
        padding: 12px 20px;
        font-size: 14px;
        min-width: 180px;
        gap: 8px;
        border-radius: 40px;
    }
    
    .linkedin-button svg {
        width: 16px;
        height: 16px;
    }
    
    .contact-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* Philosophy quote styling */
.philosophy-quote {
    margin-top: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    font-style: italic;
    color: var(--text-muted);
    backdrop-filter: blur(10px);
    position: relative;
}

.philosophy-quote em {
    color: var(--text-light);
    font-size: 1.1em;
    font-weight: 500;
}

.philosophy-quote::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.5;
}

@media (max-width: 768px) {
    .philosophy-quote {
        margin-top: 20px;
        padding: 16px;
        font-size: 0.95em;
    }
}

.contact-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    justify-content: center;
}

.contact-button {
    min-width: 200px;
    text-align: center;
}

.email-button {
    background: var(--accent-color);
}

.email-button:hover {
    background: var(--primary-color);
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.9);
    padding: var(--spacing-md) var(--spacing-md);
    text-align: center;
    backdrop-filter: blur(10px);
}

.social-links {
    margin-bottom: var(--spacing-md);
    display: none;
}

.social-link {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 var(--spacing-sm);
    transition: color var(--transition-normal);
}

.social-link:hover {
    color: var(--primary-color);
}

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

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

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

/* Layout Structure */
.main-content {
    width: 100%;
    min-height: 100vh;
}

@media (min-width: 769px) {
    .main-content {
        display: block;
    }

    .sections-container {
        margin-left: 0;
        width: 100%;
    }

    .section {
        min-height: auto;  /* Changed from 100vh to auto */
        padding: var(--spacing-md) var(--spacing-md);  /* Reduced from spacing-xl */
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: var(--spacing-lg);  /* Added consistent bottom margin */
    }

    .section-content {
        max-width: 800px;
        width: 100%;
        margin: 0 auto;
    }

    .initial-view {
        padding-top: 120px;  /* Increased to prevent overlap at all zoom levels */
        gap: var(--spacing-sm);  /* Reduced gap between elements */
    }

    .hero-section {
        min-height: 50vh;  /* Reduced from 70vh for more compact layout */
        margin-bottom: var(--spacing-xs);  /* Reduced spacing after hero */
    }

    #about {
        margin-top: 0;
        padding-top: 0;  /* Removed padding to bring closer to title */
    }

    .section:not(.initial-view .section) {
        margin-top: var(--spacing-sm);  /* Further reduced top margin */
        margin-bottom: var(--spacing-md);  /* Consistent bottom margin */
    }
}

/* Media Background */
.media-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    background: var(--background-dark);
}

.video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 1; /* Full opacity */
}

.overlay {
    display: none;
}

@media (max-width: 768px) and (orientation: portrait) {
    #video-desktop {
        display: none;
    }
    
    #video-mobile {
        display: block;
    }
}

/* Desktop Styles */
@media (min-width: 769px) {
    .hero-section {
        min-height: 50vh;  /* Reduced from 60vh for more compact layout */
        margin-bottom: var(--spacing-xs);  /* Reduced spacing after hero */
    }

    .initial-view {
        padding-top: 120px;  /* Increased to prevent overlap at all zoom levels */
        gap: var(--spacing-sm);  /* Reduced gap between elements */
    }

    #about {
        margin-top: 0;
        padding-top: 0;  /* Removed padding to bring closer to title */
    }

    .hero-content {
        margin-bottom: 0;  /* Remove bottom margin to reduce space */
    }

    .subtitle {
        margin-bottom: var(--spacing-sm);  /* Reduced space after position title */
    }

    .initial-view {
        padding-top: 100px;
    }

    .hero-section {
        margin-bottom: 2rem;
    }

    .section:not(#about) {
        padding-top: var(--spacing-xl);
    }

    .sections-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 var(--spacing-lg);
    }

    .hero-section {
        min-height: 70vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-content {
        margin-bottom: 0;
    }

    .main-content {
        display: block; /* Remove grid layout */
    }

    .title {
        font-size: 3rem;
    }

    #particles-js {
        opacity: 0.5;
    }

    #background-video-mobile {
        display: none;
    }

    .video-background {
        width: 100vw;
        height: 100vh;
    }

    .sections-container {
        padding: 0 var(--spacing-lg);
    }

    #about {
        margin-top: 0;
        padding-top: 0;
    }

    .section:not(.initial-view .section) {
        margin-top: var(--spacing-md);  /* Reduced from spacing-xl */
        margin-bottom: var(--spacing-md);  /* Reduced from spacing-xl */
    }

    .initial-view {
        padding-top: 120px;  /* Increased to prevent overlap at all zoom levels */
        gap: var(--spacing-xs);  /* Reduced gap between elements */
    }

    .hero-section {
        min-height: 45vh;  /* Reduced from 50vh for more compact layout */
        margin-bottom: var(--spacing-xs);  /* Reduced spacing after hero */
    }

    #about {
        margin-top: -20px;  /* Added negative margin to pull section up */
        padding-top: 0;
    }

    .nav-item {
        position: relative;
        padding: 8px 16px;
        margin: 0 4px;
        color: var(--text-light);
        text-decoration: none;
        border-radius: 8px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background: rgba(255, 255, 255, 0.05);
        overflow: hidden;
    }

    .nav-item:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
    }

    .nav-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(
            120deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent
        );
        transition: 0.5s;
    }

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

    .nav-item::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(
            90deg,
            var(--primary-color),
            var(--secondary-color)
        );
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-item:hover::after {
        transform: scaleX(1);
        transform-origin: left;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .navbar {
        padding: var(--spacing-xs) var(--spacing-md);  /* Adjusted padding */
        transform: translateY(0);
        transition: transform 0.3s ease;
    }

    .navbar.hidden {
        transform: translateY(-100%);
    }

    .menu-icon {
        display: block;
        width: 30px;
        height: 20px;
        position: relative;
        cursor: pointer;
        z-index: 100;
        margin-right: 24px;  /* Reduced from 32px for better positioning */
    }

    .menu-icon span {
        display: block;
        width: 100%;
        height: 2px;
        background: var(--text-light);
        position: absolute;
        transition: all var(--transition-normal);
    }

    .menu-icon span:first-child { top: 0; }
    .menu-icon span:nth-child(2) { top: 9px; }
    .menu-icon span:last-child { top: 18px; }

    .menu-icon.active span:first-child {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .menu-icon.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-icon.active span:last-child {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.9);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--spacing-lg);
        padding: var(--spacing-xl);
        transition: right var(--transition-normal);
        backdrop-filter: blur(10px);
    }

    .nav-links.active {
        right: 0;
    }

    .title {
        font-size: 2.2rem;
    }

    .text-content {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .degree {
        font-size: 1.1rem;  /* Slightly smaller degree text */
    }

    .institution {
        font-size: 0.9rem;  /* Slightly smaller institution text */
    }

    .section {
        padding: var(--spacing-sm) var(--spacing-sm);  /* Reduced padding */
        margin-bottom: var(--spacing-md);  /* Reduced from spacing-lg */
    }

    .section-content {
        width: 92%;  /* Wider content boxes */
        padding: var(--spacing-md);
        margin: var(--spacing-sm) auto;
        font-size: 0.95rem;  /* Slightly smaller text */
    }

    .hero-content {
        padding: 0 var(--spacing-sm);
    }

    .profile-picture {
        width: 150px;
        height: 150px;
    }

    .contact-button {
        width: 100%;
        text-align: center;
    }

    .contact-section {
        min-height: 50vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .contact-content {
        width: 90%;
        margin: 0 auto;
    }

    .video-background {
        object-fit: cover;
        width: 100%;
        height: 100%;
    }

    #background-video-desktop {
        display: none;
    }

    .menu-icon {
        display: block;
        width: 30px;
        height: 20px;
        position: relative;
        cursor: pointer;
        z-index: 100;
        margin-right: 24px;  /* Adjusted from 12px to move hamburger more to the right */
    }
}

/* Dark Mode Enhancement */
@media (prefers-color-scheme: dark) {
    :root {
        --background-dark: rgba(0, 0, 0, 0.95);
    }
}

/* Print Styles */
@media print {
    .navbar, .contact-button, .footer {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    .section-content {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #ffffff;
        --text-muted: #ffffff;
    }
}

/* Particle Background */
.particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    display: none;
}

/* Add overlay for better text readability */
.content-overlay {
    display: none;
}

/* Update section layout */
.sections-container {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Update about section positioning */
#about {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
}

/* Update hero and about section layout */
.initial-view {
    min-height: 100vh;
    padding: 120px 20px 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 2rem;
}

/* Update typography */
.title {
    font-family: 'Poppins', sans-serif;  /* Changed from 'Playfair Display' to 'Poppins' */
    font-size: 2.6rem;
    font-weight: 400;  /* Changed from 600 to 400 for a thinner look */
    letter-spacing: 0.02em;  /* Slightly increased letter spacing for elegance */
    margin-bottom: 0.8rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 400;
    color: #fff;
    margin-bottom: var(--spacing-md);
}

/* Adjust desktop layout */
@media (min-width: 769px) {
    .initial-view {
        padding-top: 100px;
    }

    .hero-section {
        margin-bottom: 2rem;
    }

    .section:not(#about) {
        padding-top: var(--spacing-xl);
    }

    .sections-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 var(--spacing-lg);
    }

    .hero-section {
        min-height: 70vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-content {
        margin-bottom: 0;
    }

    .main-content {
        display: block; /* Remove grid layout */
    }

    .title {
        font-size: 3rem;
    }

    #particles-js {
        opacity: 0.5;
    }

    #background-video-mobile {
        display: none;
    }

    .video-background {
        width: 100vw;
        height: 100vh;
    }

    .sections-container {
        padding: 0 var(--spacing-lg);
    }

    #about {
        margin-top: 0;
        padding-top: 0;
    }

    .section:not(.initial-view .section) {
        margin-top: var(--spacing-md);  /* Reduced from spacing-xl */
        margin-bottom: var(--spacing-md);  /* Reduced from spacing-xl */
    }

    .initial-view {
        padding-top: 120px;  /* Increased to prevent overlap at all zoom levels */
        gap: var(--spacing-xs);  /* Reduced gap between elements */
    }

    .hero-section {
        min-height: 45vh;  /* Reduced from 50vh for more compact layout */
        margin-bottom: var(--spacing-xs);  /* Reduced spacing after hero */
    }

    #about {
        margin-top: -20px;  /* Added negative margin to pull section up */
        padding-top: 0;
    }
}

/* Dynamic scaling fixes for zoom levels */
/* Fix for 110% zoom and similar intermediate levels */
@media (min-height: 650px) and (max-height: 900px) {
    .initial-view {
        padding-top: max(100px, 15vh) !important;
    }
    
    .hero-section {
        min-height: max(45vh, 400px) !important;
    }
    
    .profile-picture {
        width: min(170px, 13vw);
        height: min(170px, 13vw);
    }
}

/* Additional safety for edge cases around 110% zoom */
@media (min-height: 700px) and (max-height: 750px) {
    .initial-view {
        padding-top: max(110px, 16vh) !important;
    }
}

@media (min-height: 600px) and (max-height: 800px) {
    .initial-view {
        padding-top: max(100px, 14vh) !important;
    }
    
    .hero-section {
        min-height: max(40vh, 350px) !important;
    }
    
    .profile-picture {
        width: min(160px, 12vw);
        height: min(160px, 12vw);
    }
}

@media (min-height: 400px) and (max-height: 599px) {
    .initial-view {
        padding-top: max(100px, 15vh) !important;
    }
    
    .hero-section {
        min-height: max(35vh, 300px) !important;
    }
    
    .profile-picture {
        width: min(140px, 10vw);
        height: min(140px, 10vw);
    }
    
    .title {
        font-size: clamp(1.8rem, 4vw, 2.5rem);
    }
    
    .subtitle {
        font-size: clamp(1rem, 2.5vw, 1.2rem);
    }
}

/* High zoom level fixes (simulates 150%+ scaling) */
@media (max-height: 500px) {
    .initial-view {
        padding-top: max(120px, 20vh) !important;
    }
    
    .hero-section {
        min-height: max(30vh, 250px) !important;
        padding: 20px 0 !important;
    }
    
    .profile-picture {
        width: min(120px, 8vw);
        height: min(120px, 8vw);
        margin-bottom: 10px;
    }
    
    .title {
        font-size: clamp(1.5rem, 3.5vw, 2rem);
        margin: 10px 0;
    }
    
    .subtitle {
        font-size: clamp(0.9rem, 2vw, 1rem);
        margin-bottom: 15px;
    }
}

/* Ultra high zoom / very small screens */
@media (max-height: 400px) {
    .initial-view {
        padding-top: max(140px, 25vh) !important;
    }
    
    .hero-content {
        padding: 10px 0;
    }
    
    .profile-picture {
        width: min(100px, 6vw);
        height: min(100px, 6vw);
        margin-bottom: 8px;
    }
    
    .title {
        font-size: clamp(1.2rem, 3vw, 1.8rem);
        margin: 8px 0;
    }
    
    .subtitle {
        font-size: clamp(0.8rem, 1.8vw, 0.95rem);
        margin-bottom: 10px;
    }
    
    .hero-section {
        min-height: 200px !important;
        padding: 15px 0 !important;
    }
}

/* Update mobile styles */
@media (max-width: 768px) {
    .initial-view {
        padding-top: 80px !important; /* Reduced for mobile - less space needed */
    }

    .title {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }
}

/* Extra mobile optimization */
@media (max-width: 480px) {
    .initial-view {
        padding-top: 70px !important; /* Even less padding for small phones */
    }
    
    .profile-picture {
        width: 140px;
        height: 140px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
}

/* Contact Info */
.contact-info {
    text-align: center;
    margin: var(--spacing-md) 0;
}

.contact-detail {
    color: var(--primary-color);
    font-size: 1.2rem;
    text-decoration: none;
    transition: color var(--transition-normal);
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-md);
}

/* Update contact detail styling */
.contact-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--gradient-primary);
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--border-radius-xl);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.contact-detail:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--text-light);
    text-decoration: none;
}

.contact-detail:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Update mobile styles */
@media (max-width: 768px) {
    .contact-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .contact-detail, .contact-button {
        width: 100%;
        min-width: unset;
        margin: 0;
        text-align: center;
        background: var(--gradient-primary);
    }

    .contact-detail:before {
        content: '📧'; /* Email icon */
        margin-right: 8px;
    }

    .contact-button:before {
        content: '💼'; /* LinkedIn icon */
        margin-right: 8px;
    }
}

/* Add this new mobile-specific styling */
@media (max-width: 768px) {
    .contact-detail {
        font-size: 0.85rem;  /* Even smaller font size on mobile */
        word-break: normal;  /* Remove break-all to keep email in one line */
        padding: var(--spacing-xs) var(--spacing-xs);
        max-width: 100%;
        color: var(--text-light);
        border-radius: var(--border-radius-xl);
        text-decoration: none;
        box-shadow: var(--shadow-md);
        margin: var(--spacing-sm) 0;
        transition: all var(--transition-normal);
    }

    .contact-detail:hover {
        background: var(--secondary-color);
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

    .contact-info {
        padding: var(--spacing-sm);
    }
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
    .mobile-only {
        display: inline;
    }
}

/* Contact Section Styles */
.contact-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    justify-content: center;
}

.contact-detail {
    color: var(--primary-color);
    font-size: 1.2rem;
    text-decoration: none;
    transition: color var(--transition-normal);
    display: inline-block;
}

.contact-button {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--gradient-primary);
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--border-radius-xl);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    min-width: 200px;
    text-align: center;
}

/* Mobile-specific contact button styles */
@media (max-width: 768px) {
    .contact-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);  /* Reduced from spacing-md */
        width: 90%;  /* Reduced from 100% */
        margin: 0 auto;
        padding: 0;
    }

    .contact-detail,
    .contact-button {
        width: 100%;
        padding: var(--spacing-sm) var(--spacing-md);  /* Reduced padding */
        margin: 0;
        text-align: center;
        background: var(--gradient-primary);
        color: var(--text-light);
        font-size: 0.95rem;  /* Slightly reduced font size */
        border-radius: var(--border-radius-lg);  /* Slightly reduced border radius */
        box-shadow: var(--shadow-md);
        transform: translateY(0);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }

    .contact-detail::before,
    .contact-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent
        );
        transition: 0.5s;
    }

    .contact-detail:hover::before,
    .contact-button:hover::before {
        left: 100%;
    }

    .contact-detail:hover,
    .contact-button:hover {
        transform: translateY(-3px);
        box-shadow: 0 7px 14px rgba(0, 0, 0, 0.3);
        background: linear-gradient(135deg, #3498db, #2c3e50);
    }

    .contact-detail:active,
    .contact-button:active {
        transform: translateY(1px);
    }
}

/* Desktop-specific contact button styles */
@media (min-width: 769px) {
    .contact-detail {
        color: var(--primary-color);
        background: none;
        box-shadow: none;
        padding: 0;
    }

    .contact-detail:hover {
        color: var(--secondary-color);
        transform: none;
        box-shadow: none;
    }
}

/* ...existing code... */

/* Update logo positioning for mobile */
.logo {
    
    margin-left: 8px;  /* Reduced from 12px to move SR more to the left */
}

/* Update menu icon positioning for mobile */
@media (max-width: 768px) {
    .menu-icon {
       
        margin-right: 32px;  /* Increased from 24px to move hamburger more to the right */
    }
}

/* Enhanced desktop navbar items */
@media (min-width: 769px) {
    .nav-item {
        position: relative;
        padding: 8px 16px;
        margin: 0 4px;
        color: var(--text-light);
        text-decoration: none;
        border-radius: 8px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background: rgba(255, 255, 255, 0.05);
        overflow: hidden;
    }

    .nav-item:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
    }

    .nav-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(
            120deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent
        );
        transition: 0.5s;
    }

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

    .nav-item::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(
            90deg,
            var(--primary-color),
            var(--secondary-color)
        );
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-item:hover::after {
        transform: scaleX(1);
        transform-origin: left;
    }
}

/* ...existing code... */

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .menu-icon {
        /* ...existing code... */
        margin-right: 16px;  /* Increased from 32px to move hamburger even more to the right */
    }

    .navbar {
        padding-left: var(--spacing-xs);
        padding-right: var(--spacing-xs);
    }
}


