/* === Reset & Base === */

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

:root {
    --bg: #1a1410;
    --bg-card: #1f1914;
    --text: #e8e0d8;
    --text-muted: #a89a8c;
    --text-dim: #6b5e52;
    --accent: #da7756;
    --border: #2e2520;
    --font-mono: 'JetBrains Mono', monospace;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    max-width: 680px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Subtle grain texture */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1000;
}

/* === Typography === */

h1, h3 {
    font-family: var(--font-mono);
    font-weight: 700;
}

h1 {
    font-size: 2.6rem;
    line-height: 1.1;
    color: #fff;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-dim);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

p {
    margin-bottom: 0.75rem;
}

strong {
    color: #fff;
    font-weight: 600;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.8;
}

/* === Header === */

header {
    margin-bottom: 4rem;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.header-links {
    display: flex;
    gap: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

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

.header-links a:hover {
    color: var(--accent);
    opacity: 1;
}

.tagline {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.channel-cta {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* === Sections === */

section {
    margin-bottom: 4rem;
}

#about p {
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.8;
}

/* === Now === */

.now-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
}

.now-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0;
    font-style: italic;
}

/* === Talks === */

.talks-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.talks-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    font-size: 0.9rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
}

.talks-list li:first-child {
    padding-top: 0;
}

.talks-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.talks-list a {
    flex: 1;
}

.date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    white-space: nowrap;
}

/* === Timeline === */

.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.timeline-item {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-item .date {
    width: 90px;
    flex-shrink: 0;
}

.timeline-item h3 {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.org {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0;
}

.timeline-item--edu {
    opacity: 0.6;
}

/* === Links Grid === */

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.link-card {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.9rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.2s, opacity 0.2s;
}

.link-card:hover {
    border-color: var(--accent);
    opacity: 1;
}

.link-name {
    font-size: 0.85rem;
    color: var(--text);
    font-weight: 500;
}

.link-handle {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* === Footer === */

footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

footer p {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    margin: 0;
}

/* === Responsive === */

@media (max-width: 500px) {
    body {
        padding: 2.5rem 1.25rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    .header-top {
        flex-direction: column-reverse;
        gap: 1rem;
    }

    .header-links {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .tagline {
        font-size: 0.95rem;
    }

    .timeline-item {
        flex-direction: column;
        gap: 0.1rem;
    }

    .timeline-item .date {
        width: auto;
    }

    .talks-list li {
        flex-direction: column;
        gap: 0.1rem;
    }

    .links-grid {
        grid-template-columns: 1fr 1fr;
    }
}
