/* 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: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 30px;
    --font-weight-bold: 700;
    --font-weight-medium: 500;
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
    --shadow-md: 0 8px 32px 0 rgba(0, 102, 255, 0.15);
    --shadow-lg: 0 16px 48px 0 rgba(0, 102, 255, 0.25);
    --gradient-primary: linear-gradient(135deg, rgba(0, 102, 255, 0.9), rgba(0, 166, 255, 0.9));
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

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;
}

/* Modern Minimal Loader */
.loader {
    position: fixed;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #0a0a0a 0%, #000000 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease, transform 0.6s ease;
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
}

.loader::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.08) 0%, transparent 70%);
    animation: loaderPulse 3s ease-in-out infinite;
}

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

/* Modern Logo Styling */
.loader-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-text {
    font-size: 4rem;
    font-weight: 200;
    letter-spacing: 20px;
    position: relative;
    overflow: hidden;
}

.elegant-letter {
    display: inline-block;
    color: #ffffff;
    opacity: 0;
    animation: modernLetterReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    position: relative;
    filter: blur(8px);
}

.elegant-letter:nth-child(1) { animation-delay: 0.05s; }
.elegant-letter:nth-child(2) { animation-delay: 0.1s; }
.elegant-letter:nth-child(3) { animation-delay: 0.15s; }
.elegant-letter:nth-child(4) { animation-delay: 0.2s; }
.elegant-letter:nth-child(5) { animation-delay: 0.25s; }
.elegant-letter:nth-child(6) { animation-delay: 0.3s; }
.elegant-letter:nth-child(7) { animation-delay: 0.35s; } /* space */
.elegant-letter:nth-child(8) { animation-delay: 0.4s; } /* R */
.elegant-letter:nth-child(9) { animation-delay: 0.45s; } /* . */

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

.loader-subtitle.elegant-subtitle {
    font-size: 0.8rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 8px;
    text-transform: uppercase;
    opacity: 0;
    animation: modernSubtitleReveal 1s ease-out 0.5s forwards;
}

/* Modern Progress Indicator */
.loading-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 400px;
    position: relative;
}

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

.progress-fill.elegant-fill {
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(0, 102, 255, 0.8), 
        rgba(0, 166, 255, 1),
        rgba(0, 102, 255, 0.8));
    background-size: 200% 100%;
    width: 0%;
    animation: modernProgressFill 2s cubic-bezier(0.65, 0, 0.35, 1) forwards,
               progressShine 1.5s linear infinite;
    box-shadow: 0 0 20px rgba(0, 166, 255, 0.5),
                0 0 40px rgba(0, 166, 255, 0.3);
    border-radius: 2px;
}

.loading-text.elegant-loading {
    font-size: 0.65rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 6px;
    text-transform: uppercase;
    opacity: 0;
    animation: modernLoadingPulse 2s ease-in-out 0.8s infinite;
}

/* Animated Background Grid */
.subtle-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.4;
}

.subtle-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(0, 166, 255, 0.3);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 166, 255, 0.5);
    animation: modernFloat 15s ease-in-out infinite;
}

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

.subtle-particle:nth-child(2) {
    left: 85%;
    top: 30%;
    animation-delay: 2s;
    animation-duration: 14s;
}

.subtle-particle:nth-child(3) {
    left: 45%;
    top: 70%;
    animation-delay: 4s;
    animation-duration: 16s;
}

.subtle-particle:nth-child(4) {
    left: 70%;
    top: 60%;
    animation-delay: 1s;
    animation-duration: 13s;
}

/* Minimal Corner Accents - Redesigned */
.minimal-accent {
    position: absolute;
    width: 60px;
    height: 60px;
    opacity: 0;
    animation: modernAccentReveal 1.2s ease-out 0.6s forwards;
    z-index: 1;
}

.minimal-accent::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 166, 255, 0.5), transparent);
}

.minimal-accent::after {
    content: '';
    position: absolute;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 166, 255, 0.5), transparent);
}

.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;
    transform: scaleX(-1);
}

.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;
    transform: scaleY(-1);
}

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

.minimal-accent.bottom-right::before {
    bottom: 0;
    right: 0;
    transform: scaleX(-1);
}

.minimal-accent.bottom-right::after {
    bottom: 0;
    right: 0;
    transform: scaleY(-1);
}







