/* ============================================================
   EECUE.COM - Main Stylesheet
   ============================================================ */

/* ========== FONTS ========== */
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/fonts/JetBrainsMono-Light.woff2') format('woff2');
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/JetBrainsMono-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/JetBrainsMono-Medium.woff2') format('woff2');
}
@font-face {
    font-family: 'Source Serif 4';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/fonts/SourceSerif4-Light.woff2') format('woff2');
}
@font-face {
    font-family: 'Source Serif 4';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/SourceSerif4-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Source Serif 4';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/SourceSerif4-Medium.woff2') format('woff2');
}
@font-face {
    font-family: 'Source Serif 4';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/SourceSerif4-SemiBold.woff2') format('woff2');
}

/* ========== CSS CUSTOM PROPERTIES ========== */
:root {
    --accent: #60a5fa;
    --accent-light: #93c5fd;
    --accent-glow: rgba(96, 165, 250, 0.15);
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --border: #262626;
    --border-light: #1a1a1a;
    --text-primary: #f5f5f5;
    --text-secondary: #b0b0b0;
    --text-muted: #8a8a8a;
    --font-mono: 'JetBrains Mono', monospace;
    --font-serif: 'Source Serif 4', Georgia, serif;
    --photo-footer-height: 20px; /* Height of copyright footer burned into images */
}

@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #ffffff;
        --bg-secondary: #fafafa;
        --bg-tertiary: #f5f5f5;
        --border: #e5e5e5;
        --border-light: #f0f0f0;
        --text-primary: #171717;
        --text-secondary: #525252;
        --text-muted: #a3a3a3;
    }
}

/* ========== RESET ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; background: var(--bg-primary); }
body {
    font-family: var(--font-serif);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }
main { flex: 1; }

/* ========== HEADER ========== */
.header {
    position: relative;
    z-index: 100;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
}
@media (prefers-color-scheme: light) {
    .header { background: rgba(255, 255, 255, 0.95); }
}
.header-inner { max-width: 1400px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.header-logo { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 300; letter-spacing: -0.02em; }
.header-logo span { color: var(--text-secondary); }
.header-nav { display: flex; gap: 2rem; }
.header-nav a { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-secondary); transition: color 0.2s; letter-spacing: 0.02em; }
.header-nav a:hover, .header-nav a.active { color: var(--accent); }

/* Mobile Menu Toggle */
.mobile-menu-btn {
    display: none;
    width: 32px;
    height: 32px;
    padding: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}
.mobile-menu-btn:hover { color: var(--accent); }
.mobile-menu-btn svg { width: 100%; height: 100%; }

/* Mobile Navigation Overlay */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 200;
    flex-direction: column;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.mobile-nav.open {
    opacity: 1;
    visibility: visible;
}
.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}
.mobile-nav-close {
    width: 32px;
    height: 32px;
    padding: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}
.mobile-nav-close:hover { color: var(--accent); }
.mobile-nav-close svg { width: 100%; height: 100%; }
.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.mobile-nav-links a {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    padding: 1rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    transition: color 0.2s, background 0.2s;
}
.mobile-nav-links a:hover {
    color: var(--accent);
    background: var(--bg-secondary);
}

/* ========== FOOTER ========== */
.footer { padding: 4rem 2rem; background: var(--bg-secondary); border-top: 1px solid var(--border); }
.footer-inner { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; }
.footer-brand h3 { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 300; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 1.5rem; }
.footer-social { display: flex; gap: 1rem; }
.footer-social a { color: var(--text-muted); transition: color 0.2s; }
.footer-social a:hover { color: var(--accent); }
.footer-col h4 { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-secondary); margin-bottom: 1.25rem; }
.footer-col a { display: block; font-size: 0.85rem; color: var(--text-secondary); padding: 0.4rem 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { max-width: 1400px; margin: 3rem auto 0; padding-top: 2rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-secondary); }

/* ========== HOMEPAGE - HERO ========== */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 8rem 2rem 4rem; position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.15; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, var(--bg-primary) 0%, transparent 30%, transparent 70%, var(--bg-primary) 100%); }
.hero-content { max-width: 1400px; margin: 0 auto; width: 100%; }
.hero-intro { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 1.5rem; }
.hero-title { font-size: clamp(2.5rem, 8vw, 5rem); font-weight: 300; line-height: 1.1; margin-bottom: 1.5rem; max-width: 900px; }
.hero-subtitle { font-size: clamp(1.1rem, 2.5vw, 1.35rem); color: var(--text-secondary); max-width: 600px; line-height: 1.7; margin-bottom: 3rem; }
.hero-roles { display: flex; flex-wrap: wrap; gap: 1rem; }
.role-link { font-family: var(--font-mono); font-size: 0.8rem; padding: 0.75rem 1.5rem; border: 1px solid var(--border); color: var(--text-secondary); transition: all 0.3s; display: flex; align-items: center; gap: 0.5rem; }
.role-link:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.role-link .arrow { opacity: 0; transform: translateX(-5px); transition: all 0.3s; }
.role-link:hover .arrow { opacity: 1; transform: translateX(0); }

/* ========== HOMEPAGE - FEATURED ========== */
.featured { padding: 6rem 2rem; border-top: 1px solid var(--border); }
.featured-inner { max-width: 1400px; margin: 0 auto; }
.section-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 3rem; flex-wrap: wrap; gap: 1rem; }
.section-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.5rem; }
.section-title { font-size: 2rem; font-weight: 300; }
.section-link { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.5rem; transition: color 0.2s; }
.section-link:hover { color: var(--accent); }

