/* ========================
   1. VARIABLES & RESET
   ======================== */
:root {
    /* Color Palette */
    --bg-gradient: linear-gradient(135deg, #FFF8E1 0%, #FFE0B2 100%); /* Warm Yellow/Orange */
    --text-dark: #2D2D2D;      /* Dark Gray for reading */
    --text-light: #6D6D6D;     /* Muted gray for secondary text */
    --accent-gold: #C5A059;    /* Muted Gold for architectural feel */
    --white: #FFFFFF;
    
    /* Spacing */
    --section-padding: 80px 10%;
    
    /* Fonts */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* Smooth scroll when clicking nav links */
}

body {
    font-family: var(--font-body);
    background: var(--bg-gradient);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ========================
   2. NAVBAR STYLES
   ======================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(255, 248, 225, 0.9); /* Glassy Warm White */
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links li a {
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links li a:hover {
    color: var(--accent-gold);
}

.hamburger {
    display: none; /* Hidden on desktop */
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-dark);
    transition: all 0.3s ease-in-out;
}

/* Hamburger Animation */
.hamburger.toggle .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.toggle .bar:nth-child(2) {
    opacity: 0;
}
.hamburger.toggle .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ========================
   3. HERO SECTION
   ======================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--section-padding);
    padding-top: 100px;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Split 50/50 */
    align-items: center;
    gap: 50px;
    width: 100%;
}

.hero-text .greeting {
    display: block;
    font-size: 1.2rem;
    color: var(--accent-gold);
    margin-bottom: 10px;
    font-weight: 600;
}

.hero-text h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.hero-text .subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 20px;
}

.hero-text .description {
    max-width: 450px;
    color: var(--text-light);
    margin-bottom: 30px;
}

/* UPDATED BUTTONS FOR HERO */
.hero-buttons {
    display: flex;
    gap: 15px; /* Slightly tighter gap */
    flex-wrap: wrap; /* Allows buttons to wrap on mobile */
    align-items: center;
}

.btn {
    padding: 12px 25px; /* Adjusted padding for better fit */
    border-radius: 50px;
    font-weight: 500;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
    display: inline-block;
    white-space: nowrap; /* Prevents text from breaking inside button */
}

.btn-primary {
    background: var(--text-dark);
    color: var(--white);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--text-dark);
    color: var(--text-dark);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Blob & Image */
.hero-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.blob-shape {
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--accent-gold);
    opacity: 0.2; 
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    z-index: -1;
    animation: blob-bounce 6s infinite ease-in-out;
}

.profile-img {
    width: 350px;
    height: 350px;
    object-fit: cover;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    box-shadow: 20px 20px 60px rgba(0,0,0,0.1);
    transition: border-radius 6s ease-in-out;
    animation: blob-bounce 6s infinite ease-in-out;
}

@keyframes blob-bounce {
    0%, 100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    50% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

/* ========================
   4. PROJECTS SECTION
   ======================== */
.projects-section {
    padding: var(--section-padding);
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    display: block;
    color: var(--accent-gold);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--text-dark);
}

/* Grid Layout */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

/* Project Card */
.project-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.card-image {
    height: 250px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .card-image img {
    transform: scale(1.05);
}

.card-info {
    padding: 25px;
}

.card-info .category {
    font-size: 0.8rem;
    color: var(--accent-gold);
    font-weight: 600;
    text-transform: uppercase;
}

.card-info h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin: 10px 0;
    color: var(--text-dark);
}

.card-info p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ========================
   5. MODALS (Popup)
   ======================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    padding: 20px;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    animation: modalPop 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.modal-content h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-dark);
}

.modal-subtitle {
    color: var(--accent-gold);
    font-weight: 500;
    margin-bottom: 20px;
    display: block;
}

.tech-stack {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tech-stack span {
    background: #F5F5F5;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-dark);
    font-weight: 500;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--text-dark);
}

