/* ================================
   RESET & BASE STYLES
   ================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-bg: #1a1410;
    --secondary-bg: #2d2520;
    --card-bg: rgba(255, 255, 255, 0.03);
    --text-primary: #e8dcc4;
    --text-secondary: #c4b5a0;
    --text-muted: #8b7355;
    --accent: #8b7355;
    --accent-light: #b8a890;
    --border: rgba(139, 115, 85, 0.2);
    --shadow: rgba(0, 0, 0, 0.5);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 50%, var(--primary-bg) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 2;
}

/* ================================
   HEADER & NAVIGATION
   ================================ */
.header {
    padding: 30px 0;
    position: sticky;
    top: 0;
    background: rgba(26, 20, 16, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    color: var(--accent);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.site-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.site-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.main-nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn i {
    width: 28px;
    height: 28px;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 90px;
    left: 0;
    right: 0;
    background: rgba(26, 20, 16, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    z-index: 999;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-nav-link {
    display: block;
    padding: 15px 40px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    background: var(--card-bg);
    color: var(--text-primary);
    padding-left: 50px;
}

/* ================================
   HERO SECTION
   ================================ */
.hero {
    padding: 80px 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text {
    animation: fadeInLeft 0.8s ease-out 0.3s backwards;
}

.badge {
    display: inline-block;
    background: rgba(139, 115, 85, 0.2);
    color: var(--accent-light);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 20px;
    border: 1px solid var(--accent);
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 700;
}

.hero-description {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
    animation: fadeInRight 0.8s ease-out 0.3s backwards;
}

.main-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 10px 40px var(--shadow);
    border: 2px solid var(--border);
    filter: sepia(0.15) contrast(1.1);
    transition: all 0.5s ease;
}

.main-image:hover {
    transform: scale(1.02);
    filter: sepia(0) contrast(1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
    opacity: 0.4;
    border-radius: 4px;
    transition: opacity 0.5s ease;
}

.hero-image:hover .image-overlay {
    opacity: 0.1;
}

/* ================================
   BUTTONS
   ================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.btn i {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(139, 115, 85, 0.3);
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 115, 85, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--accent);
}

.btn-outline:hover {
    background: rgba(139, 115, 85, 0.2);
    transform: translateY(-2px);
}

.btn-outline-burgundy {
    background: transparent;
    color: var(--accent-light);
    border: 2px solid var(--accent);
}

.btn-outline-burgundy:hover {
    background: var(--accent);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-ghost:hover {
    background: var(--card-bg);
    border-color: var(--accent);
    color: var(--text-primary);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ================================
   SECTIONS
   ================================ */
.about,
.timeline,
.research,
.get-involved,
.contact {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInUp 0.8s ease-out;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
    font-weight: 700;
}

.section-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* ================================
   ABOUT SECTION - CARDS
   ================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 40px;
    transition: all 0.4s ease;
    animation: fadeInUp 0.8s ease-out backwards;
}

.card:nth-child(1) {
    animation-delay: 0.2s;
}

.card:nth-child(2) {
    animation-delay: 0.3s;
}

.card:nth-child(3) {
    animation-delay: 0.4s;
}

.card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    box-shadow: 0 10px 30px var(--shadow);
}

.card-header {
    text-align: center;
}

.card-icon {
    width: 50px;
    height: 50px;
    color: var(--accent);
    margin-bottom: 20px;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.card-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ================================
   TIMELINE SECTION
   ================================ */
.timeline {
    background: rgba(0, 0, 0, 0.2);
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.timeline-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 30px;
    transition: all 0.4s ease;
    animation: fadeInUp 0.8s ease-out backwards;
}

.timeline-card:nth-child(1) {
    animation-delay: 0.2s;
}

.timeline-card:nth-child(2) {
    animation-delay: 0.3s;
}

.timeline-card:nth-child(3) {
    animation-delay: 0.4s;
}

.timeline-card:nth-child(4) {
    animation-delay: 0.5s;
}

.timeline-card:hover {
    transform: translateY(-5px);
    border-left-width: 6px;
    box-shadow: 0 10px 30px var(--shadow);
}

.timeline-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--primary-bg);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.timeline-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.timeline-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ================================
   RESEARCH SECTION
   ================================ */
.research-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.research-text {
    animation: fadeInLeft 0.8s ease-out;
}

.research-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

.research-items {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.research-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.research-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    transform: translateX(10px);
}

.research-icon {
    width: 30px;
    height: 30px;
    color: var(--accent);
    flex-shrink: 0;
}

.research-item-title {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.research-item-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.research-image {
    position: relative;
    animation: fadeInRight 0.8s ease-out;
}

.research-img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 10px 40px var(--shadow);
    border: 2px solid var(--border);
    filter: sepia(0.15) contrast(1.05);
    transition: all 0.5s ease;
}

.research-image:hover .research-img {
    transform: scale(1.02);
    filter: sepia(0) contrast(1);
}

.image-overlay-light {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
    pointer-events: none;
    opacity: 0.3;
    border-radius: 4px;
}

/* ================================
   GET INVOLVED SECTION
   ================================ */
.get-involved {
    background: rgba(0, 0, 0, 0.2);
}

.involvement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.involvement-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    transition: all 0.4s ease;
    animation: fadeInUp 0.8s ease-out backwards;
}

.involvement-card:nth-child(1) {
    animation-delay: 0.2s;
}

.involvement-card:nth-child(2) {
    animation-delay: 0.3s;
}

.involvement-card:nth-child(3) {
    animation-delay: 0.4s;
}

.involvement-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    box-shadow: 0 10px 30px var(--shadow);
}

.involvement-icon {
    width: 60px;
    height: 60px;
    color: var(--accent);
    margin-bottom: 20px;
}

.involvement-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.involvement-description {
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.7;
}

/* ================================
   CONTACT SECTION
   ================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
}

.contact-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 40px;
}

.contact-header {
    margin-bottom: 25px;
}

.contact-icon {
    width: 35px;
    height: 35px;
    color: var(--accent);
    margin-bottom: 15px;
}

.contact-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.contact-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-secondary);
}

.contact-item-icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
    flex-shrink: 0;
}

/* ================================
   FORM STYLES
   ================================ */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-input,
.form-textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ================================
   FOOTER
   ================================ */
.footer {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.footer-logo-icon {
    width: 30px;
    height: 30px;
    color: var(--accent);
}

.footer-logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.footer-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-link:hover {
    color: var(--text-primary);
    padding-left: 5px;
}

.footer-connect-text {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.footer-buttons {
    display: flex;
    gap: 10px;
}

.footer-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 40px 0 30px;
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ================================
   ANIMATIONS
   ================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .hero-content,
    .research-content {
        gap: 40px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .main-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-menu {
        display: block;
    }

    .site-title {
        font-size: 1.2rem;
    }

    .site-subtitle {
        font-size: 0.7rem;
    }

    .hero-content,
    .research-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1.05rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .cards-grid,
    .timeline-grid,
    .involvement-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 0;
    }

    .about,
    .timeline,
    .research,
    .get-involved,
    .contact {
        padding: 50px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .card,
    .timeline-card,
    .involvement-card,
    .contact-card {
        padding: 30px;
    }
}

/* ================================
   POPUP MODAL
   ================================ */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.popup-content {
    background: linear-gradient(135deg, var(--secondary-bg), var(--primary-bg));
    border: 2px solid var(--accent);
    border-radius: 12px;
    padding: 50px;
    max-width: 500px;
    text-align: center;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.popup-overlay.active .popup-content {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
}

.popup-close:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.popup-close i {
    width: 24px;
    height: 24px;
}

.popup-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: rgba(139, 115, 85, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent);
}

.popup-icon i {
    width: 40px;
    height: 40px;
    color: var(--accent);
}

.popup-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.popup-message {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* ================================
   IMAGE POPUP MODAL
   ================================ */
.image-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 40px;
}

.image-popup-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.image-popup-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.image-popup-overlay.active .image-popup-content {
    transform: scale(1);
}

.popup-fullsize-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border: 3px solid var(--accent);
    border-radius: 4px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.9);
    cursor: zoom-out;
}

.image-popup-close {
    position: fixed;
    top: 30px;
    right: 30px;
    background: rgba(139, 115, 85, 0.3);
    border: 2px solid var(--accent);
    color: var(--text-primary);
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-popup-close:hover {
    background: var(--accent);
    transform: rotate(90deg);
}

.image-popup-close i {
    width: 28px;
    height: 28px;
}