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

:root {
    --bg: #fafaf8;
    --text: #1a1a1a;
    --text-light: #666;
    --line: #ddd;
}

body.dark {
    --bg: #111111;
    --text: #d4d4d4;
    --text-light: #777;
    --line: #333;
}

body.dark .crest {
    filter: invert(0.85) sepia(0.1) brightness(0.9);
    opacity: 0.9;
}

body.warm {
    --bg: #e8e0d0;
    --text: #1a1a1a;
    --text-light: #555;
    --line: #bbb;
}

body.warm .crest {
    filter: invert(22%) sepia(90%) saturate(1500%) hue-rotate(330deg) brightness(76%);
}

html {
    font-size: 16px;
}

body {
    font-family: 'IBM Plex Mono', monospace;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    animation: fadeIn 1s ease-out;
}

.crest {
    width: 170px;
    height: auto;
    transition: transform 0.3s ease;
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

.crest:hover {
    transform: scale(1.03);
}

h1 {
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

hr {
    width: 40px;
    border: none;
    border-top: 1px solid var(--line);
    margin: 0.5rem 0;
}


.brand {
    position: fixed;
    top: 1.5rem;
    left: 2rem;
    font-size: 0.75rem;
    color: var(--text);
}

.tagline {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}

.time {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    padding: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

.time span span {
    font-variant-numeric: tabular-nums;
}

.links {
    position: fixed;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

.links-left {
    left: 2rem;
    text-align: left;
}

.links-right {
    right: 2rem;
    text-align: right;
}

.links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.links a:hover {
    color: var(--text);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (min-width: 768px) {
    .crest {
        width: 200px;
    }

    h1 {
        font-size: 1.4rem;
    }

    .contact {
        font-size: 0.9rem;
    }
}

/* Selection styling */
::selection {
    background: #1a1a1a;
    color: var(--bg);
}
