/* Modern Portfolio Styling */
:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --accent-color: #8e8fee;
    --text-grey: #666666;
    --background-color: #123456;
    --pastelle-color1: #bedcfa;
    --pastelle-color2: #faa7c8;
    --pastelle-color3: #da9efb;
}

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

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Helvetica', 'sans-serif';

    background-image: url('projects/animation_page-0002.jpg');
    background-size: cover;          /* Ensures image covers the whole screen */
    background-position: center;     /* Centers the image */
    background-repeat: no-repeat;
    background-attachment: fixed;    /* THIS IS THE KEY: it locks the image in place */

    line-height: 1.6;
    color: var(--primary-color);
}

/* LOGO */
.logo {
    font-family: 'DM Serif Display', serif;
    font-size: 1.7rem;
    color: var(--accent-color);
    font-weight: 400;
    letter-spacing: 1px;
}

.logo span {
    color: var(--text-grey);
    font-weight: 400;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    width: 100%;
    /* 0.0 makes it invisible, 0.8 makes it semi-see-through */
    background: rgba(255, 255, 255, 0.5); 
    backdrop-filter: blur(4px);
    z-index: 100;
    transition: all 0.3s ease; /* Smooth transition for later */
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-grey);
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.nav-links i {
    font-size: 1.2rem; /* Makes the icons a bit larger */
    transition: color 0.3s ease, transform 0.3s ease;
}

.nav-links a:hover i {
    color: #E1306C; /* Instagram's brand color on hover */
    transform: translateY(-2px); /* Subtle lift effect */
}

/* Optional: Add specific colors for different brands */
.fa-linkedin:hover {
    color: #0077b5 !important;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 5%;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-grey);
    margin-bottom: 2rem;
}

/* CTA BUTTON */
.cta-button {
    padding: 1rem 2.5rem;
    /* background: var(--accent-color); */
    background: linear-gradient(135deg, var(--pastelle-color1), var(--pastelle-color3));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s;
}

.cta-button:hover {
    transform: scale(1.09);
    box-shadow: 0 12px 30px rgba(142, 143, 238, 0.35);
    color: white;
}

/* Portfolio Grid */
.portfolio {
    padding: 5rem 5%;
}

.portfolio h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    aspect-ratio: 4/3;
    
    /* Center the <a> tag inside the card */
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.05); /* Optional: helps see the card area */
}

.project-card a {
    /* Ensure the link itself is centered and holds the image properly */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.project-card img {
    /* Now we set the size relative to the card */
    width: 90%;  /* Adjust this to make the image smaller or larger */
    height: auto; 
    
    /* 'contain' ensures it doesn't stretch and stays in the center */
    object-fit: contain; 
    
    /* Remove any old positioning that might interfere */
    position: static; 
    margin: 0 auto;
    
    transition: transform 0.5s;
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 2rem;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-card:hover .overlay {
    transform: translateY(0);
}



/* --- Filter Buttons --- */

.filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 3rem; /* Spacing before the grid starts */
}

.filter-btn {
    background-color: transparent;
    border: 2px solid #e0e0e0;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-grey);
}

.filter-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.filter-btn.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Modal Background */
.modal {
    display: none; 
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

/* Modal Box */
.modal-content {
    background-color: white;
    margin: 2% auto; 
    /* REDUCE PADDING: This makes the inner "margins" smaller */
    padding: 60px; /* Gives the "X" more empty space to sit in */
    overflow: visible; /* Ensures the X doesn't get cut off */ 
    
    width: 90%;      /* Increased from 80% to use more screen width */
    max-width: 1100px; 
    min-height: 680px; /* Changed to auto so the box fits the content height */
    
    border-radius: 15px;
    position: relative;
    
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-body {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
    width: 100%;
    /* Limits the height of the entire content area */
    max-height: 70vh; 
}

/* The scrollable container for the image */
.modal-image-scroll {
    flex: 0 0 55%; /* Image takes 60% of the width */
    max-height: 70vh; /* Matches the modal body height */
    overflow-y: auto; /* Enables vertical scrolling */
    padding-right: 10px; /* Space for the scrollbar */
    border-radius: 10px;
}

#modal-img {
    width: 100%; /* Image takes full width of the scroll container */
    height: auto; /* Height grows naturally based on the image file */
    display: block;
    border-radius: 5px;
}

.modal-text {
    flex: 1;
    position: sticky; /* Ensures text stays at the top while you scroll the image */
    top: 0;
}

#modal-description {
    color: var(--text-grey);        /* A clean, professional grey */
    line-height: 1.8;      /* Adds breathing room between lines */
    font-size: 1rem;       /* Keeps it legible */
    margin-top: 10px;      /* Adds a little space below the title */
    font-weight: 400;      /* Ensures it isn't bold */
}

.close-modal {
    position: absolute;
    /* Increase these values to move it further from the very edge */
    top: 10px;       
    right: 20px;     
    
    font-size: 35px;
    color: #333;
    cursor: pointer;
    z-index: 1010; /* Ensures it stays above the image and text */
    line-height: 1;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--accent-color); /* Changes color when hovered */
}

