/* ===================================
   NATURE PORTFOLIO STYLES
   Theme: Minimalist, Nature-Inspired
   =================================== */

/* ----------------
   CSS Reset & Base
   ---------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-background: #f5f5f5;
    --color-text: #2c2c2c;
    --color-text-light: #7d7d7d;
    --color-primary: #6e6e6e;
    --color-accent: #8c8c8c;
    --color-border: #d1d1d1;
    --color-link: #6e6e6e;
    --color-link-hover: #8c8c8c;
    --color-button-high: #5A5FC1;
    --color-button-low: #7A57C1;

    /* Typography */
    --font-serif: 'Georgia', 'Times New Roman', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;

    /* Layout */
    --max-width: 800px;
    --max-width-wide: 1200px;
}

/* ----------------
   Typography
   ---------------- */
body {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-background);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-sans);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

h2 {
    font-size: 2rem;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

h3 {
    font-size: 1.5rem;
    margin-top: var(--spacing-md);
}

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--color-link);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--color-link-hover);
    border-bottom-color: var(--color-accent);
}

/* ----------------
   Layout
   ---------------- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ----------------
   Lists
   ---------------- */
ul,
ol {
    margin-left: 2rem;
    /* increased indentation */
    margin-bottom: var(--spacing-sm);
    padding-left: 1rem;
    /* extra spacing for bullets/numbers */
    line-height: 1.6;
    color: var(--color-text);
    /* optional: ensure consistent text color */
}

li {
    margin-bottom: 0.5rem;
    /* spacing between items */
    position: relative;
}


/* ----------------
   Header
   ---------------- */
.site-header {
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    /* Subtle dot pattern matching footer */
    background-image:
        radial-gradient(circle at 25% 25%, rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(236, 72, 153, 0.03) 1px, transparent 1px);
    background-size: 24px 24px, 32px 32px;
    background-position: 0 0, 16px 16px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: var(--spacing-md) 0;
    margin-bottom: var(--spacing-xl);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Decorative floating shapes for header */
.site-header::before,
.site-header::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: floatInHeader 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    z-index: 1;
}

.site-header::before {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(59, 130, 246, 0.08));
    top: -40px;
    left: 8%;
    animation-delay: 0.2s;
}

.site-header::after {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(192, 132, 252, 0.08));
    top: -30px;
    right: 12%;
    animation-delay: 0.4s;
}

/* Additional geometric accent */
.site-nav::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.06), rgba(219, 39, 119, 0.06));
    border-radius: 16px;
    transform: rotate(25deg);
    right: 5%;
    top: 50%;
    margin-top: -40px;
    opacity: 0;
    animation: slideInHeader 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.5s;
    z-index: 1;
}

