/* ============================================
   MODERN MINIMALIST PORTFOLIO
   ============================================ */

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

:root {
    --primary: #1a1a1a;
    --secondary: #ffffff;
    --accent: #0066ff;
    --text: #333333;
    --light: #f5f5f5;
    --border: #eeeeee;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    color: var(--text);
    background: var(--secondary);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   LOADER
   ============================================ */

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-name {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    letter-spacing: 1px;
}

.loader-degree {
    font-size: 1rem;
    margin: 0 0 30px 0;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loader-content p {
    font-size: 1rem;
    letter-spacing: 2px;
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    background: transparent;
    z-index: 100;
    transition: var(--transition);
}

.navbar.active {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-link {
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 20px 100px;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, -30px); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary);
}

.subtitle {
    font-size: 1.3rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
    max-width: 600px;
}

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

.fade-in {
    animation: fadeInUp 0.8s ease forwards;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.cta-button:hover {
    background: #0052cc;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 102, 255, 0.3);
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: bounce 2s infinite;
}

.hero-scroll span {
    font-size: 0.9rem;
    color: #666;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.scroll-icon {
    width: 20px;
    height: 30px;
    border: 2px solid #666;
    border-radius: 10px;
    position: relative;
}

.scroll-icon::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 8px;
    background: #666;
    border-radius: 1px;
    animation: scrolling 1.5s infinite;
}

@keyframes scrolling {
    0% { transform: translateX(-50%) translateY(0); opacity: 1; }
    100% { transform: translateX(-50%) translateY(10px); opacity: 0; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
    padding: 100px 20px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: var(--primary);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 15px auto 0;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-content {
    max-width: 700px;
    margin: 0 auto;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 25px;
}

/* ============================================
   WORK SECTION
   ============================================ */

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.work-item {
    padding: 40px;
    background: var(--light);
    border-radius: 10px;
    border-left: 4px solid var(--accent);
    transition: var(--transition);
    opacity: 0;
}

.work-item.animate-in {
    animation: fadeInUp 0.8s ease forwards;
}

.work-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.work-item h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.work-description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-stack span {
    display: inline-block;
    padding: 6px 12px;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
}

/* ============================================
   SKILLS SECTION
   ============================================ */

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-category {
    padding: 30px;
    background: var(--light);
    border-radius: 10px;
    border-top: 3px solid var(--accent);
    opacity: 0;
}

.skill-category.animate-in {
    animation: fadeInUp 0.8s ease forwards;
}

.skill-category:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.skill-category h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.skill-category p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   STUDY SECTION
   ============================================ */

.study-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.study-item {
    padding: 35px;
    background: var(--light);
    border-radius: 10px;
    border-left: 4px solid var(--accent);
    transition: var(--transition);
    opacity: 0;
}

.study-item.animate-in {
    animation: fadeInUp 0.8s ease forwards;
}

.study-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.study-item h3 {
    font-size: 1.3rem;
    margin: 0 0 10px 0;
    color: var(--primary);
}

.study-level {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0 0 15px 0;
}

.study-institute {
    color: #666;
    font-size: 0.95rem;
    margin: 4px 0 8px 0;
}

.study-verification {
    margin: 4px 0 12px 0;
    color: var(--accent);
    font-size: 0.85rem;
}

.study-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.study-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.study-tags span {
    display: inline-block;
    padding: 5px 12px;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
}

/* ============================================
   CONTACT SECTION
   ============================================ */

/* Modal for PDF viewer */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    position: relative;
    margin: 5% auto;
    width: 90%;
    max-width: 800px;
    background: #fff;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
}

.modal-content iframe {
    width: 100%;
    height: 90vh;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    color: #333;
    cursor: pointer;
}

/* Sidebar styling */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100%;
    background: var(--light);
    padding: 20px;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    overflow-y: auto;
    z-index: 150;
}

.sidebar-content {
    text-align: center;
}

.profile-pic {
    width: 100%;
    max-width: 360px;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: cover;
    object-position: center top;
    border-radius: 20px; /* Rounded corners */
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    display: block;
    margin: 0 auto 18px auto;
    border: 3px solid #e0e6ed;
    transition: box-shadow 0.2s, transform 0.2s, cursor 0.2s;
    cursor: pointer;
}

.profile-pic:hover {
    transform: scale(1.18);
    cursor: none;
}

.profile-pic:active {
    transform: scale(0.95);
}

.residence {
    color: #222;
    font-size: 1.18rem;
    font-weight: bold;
    margin-bottom: 38px;
}

.sidebar-skills {
    list-style: none;
    padding-left: 0;
    padding: 0;
    text-align: left;
    margin-bottom: 20px;
}

.sidebar-skills li {
    font-size: 0.97rem;
    margin: 6px 0;
    display: flex;
    align-items: center;
}

.sidebar a {
    color: var(--accent);
    text-decoration: none;
}

.sidebar h3 {
    margin-top: 20px;
    font-size: 1.2rem;
    color: var(--primary);
}

/* adjust main content to accommodate sidebar */
body {
    margin-left: 260px;
}



.contact-section {
    text-align: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
}

.contact-intro {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 50px;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-item {
    padding: 30px;
    background: var(--secondary);
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.contact-item:hover {
    border-color: var(--accent);
    box-shadow: 0 5px 20px rgba(0, 102, 255, 0.1);
}

.contact-item h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.contact-item a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.contact-item a:hover {
    text-decoration: underline;
}

.social-links {
    margin-top: 18px;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 18px;
}

.social-links a {
    color: #333;
    display: inline-block;
    transition: color 0.2s;
}
.social-links a:hover {
    color: #0066ff;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--primary);
    color: var(--secondary);
    text-align: center;
    padding: 40px 20px;
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .nav-menu {
        gap: 20px;
    }

    .nav-link {
        font-size: 0.85rem;
    }

    .hero {
        padding: 100px 20px 80px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section {
        padding: 60px 20px;
    }

    .section-title {
        font-size: 2rem;
    }

    .work-grid {
        grid-template-columns: 1fr;
    }

    .skills-container {
        grid-template-columns: 1fr;
    }

    .contact-methods {
        grid-template-columns: 1fr;
    }
}