/* ========================================
   TanTan Photography Website
   Style Guide
   ======================================== */

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border: #2a2a2a;
    --accent: #c9a76c;
    --transition: 0.3s ease;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Jost', 'Helvetica Neue', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}



body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

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



/* ========================================
   Navigation
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0) 100%);
    transition: background var(--transition);
}

.nav.scrolled {
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(10px);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.05em;
}

.nav-subtitle {
    display: block;
    font-size: 0.75rem;
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 0.15rem;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-primary);
    transition: width var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ========================================
   Hero Slideshow
   ======================================== */
.hero-slideshow {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.slideshow-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--bg-primary);
}

.slideshow-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 10;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all var(--transition);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.6);
}

.indicator.active {
    background: var(--text-primary);
    transform: scale(1.2);
}

/* ========================================
   Section Styles
   ======================================== */
.section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
}

/* ========================================
   Essays Section with Profile
   ======================================== */
.essays-section {
    padding: 5rem 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.essays-profile-wrapper {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
}

.profile-block {
    flex-shrink: 0;
}

.profile-photo {
    width: 280px;
    height: 350px;
    overflow: hidden;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%);
    transition: filter var(--transition);
}

.profile-photo:hover img {
    filter: grayscale(0%);
}

.profile-email {
    display: block;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    text-align: center;
}

.essays-block {
    flex: 1;
}

.essays-block .section-title {
    text-align: left;
    margin-bottom: 1.5rem;
}

/* Bio Block */
.bio-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bio-block p {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.9;
    color: #e0e0e0;
    margin-bottom: 0.4rem;
}

.bio-block p:last-child {
    margin-bottom: 0;
}

/* Standalone Essays Section */
.essays-standalone-section {
    padding: 5rem 3rem;
    background: var(--bg-secondary);
}

.essays-list-centered {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.essays-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.essay-item {
    display: flex;
    align-items: baseline;
    gap: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    transition: all var(--transition);
}

.essay-item:hover {
    padding-left: 1rem;
    border-color: var(--text-secondary);
}

.essay-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    width: 90px;
}

.essay-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-primary);
}

.essay-item:hover .essay-title {
    color: var(--accent);
}

.see-all-btn {
    display: block;
    width: fit-content;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.see-all-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

/* ========================================
   Music Player
   ======================================== */
.music-section {
    padding: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.player-container {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1rem 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50px;
}

.play-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--text-secondary);
    background: transparent;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
}

.play-btn:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.play-icon {
    margin-left: 2px;
}

.music-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.now-playing {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.music-title {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

/* ========================================
   With KeKe Section
   ======================================== */
.keke-section {
    padding: 5rem 3rem;
    background: var(--bg-primary);
}

.keke-section .section-title {
    margin-bottom: 3rem;
}

.section-year {
    font-weight: 300;
    color: var(--text-secondary);
}

.keke-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: stretch;
}

.keke-card {
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), opacity var(--transition);
}

.keke-card:hover {
    transform: translateY(-4px);
    opacity: 0.9;
}

/* Card Slideshow */
.keke-card-slideshow {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--bg-secondary);
    flex-grow: 1;
}

.keke-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    filter: grayscale(20%);
}

.keke-slide.active {
    opacity: 1;
}

.keke-card:hover .keke-slide {
    filter: grayscale(0%);
}

.keke-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-top: 1.25rem;
}

.keke-week {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
}

.keke-place {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--text-primary);
}

.keke-place-zh {
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}

/* Mini Map */
.keke-map-container {
    display: flex;
    flex-direction: column;
}

.keke-mini-map {
    width: 100%;
    height: 250px;
    min-height: 250px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    flex-grow: 1;
}

