/*
Theme Name: underscore
Author: sashimi0
Description: a familiar stranger
Version: 1.0
*/

:root {
    --bg-color: #0d110f; 
    --card-bg: #1b221e; 
    --text-primary: #e2e8e4; 
    --text-secondary: #8a9a8f; 
    --accent: #7ea37d; 
}

html, body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh; /* REVERTED: This guarantees the scrollbar appears */
    overflow: hidden; 
}

.layout-wrapper {
    display: flex;
    /* CHANGED: This dynamically subtracts the height of the top header (~90px) 
       so the bottom of your page perfectly touches the bottom of the screen! */
    height: calc(100vh - 90px); 
    width: 100vw;
    overflow: hidden;
}

.sidebar {
    width: 350px;
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid rgba(126, 163, 125, 0.1);
    /* REDUCED: Changed padding from '3rem 2rem' to '1.5rem' all around */
    padding: 1.5rem; 
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    /* REDUCED: Shrunk the gap between sections from 1.5rem down to 0.8rem */
    gap: 0.8rem; 
    height: 100%; 
    overflow-y: auto;
    min-height: 0;
}

.profile-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem; 
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    background: #000;
}

.about-title {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    font-weight: bold;
}

.about-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.achievements-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.trophy-slot {
    aspect-ratio: 1/1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed var(--text-secondary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; 
    position: relative;
    transition: 0.3s;
}

.trophy-slot img {
    width: 65%;
    height: 65%;
    object-fit: contain;
    filter: drop-shadow(0 0 5px var(--accent));
}

.trophy-slot:hover {
    border-color: var(--accent);
    background: rgba(126, 163, 125, 0.1);
}

.trophy-slot::after {
    content: attr(data-title);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.55rem;
    color: var(--accent);
    background: rgba(13, 17, 15, 0.9);
    padding: 4px 2px;
    opacity: 0;
    transition: 0.3s;
    pointer-events: none;
    z-index: 10;
    line-height: 1.1;
}

.trophy-slot:hover::after {
    opacity: 1;
}

.main-content {
    flex: 1;
    padding: 0 2rem 100px 2rem; 
    box-sizing: border-box; 
    overflow-y: auto; 
    height: 100%;
    min-height: 0; 
}

header {
    text-align: left;
    margin-bottom: 2rem;
    width: 100%;
}
h1 { 
    font-size: 2.5rem; 
    margin-top: 0; /* Forces the text directly to the top */
    margin-bottom: 0.5rem; 
}
p { color: var(--text-secondary); }


.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
    width: 100%;
    align-items: start;
}

.card {
    background: var(--card-bg);
    padding: 0.8rem; 
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    text-align: center;
    aspect-ratio: 1 / 1; 
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    align-items: center;
    box-sizing: border-box;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    background-color: rgba(126, 163, 125, 0.05);
}

.card .tag {
    margin-bottom: 4px;
}

.card h3 {
    font-size: 0.9rem;
    margin: 0 0 4px 0;
}

.card p {
    font-size: 0.75rem;
    line-height: 1.2;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

header a, h1 a {
    text-decoration: none;
    color: inherit;
}

header a:hover, h1 a:hover {
    color: var(--accent);
}
@media (max-width: 768px) {
    /* Unlock the body so the whole page can scroll on mobile */
    html, body {
        height: auto;
        overflow: auto;
    }
    
    .layout-wrapper {
        flex-direction: column;
        height: auto; 
        overflow: visible;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        overflow-y: visible;
    }
    
    .main-content {
        height: auto;
        overflow-y: visible;
    }
}

/* =========================================
   MUSIC CATEGORY PAGE STYLES
   ========================================= */

/* --- Music Sidebar --- */
/* --- Music Sidebar --- */
.music-sidebar {
    justify-content: flex-start; 
    overflow-y: auto; /* THIS ENABLES SCROLLING FOR JUST THIS SIDEBAR */
    padding-bottom: 100px; /* Adds a bumper at the bottom so the last artist isn't cut off */
}

.music-sidebar .sidebar-heading {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1rem;
    margin: 0 0 5px 0;
}

.music-sidebar .sidebar-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 2rem 0;
    line-height: 1.4;
}

.rotation-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
}

.rotation-item img {
    width: 45px;
    height: 45px;
    border-radius: 4px;
    object-fit: cover;
}

.rotation-info {
    display: flex;
    flex-direction: column;
}

.rotation-info strong {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.rotation-info span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.sidebar-more {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

/* --- Music Main Content --- */
.music-content {
    padding-top: 1.5rem;
}

.back-link {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 2.5rem;
    display: inline-block;
    transition: opacity 0.2s;
}

.back-link:hover {
    opacity: 0.8;
}

.title-block {
    border-left: 4px solid var(--accent); /* That nice green line */
    padding-left: 1.5rem;
    margin-bottom: 3rem;
}

.title-block h1 {
    font-size: 2.5rem;
    margin: 0 0 10px 0;
}

.title-block p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

/* --- Album Grid --- */
.album-grid {
    display: grid;
    /* Changed the minimum width from 180px down to 140px to fit more in a row */
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); 
    gap: 1rem; /* Slightly tighter gap between cards */
    width: 100%;
}

.album-card {
    background: var(--card-bg);
    padding: 0.8rem; /* Less padding inside the card */
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.album-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.8rem;
}

/* Scaled down text to match the smaller card size */
.album-card h3 {
    font-size: 0.95rem; 
    margin: 0 0 3px 0;
}

.album-card .meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
}