/* CHOICE MODALS (For CV & PDF) */
.option-modal {
    text-align: center;
    max-width: 500px; /* Smaller than project modals */
}

.option-modal h2 {
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.option-modal p {
    color: var(--text-light);
    margin-bottom: 30px;
}

.option-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ========================
   6. TIMELINE SECTION
   ======================== */
.timeline-section {
    padding: var(--section-padding);
    background: #FAFAFA;
}

.timeline-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 40px;
    border-left: 2px solid #E0E0E0;
}

.timeline-item {
    margin-bottom: 50px;
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    background: var(--accent-gold);
    border-radius: 50%;
    position: absolute;
    left: -49px;
    top: 5px;
    border: 3px solid #FFF;
    box-shadow: 0 0 0 2px var(--accent-gold);
}

.timeline-content .date {
    font-size: 0.85rem;
    color: var(--accent-gold);
    font-weight: 600;
    text-transform: uppercase;
    display: block;
    margin-bottom: 5px;
}

.timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-dark);
}

.timeline-content .institution {
    font-style: italic;
    color: var(--text-light);
    display: block;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

/* ========================
   7. ABOUT & SKILLS SECTION
   ======================== */
.about-section {
    padding: var(--section-padding);
    background: var(--white);
}

.about-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.highlight {
    color: var(--accent-gold);
    font-weight: 600;
}

.skills-wrapper h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-badge {
    padding: 8px 20px;
    background: var(--text-dark);
    color: var(--white);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
}

.skill-badge.outline {
    background: transparent;
    border: 1px solid var(--text-dark);
    color: var(--text-dark);
}

/* ========================
   8. CONTACT SECTION
   ======================== */
.contact-section {
    padding: var(--section-padding);
    background: var(--bg-gradient);
}

.contact-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    background: rgba(255, 255, 255, 0.4);
    padding: 50px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.contact-info h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.contact-info p {
    color: var(--text-dark);
    margin-bottom: 30px;
    line-height: 1.8;
}

.contact-item {
    margin-bottom: 20px;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
}

.contact-item span:first-child {
    font-weight: 600;
    color: var(--accent-gold);
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a:hover,
.contact-item a:hover {
    color: var(--accent-gold);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid transparent;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--white);
    transition: all 0.3s;
}

.form-group textarea {
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.1);
}

/* ========================
   9. FOOTER
   ======================== */
footer {
    background: var(--text-dark);
    color: var(--white);
    text-align: center;
    padding: 40px 20px;
}

footer h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

footer p {
    color: #999;
    font-size: 0.9rem;
}

.copyright {
    margin-top: 20px;
    font-size: 0.8rem;
    color: #555;
}

/* ========================
   10. RESPONSIVE MEDIA QUERIES
   ======================== */
@media (max-width: 768px) {
    .navbar { padding: 20px 5%; }
    
    /* Mobile Menu Logic */
    .nav-links { 
        position: absolute;
        right: 0;
        top: 70px; /* Below Navbar */
        background: var(--white);
        height: 50vh;
        width: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transform: translateY(-150%); /* Start Hidden */
        transition: transform 0.5s ease-in;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
        transform: translateY(0); /* Slide Down */
    }

    .hamburger { display: block; }
    
    .hero { height: auto; padding-top: 120px; padding-bottom: 60px; }
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    
    .hero-text h1 { font-size: 2.5rem; }
    .hero-text .description { margin: 0 auto 30px auto; }
    
    /* Ensure hero buttons center and stack nicely */
    .hero-buttons { justify-content: center; }
    
    .blob-shape { width: 300px; height: 300px; }
    .profile-img { width: 260px; height: 260px; }

    /* About Section Mobile */
    .about-container {
        grid-template-columns: 1fr;
    }
    
    /* Contact Section Mobile */
    .contact-container {
        grid-template-columns: 1fr;
        padding: 30px;
    }

    /* Option Modals Mobile */
    .option-buttons {
        flex-direction: column;
    }
}