/* Custom minimal styles */

/* CSS Variables for section colors */
:root {
    --color-work: #5a8fd4;
    --color-education: #6bb896;
    --color-certification: #d9a95b;
    --color-community: #c77c9f;
}

/* Smooth scrolling with offset for fixed nav */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Skip to content link for accessibility */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--pico-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 var(--pico-border-radius) 0;
}

.skip-to-content:focus {
    top: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
}

section {
    padding: 2rem 0;
}

.hero {
    text-align: center;
    padding: 3rem 0 2rem;
    border-bottom: 2px solid var(--color-work);
    margin-bottom: 3rem;
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    display: block;
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* Two-column hero layout for wider screens */
@media (min-width: 768px) {
    .hero {
        display: flex;
        gap: 3rem;
        align-items: center;
        justify-content: center;
        text-align: left;
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero picture {
        flex-shrink: 0;
    }

    .profile-photo {
        width: 200px;
        height: 200px;
        margin: 0;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
    }

    .hero h1 {
        text-align: left;
        margin-bottom: 0;
        margin-top: 0;
    }

    .contact-info {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        margin-top: 1rem;
        gap: 0.5rem;
    }
}

.contact-info a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.speaking-timeline {
    margin: 2rem 0;
    position: relative;
}

.timeline-container {
    position: relative;
    padding-left: 80px;
    max-width: 900px;
    margin: 0 auto;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--pico-primary);
}

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

.timeline-year {
    position: absolute;
    left: -65px;
    top: 0;
    width: 50px;
    height: 50px;
    background: var(--pico-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.timeline-content {
    margin: 0;
}

.timeline-item:nth-child(1),
.timeline-item:nth-child(2),
.timeline-item:nth-child(3) {
    border-bottom: 1px solid var(--pico-muted-border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.timeline-content summary {
    cursor: pointer;
    padding: 0.75rem 3rem 0.75rem 0.75rem;
    border-radius: var(--pico-border-radius);
    transition: all 0.2s ease;
    background-color: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    position: relative;
    background-image: none !important;
}

.timeline-content summary::-webkit-details-marker,
.timeline-content summary::marker {
    display: none !important;
}

.timeline-content summary::before {
    display: none !important;
}

.timeline-content summary::after {
    content: "▼" !important;
    background-image: none !important;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    width: auto !important;
    height: auto !important;
}

.timeline-content[open] summary::after {
    transform: translateY(-50%) rotate(180deg);
}

.timeline-content summary:hover {
    background-color: var(--pico-card-background-color);
    border-color: var(--pico-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-thumbnail {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: var(--pico-border-radius);
    flex: 0 0 60px;
    padding: 0.25rem;
    background: var(--pico-card-background-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.timeline-info {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 75px);
    padding-left: 10px;
}

.timeline-info h3 {
    margin: 0 0 0.25rem 0;
    text-align: left;
    font-size: 1.1rem;
}

.timeline-info p {
    margin: 0;
    color: var(--pico-muted-color);
    font-size: 0.9rem;
}

.timeline-details {
    margin-top: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--pico-muted-border-color);
    background-color: var(--pico-card-background-color);
    border-radius: var(--pico-border-radius);
}

.timeline-details h3,
.timeline-details h4 {
    text-align: left;
}

footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--pico-muted-border-color);
}

/* Navigation Menu */
nav {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

#menuToggle {
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 1.25rem;
    transition: background-color 0.2s ease;
}

#menuToggle:hover {
    background-color: var(--pico-muted-border-color);
}

#menuContent {
    display: none;
    position: absolute;
    top: 3rem;
    right: 0;
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#menuContent a {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    border-bottom: 1px solid var(--pico-muted-border-color);
    transition: background-color 0.2s ease;
}

#menuContent a:last-child {
    border-bottom: none;
}

#menuContent a:hover {
    background-color: var(--pico-muted-border-color);
}

/* Work Experience */
.work-experience-container {
    max-width: 900px;
    margin: 0 auto;
}

.work-card {
    margin-bottom: 1.5rem;
    border-left: 3px solid #7b68ee;
    display: grid;
    grid-template-columns: auto 1fr;
    position: relative;
    overflow: hidden;
    border-radius: var(--pico-border-radius);
}

/* Section-specific card colors */
#work-experience .work-card {
    border-left-color: var(--color-work);
}