/* Photo Grid */
.photo-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; }
.photo-item { position: relative; overflow: hidden; }
.photo-item.large { grid-column: span 8; grid-row: span 2; }
.photo-item.medium { grid-column: span 4; }
.photo-item.small { grid-column: span 4; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.5s; will-change: transform; }
.photo-item:hover img { transform: scale(1.03); }
.photo-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%); opacity: 0; transition: opacity 0.3s; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.5rem; will-change: opacity; }
.photo-item:hover .photo-overlay { opacity: 1; }
.photo-overlay-title { font-family: var(--font-mono); font-size: 0.85rem; color: #fff; margin-bottom: 0.25rem; }
.photo-overlay-meta { font-family: var(--font-mono); font-size: 0.7rem; color: rgba(255,255,255,0.6); }

/* ========== HOMEPAGE - ABOUT PREVIEW ========== */
.about-preview { padding: 6rem 2rem; background: var(--bg-secondary); border-top: 1px solid var(--border); }
.about-inner { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-content .section-label { margin-bottom: 1rem; }
.about-content h2 { font-size: 2.5rem; font-weight: 300; line-height: 1.2; margin-bottom: 1.5rem; }
.about-content p { font-size: 1.1rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 1.5rem; }
.about-link { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); display: inline-flex; align-items: center; gap: 0.5rem; }
.about-link:hover { text-decoration: underline; }
.about-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.stat-item { text-align: center; padding: 2rem; background: var(--bg-tertiary); border: 1px solid var(--border); }
.stat-number { font-family: var(--font-mono); font-size: 3rem; font-weight: 300; color: var(--accent); line-height: 1; margin-bottom: 0.5rem; }
.stat-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.1em; }

/* ========== HOMEPAGE - RECENT ========== */
.recent { padding: 6rem 2rem; border-top: 1px solid var(--border); }
.recent-inner { max-width: 1400px; margin: 0 auto; }
.recent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.recent-item { border: 1px solid var(--border); transition: border-color 0.2s; }
.recent-item:hover { border-color: var(--accent); }
.recent-image { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-tertiary); }
.recent-image img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.3s; will-change: transform; }
.recent-item:hover .recent-image img { transform: scale(1.05); }
.recent-content { padding: 1.25rem; }
.recent-type { font-family: var(--font-mono); font-size: 0.65rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.recent-title { font-size: 1.1rem; font-weight: 400; margin-bottom: 0.5rem; line-height: 1.4; }
.recent-date { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-secondary); }

/* ========== HOMEPAGE - FEATURED ALBUMS ========== */
.featured-albums { padding: 6rem 2rem; border-top: 1px solid var(--border); }
.albums-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.album-card { display: block; border: 1px solid var(--border); transition: border-color 0.2s, transform 0.2s; will-change: transform; }
.album-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.album-image { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-tertiary); }
.album-image img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.4s; will-change: transform; }
.album-card:hover .album-image img { transform: scale(1.05); }
.album-info { padding: 1.25rem; }
.album-title { font-size: 1.1rem; font-weight: 400; margin-bottom: 0.35rem; line-height: 1.4; }
.album-count { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-secondary); }

/* ========== HOMEPAGE - RECENT LINKS ========== */
.recent-links { padding: 6rem 2rem; border-top: 1px solid var(--border); background: var(--bg-secondary); }
.home-links-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.home-link-card { display: flex; flex-direction: column; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 0.5rem; overflow: hidden; transition: border-color 0.2s, transform 0.2s; will-change: transform; }
.home-link-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.home-link-image { display: block; height: 140px; background-size: cover; background-position: center; background-color: var(--bg-tertiary); overflow: hidden; }
.home-link-image-placeholder { display: flex; align-items: center; justify-content: center; }
.home-link-image-placeholder svg { width: 32px; height: 32px; color: var(--text-muted); }
.home-link-content { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.home-link-title { font-size: 0.9rem; line-height: 1.5; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.home-link-title:hover { color: var(--accent); }
.home-link-source { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-secondary); margin-top: 0.75rem; }
.apple-news-icon { float: left; margin-right: 0.75rem; }
.apple-news-icon img { width: 28px; height: 28px; margin-top: 0.25rem; }

/* ========== FEED PAGE ========== */
.page-title-section { padding: 2rem 1.5rem; border-bottom: 1px solid var(--border); }
.page-title-inner { max-width: 1400px; margin: 0 auto; }
.page-title-section h1 { font-size: 2rem; font-weight: 300; }
.page-title-section p { color: var(--text-secondary); margin-top: 0.5rem; }
.layout { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 1fr 340px; }
.feed-main { border-right: 1px solid var(--border); }
.feed-sidebar { background: var(--bg-secondary); }
.date-section { border-bottom: 1px solid var(--border); }
.date-header { padding: 1rem 1.5rem; background: var(--bg-secondary); font-family: var(--font-mono); font-size: 0.8rem; font-weight: 400; color: var(--text-secondary); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.date-content { padding: 1.5rem; }
.content-type { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.65rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.content-type svg { width: 14px; height: 14px; }

/* Blog Cards */
.blog-card { margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.blog-card:last-child { border-bottom: none; padding-bottom: 0; }
.blog-card h3 { font-size: 1.25rem; font-weight: 400; margin-bottom: 0.75rem; line-height: 1.4; }
.blog-card h3 a:hover { color: var(--accent); }
.blog-card p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 1rem; }
.blog-card .read-more { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent); }
.blog-card .read-more:hover { text-decoration: underline; }

/* Photos in Feed */
.photo-full { margin-bottom: 1rem; border-radius: 0.25rem; overflow: hidden; display: block; }
.photo-full img { width: 100%; transition: transform 0.4s; will-change: transform; }
.photo-full:hover img { transform: scale(1.02); }
.photo-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 4px; margin-top: 1rem; }
.photo-thumbs a { aspect-ratio: 1; overflow: hidden; display: block; }
.photo-thumbs img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.photo-thumbs a:hover img { transform: scale(1.1); }

/* Links in Feed */
.links-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1rem; }
.link-card { display: flex; flex-direction: column; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 0.5rem; overflow: hidden; transition: border-color 0.2s; }
.link-card:hover { border-color: var(--accent); }
.link-card-image { display: block; height: 100px; background-size: cover; background-position: center; background-color: var(--bg-tertiary); overflow: hidden; }
.link-card-content { padding: 1rem; }
.link-card-content a { font-size: 0.9rem; line-height: 1.5; }
.link-card-content a:hover { color: var(--accent); }
.link-card-source { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); margin-top: 0.5rem; display: flex; align-items: center; gap: 0.25rem; }
.link-card-meta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.link-card-domain { font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent); font-weight: 500; }
.link-card-title { font-size: 1rem; font-weight: 500; line-height: 1.4; margin-bottom: 0.5rem; }
.link-card-title a { color: var(--text); }
.link-card-title a:hover { color: var(--accent); }
.link-card-description { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 0.75rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.link-card-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.link-card-date { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.35rem; }
.link-card-date svg { width: 12px; height: 12px; }
.link-card-action { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent); font-weight: 500; }
.link-card-action:hover { text-decoration: underline; }
.link-card-action span { margin-left: 0.25rem; }
.link-card-image img { width: 100%; height: 100%; object-fit: cover; }
.link-card-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--bg-tertiary); }
.link-card-placeholder svg { width: 32px; height: 32px; color: var(--text-muted); opacity: 0.5; }

