* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8b6f47;
    --secondary-color: #a0826d;
    --accent-color: #d4a574;
    --dark-bg: #2c2416;
    --light-bg: #f5f1eb;
    --text-dark: #1a1612;
    --text-light: #e8e3db;
    --decay-gradient: linear-gradient(135deg, #d4a574 0%, #a0826d 50%, #8b6f47 100%);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
    overflow-x: hidden;
}

.header {
    background: var(--dark-bg);
    color: var(--text-light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-menu a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--accent-color);
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    margin: 4rem 0;
    padding: 2rem 0;
}

h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    text-align: center;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
}

.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--decay-gradient);
    color: white;
    border-radius: 10px;
    margin-bottom: 4rem;
}

.hero-content {
    margin-bottom: 2rem;
}

.subtitle {
    font-size: 1.3rem;
    margin: 1rem 0;
    opacity: 0.95;
}

.philosophy {
    font-size: 1.1rem;
    font-style: italic;
    margin-top: 1rem;
    opacity: 0.9;
}

.hero-image img {
    width: 100%;
    max-width: 800px;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-top: 2rem;
}

.life-timer {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.timer-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    background: white;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:hover {
    background: var(--light-bg);
}

.timer-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.timer-card {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 10px;
    border: 2px solid var(--accent-color);
    text-align: center;
}

.timer-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 1rem 0;
}

.timer-progress {
    width: 100%;
    height: 20px;
    background: #ddd;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-bar {
    height: 100%;
    background: var(--decay-gradient);
    transition: width 0.5s ease;
}

.best-lifespan {
    text-align: center;
    padding: 1.5rem;
    background: var(--accent-color);
    color: white;
    border-radius: 10px;
    margin-top: 2rem;
}

.lab-grid, .preservation-grid, .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.lab-card, .preservation-card, .feature-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.lab-card:hover, .preservation-card:hover, .feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.lab-card img, .preservation-card img, .feature-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.lab-card h3, .preservation-card h3, .feature-card h3 {
    padding: 1rem;
    color: var(--primary-color);
}

.lab-card p, .preservation-card p, .feature-card p {
    padding: 0 1rem 1.5rem;
    color: var(--text-dark);
}

.morphology-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.morphology-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    gap: 2rem;
    align-items: center;
}

.morphology-item img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.research-category {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.research-category:hover {
    transform: scale(1.05);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.research-category img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 1rem;
}

.viz-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.viz-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.heatmap {
    width: 100%;
    height: 300px;
    background: var(--decay-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.color-spectrum {
    width: 100%;
    height: 300px;
    background: linear-gradient(to right, #d4a574, #c9a961, #b89d4a, #8b6f47, #6b5d3f, #4a3d2f);
    border-radius: 10px;
}

.interaction-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.interaction-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.issues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.issue-card {
    background: var(--dark-bg);
    color: var(--text-light);
    padding: 2rem;
    border-radius: 10px;
    border-left: 5px solid var(--accent-color);
}

.contact {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition);
}

.contact-info a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.privacy {
    background: var(--light-bg);
    padding: 3rem;
    border-radius: 10px;
    margin-top: 2rem;
}

.privacy-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer {
    background: var(--dark-bg);
    color: var(--text-light);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: slideDown 0.3s;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.close:hover {
    color: var(--primary-color);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .morphology-item {
        flex-direction: column;
    }

    .morphology-item img {
        width: 100%;
    }

    .timer-display {
        grid-template-columns: 1fr;
    }
}

