/* Reset & Variables */
:root {
    --bg-color: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --line-width: 60px;
    --line-gap: 15px;
    --transition-speed: 0.4s;
    --modal-bg: rgba(255, 255, 255, 0.85);
    /* 85% opacity white */
}

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

body {
    background-color: var(--bg-color);
    font-family: var(--font-body);
    color: var(--text-primary);
    overflow-x: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main Layout */
.container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    /* Remove padding to touch edges */
}

/* Lines Container */

.lines-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Align bottom for top lines, modify for bottom lines */
    gap: var(--line-gap);
    width: 100%;
    height: 40vh;
    /* Increased to allow lines to grow without cropping */
    padding: 0 20px;
    overflow-x: auto;
    /* Allow scroll on small screens if needed */
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.lines-container::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.top-lines {
    align-items: flex-start;
    /* Lines hang from top */
    padding-bottom: 26px;
    /* Space for shadow */
}

.bottom-lines {
    align-items: flex-end;
    /* Lines grow from bottom */
    padding-top: 26px;
    /* Space for shadow */
}

/* The Line Element */
.line-item {
    width: var(--line-width);
    height: 94%;
    /* Start tall but allow room to grow */
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-speed) cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    justify-content: center;
    /* Center text horizontally */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.top-lines .line-item {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
    align-self: flex-start;
    /* Ensure it sticks to top */
    align-items: flex-end;
    /* Text at bottom */
    padding-bottom: 20px;
    /* Space for text */
}

.bottom-lines .line-item {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
    align-self: flex-end;
    /* Ensure it sticks to bottom */
    align-items: flex-start;
    /* Text at top */
    padding-top: 20px;
    /* Space for text */
}

.line-item:hover {
    height: 100%;
    filter: brightness(1.1);
    z-index: 10;
}

/* Reflection / Glow Effect */
.line-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    opacity: 0.6;
}

/* Text on Line */
.line-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: white;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 10px 0;
    pointer-events: none;
    /* Let clicks pass to line */
    transform: rotate(180deg);
    /* Adjust reading direction if needed */
}

/* Logo Section */
.logo-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    width: 100%;
    gap: 8px;
}

.logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    width: 100%;
}

.logo-label {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.05rem;
    color: #d81b60;
    white-space: nowrap;
    min-width: 160px;
}

.label-left {
    text-align: right;
}

.label-right {
    text-align: left;
}

.logo {
    max-width: 600px;
    max-height: 15vh;
    object-fit: contain;
}

.curated-by {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 0.95rem;
    color: #d81b60;
    text-align: center;
    margin-top: 2px;
}

.curator-link {
    color: #d81b60;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.curator-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* Modal Overlay */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-bg);
    backdrop-filter: blur(10px);
    /* Glassmorphism blur */
    -webkit-backdrop-filter: blur(10px);
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 42px;
    right: 30px;
    background: #d81b60;
    border-radius: 30rem;
    border: none;
    font-size: 1.6rem;
    color: #ffffff;
    cursor: pointer;
    z-index: 10;
    line-height: 0;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #d81b60;
    background: #ecd2dc;
}

.modal-body {
    padding: 40px;
    overflow-y: auto;
}

/* Modal Navigation (Tabs) */
.modal-nav {
    display: flex;
    justify-content: left;
    gap: 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.nav-btn {
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px 10px;
    position: relative;
    transition: color 0.3s;
}

.nav-btn.active {
    color: var(--text-primary);
    font-weight: 700;
}

.nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: -16px;
    /* Align with border-bottom */
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #d81b60;
    /* Accent color */
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: #d81b60;
    /* Title color */
    margin-bottom: 20px;
    text-align: left;
}

.content-text {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    text-align: justify;
}

/* --- RESPONSIVE DESIGN --- */