/* Responsive: Stack them only on small mobile screens */
@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
        align-items: center;
    }
    .modal-content {
        padding: 40px 20px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
}

/* Update your existing section classes */
.hero {
    background-color: #f9f9f9; 
}

.portfolio {
    background-color: #f9f9f9; /* Subtle contrast from the hero*/ 
}

.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 50px auto;
    padding: 20px 0;
}

/* The Vertical Line */
.timeline-container::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--accent-color);
    top: 0;
    bottom: 0;
    left: 20px; /* Aligns line to the left on mobile */
    margin-left: -1px;
}

/* Individual Item Wrapper */
.timeline-item {
    padding: 10px 40px;
    position: relative;
    background: transparent;
    margin-bottom: 30px;
}

/* The Dots on the line */
.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: white;
    border: 3px solid var(--accent-color);
    border-radius: 50%;
    left: 12px;
    top: 15px;
    z-index: 1;
}

/* The Box containing the text */
.timeline-content {
    padding: 20px;
    background: rgba(255, 255, 255, 0.1); /* Semi-transparent */
    backdrop-filter: blur(5px);           /* Glassmorphism */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: var(--primary-color);
}

.timeline-date {
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 5px;
    display: block;
}

/* Desktop: Center the line and alternate sides */
@media screen and (min-width: 768px) {
    .timeline-container::after {
        left: 50%;
    }
    
    .timeline-item {
        width: 50%;
        padding: 20px 40px;
    }

    .timeline-item:nth-child(even) {
        left: 50%;
    }

    .timeline-item:nth-child(odd) {
        left: 0;
        text-align: right;
    }

    .timeline-item:nth-child(odd) .timeline-dot {
        left: auto;
        right: -8px;
    }

    .timeline-item:nth-child(even) .timeline-dot {
        left: -8px;
    }
}

/* CONTACT SECTION */
.contact-section {
    text-align: center;
    padding: 5rem 5%;
}

.contact-subtitle {
    color: var(--text-grey);
    margin-bottom: 3rem;
}

/* Wrapper */
.contact-wrapper {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

/* Glass Card */
.contact-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px 40px;
    border-radius: 16px;

    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);

    transition: all 0.35s ease;
    min-width: 280px;
}

/* Hover effect consistent with your style */
.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--accent-color);
}

/* Icon */
.contact-icon {
    width: 60px;
    height: 60px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1.6rem;

    color: var(--accent-color);
    background: rgba(142, 143, 238, 0.1);

    border-radius: 50%;
    flex-shrink: 0; /* Prevents stretching in flex layout */

    transition: all 0.3s ease;
}

.contact-card:hover .contact-icon {
    background: var(--accent-color);
    color: white;
}

/* Text */
.contact-card h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.contact-card a {
    text-decoration: none;
    color: var(--text-grey);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.contact-card a:hover {
    color: var(--accent-color);
}

/* ABOUT SECTION */

.about-container {
    max-width: 800px;
    margin: 0 auto 40px auto;
}

.about-intro {
    padding: 35px;

    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);

    border-radius: 16px;

    border: 1px solid rgba(255,255,255,0.3);
}

.about-intro h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.about-intro p {
    margin-bottom: 15px;
    color: var(--text-grey);
    line-height: 1.8;
}

.about-highlight {
    margin-top: 10px;
    font-weight: 600;
    color: var(--primary-color);
}