.site-nav {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.site-nav a {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    border: 1px solid rgba(226, 232, 240, 0.6);
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(248, 250, 252, 0.8));
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

/* Subtle shine effect on load */
.site-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.site-nav a:nth-child(1)::before {
    animation: shine 1.5s ease forwards;
    animation-delay: 0.5s;
}

.site-nav a:nth-child(2)::before {
    animation: shine 1.5s ease forwards;
    animation-delay: 0.7s;
}

.site-nav a:nth-child(3)::before {
    animation: shine 1.5s ease forwards;
    animation-delay: 0.9s;
}

.site-nav a:nth-child(4)::before {
    animation: shine 1.5s ease forwards;
    animation-delay: 1.1s;
}

.site-nav a:nth-child(5)::before {
    animation: shine 1.5s ease forwards;
    animation-delay: 1.3s;
}

.site-nav a:hover {
    background: linear-gradient(135deg, var(--color-button-high), var(--color-button-high));
    color: white;
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 12px rgba(99, 102, 241, 0.25);
}

.site-nav a.active {
    color: white;
    background: linear-gradient(135deg, #ec4899, #db2777);
    border-color: rgba(236, 72, 153, 0.5);
    box-shadow: 0 4px 8px rgba(236, 72, 153, 0.3);
    position: relative;
}

.site-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: white;
    border-radius: 2px;
}

/* Header Animations */
@keyframes floatInHeader {
    to {
        opacity: 1;
    }
}

@keyframes slideInHeader {
    to {
        opacity: 1;
    }
}

@keyframes shine {
    to {
        left: 100%;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {

    .site-header::before,
    .site-header::after,
    .site-nav::before {
        display: none;
    }

    .site-nav {
        gap: 0.5rem;
    }

    .site-nav a {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* ---------------- Footer ---------------- */
.footer-art {
    position: relative;
    overflow: hidden;
    color: #1a1a2e;
    font-family: "Inter", system-ui, sans-serif;
    min-height: 320px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    /* Subtle dot pattern */
    background-image:
        radial-gradient(circle at 25% 25%, rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(236, 72, 153, 0.03) 1px, transparent 1px);
    background-size: 24px 24px, 32px 32px;
    background-position: 0 0, 16px 16px;
}

/* Decorative floating shapes */
.footer-art::before,
.footer-art::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: floatIn 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.footer-art::before {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.08));
    top: -60px;
    right: 10%;
    animation-delay: 0.3s;
}

.footer-art::after {
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.08), rgba(219, 39, 119, 0.08));
    bottom: -40px;
    left: 5%;
    animation-delay: 0.5s;
}

/* Additional decorative elements */
.footer-section:nth-child(1)::before,
.footer-section:nth-child(3)::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    opacity: 0;
    z-index: 1;
    animation: slideIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.footer-section:nth-child(1)::before {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(59, 130, 246, 0.1));
    top: -20px;
    left: -10px;
    transform: rotate(15deg);
    animation-delay: 0.4s;
}

.footer-section:nth-child(3)::before {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(192, 132, 252, 0.1));
    bottom: -15px;
    right: -15px;
    transform: rotate(-20deg);
    animation-delay: 0.6s;
}

/* Content */
.footer-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* Section styling with different subtle backgrounds */
.footer-section {
    position: relative;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.footer-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.04);
}

.footer-section:nth-child(1) {
    background: linear-gradient(135deg, rgba(241, 245, 249, 0.8), rgba(226, 232, 240, 0.6));
    border-left: 3px solid rgba(59, 130, 246, 0.5);
    animation-delay: 0.1s;
}

.footer-section:nth-child(2) {
    background: linear-gradient(135deg, rgba(249, 250, 251, 0.8), rgba(243, 244, 246, 0.6));
    border-left: 3px solid rgba(168, 85, 247, 0.5);
    animation-delay: 0.2s;
}

.footer-section:nth-child(3) {
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.7), rgba(254, 226, 226, 0.5));
    border-left: 3px solid rgba(236, 72, 153, 0.5);
    animation-delay: 0.3s;
}

.footer-section:nth-child(4) {
    background: linear-gradient(135deg, rgba(240, 253, 250, 0.7), rgba(204, 251, 241, 0.5));
    border-left: 3px solid rgba(14, 165, 233, 0.5);
    animation-delay: 0.4s;
}

.footer-section h2 {
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #0f172a;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: currentColor;
    opacity: 0.3;
}

.footer-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #334155;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: inline-block;
}

.footer-section a:hover {
    color: var(--color-button-high);
    transform: translateX(2px);
}

.footer-section p {
    margin: 0.3rem 0 0.8rem;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
}

