@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* Reset and Variables */
:root {
    --bg-light: #FAF6EE; /* Warm parchment tone */
    --sidebar-bg: #EBF1F6; /* Soft subtle ice-blue tone */
    --text-primary: #29235C; /* Logo Deep Navy */
    --text-secondary: #565E7A; /* Readable gray-navy */
    --accent-color: #37AAE1; /* Logo Sky Blue */
    --accent-gradient: linear-gradient(135deg, #37AAE1 0%, #29235C 100%);
    --card-bg: rgba(255, 255, 255, 0.65); /* Elegant glass over parchment */
    --border-color: rgba(41, 35, 92, 0.1); /* Subtle Navy borders */
    --shadow-color: rgba(41, 35, 92, 0.04);
}

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

body, html {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

h1, h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Layout */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 360px;
    background-color: var(--sidebar-bg);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4rem 3rem;
    border-right: 1px solid var(--border-color);
    z-index: 100;
}

.site-logo {
    width: 100%;
    height: auto;
    max-height: 110px;
    margin-bottom: 2.5rem;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
    transition: transform 0.3s ease;
}

.logo-link {
    display: block;
    margin-bottom: 0.5rem;
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 4rem;
}

.main-nav ul {
    list-style: none;
}

.main-nav li {
    margin-bottom: 1.2rem;
}

.nav-link {
    font-size: 1rem;
    color: var(--text-secondary);
    position: relative;
    display: inline-block;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.sidebar-footer {
    font-size: 0.9rem;
}

.social-link {
    color: var(--accent-color);
    font-weight: 600;
}

/* Main Content Area */
.content-area {
    margin-left: 360px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gallery-section {
    min-height: 100vh;
    padding: 6rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 3rem;
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background-image: url('../assets/clustering_graph_recolored.jpg');
    background-size: contain;
    background-position: right center;
    background-repeat: no-repeat;
    opacity: 0.3; /* Subtle watermark */
    z-index: 0;
    pointer-events: none;
}

.hero-text {
    max-width: 800px;
    animation: fadeIn 1s ease-out;
    position: relative;
    z-index: 1;
}

.intro {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* About Section */
.about-section {
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background-image: url('../assets/network_graph_recolored.jpg');
    background-size: contain;
    background-position: right center;
    background-repeat: no-repeat;
    opacity: 0.3; /* Subtle watermark */
    z-index: 0;
    pointer-events: none;
}

.about-card {
    position: relative;
    z-index: 1;
}

/* Services Grid Section */
.services-section {
    padding: 6rem 4rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    width: 100%;
}

.service-card {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1), border-color 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
}

.service-icon {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--accent-color);
    opacity: 0.4;
    letter-spacing: 2px;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.service-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.service-card b, .service-card strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1.25rem 2.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.primary-btn {
    background: var(--text-primary);
    color: #ffffff;
}

.primary-btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 132, 255, 0.2);
}

/* Form Styling */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.h-captcha {
    margin: 0.5rem 0;
    display: flex;
    justify-content: center;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.form-group input, 
.form-group textarea {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 132, 255, 0.1);
}

.form-group input::placeholder, 
.form-group textarea::placeholder {
    color: #a0a0b0;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Timeline Styling */
.timeline {
    position: relative;
    max-width: 850px;
    margin: 2.5rem 0;
    padding-left: 2rem;
    border-left: 2px solid var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 3.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-badge {
    position: absolute;
    left: calc(-2rem - 6px);
    top: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--accent-color);
    border: 2px solid var(--bg-light);
    box-shadow: 0 0 0 3px var(--border-color);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.timeline-item:hover .timeline-badge {
    background-color: var(--text-primary);
    transform: scale(1.4);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.timeline-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-color);
}

.timeline-org {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.timeline-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Badges section */
.badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.badge-item {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    background-color: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.badge-item:hover {
    background-color: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

/* Scroll Reveal Effects */
@media (prefers-reduced-motion: no-preference) {
    @supports ((animation-timeline: view()) and (animation-range: entry)) {
        @keyframes reveal {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        .reveal-on-scroll {
            animation: reveal auto linear both;
            animation-timeline: view();
            animation-range: entry 10% cover 30%;
        }
    }
}

.reveal-fallback {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-fallback.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 900px) {
    .layout-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 2rem;
        flex-direction: row;
        align-items: center;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .tagline, .sidebar-footer {
        display: none;
    }

    .main-nav ul {
        display: flex;
        gap: 1.5rem;
    }

    .main-nav li {
        margin-bottom: 0;
    }

    .content-area {
        margin-left: 0;
    }

    .gallery-section {
        padding: 4rem 2rem;
    }

    h2 {
        font-size: 2.2rem;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-badge {
        left: calc(-1.5rem - 6px);
    }
}
