* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Source Serif 4", Georgia, serif;
}

html,
body {
    height: 100%;
}

body {
    background-color: #f8f8f8;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    font-weight: 400;
    position: relative;
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
        background-image: radial-gradient(
            circle at top right,
            rgba(40, 40, 55, 0.3),
            transparent 70%
        );
    }
}

.container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    z-index: 2;
}

.content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    box-sizing: border-box;
    overflow: visible;
    position: relative;
    z-index: 2;
}

.header-container {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    width: 100%;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    overflow: visible;
}

h1 {
    font-size: 10rem;
    color: #2c3e50;
    width: 66%;
    text-align: left;
    line-height: 0.85;
    margin: 0;
    font-weight: 300;
    letter-spacing: -7px;
    white-space: nowrap;
    overflow: visible;
    box-sizing: border-box;
    min-width: 0;
    position: relative;
    z-index: 2;
}

@media (prefers-color-scheme: dark) {
    h1 {
        color: #ecf0f1;
        text-shadow: 0 0 15px rgba(52, 152, 219, 0.15);
    }
}

h2 {
    font-size: 2rem;
    color: #7f8c8d;
    font-weight: 300;
    font-style: italic;
    text-align: right;
    white-space: nowrap;
    margin: 0 0 0 auto;
    align-self: flex-start;
    max-width: 33%;
    padding-left: 20px;
    box-sizing: border-box;
    flex-shrink: 0;
    background-color: inherit;
    margin-top: -10px;
    z-index: 3;
}

@media (prefers-color-scheme: dark) {
    h2 {
        color: #95a5a6;
    }
}

a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
    text-decoration: none;
}

@media (prefers-color-scheme: dark) {
    a:hover {
        color: #5dade2;
        text-decoration: none;
    }
}

.footer {
    padding: 20px 0;
    font-size: 0.9rem;
    color: #95a5a6;
    width: 100%;
    font-weight: 300;
    position: relative;
    z-index: 2;
}

@media (prefers-color-scheme: dark) {
    .footer {
        color: #7f8c8d;
        border-top: 1px solid rgba(44, 62, 80, 0.3);
    }

    .footer:before {
        content: "";
        position: absolute;
        top: -1px;
        left: 25%;
        right: 25%;
        height: 1px;
        background: linear-gradient(
            to right,
            rgba(44, 62, 80, 0),
            rgba(52, 152, 219, 0.5),
            rgba(44, 62, 80, 0)
        );
    }
}

/* Noise overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
}

@media (prefers-color-scheme: dark) {
    .noise-overlay {
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
        opacity: 0.4;
    }
}

/* Selection styling */
::selection {
    background: #3498db;
    color: #ffffff;
}

@media (prefers-color-scheme: dark) {
    ::selection {
        background: #3498db;
        color: #121212;
    }
}

.container:after {
    content: "";
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    pointer-events: none;
}

@media (prefers-color-scheme: dark) {
    .container:after {
        background: radial-gradient(
            circle at 80% 20%,
            rgba(52, 152, 219, 0.03),
            transparent 40%
        );
    }
}

@media screen and (max-width: 768px) {
    h1 {
        font-size: 5.5rem;
        width: 100%;
        text-align: left;
        margin-bottom: 15px;
        letter-spacing: -3px;
        max-width: 100%;
        padding-right: 10px;
        white-space: normal;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    h2 {
        width: 100%;
        text-align: right;
        font-size: 1.5rem;
        max-width: 100%;
        padding-left: 0;
        flex-shrink: 1;
    }

    .header-container {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 30px;
        flex-wrap: wrap;
    }

    .content {
        padding: 25px 20px;
    }
}

@media screen and (max-width: 480px) {
    h1 {
        font-size: 3rem;
        letter-spacing: -1px;
        overflow-wrap: break-word;
        word-wrap: break-word;
        white-space: normal;
        margin-bottom: 10px;
        width: 100%;
    }

    h2 {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }

    .content {
        padding: 15px;
    }
}