/* Extra Large Screens (> 1400px) */
@media (min-width: 1400px) {
    :root {
        --line-width: 70px;
        --line-gap: 20px;
    }

    .line-text {
        font-size: 1rem;
    }

    .logo {
        max-width: 600px;
        max-height: 20vh;
    }

    .logo-label {
        font-size: 1.15rem;
    }

    .curated-by {
        font-size: 1rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    .content-text {
        font-size: 1.2rem;
    }
}

/* Large Screens (1200px to 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    :root {
        --line-width: 66px;
    }

    .line-text {
        font-size: 1rem;
    }

    .logo {
        max-width: 600px;
        max-height: 18vh;
    }
}

/* Tablets & Small Desktop (Max 900px, Lines become Horizontal Buttons) */
@media (max-width: 900px) {
    .lines-container {
        height: auto;
        flex-direction: column;
        padding: 20px;
        gap: 12px;
        overflow-x: visible;
    }

    .top-lines {
        padding-bottom: 20px;
        align-items: stretch;
    }

    .bottom-lines {
        padding-top: 20px;
        align-items: stretch;
    }

    .line-item {
        width: 100% !important;
        height: 48px !important;
        border-radius: 25px !important;
        padding: 0 20px !important;
        align-self: stretch !important;
        flex: 0 0 auto;
    }

    .top-lines .line-item,
    .bottom-lines .line-item {
        align-items: center;
        padding-top: 0;
        padding-bottom: 0;
    }

    .line-text {
        writing-mode: horizontal-tb;
        transform: none;
        padding: 0;
        font-size: 1.1rem;
    }

    .line-item:hover {
        height: 50px !important;
        /* Prevent vertical expansion */
        transform: scale(1.05);
        /* Slight pop effect instead */
    }

    .logo {
        max-width: 85%;
        max-height: 25vh;
    }

    .logo-row {
        flex-direction: column;
        gap: 10px;
    }

    .logo-label {
        min-width: unset;
        text-align: center;
        font-size: 1rem;
    }

    .label-left {
        order: -1;
    }

    .label-right {
        order: 1;
    }

    .curated-by {
        font-size: 0.9rem;
    }
}

/* Mobile Screens (Max 768px) */
@media (max-width: 768px) {
    .line-item {
        height: 48px !important;
        padding: 0 15px !important;
    }

    .line-text {
        font-size: 1.1rem;
    }

    .logo-label {
        font-size: 0.95rem;
    }

    .curated-by {
        font-size: 0.85rem;
    }

    .modal-content {
        height: 90vh;
        /* Better usage for mobile to keep modal stable */
        padding-bottom: 60px;
        /* Space for the floating button */
    }

    .close-btn {
        top: auto;
        bottom: 16px;
        left: 50%;
        transform: translateX(-50%);
        width: 44px;
        height: 44px;
        font-size: 2rem;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    .modal-body {
        padding: 20px;
        padding-bottom: 40px;
        /* Ensure content doesn't get hidden behind the button */
    }

    h2 {
        font-size: 2rem;
    }

    .modal-nav {
        gap: 15px;
    }

    .nav-btn {
        font-size: 1rem;
    }
}

/* Extra Small Mobile (Max 480px) */
@media (max-width: 480px) {
    .lines-container {
        gap: 8px;
        padding: 15px 10px;
    }

    .line-item {
        height: 46px !important;
        padding: 0 12px !important;
    }

    .line-text {
        font-size: 1rem;
    }

    .logo {
        max-width: 95%;
        max-height: 18vh;
    }

    .logo-label {
        font-size: 0.85rem;
    }

    .curated-by {
        font-size: 0.8rem;
    }
}

/* Biography Layout with Image */
.bio-container {
    /* Use float or flex? Float handles "text wrapping around image" better, which is usually preferred for bios */
    display: block;
}

.artist-image {
    width: 200px;
    /* Not too big */
    height: auto;
    float: right;
    margin-left: 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: block;
}

.artist-image.hidden {
    display: none;
}

/* Clearfix for float */
.bio-container::after {
    content: "";
    display: table;
    clear: both;
}

/* Mobile check for image */
@media (max-width: 600px) {
    .artist-image {
        float: none;
        display: block;
        margin: 0 auto 20px auto;
        width: 150px;
    }
}

/* Interview Styling */
.colored-name {
    font-weight: 700;
    text-transform: uppercase;
    /* Color will be set via JS */
}

/* Word Tab Formatting */
.word-main {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: #d81b60;
    /* Pink default */
    margin-bottom: 15px;
    /* Increased space */
    line-height: 1.2;
}

.word-subtitle {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 20px;
    display: block;
}