/* ===========================================
   MODERN RESPONSIVE CSS - CLEAN VERSION
   =========================================== */

/* CSS Variables */
: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);
}

/* Base Reset and Typography */
*, *::before, *::after {
    box-sizing: border-box;
}

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;
}

/* ===========================================
   LOADER STYLES
   =========================================== */
.loader {
    position: fixed;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loader-content {
    font-family: 'Poppins', sans-serif;
    font-size: 4.5rem;
    font-weight: 600;
    letter-spacing: 1px;
    position: relative;
    color: var(--primary-color);
    text-shadow: 0 0 30px rgba(0, 102, 255, 0.7),
                 0 0 60px rgba(0, 102, 255, 0.4);
    animation: loaderPulse 2s ease-in-out infinite;
}

@keyframes loaderPulse {
    0% { transform: scale(1); opacity: 0.9; text-shadow: 0 0 30px rgba(0, 102, 255, 0.7); }
    50% { transform: scale(1.1); opacity: 1; text-shadow: 0 0 50px rgba(0, 102, 255, 0.9); }
    100% { transform: scale(1); opacity: 0.9; text-shadow: 0 0 30px rgba(0, 102, 255, 0.7); }
}

/* ===========================================
   NAVIGATION STYLES
   =========================================== */
.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);
    padding: var(--spacing-sm) var(--spacing-md);
    transition: all var(--transition-normal);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar.hidden {
    transform: translateY(-100%);
}

.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: var(--spacing-sm);
}

.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::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);
}

/* Menu Icon for Mobile */
.menu-icon {
    display: none;
    width: 30px;
    height: 20px;
    position: relative;
    cursor: pointer;
    z-index: 100;
    margin-right: var(--spacing-md);
}

.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);
}

/* ===========================================
   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;
}

#video-mobile {
    display: none;
}

/* ===========================================
   MAIN LAYOUT
   =========================================== */
.main-content {
    width: 100%;
    min-height: 100vh;
}

.sections-container {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.initial-view {
    min-height: 100vh;
    padding: 80px 20px 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 2rem;
}

/* ===========================================
   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);
}

.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 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;
    position: relative;
    opacity: 1;
    transform: none;
    margin-bottom: var(--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);
}

.section-content:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.section h2 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    font-size: 1.8rem;
    font-weight: var(--font-weight-medium);
}

.text-content {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 1rem;
}

/* ===========================================
   EDUCATION SECTION
   =========================================== */
.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);
}

.years {
    font-size: 0.9rem;
    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);
    max-width: 800px;
    margin: 0 auto;
}

.contact-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    justify-content: center;
    margin-top: var(--spacing-lg);
}

.contact-detail,
.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;
}

.contact-detail:hover,
.contact-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    color: var(--text-light);
}

/* Text variants for contact email */
.desktop-only {
    display: inline;
}

.mobile-only {
    display: none;
}

/* ===========================================
   FOOTER
   =========================================== */