/* ========== APPLE NEWS STYLE LINK CARDS ========== */
.news-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}
@media (min-width: 1024px) {
    .news-cards-grid { grid-template-columns: repeat(3, 1fr); }
}
.news-card {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.news-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.news-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-tertiary);
}
.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.news-card:hover .news-card-image img {
    transform: scale(1.05);
}
.news-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
}
.news-card-placeholder svg {
    width: 40px;
    height: 40px;
    color: var(--text-muted);
    opacity: 0.4;
}
.news-card-content {
    padding: 1rem;
}
.news-card-source {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}
.news-card-source .news-card-domain {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.news-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.news-card-favicon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
    background: #fff;
    object-fit: contain;
}
@media (prefers-color-scheme: light) {
    .news-card-favicon {
        background: transparent;
    }
}
.news-card-text {
    flex: 1;
    min-width: 0;
}
.news-card-title {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 0.35rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card:hover .news-card-title {
    color: var(--accent);
}
.news-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
}
.news-card-domain {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}
.news-card-date {
    white-space: nowrap;
}
.news-card-meta .news-card-date::before {
    content: "·";
    margin-right: 0.5rem;
}
.news-card-apple-news {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    border-radius: 0.375rem;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.2s;
}
.news-card:hover .news-card-apple-news {
    opacity: 1;
}
.news-card-apple-news img {
    width: 100%;
    height: 100%;
}
/* Reading list specific grid - more columns on large screens */
.reading-grid {
    gap: 1.5rem;
}
@media (min-width: 1200px) {
    .reading-grid { grid-template-columns: repeat(4, 1fr); }
}
/* Homepage links grid override for 3 columns */
.home-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Reading List Page */
.reading-header { padding: 4rem 2rem 3rem; text-align: center; background: var(--bg-secondary); border-bottom: 1px solid var(--border); }
.reading-header-inner { max-width: 600px; margin: 0 auto; }
.reading-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 0.75rem; }
.reading-title { font-size: 2.5rem; font-weight: 300; margin-bottom: 0.75rem; }
.reading-subtitle { font-size: 1rem; color: var(--text-secondary); }
.reading-container { max-width: 1400px; margin: 0 auto; padding: 2rem; }
.reading-container .links-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 0; }
.reading-container .link-card-image { height: 160px; }
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.empty-state svg { width: 48px; height: 48px; margin-bottom: 1rem; opacity: 0.5; }