/* Custom mini map markers */
.mini-marker-container {
    background: transparent !important;
    border: none !important;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mini-marker {
    width: 24px;
    height: 24px;
    min-width: 24px;
    background: #8B7355;
    color: #fff;
    border: 2px solid #0a0a0a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 500;
    font-family: 'Jost', sans-serif;
}

.mini-marker-label {
    font-family: 'Palatino Linotype', Georgia, serif;
    font-size: 11px;
    color: #2C2C2C;
    white-space: nowrap;
    background: rgba(250, 249, 246, 0.85);
    padding: 2px 6px;
    border-radius: 3px;
}

.keke-map-link {
    padding-top: 1.25rem;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    transition: color var(--transition);
    text-align: center;
}

.keke-map-link:hover {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 900px) {
    .keke-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    
    .keke-map-container {
        grid-column: 1 / -1;
        order: -1;
        max-width: 350px;
        margin: 0 auto 1rem;
    }

    .keke-mini-map {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
        visibility: hidden !important;
    }

    .keke-map-link {
        display: block;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .keke-grid {
        grid-template-columns: 1fr;
    }
    
    .keke-map-container {
        max-width: 300px;
    }
}

/* ========================================
   Albums Grid
   ======================================== */
.albums-section {
    padding: 5rem 3rem;
    background: var(--bg-secondary);
}

.albums-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.album-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.album-thumbnail {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.album-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.album-card:hover .album-thumbnail img {
    transform: scale(1.05);
}

.album-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    transition: padding var(--transition);
}

.album-card:hover .album-name {
    padding-bottom: 2rem;
}

/* Album Subsections */
.albums-subsection {
    margin-bottom: 3.5rem;
}

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

.subsection-title {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* ========================================
   Page Header (for inner pages)
   ======================================== */
.page-header {
    padding: 8rem 3rem 4rem;
    text-align: center;
    background: var(--bg-primary);
}

.page-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}

.album-intro {
    max-width: none;
    margin: 0 0 2.5rem 0;
    font-family: var(--font-display);
    font-size: 1.05rem;
    line-height: 1.5;
    color: var(--text-secondary);
    text-align: left;
}

/* ========================================
   Album Page / Photo Grid
   ======================================== */
.album-content {
    padding: 2rem 3rem 5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.back-link {
    display: inline-block;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    transition: color var(--transition);
}

.back-link:hover {
    color: var(--text-primary);
}

.back-link::before {
    content: '← ';
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.photo-grid-item {
    aspect-ratio: 4/3;
    overflow: hidden;
    cursor: pointer;
}

.photo-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.photo-grid-item:hover img {
    transform: scale(1.03);
    filter: brightness(1.1);
}

/* ========================================
   Lightbox
   ======================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: color var(--transition);
}

.lightbox-close:hover {
    color: var(--text-primary);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
    transition: color var(--transition);
}

.lightbox-nav:hover {
    color: var(--text-primary);
}

.lightbox-prev {
    left: -4rem;
}

.lightbox-next {
    right: -4rem;
}

.lightbox-counter {
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ========================================
   Essays Page
   ======================================== */
.essays-page-content {
    padding: 2rem 3rem 5rem;
    max-width: 800px;
    margin: 0 auto;
}

.essays-year {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.essays-year:first-child {
    margin-top: 0;
}

/* ========================================
   Single Essay Page
   ======================================== */
.essay-content {
    padding: 2rem 3rem 5rem;
    max-width: 700px;
    margin: 0 auto;
}

.essay-body {
    font-family: var(--font-display);
    font-size: 1.2rem;
    line-height: 1.9;
    color: var(--text-primary);
}

.essay-body p {
    margin-bottom: 1.5rem;
}

.essay-body p:last-child {
    margin-bottom: 0;
}

.essay-body .section-break {
    text-align: center;
    margin: 2.5rem 0;
    color: var(--text-muted);
    letter-spacing: 0.5em;
}

/* ========================================
   Essay Page - Reading Mode
   ======================================== */
.essay-page {
    background: #fafafa;
    min-height: 100vh;
}

.essay-page .nav {
    background: rgba(250, 250, 250, 0.95);
    backdrop-filter: blur(10px);
}

.essay-page .nav-logo,
.essay-page .nav-link {
    color: #333;
}

.essay-page .nav-subtitle {
    color: #888;
}

.essay-page .nav-link:hover,
.essay-page .nav-link.active {
    color: #000;
}

.essay-page .nav-link::after {
    background: #333;
}

.essay-page .page-header {
    background: #fafafa;
    padding: 10rem 3rem 3rem;
}

.essay-page .page-title {
    color: #1a1a1a;
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.3;
}

.essay-page .page-subtitle {
    color: #888;
    font-size: 0.85rem;
    margin-top: 1rem;
}

.essay-page .essay-content {
    background: #fafafa;
    max-width: 640px;
    padding: 2rem 2rem 6rem;
}

.essay-page .back-link {
    color: #888;
}

.essay-page .back-link:hover {
    color: #333;
}

.essay-page .essay-body {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.75;
    color: #121212;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.essay-page .essay-body p {
    margin-bottom: 1rem;
}

.essay-page .section-break {
    color: #ccc;
}

.essay-page .footer {
    background: #fafafa;
    border-top: 1px solid #e5e5e5;
    color: #999;
}

/* Essay Page Mobile */
@media (max-width: 768px) {
    .essay-page {
        background: #fafafa;
    }
    
    .essay-page .nav {
        background: rgba(250, 250, 250, 0.98);
    }
    
    .essay-page .nav-logo,
    .essay-page .nav-link {
        color: #333;
    }
    
    .essay-page .page-header {
        background: #fafafa;
        padding: 7rem 1.5rem 2rem;
    }
    
    .essay-page .page-title {
        font-size: 1.5rem;
        color: #1a1a1a;
    }
    
    .essay-page .essay-content {
        background: #fafafa;
        padding: 1.5rem 1.5rem 4rem;
    }
    
    .essay-page .essay-body {
        font-family: Georgia, 'Times New Roman', serif;
        font-size: 1.1rem;
        color: #121212;
    }
    
    .essay-page .footer {
        background: #fafafa;
    }
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 3rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .nav {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 1rem;
        background: rgba(10, 10, 10, 0.98);
    }
    
    .nav-logo {
        text-align: center;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
    
    .hero-slideshow {
        height: 70vh;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .essays-section,
    .albums-section {
        padding: 3rem 1.5rem;
    }
    
    .essays-profile-wrapper {
        flex-direction: column;
        gap: 2.5rem;
        align-items: center;
    }
    
    .profile-photo {
        width: 200px;
        height: 250px;
    }
    
    .essays-block {
        width: 100%;
    }
    
    .essays-block .section-title {
        text-align: center;
    }
    
    .essay-item {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .essay-date {
        width: auto;
    }
    
    .albums-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .page-header {
        padding: 7rem 1.5rem 3rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .album-content,
    .essays-page-content,
    .essay-content {
        padding: 2rem 1.5rem 4rem;
    }
    
    .lightbox-prev {
        left: 0.5rem;
    }
    
    .lightbox-next {
        right: 0.5rem;
    }
    
    .music-section {
        padding: 2rem 1rem;
    }
    
    .player-container {
        padding: 0.75rem 1.5rem;
    }
    
    .music-title {
        font-size: 0.9rem;
    }
}
