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

body {
    font-family: "Courier New", Courier, monospace;
    line-height: 1.6;
    color: #333;
    background-color: white;
    padding-bottom: 50px;
}

.content {
    animation: contentFadeIn 220ms ease-out both;
}

.content.is-leaving {
    animation: contentFadeOut 200ms ease-in both;
}

@keyframes contentFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes contentFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .content,
    .content.is-leaving {
        animation: none;
    }
}

a,
a:visited {
    color: #444;
    text-decoration: none;
}

a:hover,
a:focus-visible {
    text-decoration: underline;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    background: white;
    color: #333;
    padding: 3.75rem 3rem 1.5rem;
}

.header-bar {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: nowrap;
}

.logo-container {
    padding-top: 0.75rem;
}

.logo {
    height: auto;
    display: block;
    width: min(520px, 100%);
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-end;
    padding-bottom: 0;
    margin-left: auto;
    justify-content: flex-end;
    height: 100%;
}

.nav a {
    color: #000;
    text-decoration: none;
    font-weight: 300;
    letter-spacing: 0.02em;
}

.nav a:visited {
    color: #444;
}

.nav a:hover,
.nav a:focus-visible {
    text-decoration: underline;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.content {
    background: white;
    padding: 3rem;
    margin-top: 0;
    position: relative;
    z-index: 10;
}

.section {
    margin-bottom: 2.5rem;
}

.section:last-child {
    margin-bottom: 0;
}

.section-divider {
    border-bottom: 1px solid #e9ecef;
    margin: 0.5rem 0 1rem;
}

.home-layout {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: start;
}

.home-intro {
    flex: 1;
}

.home-intro p {
    text-align: left;
    margin: 0;
}

.home-divider {
    width: 1px;
    background-color: #e9ecef;
    align-self: stretch;
}

.affiliate-sections {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.affiliate-projects {
    flex: 1;
}

.content > .affiliate-projects {
    margin-top: 3rem;
    max-width: calc((100% - 2rem - 1px) / 2);
    margin-left: auto;
}

.affiliate-projects h3 {
    color: #000000;
    font-size: 1.4rem;
    margin: 0 0 1rem 0;
    font-weight: 300;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.project-square {
    aspect-ratio: 1;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #000;
    transition: border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.project-square:hover,
.project-square:focus-visible {
    border-color: #000;
    text-decoration: none;
}

.project-square span {
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.project-square-iframe {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0;
}

.project-iframe {
    width: 400%;
    height: 400%;
    border: none;
    transform: scale(0.25);
    transform-origin: top left;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
}

.project-label {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    backdrop-filter: blur(4px);
}

.section h2 {
    color: #000000;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.section h3 {
    color: #000000;
    font-size: 1.4rem;
    margin: 1.5rem 0 1rem 0;
}

.section p {
    margin-bottom: 1rem;
    text-align: justify;
}

.highlight-box {
    background: white;
    border-left: 4px solid #1e3c72;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.conclusion {
    background: white;
    color: #333;
    padding: 2rem;
    margin-top: 2rem;
}

.conclusion h2 {
    color: #1e3c72;
    border-bottom-color: #e9ecef;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.8);
    border-top: 1px solid #e9ecef;
    z-index: 100;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .header {
        padding: 2.75rem 1.5rem 1rem;
    }

    .header-bar {
        flex-wrap: wrap;
    }

    .nav {
        height: auto;
        justify-content: flex-start;
    }
    
    .content {
        padding: 2rem 1.5rem;
    }
    
    .logo {
        width: min(320px, 100%);
    }
    
    .home-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .home-divider {
        width: 100%;
        height: 1px;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
}

