/* ============================================================
   MODERN CHARACTER PROFILE CSS - SCROLL LAYOUT
   Clean, maintainable, theme-aware design
   Converted from tabs to flowing scroll sections
   ============================================================ */

/* Theme variables are loaded from dynamic theme CSS */
:root {
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --section-gap: 2rem;
    --section-padding: 1.5rem;
}

/* ============================================================
   STICKY HERO - Collapses on scroll
   Shows: Avatar + Name + Species + Ears/Tail (core kemonomimi identity)
   ============================================================ */
.sticky-hero {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--card-background);
    border-bottom: 3px solid var(--primary-color);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    padding: 15px 20px;
}

.sticky-hero.collapsed {
    padding: 8px 20px;
}

.sticky-hero-content {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Sticky Hero Avatar */
.sticky-hero .hero-avatar {
    width: 112px;
    height: 112px;
    border-radius: 8px;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-bottom: 0;
}

.sticky-hero.collapsed .hero-avatar {
    width: 50px;
    height: 50px;
    border-width: 2px;
}

/* Sticky Hero Info */
.sticky-hero .hero-info {
    flex: 1;
}

.sticky-hero .hero-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2px;
    transition: font-size 0.3s ease;
    line-height: 1.2;
}

.sticky-hero.collapsed .hero-name {
    font-size: 1.2rem;
    margin-bottom: 0;
}

.sticky-hero .hero-species {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sticky-hero .hero-species i {
    color: var(--primary-color);
}

.sticky-hero.collapsed .hero-species {
    font-size: 0.85rem;
    margin-bottom: 2px;
}

/* Kemonomimi Features in Hero (Ears + Tail) */
.hero-kemonomimi {
    display: flex;
    gap: 25px;
    font-size: 0.9rem;
    color: var(--muted-text);
    transition: all 0.3s ease;
}

.sticky-hero.collapsed .hero-kemonomimi {
    font-size: 0.75rem;
    gap: 15px;
}

.kemo-feature {
    display: flex;
    align-items: center;
    gap: 6px;
}

.kemo-feature i {
    color: var(--primary-color);
    font-size: 0.85em;
}

.kemo-label {
    font-weight: 600;
    color: var(--primary-color);
}

/* Hide kemonomimi description text on collapse, show only icons */
.sticky-hero.collapsed .kemo-text {
    /* Keep visible when collapsed */
}

/* Responsive sticky hero */
@media (max-width: 768px) {
    .sticky-hero {
        padding: 12px 15px;
    }

    .sticky-hero .hero-avatar {
        width: 70px;
        height: 70px;
    }

    .sticky-hero.collapsed .hero-avatar {
        width: 40px;
        height: 40px;
    }

    .sticky-hero .hero-name {
        font-size: 1.4rem;
    }

    .sticky-hero.collapsed .hero-name {
        font-size: 1rem;
    }

    .hero-kemonomimi {
        flex-direction: column;
        gap: 4px;
    }

    .sticky-hero.collapsed .hero-kemonomimi {
        flex-direction: row;
    }
}

/* ============================================================
   LEGACY HERO SECTION (kept for reference, can be removed later)
   ============================================================ */
.profile-hero {
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: var(--section-gap);
}

.profile-hero .row {
    min-height: 350px;
}

.hero-image {
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-color: var(--faded-bg);
    height: 100%;
    min-height: 350px;
}

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

.hero-avatar {
    margin-bottom: 1rem;
}

.hero-avatar .avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    object-fit: cover;
    box-shadow: var(--shadow-md);
}

.hero-avatar .avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid var(--muted-text);
    background: var(--faded-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-text);
}

.hero-info .character-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    line-height: 1.1;
}

.hero-info .character-species {
    font-size: 1.25rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.hero-info .character-species i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.hero-info .character-alias {
    font-size: 0.95rem;
    color: var(--muted-text);
    font-style: italic;
}

.hero-info .character-alias i {
    color: var(--primary-color);
    margin-right: 0.25rem;
}

/* Jump Navigation */
.section-jump-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(var(--primary-rgb), 0.2);
}