/* The Favorite Song Pill */
.favorite-song {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 8px; /* Tighter padding on the pill */
    width: 100%;
    box-sizing: border-box;
}

.favorite-song .fav-label {
    display: block;
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.favorite-song .play-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.8rem; /* Smaller play button text */
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
    transition: color 0.2s;
}

.favorite-song .play-btn:hover {
    color: var(--accent);
}
/* --- Artist Ranking Card (Sidebar) --- */
.artist-ranking-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.8rem; /* REDUCED: Makes the card itself smaller */
    margin-bottom: 0.8rem; /* REDUCED: Shrinks the gap between different artist cards */
    width: 100%;
    box-sizing: border-box;
}

.artist-header {
    margin-bottom: 0.6rem; /* Tighter gap below artist name */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.artist-header h3 {
    margin: 0;
    font-size: 1rem; /* Slightly smaller artist name */
    color: var(--accent); 
}

/* Custom Numbered List Styling */
.ranked-albums {
    list-style: none; 
    padding: 0;
    margin: 0;
    counter-reset: album-rank; 
}

.ranked-albums li {
    display: flex;
    align-items: center;
    gap: 10px; /* Tighter gap between the number, image, and text */
    margin-bottom: 8px; /* Tighter spacing between albums */
}

.ranked-albums li:last-child {
    margin-bottom: 0;
}

.ranked-albums li::before {
    counter-increment: album-rank;
    content: counter(album-rank) ".";
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text-secondary);
    min-width: 12px;
    text-align: right;
}

.ranked-albums img {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    object-fit: cover;
}

.album-details {
    display: flex;
    flex-direction: column;
    flex: 1; 
    gap: 2px; /* Adds nice tight spacing between the 3 lines */
}

.album-year {
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.album-name {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.album-details .fav-track {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    margin-top: 3px;
}

.album-details .fav-track:hover {
    color: var(--accent); /* Turns green when you hover over the song */
}

.album-details strong {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.album-details span {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.ranked-fav {
    display: flex;
    flex-direction: column;
    align-items: flex-end; 
    text-align: right;
}

.ranked-fav .fav-label {
    font-size: 0.6rem;
    color: var(--accent); 
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.ranked-fav .fav-track {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 500;
}
/* --- Header Layout --- */
.page-header {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* The space between the logo and the text */
    width: 100%;
    margin-bottom: 2rem;
    padding-top: 1rem;
}

.header-logo {
    /* If you add an image, remove the width/height and background below */
    width: 60px; 
    height: 60px;
    border-radius: 8px;
    /* background: var(--card-bg);  Uncomment this to see the placeholder box! */
    flex-shrink: 0;
}

.header-logo img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.header-text h1 {
    margin: 0 0 5px 0;
    font-size: 2.5rem;
}

.header-text p {
    margin: 0;
}


/* --- Recent Updates Feed --- */
.recent-updates {
    margin-top: 1.5rem;
    width: 100%;
    max-width: 850px;
}

.recent-updates h2 {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
    margin-bottom: 1.5rem;
}

.recent-post-row {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
    background: var(--card-bg);
    padding: 1.2rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s ease;
}

.recent-post-row:hover {
    background-color: rgba(126, 163, 125, 0.05);
}

.post-thumb {
    flex-shrink: 0;
    width: 120px;
    height: 100px;
    background: #000; /* Adds a clean dark background behind uncropped images */
    border-radius: 4px;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* This prevents cropping entirely! */
    border-radius: 4px;
}


.post-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-meta-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.feed-tag {
    font-size: 0.65rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.feed-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.post-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.15rem;
}

.post-info h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

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

.feed-excerpt {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* --- Top Brand Header --- */
.top-title a,
.top-title a:visited,
.top-title a:active {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    transition: color 0.2s;
}

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

.top-brand-header {
    display: flex;
    align-items: center;
    justify-content: space-between; 
    gap: 1rem; 
    /* REDUCED: Changed from 1.5rem to 0.5rem to pull the whole page up */
    margin-bottom: 0.5rem; 
    padding: 1rem 2rem 0 2rem; 
    flex-wrap: wrap; 
    width: 100%;
    box-sizing: border-box;
}
.header-brand-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.top-logo {
    width: 50px; /* Adjust size of your new logo here */
    height: 50px;
    flex-shrink: 0;
}

.top-logo img {
    width: 100%;
    height: 100%;
    border-radius: 8px; /* Optional: rounds the logo corners */
    object-fit: cover;
}
/* =========================================
   TECH CATEGORY PAGE STYLES (FPS LOADOUT)
   ========================================= */

.tech-sidebar {
    justify-content: flex-start;
    overflow-y: auto; 
    padding-bottom: 100px;
}

.tech-sidebar .sidebar-heading {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1rem;
    margin: 0 0 5px 0;
}

.tech-sidebar .sidebar-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 2rem 0;
    line-height: 1.4;
}

/* FPS Inventory Slot Styling */
.equipped-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(126, 163, 125, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    /* REDUCED: Padding dropped from 10px to 6px */
    padding: 6px; 
    /* REDUCED: Margin-bottom dropped from 1rem to 0.5rem */
    margin-bottom: 0.5rem; 
    box-shadow: inset 0 0 15px rgba(0,0,0,0.8);
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
    cursor: default;
}

.equipped-card:hover {
    border-color: var(--accent);
    background: rgba(126, 163, 125, 0.08);
    transform: translateX(5px); /* Slides slightly to the right on hover */
}

/* The Item Image Box */
.equipped-img-wrapper {
    /* REDUCED: Scaled down from 65px to 50px */
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 2px;
}

.equipped-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
    filter: contrast(1.1); /* Makes the item pop slightly */
}

.equipped-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.equipped-type {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 3px;
}

.equipped-name {
    margin: 0;
    /* REDUCED: Slightly smaller font for the tighter layout */
    font-size: 0.85rem; 
    color: var(--text-primary);
    font-weight: bold;
}

/* Star Rating System */
.equipped-stars {
    color: #ffd700;
    font-size: 0.75rem; /* Slightly smaller stars */
    letter-spacing: 1px;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}
/* --- Travel XP Bars --- */
.xp-container {
    margin-top: 10px;
}

.xp-bar-bg {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(126, 163, 125, 0.3);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.8);
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #a3c4a2);
    box-shadow: 0 0 10px var(--accent);
    transition: width 1s ease-in-out;
}

.xp-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* --- Flickr Sidebar & Grid --- */
.photography-sidebar {
    justify-content: flex-start;
    overflow-y: auto;
}

.flickr-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important; /* Forces 3 columns */
    gap: 8px;
    width: 100%;
    margin-top: 10px;
}

.flickr-item {
    aspect-ratio: 1 / 1;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease;
}

.flickr-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* =========================================
   BLOG CATEGORY PAGE STYLES (CALENDAR)
   ========================================= */

.blog-sidebar {
    justify-content: flex-start;
    overflow-y: auto;
}

/* The Calendar Table */
#wp-calendar {
    width: 100%;
    border-collapse: separate;
    border-spacing: 4px; /* Creates the gap between the days */
    table-layout: fixed; 
    margin-top: 15px;
}

/* "Month Year" Title */
#wp-calendar caption {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: left;
}