/* Modern Loader Animations */
@keyframes modernLetterReveal {
    0% { 
        opacity: 0; 
        transform: translateY(30px) scale(0.8);
        filter: blur(8px);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes modernSubtitleReveal {
    0% { 
        opacity: 0;
        transform: translateY(20px);
        letter-spacing: 12px;
    }
    100% { 
        opacity: 1;
        transform: translateY(0);
        letter-spacing: 8px;
    }
}

@keyframes modernProgressFill {
    0% { 
        width: 0%;
    }
    100% { 
        width: 100%;
    }
}

@keyframes progressShine {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

@keyframes modernLoadingPulse {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(1);
    }
    50% { 
        opacity: 0.6;
        transform: scale(1.02);
    }
}

@keyframes loaderPulse {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes modernFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }
    33% {
        transform: translate(20px, -30px) scale(1.2);
        opacity: 0.8;
    }
    66% {
        transform: translate(-15px, 25px) scale(0.9);
        opacity: 0.5;
    }
}

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

@keyframes pulseRing {
    0% { 
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        opacity: 0.3;
    }
    100% { 
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Mobile Optimization for Modern Loader */
@media (max-width: 768px) {
    .loader::before {
        width: 400px;
        height: 400px;
    }

    .loader-text {
        font-size: 2.8rem;
        letter-spacing: 12px;
    }
    
    .loader-subtitle.elegant-subtitle {
        font-size: 0.7rem;
        letter-spacing: 5px;
    }
    
    .loading-progress {
        width: 300px;
    }
    
    .minimal-accent {
        width: 40px;
        height: 40px;
    }
    
    .minimal-accent.top-left,
    .minimal-accent.top-right {
        top: 24px;
    }
    
    .minimal-accent.top-left,
    .minimal-accent.bottom-left {
        left: 24px;
    }
    
    .minimal-accent.top-right,
    .minimal-accent.bottom-right {
        right: 24px;
    }
    
    .minimal-accent.bottom-left,
    .minimal-accent.bottom-right {
        bottom: 24px;
    }

    .loader-container {
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .loader::before {
        width: 300px;
        height: 300px;
    }

    .loader-text {
        font-size: 2.2rem;
        letter-spacing: 8px;
    }
    
    .loader-subtitle.elegant-subtitle {
        font-size: 0.65rem;
        letter-spacing: 4px;
    }
    
    .loading-progress {
        width: 260px;
    }
    
    .minimal-accent {
        width: 35px;
        height: 35px;
    }

    .loader-container {
        gap: 36px;
    }
}

@media (max-width: 360px) {
    .loader::before {
        width: 250px;
        height: 250px;
    }

    .loader-text {
        font-size: 1.9rem;
        letter-spacing: 6px;
    }
    
    .loader-subtitle.elegant-subtitle {
        font-size: 0.6rem;
        letter-spacing: 3px;
    }
    
    .loading-progress {
        width: 220px;
    }

    .minimal-accent {
        width: 30px;
        height: 30px;
    }
}

/* 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(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(10, 10, 10, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    min-height: 60px;
    padding: 0 32px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.logo {
    font-size: 1.4rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    letter-spacing: 3px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.logo:hover {
    transform: translateX(2px);
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 0 20px rgba(0, 166, 255, 0.4);
}

.nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
    background: transparent;
}

.nav-item {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-weight: 400;
    font-size: 0.9rem;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid transparent;
    letter-spacing: 0.3px;
}

/* 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: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 102, 255, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset,
                0 0 60px rgba(0, 102, 255, 0.2);
    margin-bottom: var(--spacing-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: grayscale(0.2);
    position: relative;
}

.profile-picture:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 48px rgba(0, 102, 255, 0.6),
                0 0 0 2px rgba(0, 166, 255, 0.4) inset,
                0 0 80px rgba(0, 102, 255, 0.4);
    filter: grayscale(0);
    border-color: rgba(0, 166, 255, 0.5);
}

/* Update title typography */
.title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.6rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    margin-bottom: 0.8rem;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0, 102, 255, 0.4),
                 0 4px 40px rgba(0, 102, 255, 0.2),
                 0 0 60px rgba(0, 166, 255, 0.1);
}

.subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 12px rgba(0, 102, 255, 0.3);
}

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

.section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 0 2px 16px rgba(0, 102, 255, 0.5);
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, 
        var(--primary-color), 
        var(--secondary-color),
        transparent);
    box-shadow: 0 0 10px rgba(0, 102, 255, 0.6);
}