.social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.social a {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.9));
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social a:hover {
    background: linear-gradient(135deg, var(--color-button-high), var(--color-button-low));
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatIn {
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .footer-content {
        text-align: center;
        gap: 1.5rem;
    }

    .footer-section {
        padding: 1.25rem;
    }

    .footer-section h2::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .social {
        justify-content: center;
    }

    .footer-art::before,
    .footer-art::after {
        display: none;
    }
}

/* ----------------
   Home Page
   ---------------- */
.hero {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.hero h1 {
    margin-bottom: var(--spacing-md);
}

.hero p {
    font-size: 1.25rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto var(--spacing-md);
}

.featured-post {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: #fafaf8;
}

.featured-post h2 {
    margin-top: 0;
}

/* ----------------
   About Page
   ---------------- */

.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
    gap: 2rem;
}

.image-wrapper img {
    max-width: 50%;
    height: auto;
    border-radius: 8px;
}

.about-content img {
    flex: 1 1 50%;
    /* 1/3 of the space */
    max-width: 50%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
    /* keeps proportions if resized */
}

.about-content>div {
    flex: 2 1 67%;
    /* 2/3 of the space */
    min-width: 250px;
}


.about-hero {
    text-align: center;
    padding: var(--spacing-xl) 0;
    margin-bottom: var(--spacing-lg);
}

.about-hero h1 {
    margin-bottom: var(--spacing-md);
}

.about-hero p {
    font-size: 1.25rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto var(--spacing-md);
    line-height: 1.6;
}

.about-section {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: #fafaf8;
}

.about-section h2 {
    margin-top: 0;
}

.about-section p {
    margin-bottom: var(--spacing-md);
    color: var(--color-text-dark);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.team-member {
    text-align: center;
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: #fff;
    transition: transform 0.2s ease;
}

.team-member:hover {
    transform: translateY(-5px);
}

.team-member img {
    border-radius: 50%;
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin-bottom: var(--spacing-md);
}


/* ----------------
   Project Grid
   ---------------- */
.year-section {
    margin-bottom: var(--spacing-xl);
}

.year-heading {
    font-family: var(--font-sans);
    font-size: 1.75rem;
    color: var(--color-accent);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--color-border);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.project-card {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: white;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.project-card-content {
    padding: var(--spacing-md);
}

.project-card h3 {
    margin-top: 0;
    font-size: 1.25rem;
}

.project-card p {
    color: var(--color-text-light);
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
}

.project-card a {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--color-accent);
    font-weight: 500;
}

/* ----------------
   Blog
   ---------------- */
.post-list {
    list-style: none;
}

.post-item {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--color-border);
}

.post-item:last-child {
    border-bottom: none;
}

.post-meta {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-xs);
}

.post-title {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-xs);
}

.post-excerpt {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-sm);
}

.post-tags {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

.tag {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    background-color: #f5f5f3;
    color: var(--color-primary);
    border-radius: 20px;
    border: none;
}

/* ----------------
   Post Content
   ---------------- */
.post-header {
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.post-header h1 {
    margin-bottom: var(--spacing-xs);
}

.post-content {
    margin-bottom: var(--spacing-xl);
}

.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: var(--spacing-md) auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-content blockquote {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md);
    border-left: 4px solid var(--color-accent);
    background-color: #f5f5f3;
    font-style: italic;
}

.post-content code {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    background-color: #f5f5f3;
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

.post-content pre {
    background-color: #2d3436;
    color: #f5f5f3;
    padding: var(--spacing-md);
    border-radius: 8px;
    overflow-x: auto;
    margin: var(--spacing-md) 0;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ----------------
   Observations
   ---------------- */
.observation-section {
    margin-bottom: var(--spacing-xl);
}

.observation-section h2 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.observation-list {
    list-style: none;
}

.observation-item {
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: var(--spacing-sm);
    background-color: white;
    transition: background-color 0.2s ease;
}

.observation-item:hover {
    background-color: #fafaf8;
}

.obs-common-name {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
}

.obs-scientific-name {
    font-style: italic;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-xs);
}

.obs-details {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--color-text-light);
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* ----------------
   Year Browser
   ---------------- */
.year-browser {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 2px solid var(--color-border);
    text-align: center;
}

.year-browser h3 {
    margin-bottom: var(--spacing-md);
}

.year-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.year-link {
    font-family: var(--font-sans);
    padding: var(--spacing-xs) var(--spacing-md);
    background-color: #f5f5f3;
    color: var(--color-primary);
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.year-link:hover {
    background-color: var(--color-accent);
    color: white;
    border-bottom-color: transparent;
}

/* ----------------
   Responsive Design
   ---------------- */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 3rem;
        --spacing-lg: 2rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

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

    .site-nav {
        gap: var(--spacing-sm);
    }

    .obs-details {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
}

/* ----------------
   Accessibility
   ---------------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles */
a:focus,
button:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ----------------
   Utilities
   ---------------- */
.text-center {
    text-align: center;
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

/* Lazy loading images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}