@import url('https://cdn.evanhollander.org/themes.css');

@font-face {
  font-family: 'Inter';
  src: url('https://cdn.evanhollander.org/fonts/InterVariableVF.woff2') format('woff2-variations'),
       url('https://cdn.evanhollander.org/fonts/InterVariableVF.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://cdn.evanhollander.org/fonts/eb-garamond-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --border-radius: 4px;
    --spacing: 2rem;
    --content-width: 760px;
    --font-sans: 'Inter', sans-serif;
    --font-serif: 'EB Garamond', Georgia, serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    line-height: 1.7;
    color: var(--text);
    background-color: var(--canvas);
    font-size: 1.1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.theme-toggle-wrapper {
    position: absolute;
    top: 1em;
    right: 1em;
    width: 4em;
    height: 4em;
    z-index: 998;
}

.theme-toggle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    border-radius: 2em;
    padding: 0;
    cursor: pointer;
    z-index: 2;
    opacity: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;
}

.theme-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1.4em;
    height: 1.4em;
    fill: var(--primary);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.moon-icon {
    opacity: 0;
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
}

[data-theme="light"] .sun-icon {
    opacity: 1;
}

.container {
    width: 100%;
    overflow-x: hidden;
}

.content {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
    box-sizing: border-box;
}

h1, h2, h3 {
    font-family: var(--font-sans);
    line-height: 1.3;
    color: var(--primary);
}

h1 {
    font-size: 2.25rem;
    margin: 0;
}

h2 {
    font-size: 1.4rem;
    margin: 0 0 0.75rem;
}

h3 {
    font-size: 1.1rem;
    margin: 0 0 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.6em;
}

p {
    margin-bottom: 1.25rem;
}

a {
    color: var(--primary);
    text-decoration: none;
}

.site-header {
    text-align: center;
    padding: 4rem 0 3rem;
    width: 100%;
}

.subtitle {
    font-size: 1.15rem;
    opacity: 0.85;
    margin-top: 0.5rem;
}

.main-content {
    flex: 1;
    padding-bottom: 3rem;
}

.section {
    margin-bottom: 2rem;
    padding: 1.75rem 2rem;
    background: var(--surface);
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.key-card {
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius);
    margin-bottom: 1.25rem;
}

.key-card:last-child {
    margin-bottom: 0;
}

.key-purpose {
    opacity: 0.8;
    margin-bottom: 1rem;
}

.badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2em 0.6em;
    border-radius: 1em;
    background: color-mix(in srgb, var(--primary) 15%, var(--surface) 85%);
    color: var(--primary);
}

.badge.pending {
    background: color-mix(in srgb, var(--yellow) 25%, var(--surface) 75%);
    color: color-mix(in srgb, var(--yellow) 70%, black 30%);
}

dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.4rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

dt {
    opacity: 0.65;
}

dd {
    font-family: monospace;
    word-break: break-all;
}

dd.unpublished {
    font-family: var(--font-sans);
    opacity: 0.6;
    font-style: italic;
}

.key-download {
    display: inline-block;
    font-size: 0.9rem;
    padding: 0.5em 1em;
    border: 1px solid var(--primary);
    border-radius: var(--border-radius);
}

.key-download.disabled {
    pointer-events: none;
    opacity: 0.4;
    border-color: currentColor;
}

ol, ul {
    padding-left: 1.4rem;
    margin-bottom: 1.25rem;
}

li {
    margin-bottom: 0.5rem;
}

code {
    font-family: monospace;
    background: color-mix(in srgb, var(--primary) 8%, var(--surface) 92%);
    padding: 0.1em 0.4em;
    border-radius: 3px;
}

.site-footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    width: 100%;
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (max-width: 600px) {
    :root { --spacing: 1.25rem; }
    h1 { font-size: 1.85rem; }
    .section { padding: 1.25rem 1.5rem; }
}
