:root {
    --primary-color: #270097;
    --text-color: white;
    --font-main: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --spacing-sm: 12px;
    --spacing-md: 24px;
    --spacing-lg: 48px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    color: var(--text-color);
    background-color: var(--primary-color);
}

.simulation-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#glCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

#container {
    position: relative;
    height: 100vh;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto auto 1fr;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    z-index: 1;
    pointer-events: none;
}

header, main, section, footer, nav {
    padding: 0;
    pointer-events: none;
}

main, section {
    font-size: 0.95rem;
    line-height: 1.4;
}

footer {
    font-size: 0.85rem;
    line-height: 1.5;
}

header, .project-1 { grid-column: 1; }
main, .project-2 { grid-column: 2; }
section, .project-3 { grid-column: 3; }
footer, .project-4 { grid-column: 4; }

header, main, section, footer {
    grid-row: 1;
}

header h1 {
    font-weight: 700;
    font-size: 2.8rem;
    line-height: 1;
    letter-spacing: -0.02em;
}

a {
    color: var(--text-color);
    text-decoration: none;
    padding-bottom: 3px;
    font-weight: bold;
    pointer-events: auto;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.7;
}

.project-column {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    grid-row: 4;
}

.project-link {
    display: inline-block;
    color: var(--text-color);
    pointer-events: auto;
}

.project-link:hover,
.project-link:focus {
    color: var(--primary-color);
    background-color: var(--text-color);
    outline: none;
    opacity: 1;
}

.project {
    display: flex;
    flex-direction: column;
    padding: 6px 10px;
}

.project .title {
    font-size: 1.1rem;
    margin-bottom: 4px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.project .subtitle {
    font-size: 0.8rem;
    margin-bottom: var(--spacing-sm);
    opacity: 0.7;
    font-weight: 400;
}

.project .description {
    font-size: 0.75rem;
    line-height: 1.5;
    font-weight: normal;
}

.project .authors {
    font-size: 0.7rem;
    line-height: 1.4;
    font-style: normal;
    margin-top: 8px;
    opacity: 0.8;
}

.project-link:hover .title,
.project-link:hover .subtitle,
.project-link:hover .description,
.project-link:hover .authors {
    color: var(--primary-color);
    opacity: 1;
}

@media (max-width: 768px) {
    html, body {
        overflow-y: auto;
        overflow-x: hidden;
        height: auto;
    }
    
    body {
        position: relative;
        min-height: 100vh;
        z-index: 0;
    }
    
    .simulation-container {
        position: fixed;
        height: 100vh;
        width: 100vw;
        top: 0;
        left: 0;
        z-index: -1;
    }
    
    #glCanvas {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
    }
    
    #container {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(8, auto);
        height: auto;
        min-height: 100vh;
        gap: var(--spacing-lg);
        padding: var(--spacing-md);
    }
    
    header, main, section, footer, .project-column {
        grid-column: 1;
        width: 100%;
    }
    
    header { 
        grid-row: 1; 
        padding-top: var(--spacing-md);
    }
    main { grid-row: 2; }
    section { grid-row: 3; }
    .project-1 { grid-row: 4; }
    .project-2 { grid-row: 5; }
    .project-3 { grid-row: 6; }
    .project-4 { grid-row: 7; }
    footer { 
        grid-row: 8; 
        padding-bottom: var(--spacing-lg);
    }
    
    .project {
        width: 100%;
        padding: 0;
    }
    
    .project .title { font-size: 1.2rem; }
    .project .subtitle { font-size: 0.9rem; }
    .project .description { font-size: 0.85rem; }
}

@media (max-width: 480px) {
    :root {
        --spacing-md: 20px;
        --spacing-lg: 36px;
    }
}

h1 .line {
    display: block;
}
