:root {
    /* Light mode defaults */
    --bg-color: #f8f9fa;
    --text-main: #1a1a1a;
    --text-muted: #606060;
    --border-color: #e5e5e5;
    --hover-bg: #f1f3f5;
    --link-color: #0066ff;
    --header-glow: 2px 2px 2px var(--bg-color), 0 0 1em darkblue, 0 0 2em blue
}

[data-theme="dark"] {
    /* Dark mode variables */
    --bg-color: #0a0a0a;
    --text-main: #f5f5f5;
    --text-muted: #a0a0a0;
    --border-color: #262626;
    --hover-bg: #141414;
    --link-color: #99ccff;
    --header-glow: 2px 2px 2px var(--bg-color), 0 0 0.5em red, 0 0 1em pink
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    width: 100%;
    max-width: 640px;
    position: relative;
}

header {
    margin-bottom: 3rem;
    position: relative;
    padding-right: 3rem;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    text-shadow: var(--header-glow)
}

.description {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
}

/* Theme Toggle Button */
.theme-toggle {
    position: absolute;
    top: 0;
    right: 0;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    transition: background-color 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
    background-color: var(--hover-bg);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Hide icon depending on theme */
[data-theme="dark"] .sun-icon {
    display: block;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

/* Links Table Layout */
.links-table {
    width: 100%;
    border-collapse: collapse;
}

.links-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.links-row:first-child {
    border-top: 1px solid var(--border-color);
}

.links-row:hover {
    background-color: var(--hover-bg);
}

.cell {
    padding: 1.25rem 0.5rem;
    display: flex;
    align-items: center;
}

.link-title a {
    color: var(--link-color);
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s;
}

.link-title a:hover {
    opacity: 0.7;
}

.link-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.link-extern {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    position: relative;
    top: -0.06em;
    fill: currentColor;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


@media (max-width: 480px) {
    header {
        padding-right: 0;
        margin-bottom: 2rem;
    }

    .theme-toggle {
        float: right;
    }

    .links-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        padding: 1rem 0;
    }

    .cell {
        padding: 0.25rem 0.5rem;
    }
}