@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500&display=swap');

/* GLOBAL RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    background-color: #f6c1d1; /* default pink */
    color: #111;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* NAVIGATION */
.nav {
    position: fixed;
    top: 40px;
    right: 8%;
    display: flex;
    gap: 25px;
    z-index: 100;
}

.nav a {
    text-decoration: none;
    font-size: 0.9rem;
    color: #111;
    opacity: 0.85;
    position: relative;
    transition: opacity 0.3s ease;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ff6f91; /* pink accent */
    transition: width 0.3s ease;
}

.nav a:hover {
    opacity: 1;
}

.nav a:hover::after {
    width: 100%;
}

/* HERO */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
    padding-left: 10%;
    padding-right: 10%;
    background-color: #f6c1d1;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.09rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 20px;
    color: #111;
}

.hero p {
    max-width: 520px;
    font-size: 1.1rem;
    color: #111a1f;
}

.hero-text {
    max-width: 520px;
}

.hero-image img {
    width: 360px;
    border-radius: 18px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.18);
    object-fit: cover;
}
/* Subtitle for hero section */
.hero .subtitle {
    font-size: 1.3rem;
    font-weight: 500;
    color: #111a1f; /* matches hero p color */
    margin-bottom: 4rem; /* spacing before contributions */
}

/* SECTIONS WITH ALTERNATING BACKGROUNDS */
section:nth-child(even) {
    background-color: #ffffff;
    color: #111;
}

section:nth-child(odd) {
    background-color: #f6c1d1;
    color: #111;
}

section {
    padding: 160px 10%;
}

h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 600;
    margin-bottom: 50px;
    letter-spacing: -0.5px;
}

/* ABOUT */
#about {
    padding-top: 100px; /* less than default 160px */
    padding-bottom: 160px; /* keep bottom padding */
}
.about p {
    max-width: 650px;
    color: inherit; /* adapts to section color */
}

/* PROJECTS */
.project {
    margin-bottom: 60px;
    transition: transform 0.4s ease;
}

.project h3 {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 10px;
    transition: color 0.3s ease;
    position: relative;
    display: inline-block;
}

.project h3::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background-color: #ff6f91;
    transition: width 0.3s ease;
    margin-top: 4px;
}

.project:hover h3::after {
    width: 100%;
}

.project p {
    color: rgba(17, 17, 17, 0.7);
    max-width: 600px;
}

.project:hover {
    transform: translateX(10px);
}

.project a {
    text-decoration: none;
    color: #111;
    font-size: 1.6rem;
    font-weight: 300;
    transition: opacity 0.3s ease;
}

.project a:hover {
    opacity: 0.7;
}

/* PROJECT WITH IMAGE (Selected Works) */
.project-with-image {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.project-with-image .project-text {
    max-width: 600px;
}

.project-with-image .project-image img {
    width: 220px; /* smaller than hero */
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    object-fit: cover;
}

.project-with-image .media-preview {
    width: 360px;
    display: flex;
}

/* image behavior */
.project-with-image .media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.18);
}

.flash {
    margin-bottom: 20px;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: 500;
}

.flash.success {
    background-color: #d4edda;
    color: #155724;
}

.flash.error {
    background-color: #f8d7da;
    color: #721c24;
}

.works-list {
    display: flex;
    flex-direction: column;
    gap: 20px; /* spacing between links */
    max-width: 650px; /* matches .about p width */
}

.works-list a {
    color: #111;
    font-size: 1.1rem;
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.works-list a:hover {
    opacity: 0.7;
}

/* CONTACT FORM */
.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.contact-column {
    flex: 1;
    min-width: 280px; /* ensures it stacks nicely on smaller screens */
}

.contact-column p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #111a1f;
}

.contact-column a {
    color: #ff6f91;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.contact-column a:hover {
    opacity: 0.7;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .contact-info {
        flex-direction: column;
        gap: 20px;
    }
}

/* IMAGE GALLERY */
.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.gallery img {
    width: 100%;
    border-radius: 10px;
    transition: transform 0.4s ease, opacity 0.4s ease;
    filter: brightness(0.98);
}

.gallery img:hover {
    transform: scale(1.03);
    opacity: 0.9;
}

/* SCROLL ANIMATION */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.9s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    animation: fadeIn 1.2s ease forwards;
}

/* PAGE TRANSITION */
body.fade-out {
    opacity: 0;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {

    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero h1 {
        font-size: 3.2rem;
    }

    .hero-image img {
        width: 260px;
        margin-top: 40px;
    }

    section {
        padding: 100px 8%;
    }

    h2 {
        font-size: 2.2rem;
    }

    .gallery {
        grid-template-columns: 1fr;
    }
     #about {
        padding-top: 60px; /* mobile-friendly spacing */
    }
      .project-with-image {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-with-image .project-image img {
        width: 100%;
        margin-top: 20px;
    }
}