/* Multi-Stream Theme - Minimal Base Styles */

:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Light mode (default) */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --border-color: #d2d2d7;
    --accent: #0071e3;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #1d1d1f;
        --text-primary: #f5f5f7;
        --text-secondary: #a1a1a6;
        --border-color: #424245;
        --accent: #2997ff;
    }
}

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

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

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

/* Header */
.site-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}

/* Reduce header padding on narrow screens */
@media (max-width: 767px) {
    .site-header {
        padding: 10px 0;
    }
}

.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

/* Hamburger toggle button */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

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

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
}

.nav-menu a:hover {
    color: var(--accent);
}

/* Mobile navigation */
@media (max-width: 767px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 1rem;
        margin-top: 0.5rem;
        flex-direction: column;
        gap: 1rem;
        min-width: 200px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        margin: 0;
    }

    .nav-menu a {
        display: block;
        padding: 0.5rem;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

/* Main content */
main {
    min-height: 60vh;
    padding: 0 0 40px 0;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
    color: var(--text-secondary);
}

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

a:hover {
    text-decoration: underline;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Hero section */
.hero {
    padding: 60px 0 40px 0;
}

/* Reduce hero padding on narrow screens */
@media (max-width: 767px) {
    .hero {
        padding: 15px 0 10px 0;
    }
}

/* Ensure no background on wider screens */
@media (min-width: 431px) {
    .hero-text {
        background: none;
        padding-top: 0;
        padding-bottom: 0;
    }
}

/* Display photo as background with text overlay on very narrow screens */
@media (max-width: 430px) {
    .hero {
        position: relative;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        padding: 3rem 0;
        background-image: url('/bio/images/maciej_on_bass_1024px.jpg');
        background-size: cover;
        background-position: center top;
        background-repeat: no-repeat;
    }

    .hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.4) 0%,
            rgba(0, 0, 0, 0.4) 60%,
            var(--bg-primary) 100%);
        z-index: 1;
    }

    .hero-content {
        position: relative;
        z-index: 2;
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .hero-text {
        text-align: center;
        color: #ffffff;
        padding-top: 6rem;
    }

    .hero h1 {
        color: #ffffff;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
        margin-bottom: 1rem;
    }

    .hero .tagline {
        color: #ffffff;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
        background: rgba(0, 0, 0, 0.5);
        padding: 1rem;
        margin-bottom: 0;
    }

    .hero .social {
        background: none;
    }

    .hero-photo {
        display: none;
    }
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin: 0 auto;
}

.hero-photo {
    flex-shrink: 0;
    margin-right: 1rem;
}

.hero-photo img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
}