/* Days of the Week Header (M T W T F S S) */
#wp-calendar th {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    padding-bottom: 8px;
    font-weight: normal;
    text-align: center;
}

/* Empty or Inactive Days */
#wp-calendar td {
    text-align: center;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    height: 35px; /* Forces square cells */
    padding: 0;
}

/* Blank spaces at the start/end of the month */
#wp-calendar td.pad {
    background: none;
    border: none;
}

/* DAYS WITH POSTS (The Bright Green Highlight) */
#wp-calendar td a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--accent);
    color: var(--bg-color); /* Dark text for contrast against the green */
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    box-shadow: 0 0 12px rgba(126, 163, 125, 0.5); /* Glowing effect */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#wp-calendar td a:hover {
    transform: scale(1.15); /* Pops out when hovered */
    box-shadow: 0 0 15px rgba(126, 163, 125, 0.8);
}
/* =========================================
   UNIVERSAL POST GRID & CARDS
   ========================================= */

.post-grid {
    display: grid;
    /* This creates responsive columns that won't stretch too wide */
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    width: 100%;
    align-items: stretch;
}

.post-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.post-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, border-color 0.2s;
    overflow: hidden;
}

.post-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

/* The Green Glow for posts with images */
.post-card.highlight-image {
    border-color: rgba(126, 163, 125, 0.4); 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.post-card-thumb {
    width: 100%;
    height: 150px;
    overflow: hidden;
}

.post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1; /* Pushes the excerpt up so cards are equal height */
}

.post-card-date {
    font-size: 0.65rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.post-card-body h3 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.3;
    color: var(--text-primary);
}

.post-card-excerpt {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
/* =========================================
   POST BODY MEDIA & ROW FIXES
   ========================================= */

/* 1. Force all images, iframes, and Flickr embeds to never exceed their container */
.post-body img,
.post-body iframe,
.post-body embed,
.post-body object,
.post-body [data-flickr-embed] {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    border-radius: 4px; /* Optional: adds a nice subtle rounding to post images */
}

/* 2. Fix the "Flex Blowout" bug where large embeds ignore Row boundaries */
.post-body .wp-block-column,
.post-body .wp-block-group {
    min-width: 0; /* This mathematically forces the flexbox to let the images shrink */
}

/* 3. Ensure Rows and Columns always have breathing room and wrap on mobile */
.post-body .wp-block-columns,
.post-body .wp-block-group.is-layout-flex {
    flex-wrap: wrap;
    gap: 1.5rem; 
}