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

:root {
    --color-primary: #2c3e50;
    --color-secondary: #34495e;
    --color-accent: #3498db;
    --color-text: #333;
    --color-text-light: #666;
    --color-bg: #fff;
    --color-bg-alt: #f8f9fa;
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --max-width: 1200px;
    --spacing: 2rem;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header & Navigation */
.site-header {
    background: var(--color-bg);
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem var(--spacing);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary);
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    color: var(--color-text);
    font-weight: 500;
}

.nav-menu a:hover {
    color: var(--color-accent);
}

/* Main Content */
.main-content {
    flex: 1;
}

/* Hero Section (Home) */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    color: white;
    text-align: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 177.78vh; /* 16:9 aspect ratio */
    height: 100vh;
    min-width: 100%;
    min-height: 56.25vw; /* 16:9 aspect ratio */
    transform: translate(-50%, -50%);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: var(--spacing);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.mission-text {
    font-size: 1.25rem;
    line-height: 1.8;
}

/* Page Sections */
.page-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 4rem var(--spacing);
}

.page-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}

.intro-text {
    font-size: 1.125rem;
    color: var(--color-text-light);
    margin-bottom: 3rem;
    max-width: 800px;
}

/* Team Section */
.team-list {
    display: grid;
    gap: 3rem;
}

.team-member h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-secondary);
}

.team-member p {
    line-height: 1.8;
}

.team-member .social {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--color-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.project-card a {
    color: inherit;
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-info {
    padding: 1.5rem;
}

.project-info h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.project-info p {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* Project Detail */
.project-detail .back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--color-text-light);
}

.project-hero-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.project-content {
    line-height: 1.8;
    max-width: 800px;
}

.project-content h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.project-content h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--color-secondary);
}

.project-content p {
    margin-bottom: 1rem;
}

.project-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.project-content blockquote {
    border-left: 4px solid var(--color-accent);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--color-text-light);
}

.project-content ul, 
.project-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.project-content li {
    margin-bottom: 0.5rem;
}

.project-content hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 2rem 0;
}

.project-content strong {
    color: var(--color-primary);
}

.project-content em {
    color: var(--color-text-light);
}

/* Contact Form */
.contact-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.submit-btn {
    background: var(--color-accent);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-btn:hover {
    background: var(--color-primary);
}

.email-alternative {
    margin-top: 2rem;
    color: var(--color-text-light);
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 6rem var(--spacing);
}

.error-page h1 {
    font-size: 3rem;
}

.error-page p {
    margin-bottom: 2rem;
    color: var(--color-text-light);
}

.back-home {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--color-accent);
    color: white;
    border-radius: 4px;
}

/* Footer */
.site-footer {
    background: var(--color-bg-alt);
    border-top: 1px solid #eee;
    padding: 2rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-weight: bold;
    color: var(--color-primary);
}

.footer-email {
    color: var(--color-text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .hero {
        height: 100vh;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .page-section {
        padding: 2rem var(--spacing);
    }

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

    .footer-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