.section-jump-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: var(--faded-bg);
    color: var(--text-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.section-jump-nav a:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

.section-jump-nav a i {
    font-size: 0.8rem;
}

/* ============================================================
   PROFILE SECTIONS (Scrollable Content Areas)
   ============================================================ */
.profile-section {
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: var(--section-gap);
    overflow: hidden;
}

.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: var(--section-padding);
    background: linear-gradient(135deg, var(--faded-bg) 0%, var(--card-background) 100%);
    border-bottom: 1px solid var(--border-color);
    border-radius: 12px 12px 0 0;
}

.section-header-row .section-header {
    padding: 0;
    background: none;
    border: none;
    margin: 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: var(--section-padding);
    background: linear-gradient(135deg, var(--faded-bg) 0%, var(--card-background) 100%);
    border-bottom: 2px solid rgba(var(--primary-rgb), 0.2);
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-color);
}

.section-header i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

/* Toyhouse logo in section header */
.section-logo-th {
    height: 1.5rem;
    width: auto;
    vertical-align: middle;
    margin-right: 0.25rem;
}

.section-content {
    padding: var(--section-padding);
}

/* ============================================================
   STAT BLOCKS (Icon + Label + Value)
   ============================================================ */
.stat-block {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.statcon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--faded-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--muted-text);
    flex-shrink: 0;
}

.statcon-featured {
    background: var(--primary-color);
    color: white;
}

.tilted {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted-text);
    margin-bottom: 2px;
}

.stat-value {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.4;
}

.stat-value a {
    color: var(--primary-color);
}

/* Eye color icons (for showing actual eye colors) */
.eye-colors {
    margin-top: 6px;
    display: flex;
    gap: 5px;
}

.eye-colors i {
    font-size: 0.9rem;
}

/* Hair color swatches (circles showing hair colors) */
.hair-colors {
    margin-top: 6px;
    display: flex;
    gap: 5px;
}

.hair-colors i {
    font-size: 0.75rem;
}

/* Glasses indicator (shown in eyes section when character wears glasses) */
.glasses-indicator {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--muted-text);
    font-size: 0.8rem;
}

.glasses-indicator i {
    font-size: 0.85rem;
}

.glasses-text {
    font-size: 0.75rem;
    font-style: italic;
}

/* Featured stat (like favorite song) */
.featured-stat {
    padding: 1rem;
    background: rgba(var(--primary-rgb), 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.song-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-color);
    font-weight: 600;
}

.song-link:hover {
    color: var(--hover-color);
}

/* ============================================================
   LIKES & DISLIKES CARDS
   ============================================================ */
.likes-dislikes-card {
    padding: 1.25rem;
    border-radius: 10px;
    height: 100%;
}

.likes-card {
    background: rgba(39, 174, 96, 0.08);
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.likes-card .tilted {
    color: #27ae60;
}

.dislikes-card {
    background: rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.dislikes-card .tilted {
    color: #e74c3c;
}

.stat-value-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stat-value-list li {
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-color);
}

.stat-value-list li:last-child {
    border-bottom: none;
}

/* ============================================================
   TRAITS / BADGES
   ============================================================ */
.traits-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.badge-trait {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--faded-bg);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(var(--primary-rgb), 0.3);
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-content {
    overflow: hidden;
}

.about-portrait {
    float: right;
    max-width: 200px;
    max-height: 300px;
    margin: 0 0 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    object-fit: contain;
}

.about-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-color);
}

.physical-description {
    clear: both;
    padding-top: 1rem;
    border-top: 1px solid var(--faded-bg);
    margin-top: 1rem;
}

.physical-description h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

/* ============================================================
   GALLERY GRID
   ============================================================ */
/* Gallery Showcase Layout - Full Bleed Collage */
/* Remove padding from gallery section content */
#gallery .section-content {
    padding: 0;
}

/* Outer card: Landscape background, centered */
.gallery-showcase {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    /* 3:2 landscape aspect ratio for the background card */
    aspect-ratio: 3 / 2;
    max-height: 550px;
    /* Center the outer card */
    margin: 0 auto;
}

/* Overlay covers entire background at 70% white (30% image visibility) */
.gallery-showcase-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.70);
}

/* Inner card: Slightly smaller, centered, transparent (no additional overlay) */
.gallery-showcase-content {
    position: absolute;
    inset: 3%;
    z-index: 1;
}

