/* Dark Tech Theme - Conference Talks Archive */
@import url('https://fonts.googleapis.com/css2?family=Smooch+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* Color Variables */
:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-card: #1c2128;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --accent: #f0b429;
    --accent-hover: #ffc940;
    --accent-muted: rgba(240, 180, 41, 0.15);
    --border: #30363d;
    --border-accent: #f0b429;
    --crt-green: #39ff14;
    --crt-glow: 0 0 10px rgba(57, 255, 20, 0.4), 0 0 20px rgba(57, 255, 20, 0.2), 0 0 30px rgba(57, 255, 20, 0.1);
}

/* Reset and base styles */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    font-size: 16px;
}

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

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Main content */
.site-main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero-section {
    position: relative;
    background-color: var(--bg-secondary);
    background-size: cover;
    background-position: center;
    margin: -2rem -2rem 2rem -2rem;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.hero-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    /* Full-section blur */
    background: rgba(13, 17, 23, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 900px;
    padding: 1.5rem 2rem;
    border-radius: 8px;
    border: 1px solid rgba(48, 54, 61, 0.5);
    background: rgba(13, 17, 23, 0.5);
}

.hero-avatar {
    width: 110px;
    height: 110px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.hero-text {
    text-align: left;
}

.hero-tagline {
    font-family: 'Smooch Sans', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    line-height: 1;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.hero-bio {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 1.25rem;
    font-weight: 400;
    line-height: 1.5;
}

.hero-nav {
    display: flex;
    gap: 0.5rem;
}

.hero-nav a {
    color: var(--text-secondary);
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.2s;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
}

.hero-nav a:hover {
    color: var(--accent);
    border-color: var(--accent);
    text-decoration: none;
}

/* Year Navigation - Floating Sidebar */
.year-nav {
    position: fixed;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.year-nav-inner {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.year-nav-link {
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.4rem 0.6rem;
    text-decoration: none;
    transition: all 0.15s;
    border-radius: 4px;
}

.year-nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    text-decoration: none;
}

.year-nav-link.active {
    color: var(--bg-primary);
    background: var(--accent);
    font-weight: 600;
}

/* Talks Grid Layout */
.talks-grid-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem 0 1rem;
}

.talks-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

/* Year bookend - opening bracket on first card, closing on last card */
.talk-card.year-first::before,
.talk-card.year-last::after {
    content: "";
    position: absolute;
    border: 2px solid var(--accent);
    pointer-events: none;
    z-index: 20;
}

/* Opening bracket - top-left on first card of year */
.talk-card.year-first::before {
    top: -8px;
    left: -8px;
    width: 24px;
    height: 24px;
    border-right: none;
    border-bottom: none;
}

/* Closing bracket - bottom-right on last card of year */
.talk-card.year-last::after {
    bottom: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-left: none;
    border-top: none;
}

/* Scroll anchor offset */
.talk-card[id^="year-"] {
    scroll-margin-top: 2rem;
}

/* Year badge positioned at top-left corner */
.year-badge {
    position: absolute;
    top: -1.5rem;
    left: -8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.05em;
    white-space: nowrap;
    z-index: 25;
}

.talk-card {
    position: relative;
    background: var(--bg-card);
    overflow: visible;
    transition: all 0.12s ease-out;
    border: 1px solid var(--border);
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.talk-card:hover {
    background: var(--bg-tertiary);
    border-color: var(--crt-green);
    box-shadow: var(--crt-glow);
    transform: translateY(-2px);
}

.talk-link {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.talk-link:hover {
    text-decoration: none;
}

.talk-thumbnail-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: var(--bg-primary);
}

.talk-thumbnail-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.12s ease-out;
    opacity: 0.9;
}

.talk-card:hover .talk-thumbnail-wrapper img {
    opacity: 1;
    filter: brightness(1.1) saturate(1.1);
}

.talk-meta-box {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.35rem 0.65rem;
    background: rgba(13, 17, 23, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 100px;
    border: 1px solid rgba(48, 54, 61, 0.5);
}

.talk-event {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--accent);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    display: block;
}

.talk-info {
    padding: 0.75rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}

.talk-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
}

/* Single Talk Hero */
.talk-hero {
    position: relative;
    height: 200px;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    margin: -2rem -2rem 2rem -2rem;
    overflow: hidden;
}

.talk-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(13, 17, 23, 0.7) 0%,
        rgba(13, 17, 23, 0.95) 100%);
}

.talk-hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
}

.talk-hero-back {
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    text-decoration: none;
    transition: color 0.2s;
}

.talk-hero-back:hover {
    color: var(--accent);
    text-decoration: none;
}

.talk-hero-content {
    max-width: 900px;
}

.talk-hero-title {
    font-family: 'Smooch Sans', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.talk-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.talk-hero-event {
    font-weight: 500;
    color: var(--accent);
}

.talk-hero-date::before,
.talk-hero-location::before {
    content: "/";
    margin-right: 0.5rem;
    color: var(--text-muted);
}

/* Single talk page */
.talk-single {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 2rem;
}

.talk-main-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.talk-slides-section {
    min-width: 0;
}

.talk-hero-image {
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    overflow: hidden;
}

.talk-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* PDF Viewer */
.pdf-viewer {
    margin-bottom: 2rem;
}

.pdf-download-link {
    text-align: center;
    margin-top: 1rem;
}

.pdf-download-link a {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent);
    border-radius: 4px;
    transition: all 0.2s;
}

