:root {
    --bg: #0f172a;
    --bg-elevated: #111827;
    --accent: #38bdf8;
    --accent-soft: rgba(56, 189, 248, 0.15);
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --border-subtle: rgba(148, 163, 184, 0.35);
    --radius-lg: 18px;
    --radius-full: 999px;
    --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.4);
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background: radial-gradient(circle at top, #020617 0, #020617 35%, #020617 60%, #020617 100%);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    padding: 32px 16px;
}

.page {
    width: 100%;
    max-width: 960px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.92));
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: var(--shadow-soft);
    padding: 28px 24px 32px;
    position: relative;
    overflow: hidden;
}

.page::before {
    content: "";
    position: absolute;
    top: -140px;
    right: -140px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.18), transparent 70%);
    opacity: 0.8;
    pointer-events: none;
}

header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.name-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.name {
    font-size: clamp(1.8rem, 2.3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: 0.03em;
}

.tagline {
    font-size: 0.95rem;
    color: var(--text-muted);
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

nav a {
    text-decoration: none;
    font-size: 0.9rem;
    color: var(--text-main);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(14px);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

nav a:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: #e0f2fe;
    transform: translateY(-1px);
}

main {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 24px;
    margin-top: 4px;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    main {
    grid-template-columns: 1fr;
    row-gap: 0;
    }
    .page {
    padding: 22px 18px 26px;
    border-radius: 20px;
    }
}

.card {
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.98));
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    padding: 18px 18px 16px;
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
}

.card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(140deg, rgba(56, 189, 248, 0.04), transparent);
    mix-blend-mode: screen;
    pointer-events: none;
}

.card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #e5e7eb;
}

.card-subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #e5e7eb;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-muted);
}

.pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
}

.intro-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.inline-list {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 2px;
}

.inline-tag {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(15, 23, 42, 0.9);
}

.link-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    font-size: 0.86rem;
    text-decoration: none;
    margin-top: 6px;
    transition: background 0.15s ease, transform 0.08s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.link-button span.icon {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    opacity: 0.85;
}

.link-button:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25);
    transform: translateY(-1px);
}

.link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.section-list {
    list-style: none;
    margin-top: 4px;
}

.section-item {
    padding: 7px 9px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.92);
    margin-bottom: 7px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.item-title-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: baseline;
}

.item-title {
    font-size: 0.9rem;
    font-weight: 500;
}

.item-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    white-space: nowrap;
}

.item-tags {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.item-tag {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.95);
}

.item-description {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.math-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    margin-top: 6px;
}

.math-card {
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.93);
    padding: 8px 9px;
    font-size: 0.82rem;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.math-card-title {
    font-weight: 500;
}

.math-card-meta {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.math-card a {
    margin-top: 4px;
    font-size: 0.8rem;
}

a {
    color: #7dd3fc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

footer {
    margin-top: 16px;
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.footer-right {
    font-family: var(--font-mono);
}