/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

/* CSS Variables for Theme */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-banner: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: rgba(229, 231, 235, 0.3);
    --card-hover: #f3f4f6;
    --timeline-line: #d1d5db;
    --accent-color: #4f46e5;
}

.dark {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-banner: radial-gradient(ellipse at top, #1e3a8a 0%, #0f172a 50%, #000000 100%);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(51, 65, 85, 0.3);
    --card-hover: #1e293b;
    --timeline-line: #475569;
    --accent-color: #6366f1;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.75;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Global Hyperlink Styles */
a {
    color: #6366f1; /* Indigo-500 */
    font-weight: 600; /* Semibold */
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.75;
}

/* Link Color Variations (matching reference site) */
a.link-blue {
    color: #3b82f6; /* Blue-500 */
}

a.link-green {
    color: #22c55e; /* Green-500 */
}

a.link-indigo {
    color: #6366f1; /* Indigo-500 (default) */
}

/* Override for specific contexts if needed */
.blog-card {
    color: inherit;
}

.blog-card a {
    color: inherit;
}

/* Header */
header {
    padding: 2rem 0 1rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 200;
    transition: all 0.5s ease;
    background-color: transparent;
}

header.scrolled {
    background-color: var(--bg-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0 0.75rem;
}

.dark header.scrolled {
    background-color: rgba(15, 23, 42, 0.9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

h1 {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    transition: all 0.5s ease;
}

header.scrolled h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

nav {
    position: absolute;
    top: 2rem;
    right: 2rem;
    transition: all 0.5s ease;
}

header.scrolled nav {
    top: 1rem;
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.05);
    border-color: var(--accent-color);
}

/* Banner Section */
.banner-section {
    width: 100%;
    height: 350px;
    background: var(--bg-banner);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 0; /* No margin needed, profile will be absolutely positioned */
}

.banner-section iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.game-placeholder {
    color: var(--text-secondary);
    font-size: 1.5rem;
    text-align: center;
    padding: 2rem;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.5);
}

/* Profile Picture */
.profile-container {
    display: flex;
    justify-content: center;
    position: absolute;
    top: 225px; /* Positioned to overlap the game section */
    left: 0;
    right: 0;
    z-index: 10;
    margin-bottom: 2rem;
}

.profile-picture {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 25px solid var(--bg-primary); /* Thick border matching main website background */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.25rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.profile-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Main Content Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.two-column-layout {
    display: grid;
    grid-template-columns: 30% 70%;
    gap: 3rem;
    margin-top: 2rem;
}

.left-column, .right-column {
    border-left: 1px dashed var(--border-color);
    padding-left: 2rem;
}

/* Section Headers */
.section-header {
    font-family: Georgia, serif;
    font-size: 2.625rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

h2 {
    font-family: Georgia, serif;
}

/* Social Links */
.social-links {
    margin-bottom: 3rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.social-link:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.social-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.social-icons-row {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    padding-left: 0.5rem;
}

.social-link.icon-only {
    padding: 0.5rem;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    justify-content: center;
    width: 40px;
    height: 40px;
}

.social-link.icon-only:hover {
    background: var(--card-hover);
    transform: translateY(-2px);
}

/* Recorded Talks */
.talks-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.video-placeholder {
    aspect-ratio: 16 / 9;
    background: var(--bg-secondary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border: 2px dashed var(--border-color);
    overflow: hidden;
}

.video-placeholder iframe {
    width: 100%;
    height: 100%;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 7rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 5.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--timeline-line);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding-left: 0.5rem;
}

.timeline-dot {
    position: absolute;
    left: -1.725rem;
    top: 0.5rem;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--timeline-line);
    border: none;
    box-shadow: none;
}

.timeline-date {
    position: absolute;
    left: -12rem;
    top: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: right;
    width: 10rem;
}

.timeline-title {
    font-family: Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

/* Blog Posts */
.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.blog-card {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.2);
    border-color: var(--accent-color);
    background: var(--card-hover);
}

.blog-thumbnail {
    width: 200px;
    height: 120px;
    background: var(--timeline-line);
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    overflow: hidden;
}

.blog-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-content {
    flex: 1;
}

.blog-title {
    font-family: Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.blog-description {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.blog-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    h1 {
        font-size: 2rem;
    }

    nav {
        position: static;
        margin-top: 1rem;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .banner-section {
        height: 250px;
    }

    .profile-container {
        top: 160px; /* Adjust position for smaller screens */
    }

    .profile-picture {
        width: 180px;
        height: 180px;
        border: 20px solid var(--bg-primary); /* Slightly thinner border for mobile */
    }

    .section-header {
        font-size: 2rem;
    }

    .blog-card {
        flex-direction: column;
    }

    .blog-thumbnail {
        width: 100%;
    }

    h1 {
        font-size: 1.75rem;
    }
}

/* Spacing Utilities */
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mt-4 { margin-top: 4rem; }