.hero-text {
    flex-shrink: 1;
    min-width: 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero .tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.hero .social {
    margin: 1rem 0 0 0;
}

.hero .social ul {
    justify-content: flex-start;
}

/* Stream columns */
.stream-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Increase gap on wider screens */
@media (min-width: 768px) {
    .stream-columns {
        gap: 2rem;
    }
}

/* Mobile: Stack Music on top, then Apps, then Bio */
@media (min-width: 768px) and (max-width: 1023px) {
    .stream-columns {
        grid-template-columns: 1fr;
    }

    /* Order on tablet: Music, Apps, Bio */
    .music-stream { order: 1; }
    .apps-stream { order: 2; }
    .bio-stream { order: 3; }
}

/* Desktop: Three columns */
@media (min-width: 1024px) {
    .stream-columns {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.stream-column h2 {
    margin-bottom: 1.5rem;
}

.stream-column h2 a {
    color: var(--text-primary);
    text-decoration: none;
}

.stream-column h2 a:hover {
    color: var(--accent);
}

/* Hide Music and Apps section headers on narrow screens to save space */
@media (max-width: 767px) {
    .music-stream h2,
    .apps-stream h2 {
        display: none;
    }
}

.stream-content {
    /* Removed background - individual items will have their own containers */
}

/* Music preview on homepage */
.music-preview {
    background: var(--bg-secondary);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.music-preview:last-of-type {
    margin-bottom: 1rem;
}

/* Default: hide mobile link, show desktop link */
.view-all-link-mobile {
    display: none;
}

.view-all-link-desktop {
    display: inline-block;
}

/* Horizontal layout on narrow screens */
@media (max-width: 767px) {
    .music-preview {
        display: flex;
        flex-wrap: wrap;
        gap: 0.1rem;
        align-items: flex-start;
    }

    .embed-preview {
        flex-basis: 100%;
        margin-top: 0;
    }

    .music-preview-image {
        flex-shrink: 0;
        margin-right: 0.75rem;
    }

    .music-preview-image a {
        display: block;
    }

    .music-preview-image img {
        width: 80px;
        height: 80px;
        object-fit: cover;
        border-radius: 6px;
        cursor: pointer;
        transition: opacity 0.2s;
    }

    .music-preview-image img:hover {
        opacity: 0.85;
    }

    .music-preview-content {
        flex: 1;
        min-width: 0;
    }

    /* Hide 2nd and 3rd releases on narrow screens */
    .music-preview-desktop-only {
        display: none;
    }

    /* Show mobile link, hide desktop link */
    .view-all-link-mobile {
        display: inline-block !important;
    }

    .view-all-link-desktop {
        display: none !important;
    }
}

/* Tablet horizontal layout */
@media (min-width: 768px) and (max-width: 1023px) {
    .music-preview {
        display: flex;
        flex-wrap: wrap;
        gap: 0.1rem;
        align-items: flex-start;
    }

    .embed-preview {
        flex-basis: 100%;
        margin-top: 0;
    }

    .music-preview-image {
        flex-shrink: 0;
        margin-right: 0.75rem;
    }

    .music-preview-image a {
        display: block;
    }

    .music-preview-image img {
        width: 80px;
        height: 80px;
        object-fit: cover;
        border-radius: 6px;
        cursor: pointer;
        transition: opacity 0.2s;
    }

    .music-preview-image img:hover {
        opacity: 0.85;
    }

    .music-preview-content {
        flex: 1;
        min-width: 0;
    }
}

/* Full width image on wide screens */
@media (min-width: 1024px) {
    .music-preview-image {
        margin-bottom: 1rem;
    }

    .music-preview-image a {
        display: block;
    }

    .music-preview-image img {
        width: 100%;
        max-width: 300px;
        height: auto;
        border-radius: 8px;
        cursor: pointer;
        transition: opacity 0.2s;
    }

    .music-preview-image img:hover {
        opacity: 0.85;
    }
}

.music-preview h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.music-preview h3 a {
    color: var(--text-primary);
    text-decoration: none;
}

.music-preview h3 a:hover {
    color: var(--accent);
}

.music-preview-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.music-preview-meta .artist {
    font-weight: 500;
}

.embed-preview {
    margin-top: 0;
}

.embed-preview iframe {
    border-radius: 8px;
}

.stream-footer {
    margin-top: 0;
    text-align: center;
}

.view-all-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.view-all-link:hover {
    text-decoration: underline;
}

/* Show all 3 music previews on all screen sizes */

/* Post content */
.post-content {
    max-width: 720px;
    margin: 0 auto;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 2rem 0;
    display: block;
}

.post-content p {
    text-indent: 2em;
    margin-bottom: 0.3rem;
}

.post-content blockquote {
    font-style: italic;
    margin: 1.5rem 0;
    padding-left: 2rem;
    border-left: 3px solid var(--border-color);
}

.post-content blockquote p {
    text-indent: 0;
}

.post-content ul,
.post-content ol {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content li p {
    text-indent: 0;
}

@media (max-width: 767px) {
    .post-content img {
        width: 100%;
        margin: 1rem 0;
    }
}

.post-header {
    margin-bottom: 2rem;
}

.post-illustration {
    max-width: 720px;
    margin: 0 auto 2rem auto;
    overflow: hidden;
}

.post-illustration img {
    width: 100%;
    max-height: 720px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.post-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Post cards */
.post-card {
    background: var(--bg-secondary);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
}

.post-card:last-child {
    margin-bottom: 0;
}

.post-card-image {
    flex-shrink: 0;
}

.post-card-image a {
    display: block;
}

.post-card-image img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

/* Narrow screens: wide banner image at top */
@media (max-width: 767px) {
    .post-card {
        flex-direction: column;
        gap: 0;
        padding: 0;
        overflow: hidden;
    }

    .post-card-image {
        width: 100%;
        height: 6rem;
        margin: 0;
        overflow: hidden;
    }

    .post-card-image a {
        display: block;
        height: 100%;
    }

    .post-card-image img {
        width: 100%;
        height: 100%;
        border-radius: 0;
        object-fit: cover;
        object-position: center;
    }

    .post-card-content {
        padding: 1.25rem;
    }
}

.post-card-content {
    flex: 1;
    min-width: 0;
}

.post-card h2,
.post-card h3 {
    font-size: 1.25rem;
    margin: 0.5rem 0 0.5rem 0;
}

.post-card h2 a,
.post-card h3 a {
    color: var(--text-primary);
    text-decoration: none;
}

.post-card h2 a:hover,
.post-card h3 a:hover {
    color: var(--accent);
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.post-summary {
    color: var(--text-primary);
    margin: 0;
}

.post-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0.5rem 0 0 0;
}

.post-card ul,
.post-card ol {
    margin: 0 0 0.5rem 0;
    padding-left: 1.5rem;
}

.post-card li {
    margin-bottom: 0.25rem;
}

.post-card img {
    max-width: 100%;
    height: auto;
    display: block;
}

.read-more {
    margin-top: 0.75rem;
}

.read-more a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.read-more a:hover {
    text-decoration: underline;
}

/* Year groups in jogger */
.year-group {
    margin-bottom: 2rem;
}

.year-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* App previews */
.app-preview {
    background: var(--bg-secondary);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.app-preview:last-of-type {
    margin-bottom: 0;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.app-preview h3 {
    font-size: 1.25rem;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.app-preview h3 a {
    color: var(--text-primary);
    text-decoration: none;
}

.app-preview h3 a:hover {
    color: var(--accent);
}

.app-type {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    text-transform: capitalize;
    white-space: nowrap;
}

.app-description {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.app-download-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
}

.app-download-link:hover {
    text-decoration: underline;
}

/* App post previews */
.app-post-preview {
    background: var(--bg-secondary);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.app-post-preview:last-of-type {
    margin-bottom: 0;
}

.app-post-preview h3 {
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
}

.app-post-preview h3 a {
    color: var(--text-primary);
    text-decoration: none;
}

.app-post-preview h3 a:hover {
    color: var(--accent);
}

.app-post-preview .post-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
}

.app-post-preview .post-summary {
    color: var(--text-primary);
    margin: 0;
}

/* Bio stream content */
.bio-stream .stream-content {
    background: var(--bg-secondary);
    padding: 1.25rem;
    border-radius: 12px;
}

.bio-stream .stream-content h2 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.bio-stream .stream-content h2:first-child {
    margin-top: 0;
}

.bio-stream .stream-content p {
    margin-bottom: 1rem;
}

.bio-stream .stream-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    list-style: disc;
}

.bio-stream .stream-content li {
    margin-bottom: 0.5rem;
}

.bio-stream .stream-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
    opacity: 0.5;
}

/* Social links */
.social {
    margin: 1.5rem 0;
}

.social ul {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.social li {
    margin: 0;
}

.social a {
    font-size: 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Music page */
.music-page {
    padding: 2rem 0;
}

.testflight-banner {
    background: #28A745;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.testflight-banner a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    display: block;
}

.testflight-banner a:hover {
    opacity: 0.9;
}

.app-download-banner {
    background: #28A745;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
}

.app-download-banner a {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.app-download-banner a:hover {
    opacity: 0.9;
}

.app-download-banner .download-text {
    font-size: 1rem;
    font-weight: 600;
}

.app-download-banner .download-caption {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.9;
}

.music-listen-banner {
    background: #28A745;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
}

.music-listen-banner a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    display: block;
}

.music-listen-banner a:hover {
    opacity: 0.9;
}

.section-header {
    margin-bottom: 2rem;
}

.section-intro {
    background: var(--bg-secondary);
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.section-intro p {
    margin: 0 0 1rem 0;
}

.section-intro p:last-child {
    margin-bottom: 0;
}

.section-intro ul,
.section-intro ol {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

.section-intro li {
    margin-bottom: 0.5rem;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.music-productions {
    max-width: 800px;
    margin: 0 auto;
}

.music-column {
    /* Single column on mobile */
}

/* Two-column masonry layout on wide screens */
@media (min-width: 1024px) {
    .music-productions {
        max-width: 1200px;
        display: flex;
        gap: 2rem;
    }

    .music-column {
        flex: 1;
    }
}

.music-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    break-inside: avoid;
}

.music-image {
    margin-bottom: 1.5rem;
}

.music-image img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    display: block;
}

.music-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.music-meta {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.music-meta .artist {
    font-weight: 500;
}

.music-description {
    margin: 1rem 0;
}

.music-credits {
    margin: 1rem 0;
    font-size: 0.95rem;
}

.music-credits ul {
    list-style: none;
    margin: 0.5rem 0 0 0;
    padding: 0;
}

.music-credits li {
    margin: 0.25rem 0;
    color: var(--text-secondary);
}

.music-links {
    margin-top: 1.5rem;
}

.embed {
    margin: 1rem 0;
}

.embed iframe {
    max-width: 100%;
    border-radius: 8px;
}

.instagram-link a,
.streaming-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.instagram-link a:hover,
.streaming-link a:hover {
    opacity: 0.9;
}

.music-footer {
    max-width: 800px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}