.footer {
    background: rgba(0, 0, 0, 0.9);
    padding: var(--spacing-md);
    text-align: center;
    backdrop-filter: blur(10px);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.social-links {
    margin-bottom: var(--spacing-md);
    display: none;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===========================================
   ANIMATIONS
   =========================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================================
   DESKTOP RESPONSIVE STYLES
   =========================================== */
@media (min-width: 769px) {
    .title {
        font-size: 3rem;
    }

    .hero-section {
        min-height: 70vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .initial-view {
        padding-top: 100px;
    }

    .section:not(#about) {
        padding-top: var(--spacing-xl);
    }

    .sections-container {
        padding: 0 var(--spacing-lg);
    }

    #about {
        margin-top: 0;
        padding-top: 0;
    }

    .nav-item {
        position: relative;
        padding: 8px 16px;
        margin: 0 4px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .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;
    }

    .contact-detail {
        color: var(--primary-color);
        background: none;
        box-shadow: none;
        padding: 0;
        min-width: auto;
    }

    .contact-detail:hover {
        color: var(--secondary-color);
        transform: none;
        box-shadow: none;
        background: none;
    }
}

/* ===========================================
   MOBILE RESPONSIVE STYLES
   =========================================== */
@media (max-width: 768px) {
    .navbar {
        padding: var(--spacing-xs) var(--spacing-md);
    }

    .menu-icon {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.95);
        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(20px);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .title {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .subtitle {
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .initial-view {
        padding: 60px 15px 40px;
        min-height: 100vh;
        gap: 1.5rem;
    }

    .hero-content {
        padding: 0 10px;
        max-width: 100%;
    }

    .profile-picture {
        width: 150px;
        height: 150px;
        margin-bottom: 1rem;
    }

    .section {
        padding: var(--spacing-sm) 10px;
        margin-bottom: var(--spacing-md);
    }

    .section-content {
        width: calc(100% - 20px);
        max-width: 100%;
        padding: var(--spacing-md);
        margin: var(--spacing-sm) auto;
        font-size: 0.95rem;
        border-radius: var(--border-radius-md);
    }

    .section h2 {
        font-size: 1.5rem;
        margin-bottom: var(--spacing-sm);
    }

    .text-content {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .degree {
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .institution, .years {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .education-item {
        padding: var(--spacing-sm);
        margin-bottom: var(--spacing-sm);
    }

    .contact-content {
        width: calc(100% - 20px);
        max-width: 100%;
        padding: var(--spacing-md);
    }

    .contact-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
        width: 100%;
        margin-top: var(--spacing-md);
    }

    .contact-detail,
    .contact-button {
        width: 100%;
        padding: 12px var(--spacing-md);
        margin: 0;
        font-size: 0.95rem;
        min-width: unset;
        border-radius: var(--border-radius-md);
        text-align: center;
        display: block;
    }

    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: inline;
    }

    /* Mobile video background */
    #video-desktop {
        display: none;
    }
    
    #video-mobile {
        display: block;
    }

    .video-background {
        object-fit: cover;
        width: 100vw;
        height: 100vh;
        min-width: 100%;
        min-height: 100%;
    }

    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }

    /* Better mobile typography */
    h1, h2, h3 {
        word-wrap: break-word;
        hyphens: auto;
    }
}

/* ===========================================
   TABLET RESPONSIVE STYLES
   =========================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .sections-container {
        padding: 0 var(--spacing-md);
        max-width: 90%;
    }

    .section-content {
        max-width: 100%;
        padding: var(--spacing-lg);
    }

    .title {
        font-size: 2.8rem;
    }

    .hero-content {
        max-width: 90%;
    }

    .profile-picture {
        width: 160px;
        height: 160px;
    }
}

/* ===========================================
   LARGE SCREEN RESPONSIVE STYLES
   =========================================== */
@media (min-width: 1441px) {
    .sections-container {
        max-width: 1400px;
        padding: 0 var(--spacing-xl);
    }

    .title {
        font-size: 3.5rem;
    }

    .subtitle {
        font-size: 1.5rem;
    }

    .section-content {
        padding: var(--spacing-xl);
    }

    .profile-picture {
        width: 200px;
        height: 200px;
    }
}

/* Mobile Portrait Video */
@media (max-width: 768px) and (orientation: portrait) {
    #video-desktop {
        display: none;
    }
    
    #video-mobile {
        display: block;
    }
}

/* Landscape Phone Support */
@media (max-width: 768px) and (orientation: landscape) and (max-height: 500px) {
    .initial-view {
        padding: 40px 15px 20px;
        gap: 1rem;
    }

    .profile-picture {
        width: 120px;
        height: 120px;
    }

    .title {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .section-content {
        padding: var(--spacing-sm);
    }
}

/* ===========================================
   ACCESSIBILITY & PERFORMANCE
   =========================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

@media (prefers-contrast: high) {
    :root {
        --primary-color: #ffffff;
        --text-muted: #ffffff;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --background-dark: rgba(0, 0, 0, 0.95);
    }
}

/* Print Styles */
@media print {
    .navbar, .contact-button, .footer, .video-background {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    .section-content {
        box-shadow: none;
        border: 1px solid #ddd;
        background: #fff;
    }
}