#education .work-card {
    border-left-color: var(--color-education);
}

#certifications .work-card {
    border-left-color: var(--color-certification);
}

#meetup-organizer .work-card {
    border-left-color: var(--color-community);
}

.work-card-left {
    background: var(--pico-card-background-color);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 2px solid var(--pico-muted-border-color);
}

.company-logo {
    width: 132px;
    height: 132px;
    object-fit: contain;
    background: white;
    padding: 0.75rem;
    border-radius: var(--pico-border-radius);
}

.work-card-content {
    padding: 1.5rem;
    background: var(--pico-background-color);
}

.work-card-content h3 {
    margin: 0 0 0.75rem 0;
    text-align: left;
    font-size: 1.6rem;
    font-weight: 700;
}

.work-card-years {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--pico-color);
    font-size: 1rem;
    font-weight: 600;
    background: var(--pico-muted-border-color);
    padding: 0.25rem 0.75rem;
    border-radius: var(--pico-border-radius);
    white-space: nowrap;
    min-width: 160px;
    text-align: center;
}

.work-card .job-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.work-card .description {
    margin: 0;
    font-size: 0.9rem;
}

.no-bullets {
    list-style: none;
}

/* Section Separator */
.section-separator {
    margin: 3.5rem auto;
    max-width: 900px;
    border: 0;
    border-top: 2px solid var(--pico-muted-border-color);
}

/* Floating Images */
.float-right-image {
    float: right;
    max-width: 50%;
    height: auto;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: var(--pico-border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.float-right-image:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

/* Video Wrapper */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-top: 1.5rem;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Interview Images */
.interview-images {
    margin-bottom: 1.5rem;
}

.interview-images img {
    width: 100%;
    height: auto;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: var(--pico-border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.interview-images img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

/* Clear Float */
.clear-float {
    clear: both;
}

/* Image Fullscreen Overlay */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
}

.image-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .timeline-container {
        padding-left: 60px;
        max-width: 100%;
    }

    .timeline-container::before {
        left: 30px;
    }

    .timeline-year {
        left: -55px;
        width: 50px;
        height: 50px;
        font-size: 0.9rem;
    }

    .float-right-image {
        float: none;
        max-width: 100%;
        margin: 0 0 1rem 0;
    }

    .work-card {
        grid-template-columns: 1fr;
    }

    .work-card-left {
        border-right: none;
        border-bottom: 2px solid var(--pico-muted-border-color);
    }

    .company-logo {
        width: 120px;
        height: 120px;
    }

    .work-card-content {
        padding: 1rem;
        padding-bottom: 3rem;
    }

    .work-card-content h3 {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }

    .work-card-years {
        top: auto;
        bottom: 0.5rem;
        right: 0.5rem;
        font-size: 0.85rem;
    }

    .video-wrapper {
        margin-top: 1rem;
    }

    nav {
        top: 0.5rem;
        right: 0.5rem;
    }
}

/* Improved focus states for keyboard navigation */
a:focus,
button:focus,
details summary:focus {
    outline: 3px solid var(--pico-primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    nav,
    .skip-to-content,
    #back-to-top {
        display: none !important;
    }

    .work-card,
    .timeline-item {
        page-break-inside: avoid;
    }

    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }

    .video-wrapper {
        display: none;
    }

    body {
        background: white !important;
    }

    #work-experience .work-card {
        border-left-color: var(--color-work) !important;
    }

    #education .work-card {
        border-left-color: var(--color-education) !important;
    }

    #certifications .work-card {
        border-left-color: var(--color-certification) !important;
    }

    #meetup-organizer .work-card {
        border-left-color: var(--color-community) !important;
    }
}

/* Back to top button */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--pico-primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#back-to-top:hover {
    background: var(--pico-primary-hover);
    transform: translateY(-2px);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    #back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}