/* Feed Sidebar */
.sidebar-section { border-bottom: 1px solid var(--border); }
.sidebar-header { padding: 1rem 1.25rem; background: var(--bg-tertiary); font-family: var(--font-mono); font-size: 0.65rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-secondary); display: flex; justify-content: space-between; align-items: center; }
.sidebar-header svg { width: 14px; height: 14px; opacity: 0.6; }
.tags-grid { padding: 1rem 1.25rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.tag-card { display: block; }
.tag-card-img { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 0.25rem; margin-bottom: 0.375rem; }
.tag-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.tag-card:hover img { transform: scale(1.05); }
.tag-card-count { position: absolute; top: 0.375rem; right: 0.375rem; background: rgba(0,0,0,0.8); color: #fff; font-family: var(--font-mono); font-size: 0.55rem; padding: 0.2rem 0.4rem; border-radius: 0.125rem; }
.tag-card-name { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-secondary); }
.tag-card:hover .tag-card-name { color: var(--accent); }

/* Pagination */
.pagination { padding: 2rem 1.5rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.pagination-info { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-secondary); }
.pagination-controls { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.pagination-pages { display: flex; align-items: center; gap: 0.25rem; }
.pagination-btn, .pagination-page { font-family: var(--font-mono); font-size: 0.75rem; padding: 0.5rem 0.75rem; border: 1px solid var(--border); color: var(--text-secondary); transition: all 0.2s; background: transparent; }
.pagination-btn:hover, .pagination-page:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pagination-btn.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.pagination-page.current { background: var(--accent); border-color: var(--accent); color: #fff; }
/* Legacy pagination styles */
.pagination a, .pagination span:not(.pagination-btn):not(.pagination-page):not(.pagination-info) { font-family: var(--font-mono); font-size: 0.75rem; padding: 0.6rem 1rem; border: 1px solid var(--border); color: var(--text-secondary); transition: all 0.2s; }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination .ellipsis { border: none; }

/* Month-based Navigation */
.month-nav { padding: 2rem 1.5rem; border-top: 1px solid var(--border); }
.month-nav-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.month-nav-arrow { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-secondary); transition: color 0.2s; }
.month-nav-arrow:hover { color: var(--accent); }
.month-nav-arrow.disabled { visibility: hidden; }
.month-nav-current { font-family: var(--font-mono); font-size: 0.9rem; font-weight: 500; color: var(--text-primary); }
.month-grid { display: flex; flex-direction: column; gap: 1rem; }
.month-year-group { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; }
.month-year-label { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 500; color: var(--text-primary); min-width: 3.5rem; }
.month-year-label:hover { color: var(--accent); }
.month-year-months { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.month-link { font-family: var(--font-mono); font-size: 0.7rem; padding: 0.35rem 0.6rem; border: 1px solid var(--border); border-radius: 0.25rem; color: var(--text-secondary); transition: all 0.2s; }
.month-link:hover { border-color: var(--accent); color: var(--accent); }
.month-link.current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ========== PHOTO PAGE ========== */
.photo-page .header { position: fixed; top: 0; left: 0; right: 0; }

/* Photo Page Content */
.photo-page-content { padding-top: 0; background: var(--bg-primary); min-height: calc(100vh - 60px); }
.photo-page-inner { max-width: 1800px; margin: 0 auto; display: grid; grid-template-columns: 1fr 400px; }
@media (min-width: 2000px) { .photo-page-inner { max-width: 2400px; } }
@media (min-width: 2800px) { .photo-page-inner { max-width: 3200px; grid-template-columns: 1fr 450px; } }
.photo-main { padding: 0 2rem 2rem; border-right: 1px solid var(--border); }

/* Photo Image with invisible nav edges */
.photo-image { position: relative; margin-bottom: 2rem; background: var(--bg-primary); display: flex; align-items: center; justify-content: center; }
.photo-image img { max-width: 100%; height: auto; display: block; }
.photo-nav-edge { position: absolute; top: 0; bottom: 0; width: 20%; min-width: 60px; cursor: pointer; z-index: 10; }
.photo-nav-edge.prev { left: 0; cursor: w-resize; }
.photo-nav-edge.next { right: 0; cursor: e-resize; }
.photo-nav-edge:hover { background: linear-gradient(to right, rgba(0,0,0,0.1), transparent); }
.photo-nav-edge.next:hover { background: linear-gradient(to left, rgba(0,0,0,0.1), transparent); }

.photo-title { font-size: 2rem; font-weight: 300; margin-bottom: 1rem; line-height: 1.3; }
.photo-date { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 2rem; }
.photo-date a:hover { color: var(--accent); }
.photo-caption { font-size: 1.15rem; line-height: 1.8; color: var(--text-secondary); margin-bottom: 2rem; max-width: 65ch; }
.photo-description { padding: 1.25rem; background: var(--bg-secondary); border-left: 3px solid var(--accent); margin-bottom: 2rem; }
.photo-description-label { font-family: var(--font-mono); font-size: 0.65rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.photo-description p { color: var(--text-secondary); line-height: 1.7; }

/* Adjacent Photos */
.adjacent-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.adjacent-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.adjacent-item { aspect-ratio: 16/10; overflow: hidden; border-radius: 0.25rem; position: relative; display: block; }
.adjacent-item img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.3s; }
.adjacent-item:hover img { transform: scale(1.05); }
.adjacent-label { position: absolute; bottom: 0.75rem; left: 0.75rem; font-family: var(--font-mono); font-size: 0.65rem; color: #fff; background: rgba(0,0,0,0.6); padding: 0.25rem 0.5rem; border-radius: 3px; }

/* Photo Sidebar */
.photo-sidebar { padding: 1.5rem 2rem 2rem; background: var(--bg-secondary); }
.photo-sidebar .sidebar-section { margin-bottom: 2rem; border-bottom: none; }
.photo-sidebar .sidebar-section:last-child { margin-bottom: 0; }
.photo-sidebar .sidebar-section h3,
.photo-sidebar .sidebar-section h2.sidebar-heading { font-family: var(--font-mono); font-size: 0.6rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-secondary); margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.photo-sidebar .sidebar-section h3::before,
.photo-sidebar .sidebar-section h2.sidebar-heading::before { content: ''; width: 4px; height: 4px; background: var(--accent); border-radius: 50%; }
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.meta-item { display: flex; flex-direction: column; gap: 0.25rem; }
.meta-item.full { grid-column: span 2; }
.meta-item .label { font-family: var(--font-mono); font-size: 0.55rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); }
.meta-item .value { font-family: var(--font-mono); font-size: 0.8rem; }
.meta-item .value a:hover { color: var(--accent); }
.color-swatch { display: inline-flex; align-items: center; gap: 0.5rem; }
.color-swatch .swatch { width: 14px; height: 14px; border-radius: 2px; border: 1px solid var(--border); }
.tag-pills { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.tag-pill { font-family: var(--font-mono); font-size: 0.65rem; padding: 0.35rem 0.65rem; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 0.25rem; color: var(--text-secondary); transition: all 0.2s; }
.tag-pill:hover { border-color: var(--accent); color: var(--accent); }
.score-list { display: flex; flex-direction: column; gap: 0.75rem; }
.score-item { display: flex; align-items: center; gap: 0.75rem; }
.score-item .label { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-secondary); min-width: 90px; }
.score-item .label a:hover { color: var(--accent); }
.score-bar { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.score-bar-fill { height: 100%; background: var(--accent); border-radius: 2px; }
.score-item .value { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-secondary); min-width: 35px; text-align: right; }
.score-item.score-negative .value { color: #ef4444; }
.score-item.score-negative .score-bar-fill { background: #ef4444; }
.score-section-label { font-family: var(--font-mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-top: 0.5rem; padding-bottom: 0.25rem; border-bottom: 1px solid var(--border); }
.score-section-label:first-child { margin-top: 0; }

/* Face attributes */
.face-attributes { margin-top: 0.5rem; }
.face-attr { background: var(--bg-secondary); color: var(--text-muted); cursor: default; }

/* Notices */
.notices { max-width: 1400px; margin: 0 auto; padding: 0 2rem 2rem; }
.notice { padding: 1rem 1.25rem; border-left: 3px solid; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.notice:last-child { margin-bottom: 0; }
.notice.warning { background: rgba(251, 191, 36, 0.08); border-color: #fbbf24; }
.notice.info { background: rgba(96, 165, 250, 0.08); border-color: var(--accent); }
.notice.celeb { background: rgba(34, 211, 238, 0.08); border-color: #22d3ee; }
.notice a { color: var(--accent); }

/* Face Bounding Boxes */
.face-boxes-overlay {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 20;
    /* Width and height set dynamically via JS to match image */
}
.face-boxes-overlay.visible { opacity: 1; }
.face-box {
    position: absolute;
    border: 2px solid rgba(96, 165, 250, 0.7);
    border-radius: 4px;
    box-sizing: border-box;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(96, 165, 250, 0.05);
}
.face-box:hover {
    border-color: var(--accent);
    background: rgba(96, 165, 250, 0.15);
    box-shadow: 0 0 12px rgba(96, 165, 250, 0.4);
}
.face-box.celebrity {
    border-color: rgba(34, 211, 238, 0.7);
    background: rgba(34, 211, 238, 0.05);
}
.face-box.celebrity:hover {
    border-color: #22d3ee;
    background: rgba(34, 211, 238, 0.15);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.4);
}
.face-box.highlighted {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.5);
    z-index: 10;
}
.face-label {
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 0.25rem 0.6rem;
    border-radius: 3px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
    font-weight: 500;
}
.face-box:hover .face-label,
.face-box.highlighted .face-label { opacity: 1; }

/* Face Toggle Button */
.face-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    vertical-align: middle;
    margin-left: 0.5rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.face-toggle-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.face-toggle-btn:active {
    background: var(--accent-glow);
}
.face-toggle-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.face-toggle-btn svg { display: block; width: 20px; height: 20px; }

/* Person/Celeb Links Hover States */
.face-person-link,
.face-celeb-link { transition: all 0.2s ease; }
.face-person-link.highlighted,
.face-celeb-link.highlighted {
    background: rgba(251, 191, 36, 0.2);
    border-color: #fbbf24;
    color: #fbbf24;
}
.celebrity-pills { margin-top: 0.5rem; }
.faces-count {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ========== COLLECTION PAGE ========== */
.gallery-hero { position: relative; height: 40vh; min-height: 300px; overflow: hidden; display: flex; align-items: flex-end; }
.gallery-hero-bg { position: absolute; inset: 0; }
.gallery-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.gallery-hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg-primary) 0%, rgba(10,10,10,0.5) 50%, rgba(10,10,10,0.3) 100%); }
@media (prefers-color-scheme: light) {
    .gallery-hero-bg::after { background: linear-gradient(to top, var(--bg-primary) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0.3) 100%); }
}
.gallery-hero-content { position: relative; z-index: 1; width: 100%; max-width: 1600px; margin: 0 auto; padding: 2rem; }
.gallery-breadcrumb { font-family: var(--font-mono); font-size: 0.7rem; color: #fff; margin-bottom: 0.75rem; }
.gallery-breadcrumb a { color: #fff; }
.gallery-breadcrumb a:hover { color: var(--accent); }
.gallery-breadcrumb .sep { margin: 0 0.5rem; }
.gallery-title { font-size: 2.5rem; font-weight: 300; color: #fff; margin-bottom: 0.5rem; text-shadow: 0 2px 4px rgba(0,0,0,0.8), 0 4px 12px rgba(0,0,0,0.5); }
.gallery-meta { font-family: var(--font-mono); font-size: 0.8rem; color: #fff; display: flex; flex-wrap: wrap; gap: 1.5rem; }
.gallery-meta span { display: flex; align-items: center; gap: 0.375rem; }
.gallery-meta svg { width: 14px; height: 14px; opacity: 0.7; }
@media (prefers-color-scheme: light) {
    .gallery-breadcrumb, .gallery-breadcrumb a, .gallery-meta { color: #000; }
}

/* Gallery Controls */
.gallery-controls { background: var(--bg-secondary); border-bottom: 1px solid var(--border); padding: 1rem 2rem; position: sticky; top: 0; z-index: 50; }
.controls-inner { max-width: 1600px; margin: 0 auto; display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.control-group { display: flex; align-items: center; gap: 0.5rem; }
.control-label { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.control-btn { font-family: var(--font-mono); font-size: 0.7rem; padding: 0.5rem 0.875rem; background: transparent; border: 1px solid var(--border); color: var(--text-secondary); cursor: pointer; transition: all 0.2s; }
.control-btn:hover { border-color: var(--accent); color: var(--accent); }
.control-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.controls-spacer { flex: 1; }
.photo-count { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); }

/* Gallery Container */
.gallery-container { max-width: 1600px; margin: 0 auto; padding: 2rem; }
.gallery-view { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.gallery-item { position: relative; overflow: hidden; border-radius: 0.25rem; background: var(--bg-secondary); }
.gallery-item img { width: 100%; height: auto; opacity: 1; transition: transform 0.4s, opacity 0.3s; }
.gallery-item img:not([src]), .gallery-item img[data-src] { opacity: 0; }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item.portrait { grid-row: span 2; }
.gallery-item-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%); opacity: 0; transition: opacity 0.3s; display: flex; flex-direction: column; justify-content: flex-end; padding: 1rem; }
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-title { font-family: var(--font-mono); font-size: 0.8rem; color: #fff; }
.gallery-item-meta { font-family: var(--font-mono); font-size: 0.65rem; color: rgba(255,255,255,0.6); }
.thumbs-view { display: none; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px; }
.thumbs-view.active { display: grid; }
.gallery-view.hidden { display: none; }
.thumb-item { aspect-ratio: 1; overflow: hidden; background: var(--bg-secondary); }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; opacity: 1; transition: transform 0.2s, opacity 0.3s; }
.thumb-item img:not([src]), .thumb-item img[data-src] { opacity: 0; }
.thumb-item:hover img { transform: scale(1.08); }
.load-more { display: block; width: 100%; max-width: 400px; margin: 2rem auto 0; padding: 1rem 2rem; background: transparent; border: 1px solid var(--border); color: var(--text-secondary); font-family: var(--font-mono); font-size: 0.8rem; text-align: center; transition: all 0.2s; }
.load-more:hover { border-color: var(--accent); color: var(--accent); }

/* ========== INDEXES PAGE ========== */
.page-header { padding: 4rem 2rem; text-align: center; border-bottom: 1px solid var(--border); }
.page-header-inner { max-width: 800px; margin: 0 auto; }
.page-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.page-title { font-size: 3rem; font-weight: 300; margin-bottom: 1rem; }
.page-subtitle { font-size: 1.15rem; color: var(--text-secondary); line-height: 1.7; }
.page-stats { margin-top: 2rem; display: flex; justify-content: center; gap: 3rem; }
.page-stat { text-align: center; }
.page-stat-number { font-family: var(--font-mono); font-size: 2rem; font-weight: 300; color: var(--accent); }
.page-stat-label { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.collections-container { max-width: 1600px; margin: 0 auto; padding: 3rem 2rem; }
.collection-section { margin-bottom: 4rem; }
.collection-section:last-child { margin-bottom: 0; }
.section-header-link { display: flex; flex-direction: column; gap: 0.25rem; text-decoration: none; transition: color 0.2s; }
.section-header-link:hover .section-title { color: var(--accent); }
.section-header-link:hover .section-count { color: var(--accent); }
.section-count { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); transition: color 0.2s; }
.index-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem; }
@media (min-width: 1400px) { .index-grid { grid-template-columns: repeat(10, 1fr); } }
.index-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 0.5rem; overflow: hidden; transition: all 0.3s; }
.index-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.index-card-image { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.index-card-image img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.4s; }
.index-card:hover .index-card-image img { transform: scale(1.05); }
.index-card-count { position: absolute; top: 0.75rem; right: 0.75rem; background: rgba(0,0,0,0.8); color: #fff; font-family: var(--font-mono); font-size: 0.65rem; padding: 0.3rem 0.6rem; border-radius: 0.25rem; backdrop-filter: blur(4px); }
.index-card-content { padding: 1rem 1.25rem; }
.index-card-title { font-family: var(--font-mono); font-size: 0.9rem; font-weight: 400; margin-bottom: 0.25rem; }
.index-card-subtitle { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); }
.view-all { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); margin-top: 1.5rem; transition: color 0.2s; }
.view-all:hover { color: var(--accent); }

/* Index Type Header (e.g., /indexes/places) */
.index-header { padding: 3rem 2rem; text-align: center; border-bottom: 1px solid var(--border); background: var(--bg-secondary); }
.index-header-inner { max-width: 800px; margin: 0 auto; }
.index-breadcrumb { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.index-breadcrumb a { color: var(--text-muted); transition: color 0.2s; }
.index-breadcrumb a:hover { color: var(--accent); }
.index-breadcrumb .sep { margin: 0 0.5rem; opacity: 0.5; }
.index-label { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.25rem; }
.index-title { font-size: 2.5rem; font-weight: 300; margin-bottom: 0.5rem; text-transform: capitalize; }
.index-stats { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 1.5rem; }
.index-controls { display: flex; justify-content: center; gap: 0.5rem; }
.sort-btn { font-family: var(--font-mono); font-size: 0.7rem; padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: 0.25rem; color: var(--text-secondary); background: transparent; transition: all 0.2s; }
.sort-btn:hover { border-color: var(--accent); color: var(--accent); }
.sort-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.index-container { max-width: 1600px; margin: 0 auto; padding: 3rem 2rem; }
.index-card-badge { position: absolute; top: 0.75rem; right: 0.75rem; background: rgba(0,0,0,0.8); color: #fff; font-family: var(--font-mono); font-size: 0.65rem; padding: 0.3rem 0.6rem; border-radius: 0.25rem; backdrop-filter: blur(4px); }
.index-card-overlay { position: absolute; bottom: 0; left: 0; right: 0; padding: 1rem; background: linear-gradient(transparent, rgba(0,0,0,0.8)); }
.index-card-overlay .index-card-title { color: #fff; font-family: var(--font-mono); font-size: 0.85rem; font-weight: 400; margin-bottom: 0.25rem; text-transform: capitalize; }
.index-card-overlay .index-card-count { color: rgba(255,255,255,0.7); font-family: var(--font-mono); font-size: 0.65rem; }

/* Truncate long index card titles to 2 lines */
.index-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    max-height: 2.6em; /* 2 lines * 1.3 line-height */
}

/* Infinite scroll */
.infinite-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.infinite-loader.done {
    color: var(--text-secondary);
}

.infinite-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.index-card.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== DOCUMENT/BLOG ARTICLE LAYOUT ========== */
.article-layout { margin: 0 2rem; display: grid; grid-template-columns: 1fr 320px; min-height: calc(100vh - 200px); }
@media (min-width: 1500px) { .article-layout { max-width: 1400px; margin: 0 auto; } }
.article-content { padding: 4rem 3rem; border-right: 1px solid var(--border); }
.article-header { margin-bottom: 3rem; }
.article-breadcrumb { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 1.5rem; }
.article-breadcrumb a { color: var(--text-secondary); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
.article-breadcrumb a:hover { color: var(--accent); }
.article-breadcrumb .sep { margin: 0 0.5rem; }
.article-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.article-title { font-size: 2.75rem; font-weight: 300; line-height: 1.2; margin-bottom: 0.5rem; }
.article-subtitle { font-size: 1.25rem; color: var(--text-secondary); line-height: 1.6; }
.article-date { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1rem; }
.article-hero { margin: 0 0 2rem 0; border-radius: 0.5rem; overflow: hidden; }
.article-hero img { width: 100%; height: auto; display: block; }
.article-intro { font-size: 1.25rem; line-height: 1.8; color: var(--text-primary); margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.article-intro p { font-size: inherit; line-height: inherit; color: inherit; margin-bottom: 1rem; }
.article-intro p:last-child { margin-bottom: 0; }

/* Prose */
.prose { max-width: none; }
.prose p { font-size: 1.1rem; line-height: 1.9; color: var(--text-secondary); margin-bottom: 1.5rem; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.prose a:hover { text-decoration-style: solid; }
.prose h1, .prose h2 { font-size: 1.5rem; font-weight: 400; margin-top: 3rem; margin-bottom: 1.25rem; padding-top: 2rem; border-top: 1px solid var(--border); color: var(--text-primary); }
.prose h1:first-child, .prose h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.prose h3 { font-size: 1.2rem; font-weight: 500; margin-top: 2rem; margin-bottom: 1rem; color: var(--text-primary); }
.prose ul, .prose ol { margin-bottom: 1.5rem; padding-left: 1.5rem; }
.prose li { font-size: 1.05rem; line-height: 1.8; color: var(--text-secondary); margin-bottom: 0.5rem; }
.prose blockquote { margin: 2rem 0; padding: 1.5rem 2rem; background: var(--bg-secondary); border-left: 3px solid var(--accent); font-style: italic; }
.prose blockquote p { margin-bottom: 0; }
.prose img { border-radius: 0.25rem; margin: 2rem 0; max-width: 100%; height: auto; aspect-ratio: auto; content-visibility: auto; contain-intrinsic-size: auto 400px; }
.prose code { font-family: var(--font-mono); font-size: 0.9em; background: var(--bg-secondary); padding: 0.2rem 0.4rem; border-radius: 0.25rem; }
.prose pre { margin: 1.5rem 0; padding: 1.5rem; background: var(--bg-secondary); border-radius: 0.25rem; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }

/* Article Sidebar */
.article-sidebar { padding: 4rem 2rem; background: var(--bg-secondary); }
.article-sidebar .sidebar-section { margin-bottom: 2.5rem; border-bottom: none; }
.article-sidebar .sidebar-section:last-child { margin-bottom: 0; }
.article-sidebar .sidebar-section h3 { font-family: var(--font-mono); font-size: 0.6rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-secondary); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.article-sidebar .sidebar-section h3::before { content: ''; width: 4px; height: 4px; background: var(--accent); border-radius: 50%; }
.subscribe-box { background: var(--bg-tertiary); border: 1px solid var(--border); padding: 1.5rem; border-radius: 0.5rem; }
.subscribe-box h4 { font-size: 1rem; font-weight: 400; margin-bottom: 0.5rem; }
.subscribe-box p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.6; }
.subscribe-box iframe { width: 100%; border: none; min-height: 200px; }
.sidebar-links { display: flex; flex-direction: column; gap: 0.75rem; }
.sidebar-links a { font-size: 0.9rem; color: var(--text-secondary); display: flex; align-items: center; gap: 0.5rem; transition: color 0.2s; }
.sidebar-links a::before { content: '→'; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-secondary); }
.sidebar-links a:hover { color: var(--accent); }
.sidebar-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stat-box { text-align: center; padding: 1.25rem 0.75rem; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 0.375rem; }
.stat-box .stat-number { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 300; color: var(--accent); line-height: 1; margin-bottom: 0.375rem; }
.stat-box .stat-label { font-family: var(--font-mono); font-size: 0.55rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }

/* Dynamic stat loading animation */
.stat-loading {
    position: relative;
    color: transparent !important;
}
.stat-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1em;
    height: 1em;
    margin: -0.5em 0 0 -0.5em;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: stat-spin 0.8s linear infinite;
}
@keyframes stat-spin {
    to { transform: rotate(360deg); }
}

.metadata-item { margin-bottom: 1rem; }
.metadata-label { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem; }
.metadata-value { font-size: 0.9rem; color: var(--text-primary); }
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-link { font-family: var(--font-mono); font-size: 0.75rem; padding: 0.375rem 0.75rem; background: var(--bg-tertiary); border: 1px solid var(--border); border-radius: 2rem; color: var(--text-secondary); transition: all 0.2s; }
.tag-link:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.tag-link.active { background: var(--accent); border-color: var(--accent); color: #000; }
.blog-breadcrumb { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 1rem; }
.blog-breadcrumb a { color: var(--text-secondary); }
.blog-breadcrumb a:hover { color: var(--accent); }
.blog-breadcrumb .sep { margin: 0 0.5rem; opacity: 0.5; }
.sidebar-link { display: block; padding: 0.75rem 1rem; font-size: 0.9rem; color: var(--text-secondary); background: var(--bg-tertiary); border-radius: 0.25rem; transition: all 0.2s; }
.sidebar-link:hover { background: var(--accent); color: #000; }

/* ========== BLOG INDEX ========== */
.blog-header { padding: 4rem 2rem; text-align: center; border-bottom: 1px solid var(--border); }
.blog-header-inner { max-width: 800px; margin: 0 auto; }
.blog-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.blog-title { font-size: 3rem; font-weight: 300; margin-bottom: 1rem; }
.blog-subtitle { font-size: 1.15rem; color: var(--text-secondary); line-height: 1.7; }
.blog-layout { max-width: 1200px; margin: 0 auto; padding: 3rem 2rem; display: grid; grid-template-columns: 1fr 320px; gap: 3rem; }
.posts-list { display: flex; flex-direction: column; gap: 2rem; }
.post-card { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 0.5rem; overflow: hidden; transition: all 0.3s; }
.post-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.post-card-content { padding: 2rem; }
.post-card-title { font-size: 1.5rem; font-weight: 400; margin-bottom: 0.75rem; line-height: 1.3; }
.post-card-title a { color: var(--text-primary); transition: color 0.2s; }
.post-card-title a:hover { color: var(--accent); }
.post-card-excerpt { font-size: 1rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 1rem; }
.post-card-meta { display: flex; align-items: center; gap: 1rem; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }
.post-card-date { display: flex; align-items: center; gap: 0.375rem; }
.post-card-date svg { width: 14px; height: 14px; }
.post-card-link { color: var(--accent); display: flex; align-items: center; gap: 0.375rem; transition: gap 0.2s; }
.post-card-link:hover { gap: 0.5rem; }
.blog-sidebar { display: flex; flex-direction: column; gap: 2rem; }
.blog-sidebar .sidebar-section { background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 0.5rem; overflow: hidden; }
.blog-sidebar .sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; background: var(--bg-tertiary); border-bottom: 1px solid var(--border); }
.blog-sidebar .sidebar-header h3 { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.blog-sidebar .sidebar-header svg { width: 16px; height: 16px; color: var(--text-muted); }
.blog-sidebar .sidebar-content { padding: 1.25rem; }
.subscribe-frame { width: 100%; border: none; min-height: 200px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pagination-label { font-family: var(--font-mono); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 1rem; }
.pagination-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pagination-link { font-family: var(--font-mono); font-size: 0.8rem; padding: 0.5rem 0.875rem; border: 1px solid var(--border); border-radius: 0.25rem; color: var(--text-secondary); transition: all 0.2s; }
.pagination-link:hover { border-color: var(--accent); color: var(--accent); }
.pagination-link.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ========== RESPONSIVE ========== */
@media (min-width: 1400px) {
    .gallery-view { grid-template-columns: repeat(5, 1fr); }
    .thumbs-view { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media (max-width: 1200px) {
    .footer-inner { grid-template-columns: 1fr 1fr 1fr; }
    .footer-brand { grid-column: span 3; margin-bottom: 1rem; }
    .photo-page-inner { grid-template-columns: 1fr 350px; }
    .gallery-view { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1023px) {
    .header { padding: 1rem 1.5rem; position: relative; }
    .header-nav { display: none; }
    .mobile-menu-btn { display: block; }
    .mobile-nav.open { display: flex; }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .footer-brand { grid-column: span 2; }
    .hero { padding: 7rem 1.5rem 3rem; }
    .photo-grid { grid-template-columns: repeat(6, 1fr); }
    .photo-item.large { grid-column: span 6; grid-row: span 1; }
    .photo-item.medium, .photo-item.small { grid-column: span 3; }
    .about-inner { grid-template-columns: 1fr; gap: 3rem; }
    .about-stats { order: -1; }
    .recent-grid { grid-template-columns: 1fr 1fr; }
    .albums-grid { grid-template-columns: 1fr 1fr; }
    .home-links-grid { grid-template-columns: 1fr 1fr; }
    .news-cards-grid { grid-template-columns: repeat(2, 1fr); }
    .layout { grid-template-columns: 1fr; }
    .feed-main { border-right: none; }
    .feed-sidebar { display: grid; grid-template-columns: 1fr 1fr; }
    .feed-sidebar .sidebar-section:first-child { border-right: 1px solid var(--border); }
    .tags-grid { grid-template-columns: repeat(4, 1fr); }
    .photo-page-inner { grid-template-columns: 1fr; }
    .photo-main { border-right: none; border-bottom: 1px solid var(--border); }
    .gallery-hero { height: 35vh; min-height: 250px; }
    .gallery-title { font-size: 2rem; }
    .page-header { padding: 3rem 1.5rem; }
    .page-title { font-size: 2.5rem; }
    .article-layout { grid-template-columns: 1fr; }
    .article-content { border-right: none; border-bottom: 1px solid var(--border); }
    .blog-layout { grid-template-columns: 1fr; }
    .blog-sidebar { order: 2; }
}

@media (max-width: 767px) {
    .header { padding: 0.875rem 1rem; }
    .header-logo { font-size: 1rem; }
    .footer { padding: 3rem 1rem; }
    .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
    .footer-brand { grid-column: span 1; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
    .hero { padding: 6rem 1rem 2rem; min-height: auto; }
    .hero-title { font-size: 2.25rem; }
    .hero-subtitle { font-size: 1rem; }
    .role-link { font-size: 0.75rem; padding: 0.625rem 1.25rem; }
    .featured, .about-preview, .recent, .featured-albums, .recent-links { padding: 4rem 1rem; }
    .section-title { font-size: 1.5rem; }
    .albums-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .home-links-grid { grid-template-columns: 1fr; gap: 1rem; }
    .news-cards-grid { grid-template-columns: 1fr; gap: 1rem; }
    .news-card-title { font-size: 0.9rem; }
    .photo-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .photo-item.large, .photo-item.medium, .photo-item.small { grid-column: span 1; grid-row: span 1; }
    .photo-item.large { grid-column: span 2; }
    .about-content h2 { font-size: 1.75rem; }
    .about-content p { font-size: 1rem; }
    .about-stats { gap: 1rem; }
    .stat-item { padding: 1.5rem 1rem; }
    .stat-number { font-size: 2.25rem; }
    .recent-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .page-title-section h1 { font-size: 1.5rem; }
    .date-content { padding: 1rem; }
    .feed-sidebar { grid-template-columns: 1fr; }
    .feed-sidebar .sidebar-section:first-child { border-right: none; }
    .tags-grid { grid-template-columns: repeat(3, 1fr); }
    .links-grid { grid-template-columns: 1fr; }
    .reading-header { padding: 2rem 1rem 1.5rem; }
    .reading-title { font-size: 1.75rem; }
    .reading-container { padding: 1rem; }
    .reading-container .links-grid { grid-template-columns: 1fr; }
    .photo-thumbs { grid-template-columns: repeat(4, 1fr); }
    .keyboard-hint { display: none; }
    .photo-main, .photo-sidebar { padding: 2rem 1rem; }
    .photo-title { font-size: 1.5rem; }
    .photo-caption { font-size: 1rem; }
    .adjacent-grid { gap: 0.5rem; }
    .notices { padding: 0 1rem 1rem; }
    .gallery-hero { height: 30vh; min-height: 220px; }
    .gallery-hero-content { padding: 1.5rem; }
    .gallery-title { font-size: 1.5rem; }
    .gallery-controls { padding: 0.75rem 1rem; }
    .controls-inner { gap: 1rem; }
    .control-btn { font-size: 0.65rem; padding: 0.4rem 0.7rem; }
    .gallery-container { padding: 1rem; }
    .gallery-view { grid-template-columns: 1fr; gap: 0.5rem; }
    .gallery-item.portrait { grid-row: span 1; }
    .thumbs-view { grid-template-columns: repeat(3, 1fr); gap: 3px; }
    .page-header { padding: 2rem 1rem; }
    .page-title { font-size: 2rem; }
    .page-subtitle { font-size: 1rem; }
    .page-stats { gap: 2rem; }
    .page-stat-number { font-size: 1.5rem; }
    .collections-container { padding: 2rem 1rem; }
    .index-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .index-card-content { padding: 0.75rem 1rem; }
    .index-card-title { font-size: 0.8rem; }
    .article-content { padding: 3rem 1.5rem; }
    .article-title { font-size: 2rem; }
    .article-subtitle { font-size: 1.1rem; }
    .prose p { font-size: 1rem; }
    .article-sidebar { padding: 2rem 1.5rem; }
    .sidebar-stats { grid-template-columns: repeat(4, 1fr); }
    .blog-header { padding: 3rem 1.5rem; }
    .blog-title { font-size: 2rem; }
    .blog-layout { padding: 2rem 1rem; }
    .post-card-content { padding: 1.5rem; }
    .post-card-title { font-size: 1.25rem; }
}

@media (max-width: 479px) {
    .hero-roles { flex-direction: column; }
    .role-link { justify-content: center; }
    .about-stats { grid-template-columns: 1fr; }
    .page-title-section, .date-content { padding: 1rem; }
    .page-title-section h1 { font-size: 1.25rem; }
    .photo-thumbs { grid-template-columns: repeat(3, 1fr); }
    .tags-grid { grid-template-columns: repeat(2, 1fr); }
    .meta-grid { grid-template-columns: 1fr; }
    .meta-item.full { grid-column: span 1; }
    .gallery-title { font-size: 1.25rem; }
    .gallery-meta { flex-direction: column; gap: 0.375rem; }
    .controls-inner { flex-direction: column; align-items: flex-start; }
    .controls-spacer { display: none; }
    .page-title { font-size: 1.5rem; }
    .page-stats { flex-wrap: wrap; gap: 1.5rem; }
    .index-grid { grid-template-columns: 1fr 1fr; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .article-content { padding: 2rem 1rem; }
    .article-title { font-size: 1.75rem; }
    .prose h2 { font-size: 1.25rem; }
    .article-sidebar { padding: 1.5rem 1rem; }
    .sidebar-stats { grid-template-columns: 1fr 1fr; }
    .blog-header { padding: 2rem 1rem; }
    .blog-title { font-size: 1.75rem; }
    .post-card-meta { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}