/* Portrait - left side, full height */
.gallery-portrait {
    position: absolute;
    left: 5%;
    top: 0;
    bottom: 0;
    width: 45%;
}

.gallery-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* Squares container - right side */
.gallery-squares {
    position: absolute;
    right: 5%;
    top: 0;
    bottom: 0;
    width: 35%;
    display: flex;
    flex-direction: column;
}

/* Each square takes exactly half the height */
.gallery-square {
    position: relative;
    height: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-square img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-avatar img {
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.gallery-chibi img {
    filter: drop-shadow(3px 3px 6px rgba(0,0,0,0.3));
}

/* Legacy grid styles - keeping for backwards compatibility */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-item {
    aspect-ratio: 1;
}

.gallery-item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--faded-bg);
    border-radius: 10px;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-image:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.gallery-label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(var(--primary-rgb), 0.9);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   LINK CARDS
   ============================================================ */
.link-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--faded-bg);
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.link-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.link-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.link-content h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.link-content p {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    color: var(--muted-text);
}

/* Compact link cards (for multiple links in a row) */
.link-card-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--faded-bg);
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    text-decoration: none;
    height: 100%;
}

.link-card-compact:hover {
    border-color: var(--primary-color);
    background: var(--card-background);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.link-icon-sm {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.link-label {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.link-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color);
}

.link-subtitle {
    font-size: 0.75rem;
    color: var(--muted-text);
}

.link-arrow {
    color: var(--muted-text);
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.link-card-compact:hover .link-arrow {
    color: var(--primary-color);
    transform: translateX(3px);
}

/* Whiskers Haven internal links - use site primary color */
.link-card-wh .link-icon-wh {
    background: var(--primary-color);
}

.link-card-wh:hover {
    border-color: var(--primary-color);
}

.link-card-wh:hover .link-arrow {
    color: var(--primary-color);
}

/* Toyhouse external links - teal color to match TH branding */
.link-icon-th {
    background: #3aa9a0;
}

.link-card-th:hover {
    border-color: #3aa9a0;
}

.link-card-th:hover .link-arrow {
    color: #3aa9a0;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-pinky {
    background: var(--primary-color);
    color: white;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-pinky:hover {
    background: var(--hover-color);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.4);
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 768px) {
    :root {
        --section-gap: 1.25rem;
        --section-padding: 1rem;
    }
    
    .profile-hero .row {
        min-height: auto;
    }
    
    .hero-image {
        min-height: 250px;
    }
    
    .hero-content {
        padding: 1.5rem;
    }
    
    .hero-info .character-name {
        font-size: 1.75rem;
    }
    
    .hero-info .character-species {
        font-size: 1rem;
    }
    
    .section-jump-nav {
        justify-content: center;
    }
    
    .section-jump-nav a span {
        display: none;
    }
    
    .section-header {
        font-size: 1.15rem;
    }
    
    .about-portrait {
        float: none;
        display: block;
        margin: 0 auto 1rem auto;
        max-width: 150px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-item-large {
        grid-column: span 2;
        grid-row: span 1;
        aspect-ratio: 16/9;
    }
    
    /* Gallery showcase mobile - stack vertically */
    .gallery-showcase {
        aspect-ratio: auto;
        min-height: auto;
    }
    
    .gallery-showcase-content {
        position: relative;
        display: flex;
        flex-direction: column;
    }
    
    .gallery-portrait {
        position: relative;
        width: 100%;
        height: auto;
        aspect-ratio: 2 / 3;
    }
    
    .gallery-squares {
        position: relative;
        width: 100%;
        flex-direction: row;
        height: auto;
    }
    
    .gallery-square {
        flex: 1;
        aspect-ratio: 1;
    }
    
    .link-card {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
    color: var(--text-color);
}

p {
    margin-bottom: 1rem;
    color: var(--text-color);
}

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

a:hover {
    color: var(--hover-color);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-muted {
    color: var(--muted-text) !important;
}

.text-center {
    text-align: center;
}

.small {
    font-size: 0.85em;
}

/* ============================================================
   SMOOTH SCROLL BEHAVIOR
   ============================================================ */
html {
    scroll-behavior: smooth;
}

/* Offset for section anchors (accounts for any fixed header) */
.profile-section {
    scroll-margin-top: 1rem;
}
