@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-main: #0a0d14;
    --bg-card: rgba(16, 22, 35, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.35);
    --accent: #14b8a6;
    --accent-glow: rgba(20, 184, 166, 0.3);
    --red: #ef4444;
    --font-outfit: 'Outfit', sans-serif;
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-outfit);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background elements for glow */
body::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.08) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

header {
    background: rgba(10, 13, 20, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.02em;
}

.logo-icon {
    color: var(--red);
    font-size: 1.8rem;
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.15); }
    28% { transform: scale(1); }
    42% { transform: scale(1.15); }
    70% { transform: scale(1); }
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: 80vh;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 1rem;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.1) 0%, transparent 60%);
    border-radius: 24px;
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 2rem auto;
}

/* Search bar styling */
.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1.2rem 1.5rem 1.2rem 3.5rem;
    font-family: var(--font-outfit);
    font-size: 1.1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
    box-shadow: var(--card-shadow);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 25px var(--primary-glow);
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.2rem;
    pointer-events: none;
}

/* Archive grid and Years */
.years-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.year-btn {
    font-family: var(--font-outfit);
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.year-btn:hover {
    color: var(--text-primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--primary-glow);
}

.year-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 10px 20px var(--primary-glow);
}

/* Grid layout for talks */
.talks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.talk-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition);
    box-shadow: var(--card-shadow);
}

.talk-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(59, 130, 246, 0.15);
}

.talk-thumb-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #0f172a;
    overflow: hidden;
}

.talk-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.talk-card:hover .talk-thumb {
    transform: scale(1.05);
}

.play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(59, 130, 246, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    opacity: 0.8;
    transition: var(--transition);
}

.talk-card:hover .play-badge {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
    background: var(--accent);
}

.talk-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.talk-speaker {
    font-size: 0.9rem;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.talk-title {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.talk-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn-sm {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    font-family: var(--font-outfit);
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

/* Talk detail page */
.talk-detail-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

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

.video-player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.video-player-wrapper video {
    width: 100%;
    height: 100%;
    display: block;
}

.talk-details h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.talk-meta-details {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-size: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.talk-meta-details strong {
    color: var(--text-primary);
}

.talk-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Sidebar & PDFs */
.sidebar-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    height: fit-content;
}

.sidebar-panel h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.pdf-preview-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.pdf-icon {
    font-size: 2rem;
    color: var(--red);
}

.pdf-details h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.pdf-details p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.download-btn-large {
    display: block;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent) 0%, #0d9488 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.download-btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

/* SEO Slide Transcript section */
.transcript-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 3rem;
}

.transcript-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.transcript-content {
    color: var(--text-secondary);
    font-size: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 1rem;
    white-space: pre-line;
}

.transcript-content::-webkit-scrollbar {
    width: 6px;
}

.transcript-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

footer {
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: 5rem;
    background: rgba(10, 13, 20, 0.9);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
    text-decoration: none;
}

/* Search results styles */
.search-header {
    margin-bottom: 2rem;
}

.search-query-display {
    color: var(--accent);
}