.pdf-download-link a:hover {
    background: var(--accent);
    color: var(--bg-primary);
    text-decoration: none;
}

/* PDF Placeholder */
.pdf-placeholder {
    position: relative;
    border: 1px solid var(--border);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--bg-primary);
}

.pdf-placeholder-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.6;
}

.pdf-placeholder-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 17, 23, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.pdf-placeholder-text {
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.pdf-loading-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.pdf-iframe {
    width: 100%;
    border: 1px solid var(--border);
}

.talk-description {
    margin-bottom: 2.5rem;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.talk-description p {
    margin: 0 0 1.25rem;
}

/* Resources */
.talk-resources {
    margin-bottom: 2.5rem;
}

.talk-resources h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0 0 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.talk-resources ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}

.talk-resources li {
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    transition: border-color 0.2s;
}

.talk-resources li:hover {
    border-left-color: var(--accent-hover);
}

.talk-resources li a {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.talk-resources li a:hover {
    color: var(--accent);
}

.talk-resources li p {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Embeds */
.talk-embeds {
    margin-bottom: 2.5rem;
}

.talk-embeds h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0 0 1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.embeds-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.embed-item {
    min-height: 50px;
}

/* Twitter embeds */
.embed-item[data-embed-type="twitter"] blockquote {
    background: var(--bg-tertiary);
    border-left: 3px solid #1da1f2;
    padding: 1rem;
    margin: 0;
}

/* Bio Page */
.bio-hero {
    position: relative;
    background: var(--bg-secondary);
    margin: -2rem -2rem 2rem -2rem;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.bio-hero-overlay {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
}

.bio-hero-back {
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    text-decoration: none;
    transition: color 0.2s;
}

.bio-hero-back:hover {
    color: var(--accent);
    text-decoration: none;
}

.bio-hero-content {
    text-align: center;
    padding: 2rem 0;
}

.bio-avatar {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--border);
    margin-bottom: 1rem;
}

.bio-hero-title {
    font-family: 'Smooch Sans', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.bio-hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

.bio-single {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 2rem;
}

.bio-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.bio-content h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
}

.bio-content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--accent-muted);
}

.bio-content a:hover {
    border-bottom-color: var(--accent);
}

.bio-links {
    margin-bottom: 2.5rem;
}

.bio-links h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bio-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.bio-link {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.bio-link:hover {
    border-left-color: var(--accent-hover);
    text-decoration: none;
}

.bio-link-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.bio-link:hover .bio-link-icon {
    color: var(--accent);
}

.bio-link-title {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.bio-link-url {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.bio-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
}

.bio-stat {
    text-align: center;
}

.bio-stat-number {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
}

.bio-stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Footer */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: var(--text-secondary);
}

.site-footer a:hover {
    color: var(--accent);
}

/* Responsive */
@media (max-width: 1024px) {
    .talks-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .year-nav {
        display: none;
    }
}

@media (max-width: 900px) {
    .talk-main-content {
        grid-template-columns: 1fr;
    }

    .talk-description {
        order: 1;
    }

    .talk-slides-section {
        order: 2;
    }
}

@media (max-width: 768px) {
    .hero-section {
        margin: -1.5rem -1.5rem 2rem -1.5rem;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 2rem 1.5rem;
    }

    .hero-avatar {
        width: 90px;
        height: 90px;
    }

    .hero-text {
        text-align: center;
    }

    .hero-tagline {
        font-size: 1.75rem;
    }

    .hero-bio {
        font-size: 0.9rem;
    }

    .hero-nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    .talks-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .talk-hero {
        height: 180px;
        margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    }

    .talk-hero-title {
        font-size: 2rem;
    }

    .talk-hero-meta {
        font-size: 0.8rem;
    }

    .embeds-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-section {
        margin: -1rem -1rem 1.5rem -1rem;
    }

    .hero-content {
        padding: 1.5rem 1rem;
    }

    .hero-avatar {
        width: 80px;
        height: 80px;
    }

    .hero-tagline {
        font-size: 1.5rem;
    }

    .hero-bio {
        font-size: 0.85rem;
    }

    .talk-hero-title {
        font-size: 1.75rem;
    }

    .bio-stats {
        flex-wrap: wrap;
        gap: 2rem;
    }

    .bio-stat-number {
        font-size: 2rem;
    }

    .talks-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .talk-hero {
        height: 160px;
        margin: -1rem -1rem 1rem -1rem;
    }

    .talk-hero-overlay {
        padding: 1rem;
    }

    .talk-hero-title {
        font-size: 1.5rem;
    }

    .talk-hero-meta {
        font-size: 0.75rem;
        gap: 0.5rem;
    }

    .talk-single {
        padding: 1.5rem;
    }
}
