:root {
    --sky-blue: #A9D1EC;
    --cloud-white: #FBFCFC;
    --meadow-green: #D4E3D5;
    --sand-beige: #F4EDE1;
    --text-main: #3C4E5E;
    --text-light: #5B7288;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-main);
    /* Aesthetic flow from sky blue to cloud white, down to meadow green, ending in sand beige */
    background: linear-gradient(to bottom, var(--sky-blue) 0%, var(--cloud-white) 30%, var(--sand-beige) 70%, var(--meadow-green) 100%);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Typography spacing for 'breathing room' */
h1,
h2,
h3,
h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

p,
a,
span {
    font-weight: 200;
    letter-spacing: 0.02em;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(251, 252, 252, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.navbar:hover {
    background: rgba(251, 252, 252, 0.6);
}

/* Logo */
.sparrow-icon {
    width: 80px;
    height: auto;
    opacity: 0.8;
    mix-blend-mode: multiply;
    transition: transform 0.5s ease;
}

.logo-link:hover .sparrow-icon {
    transform: rotate(15deg) translateY(-2px);
}

/* Decorations */
.decor {
    position: absolute;
    mix-blend-mode: multiply;
    opacity: 0.6;
    pointer-events: none;
    z-index: -1;
    user-select: none;
}

.cloud {
    width: 350px;
    filter: opacity(0.5);
}

.cloud-1 {
    top: 5%;
    right: 5%;
    width: 450px;
}

.cloud-2 {
    top: 35%;
    left: -5%;
    width: 550px;
}

.bird-flying {
    width: 150px;
    top: 0%;
    left: 0%;
    transform: translateY(-20%);
}

.bird-branch {
    width: 250px;
    top: 0%;
    right: 0%;
    transform: translateY(-20%);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 3rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 1rem;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background-color: var(--text-main);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover {
    color: #000;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Sections Layout */
.section-container {
    min-height: 100vh;
    padding: 8rem 10% 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Landing specific */
#landing {
    text-align: center;
    align-items: center;
}

.title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #2F3E4D;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 600px;
    margin-bottom: 4rem;
    line-height: 1.8;
}

.passions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    width: 100%;
    max-width: 1000px;
}

.passion-item {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: left;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.4s ease, background 0.4s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
}

.passion-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.passion-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.passion-item p {
    font-size: 1rem;
    color: var(--text-light);
}

/* Cards (Library & Gallery) */
.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.section-desc {
    text-align: center;
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 4rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
}

.card:hover::before {
    opacity: 1;
}

.card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 80px;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.card-type {
    display: inline-block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #7b94ad;
}

/* Footer */
footer {
    padding: 6rem 5% 4rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.footer-icon {
    display: none;
    /* Removed from footer as requested */
}

.footer-text {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 500px;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.contact-links a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 1rem;
    position: relative;
    transition: color 0.3s ease;
}

.contact-links a:hover {
    color: #000;
}

/* Fade in animation styles handled by JS */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.215, 0.610, 0.355, 1), transform 1s cubic-bezier(0.215, 0.610, 0.355, 1);
    will-change: opacity, transform;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* Article List & Cards (Inline Reading) */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.article-card {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    transition: all 0.4s ease;
}

.article-header {
    padding: 2.5rem 3rem;
    cursor: pointer;
    position: relative;
    transition: background 0.3s ease;
}

.article-header:hover {
    background: rgba(255, 255, 255, 0.6);
}

.article-meta {
    margin-bottom: 1rem;
}

.article-class {
    display: inline-block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #7b94ad;
}

.article-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.article-summary {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-main);
}

.read-more-btn span {
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.4s ease;
}

.article-card.open .read-more-btn span {
    transform: rotate(45deg);
    /* Turns + into x */
}

.article-content-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(251, 252, 252, 0.9);
}

.article-card.open .article-content-container {
    max-height: 10000px;
    /* allow variable expansion height */
}

.article-body {
    padding: 3rem;
    font-size: 1.15rem;
    line-height: 1.8;
    color: #2F3E4D;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Mammoth Content Formatting */
.article-body p {
    margin-bottom: 1.5rem;
}

.article-body h1,
.article-body h2,
.article-body h3 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-iframe {
    width: 100%;
    height: 80vh;
    border: none;
    border-radius: 8px;
}

/* Gallery Carousel Styles */
.gallery-projects {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    width: 100%;
    margin-top: 2rem;
}

.carousel-container {
    position: relative;
    width: 100%;
}

.carousel-title {
    font-size: 1.8rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 1.5rem;
    padding: 1rem 2rem 2rem 2rem;
    scrollbar-width: none;
    /* Firefox */
}

.carousel::-webkit-scrollbar {
    display: none;
    /* Chrome/ Safari */
}

.carousel.dragging {
    scroll-behavior: auto;
    cursor: grab;
    cursor: -webkit-grab;
}

.carousel.dragging .carousel-item {
    pointer-events: none;
}

.carousel-item {
    flex: 0 0 auto;
    width: 300px;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    scroll-snap-align: start;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    user-select: none;
}

.carousel-item:hover {
    transform: translateY(-5px);
}

/* Pagination Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(169, 209, 236, 0.4);
    backdrop-filter: blur(2px);
    transition: all 0.3s ease;
    cursor: pointer;
}

.dot.active {
    background: rgba(91, 114, 136, 0.7);
    transform: scale(1.3);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* In a full project, add a mobile menu here */
    }

    .title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .section-container {
        padding: 6rem 5% 3rem;
    }

    .article-header {
        padding: 1.5rem 1.5rem;
    }

    .article-body {
        padding: 1.5rem 1.5rem;
    }

    .article-title {
        font-size: 1.6rem;
    }

    .card {
        padding: 1.5rem 1.5rem;
    }

    .cloud-1 {
        width: 250px;
        right: 0;
    }

    .cloud-2 {
        width: 300px;
        left: -10%;
    }

    .bird-flying {
        width: 100px;
    }

    .bird-branch {
        width: 150px;
    }

    .carousel-item {
        width: 260px;
        height: 350px;
    }
}