/* Base styles */
:root {
    --color-bg: #0A0A0B;
    /* Deep Dark */
    --color-bg-secondary: #151518;
    /* Slightly lighter dark */
    --color-bg-card: #1C1C1E;
    /* Card backgrounds */
    --color-text: #F2F2F7;
    /* Light text */
    --color-text-secondary: #8E8E93;
    /* Secondary text */
    --color-accent: #007AFF;
    /* Bright Blue */
    --color-accent-hover: #0056CC;
    /* Darker blue for hover */
    --color-border: #2C2C2E;
    /* Subtle borders */
    --color-success: #30D158;
    /* Green accent */
    --font-family-base: 'Inter', 'SF Pro Display', 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.25);
    --gradient-hero: linear-gradient(135deg, #1a1a1b 0%, #2d2d30 100%);
    --gradient-accent: linear-gradient(135deg, var(--color-accent) 0%, #0056CC 100%);
}

html {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    font-family: var(--font-family-base);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    display: block;
}

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

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

/* Layout & Typography */
main {
    padding: 2rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    margin-bottom: 4rem;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    color: var(--color-text);
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

h3 {
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
    color: var(--color-text);
}

p {
    margin: 0.75rem 0;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

ul {
    padding-left: 1.25rem;
    margin: 0.75rem 0;
}

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

/* Hero Section */
#hero {
    text-align: center;
    padding: 6rem 2rem 5rem;
    background: var(--gradient-hero);
    color: var(--color-text);
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(0, 122, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero__photo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 2rem;
    border: 4px solid var(--color-border);
    box-shadow: var(--shadow-medium);
    position: relative;
    z-index: 1;
}

.hero__photo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-card);
    color: var(--color-text-secondary);
}

.hero__pitch {
    font-size: 1.25rem;
    margin: 1rem auto 2.5rem;
    max-width: 600px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.button {
    display: inline-block;
    background: var(--gradient-accent);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.button:hover,
.button:focus {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    color: #fff;
}

/* Timeline (Experience) */
.timeline-item {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: var(--color-bg-card);
    border-radius: 16px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.timeline-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
    border-color: var(--color-accent);
}

.timeline-date {
    font-weight: 500;
    color: var(--color-accent);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-item h3 {
    color: var(--color-text);
    margin-bottom: 1rem;
}

.timeline-item ul {
    list-style: none;
    padding-left: 0;
}

.timeline-item li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.timeline-item li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: bold;
}

/* Projects Section */
.projects {
    display: grid;
    gap: 2rem;
    /* mobile-first: single column; grid adjusts for larger screens in media query */
}

.project-card {
    background: var(--color-bg-card);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-medium);
    border-color: var(--color-accent);
}

.project-card h3 {
    font-size: 1.375rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.project-card p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.project-card a {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(0, 122, 255, 0.1);
    border: 1px solid var(--color-accent);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.project-card a:hover {
    background: var(--color-accent);
    color: #fff;
    transform: translateX(4px);
}

/* Writing & Talks Section */
.media-cards {
    display: grid;
    gap: 2rem;
}

.media-card {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    background: var(--color-bg-card);
    border-radius: 16px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.media-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
    border-color: var(--color-accent);
}

.media-icon {
    flex: 0 0 auto;
    margin-right: 1.5rem;
    padding: 1rem;
    background: rgba(0, 122, 255, 0.1);
    border-radius: 12px;
    color: var(--color-accent);
}

.media-icon svg {
    width: 28px;
    height: 28px;
}

.media-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.media-content p {
    font-size: 0.95rem;
    margin: 0 0 1rem;
    line-height: 1.6;
}

.media-content a {
    font-weight: 600;
    color: var(--color-accent);
}

/* Contact Section */
#contact {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--color-bg-secondary);
    border-radius: 24px;
    border: 1px solid var(--color-border);
}

#contact p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-email {
    font-weight: 600;
    display: inline-block;
    margin-bottom: 2rem;
    font-size: 1.25rem;
    color: var(--color-accent);
    padding: 0.75rem 1.5rem;
    background: rgba(0, 122, 255, 0.1);
    border: 1px solid var(--color-accent);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.contact-email:hover {
    background: var(--color-accent);
    color: #fff;
}

.contact-socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.contact-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    color: var(--color-text-secondary);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.contact-socials a:hover {
    color: var(--color-accent);
    background: rgba(0, 122, 255, 0.1);
    border-color: var(--color-accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
}

.contact-socials svg {
    width: 24px;
    height: 24px;
}

/* Featured Video Slideshow Section */
#featured-videos {
    background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg) 50%, var(--color-bg-secondary) 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

#featured-videos::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 20%, rgba(0, 122, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 122, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.video-slideshow-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.slideshow-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.slideshow-subtitle {
    font-size: 1.25rem;
    text-align: center;
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.video-slider {
    position: relative;
    height: 600px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--color-border);
    background: var(--color-bg-card);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    padding: 2rem;
    gap: 3rem;
}

.slide.active {
    opacity: 1;
    transform: translateX(0);
}

.slide.prev {
    transform: translateX(-100%);
}

.video-wrapper {
    flex: 1.2;
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--color-border);
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 16px;
}

.slide-content {
    flex: 0.8;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.slide-content h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.slide-content p {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Slideshow Controls */
.slideshow-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
}

.nav-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    background: var(--color-bg-card);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--gradient-accent);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.nav-btn:hover::before {
    width: 100%;
    height: 100%;
}

.nav-btn:hover {
    color: #fff;
    border-color: var(--color-accent);
    transform: scale(1.1);
    box-shadow: var(--shadow-soft);
}

.nav-btn:active {
    transform: scale(0.95);
}

.nav-btn svg {
    width: 24px;
    height: 24px;
    z-index: 1;
}

/* Slide Indicators */
.slide-indicators {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-border);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.indicator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--color-accent);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.indicator.active::before,
.indicator:hover::before {
    width: 100%;
    height: 100%;
}