.text-content {
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.text-content p {
    margin-bottom: 1.2rem;
    text-align: justify;
}

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

.section-content {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.65);
    padding: var(--spacing-lg);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transform-style: preserve-3d;
    perspective: 1000px;
    position: relative;
    overflow: hidden;
}

.section-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.5), 
        transparent);
    opacity: 0.8;
}

.section-content:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px 0 rgba(0, 102, 255, 0.3);
    background: rgba(0, 0, 0, 0.75);
    border-color: rgba(0, 102, 255, 0.4);
}

/* Education Items */
.education-item {
    background: rgba(0, 0, 0, 0.4);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

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

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

.education-item:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translateX(8px);
    border-color: rgba(0, 102, 255, 0.3);
    box-shadow: -4px 0 16px rgba(0, 102, 255, 0.2);
}

.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.65);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--glass-shadow);
}

.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, rgba(0, 119, 181, 0.9), rgba(0, 88, 133, 0.9));
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(0, 119, 181, 0.35),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
    min-width: 220px;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

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

.linkedin-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 119, 181, 0.5),
                0 0 0 2px rgba(0, 166, 255, 0.3) inset;
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.95), rgba(0, 102, 153, 0.95));
    border-color: rgba(0, 166, 255, 0.5);
}

.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: 24px;
    background: rgba(0, 0, 0, 0.4);
    border-left: 4px solid var(--primary-color);
    border-radius: 12px;
    font-style: italic;
    color: var(--text-muted);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 4px solid var(--primary-color);
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.1);
}

.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, 
        rgba(0, 102, 255, 0.6), 
        transparent);
    opacity: 0.8;
}

@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(10, 10, 10, 0.85);
    padding: var(--spacing-md) var(--spacing-md);
    text-align: center;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.2);
}

.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);
}

.media-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 102, 255, 0.05) 50%,
        rgba(0, 0, 0, 0.3) 100%
    );
    pointer-events: none;
    z-index: 1;
}

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

.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;
    }

}

/* 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(10, 10, 10, 0.92);
        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(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
    }

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

    .nav-item {
        font-size: 1.1rem;
        padding: 14px 28px;
        width: 80%;
        text-align: center;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 12px;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .nav-item:active {
        background: rgba(255, 255, 255, 0.15);
        transform: scale(0.98);
    }

    .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;
    }
}

/* 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 */
    }
}

/* Desktop navbar items */
@media (min-width: 769px) {
    .navbar {
        padding: 0 48px;
        background: rgba(10, 10, 10, 0.65);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
        min-height: 64px;
    }

    .menu-icon {
        display: none !important;
    }

    .logo {
        font-size: 1.5rem;
        letter-spacing: 4px;
        font-weight: 500;
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        gap: 8px;
        background: rgba(255, 255, 255, 0.02);
        padding: 6px;
        border-radius: 12px;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-item {
        position: relative;
        padding: 10px 22px;
        margin: 0;
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
        border-radius: 8px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        background: transparent;
        backdrop-filter: none;
        border: 1px solid transparent;
        overflow: hidden;
        font-weight: 400;
        font-size: 0.9rem;
        box-shadow: none;
        letter-spacing: 0.5px;
    }

    .nav-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.08);
        opacity: 0;
        transition: opacity 0.3s ease;
        border-radius: 8px;
        z-index: -1;
    }

    .nav-item:hover::before {
        opacity: 1;
    }

    .nav-item:hover {
        color: rgba(255, 255, 255, 1);
        transform: translateY(-1px);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .nav-item::after {
        content: '';
        position: absolute;
        bottom: 2px;
        left: 50%;
        width: 0;
        height: 1px;
        background: linear-gradient(90deg, 
            transparent,
            rgba(0, 166, 255, 0.8),
            transparent);
        transform: translateX(-50%);
        transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-item:hover::after {
        width: 70%;
    }

    .nav-item:active {
        transform: translateY(0);
    }
}

/* ...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-md);  /* Changed from spacing-xs for better logo positioning */
        padding-right: var(--spacing-xs);
    }

    .logo {
        font-size: 1.4rem;
        letter-spacing: 2px;
        margin-left: 8px;  /* Add left margin to prevent logo from touching screen edge */
    }
}