.indicator.active {
    transform: scale(1.3);
}

/* Responsive Design for Video Slideshow */
@media (max-width: 1024px) {
    .slide {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem 1.5rem;
        text-align: center;
    }

    .video-wrapper {
        flex: none;
        width: 100%;
        max-width: 600px;
    }

    .slide-content {
        flex: none;
        padding: 1rem;
    }

    .slide-content h3 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .slide-content p {
        font-size: 1.1rem;
    }

    .slideshow-title {
        font-size: 2.5rem;
    }

    .video-slider {
        height: auto;
        min-height: 500px;
    }
}

@media (max-width: 768px) {
    #featured-videos {
        padding: 3rem 0;
    }

    .video-slideshow-container {
        padding: 0 1rem;
    }

    .slideshow-title {
        font-size: 2rem;
    }

    .slideshow-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .slide {
        padding: 1.5rem 1rem;
    }

    .slide-content h3 {
        font-size: 1.5rem;
    }

    .slide-content p {
        font-size: 1rem;
    }

    .nav-btn {
        width: 50px;
        height: 50px;
    }

    .nav-btn svg {
        width: 20px;
        height: 20px;
    }

    .slideshow-controls {
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .video-slider {
        border-radius: 16px;
        min-height: 400px;
    }

    .video-wrapper {
        border-radius: 12px;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0 3rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    border-top: 1px solid var(--color-border);
    margin-top: 4rem;
}

/* Responsive Design: Larger screens */
@media (min-width: 768px) {
    main {
        padding: 3rem 2rem;
    }

    #hero {
        padding: 8rem 3rem 6rem;
    }

    h1 {
        font-size: 4rem;
    }

    .hero__photo {
        width: 140px;
        height: 140px;
        margin-bottom: 2.5rem;
    }

    .hero__photo--placeholder svg {
        width: 56px;
        height: 56px;
    }

    .hero__pitch {
        font-size: 1.375rem;
    }

    .projects {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }

    .media-cards {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (min-width: 1024px) {
    .projects {
        grid-template-columns: repeat(3, 1fr);
    }

    .media-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}