/* ─── Theme variables ────────────────────────────────────── */
:root {
    --bg:         #f7f6f0;
    --bg-subtle:  #eeeee8;
    --text-1:     #222;
    --text-2:     #333;
    --text-3:     #444;
    --text-4:     #555;
    --text-muted: #888;
    --text-faint: #aaa;
    --border:     #e4e4e0;
    --border-alt: #e8e8e4;
    --border-sub: #f0efe9;
    --tag-bg:     #ece8f4;
    --tag-color:  #7a5299;
    --vinyl-hole: #f7f6f0;
    --podcast-bg: #e8e7e0;
    --book-bg:    #e8e4f0;
}

body.dark {
    --bg:         #161614;
    --bg-subtle:  #1e1e1b;
    --text-1:     #e8e7e0;
    --text-2:     #d4d3cc;
    --text-3:     #bdbcb5;
    --text-4:     #a8a79f;
    --text-muted: #6e6d67;
    --text-faint: #555550;
    --border:     #2c2c28;
    --border-alt: #2a2a26;
    --border-sub: #222220;
    --tag-bg:     #2d2040;
    --tag-color:  #b592d8;
    --vinyl-hole: #161614;
    --podcast-bg: #2a2a26;
    --book-bg:    #2d2040;
}

/* ─── Theme toggle button ────────────────────────────────── */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 100;
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
    transition: border-color 0.2s, color 0.2s;
}

.theme-toggle:hover {
    border-color: #7a5299;
    color: #7a5299;
}

/* Reset & Background */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    color: var(--text-1);
    transition: background-color 0.2s, color 0.2s;
}

/* Center Content Styling */
.profile-card {
    max-width: 860px;
    text-align: center;
    padding: 20px;
    z-index: 10; /* Ensures text stays clickable and layered above everything else */
}

.profile-layout {
    display: flex;
    align-items: center;
    gap: 36px;
    margin-bottom: 32px;
    text-align: left;
}

.profile-photo {
    width: 240px;
    border-radius: 12px;
    flex-shrink: 0;
    border: 3px solid #7a5299;
}

.profile-text {
    flex: 1;
    text-align: center;
}

.profile-card h1 {
    font-family: Georgia, serif;
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-1);
    margin-bottom: 15px;
}

.profile-card .bio {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-3);
    margin-bottom: 25px;
}

.profile-card .bio a {
    color: #7a5299;
    text-decoration: none;
    transition: color 0.2s;
}

.profile-card .bio a:hover {
    color: #5a3d79;
}

.links a {
    color: var(--text-4);
    text-decoration: none;
    margin: 0 12px;
    font-weight: 500;
    transition: color 0.2s;
}

.links a:hover {
    color: #7a5299;
}

.social-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 24px;
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.2rem;
    text-decoration: none;
    transition: color 0.2s;
}

.social-links a:hover {
    color: #7a5299;
}

/* ─── Writings page ─────────────────────────────────────── */

.writings-body {
    align-items: flex-start;
    overflow: auto;
}

.writings-container {
    max-width: 700px;
    width: 100%;
    margin: 60px auto;
    padding: 0 32px 80px;
}

.back-link {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 32px;
    transition: color 0.2s;
}

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

.writings-title {
    font-family: Georgia, serif;
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-1);
    margin-bottom: 40px;
}

.article-list {
    display: flex;
    flex-direction: column;
}

.article-entry {
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
}

.article-entry:first-child {
    border-top: 1px solid var(--border);
}

.article-entry h2 {
    font-family: Georgia, serif;
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 6px;
}

.article-entry h2 a {
    color: #7a5299;
    text-decoration: none;
    transition: color 0.2s;
}

.article-entry h2 a:hover {
    color: #5a3d79;
}

.article-date {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.article-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-4);
}

/* ─── Courses page ──────────────────────────────────────── */

.courses-body {
    align-items: flex-start;
    overflow: auto;
}

.courses-container {
    max-width: 700px;
    width: 100%;
    margin: 60px auto;
    padding: 0 32px 80px;
}

.courses-title {
    font-family: Georgia, serif;
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-1);
    margin-bottom: 8px;
}

.courses-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 48px;
}

.semester {
    margin-bottom: 40px;
}

.semester h2 {
    font-family: Georgia, serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-1);
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.semester ul {
    list-style: none;
}

.semester li {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-4);
    margin-bottom: 4px;
}

.semester li strong {
    color: #7a5299;
    font-weight: 500;
}

/* ─── Experiences page ──────────────────────────────────── */

.experiences-body {
    align-items: flex-start;
    overflow: auto;
}

.experiences-container {
    max-width: 700px;
    width: 100%;
    margin: 60px auto;
    padding: 0 32px 80px;
}

.experiences-title {
    font-family: Georgia, serif;
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-1);
    margin-bottom: 8px;
}

.experiences-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 48px;
}

.exp-timeline {
    position: relative;
    padding-left: 32px;
    border-left: 1px solid var(--border);
}

.exp-entry {
    position: relative;
    padding-bottom: 36px;
}

.exp-entry:last-child {
    padding-bottom: 0;
}

.exp-entry::before {
    content: "";
    position: absolute;
    top: 6px;
    left: -37px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: #7a5299;
}

.exp-date {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.exp-entry h2 {
    font-family: Georgia, serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-1);
    margin-bottom: 6px;
}

.exp-detail {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-4);
    font-style: italic;
}

.exp-link {
    margin-top: 8px;
}

.exp-link a {
    font-size: 0.9rem;
    color: #7a5299;
    text-decoration: none;
    transition: color 0.2s;
}

.exp-link a:hover {
    color: #5a3d79;
}

/* ─── Projects page ─────────────────────────────────────── */

.projects-body {
    align-items: flex-start;
    overflow: auto;
}

.projects-container {
    max-width: 800px;
    width: 100%;
    margin: 60px auto;
    padding: 0 32px 80px;
}

.project-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.tab-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-4);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    border-color: #7a5299;
    color: #7a5299;
}

.tab-btn.active {
    background: #7a5299;
    border-color: #7a5299;
    color: #fff;
}

.project-category-tag {
    font-size: 0.75rem;
    color: var(--text-faint);
    font-style: italic;
}

.project-entry {
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
}

.project-entry:last-child {
    border-bottom: none;
}

.project-header {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 10px;
}

.project-name {
    font-family: Georgia, serif;
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text-1);
}

.project-date {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.tag {
    font-size: 0.8rem;
    color: var(--tag-color);
    background: var(--tag-bg);
    border-radius: 20px;
    padding: 3px 10px;
}

.project-summary {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-2);
    margin-bottom: 8px;
}

.project-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-4);
    margin-bottom: 12px;
}

.project-links {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 16px;
}

.project-links-label {
    color: var(--text-muted);
}

.project-links a {
    color: #7a5299;
    text-decoration: none;
    transition: color 0.2s;
}

.project-links a:hover {
    color: #5a3d79;
}

.project-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    padding: 60px 0;
}

/* ─── Maps page ─────────────────────────────────────────── */

.maps-body {
    align-items: flex-start;
    overflow: auto;
}

.maps-container {
    max-width: 1200px;
    width: 100%;
    margin: 60px auto;
    padding: 0 32px 80px;
}

.maps-title {
    font-family: Georgia, serif;
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-1);
    margin-bottom: 8px;
}

.maps-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 48px;
}

.maps-grid {
    column-count: 3;
    column-gap: 32px;
}

.map-card {
    break-inside: avoid;
    margin-bottom: 32px;
}

.map-card img {
    display: block;
    width: 100%;
    border-radius: 6px;
    border: 3px solid #7a5299;
}

.map-card figcaption {
    margin-top: 12px;
}

.map-name {
    display: block;
    font-weight: 600;
    color: var(--text-1);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.map-detail {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (max-width: 900px) {
    .maps-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .maps-grid {
        column-count: 1;
    }
}

/* ─── Interests pages ───────────────────────────────────── */

.interests-body {
    align-items: flex-start;
    overflow: auto;
}

.interests-container {
    max-width: 700px;
    width: 100%;
    margin: 60px auto;
    padding: 0 32px 80px;
}

.interests-title {
    font-family: Georgia, serif;
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-1);
    margin-bottom: 8px;
}

.interests-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 48px;
}

/* Section block on the overview page */
.interests-section {
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
}

.interests-section:first-of-type {
    border-top: 1px solid var(--border);
}

.interests-section-header {
    margin-bottom: 4px;
}

.interests-section-title {
    font-family: Georgia, serif;
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text-1);
}

.interests-section-sub {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Item rows */
.interest-list {
    list-style: none;
    margin-bottom: 16px;
}

.interest-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-sub);
    font-size: 0.9rem;
}

.interest-item:last-child {
    border-bottom: none;
}

.interest-name {
    font-weight: 500;
    color: var(--text-1);
    flex-shrink: 0;
}

.interest-creator {
    color: var(--text-muted);
    flex-shrink: 0;
}

.interest-divider {
    color: var(--border);
    flex-shrink: 0;
}

.interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
}

.interest-type {
    font-size: 0.78rem;
    color: var(--text-faint);
    font-style: italic;
    flex-shrink: 0;
    margin-left: 4px;
}

.podcast-thumb {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    align-self: center;
    background: var(--podcast-bg);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* Section footer "X total · view all →" */
.interests-section-footer {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.interests-section-footer a {
    color: #7a5299;
    text-decoration: none;
    transition: color 0.2s;
}

.interests-section-footer a:hover {
    color: #5a3d79;
}

/* Subpage headings */
.interests-subpage-title {
    font-family: Georgia, serif;
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-1);
    margin-bottom: 8px;
}

.interests-subpage-sub {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* Full list on subpages */
.interests-full-list {
    list-style: none;
    border-top: 1px solid var(--border);
}

.interests-full-list .interest-item {
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    font-size: 0.925rem;
}

/* Sports section */
.sports-list {
    list-style: none;
    margin-bottom: 16px;
}

.sports-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid #f0efe9;
    font-size: 0.9rem;
}

.sports-item:last-child {
    border-bottom: none;
}

.sports-sport {
    font-weight: 500;
    color: var(--text-muted);
    min-width: 80px;
    flex-shrink: 0;
}

.sports-team {
    color: var(--text-1);
}

/* Channels tabs */
.channels-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

/* Travel map */
.travel-map-wrap {
    width: 100%;
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

.travel-map-legend {
    display: flex;
    gap: 24px;
    font-size: 0.875rem;
    color: var(--text-4);
    margin-top: 10px;
    margin-bottom: 24px;
}

.legend-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.legend-dot.visited {
    background: #22c55e;
}

.legend-dot.want {
    background: #f97316;
}

/* Travel text summary on overview */
.travel-summary {
    font-size: 0.9rem;
    color: var(--text-4);
    line-height: 1.6;
    margin-bottom: 8px;
}

/* ─── Interests nav tabs ─────────────────────────────────── */

.interests-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.inav {
    background: none;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-4);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}

.inav:hover {
    border-color: #7a5299;
    color: #7a5299;
}

.inav.active {
    background: #7a5299;
    border-color: #7a5299;
    color: #fff;
}

/* Override max-width for interests overview */
.interests-container {
    max-width: 760px;
}

/* Section title as block with link */
.interests-section-title {
    display: block;
    font-family: Georgia, serif;
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--text-1);
    margin-bottom: 6px;
}

.interests-section-title a {
    color: var(--text-1);
    text-decoration: none;
}

.interests-section-title a:hover {
    color: #7a5299;
}

/* Media layout (vinyl/book widget + list) */
.media-layout {
    display: flex;
    flex-direction: row-reverse;
    gap: 28px;
    align-items: flex-start;
}

/* Vinyl widget */
.vinyl-widget {
    position: relative;
    width: 230px;
    height: 175px;
    flex-shrink: 0;
}

.vinyl-cover {
    position: absolute;
    left: 0;
    top: 10px;
    width: 160px;
    height: 160px;
    border-radius: 3px;
    object-fit: cover;
    z-index: 2;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.vinyl-disk {
    position: absolute;
    left: 56px;
    top: 20px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%,
        #222 0 18%,
        #2a2a2a 18% 20%,
        #222 20% 24%,
        #2a2a2a 24% 26%,
        #222 26% 30%,
        #2a2a2a 30% 32%,
        #222 32% 100%);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
}

/* Album-art label printed on the vinyl */
.vinyl-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: #7a5299;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.35);
}

.vinyl-label::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--vinyl-hole);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
}

.vinyl-widget.is-hovered .vinyl-disk {
    transform: translateX(72px);
}

/* Book widget */
.book-widget {
    width: 140px;
    flex-shrink: 0;
}

.book-cover {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    display: block;
    transition: box-shadow 0.3s;
    min-height: 120px;
    background: var(--book-bg);
}

/* Media list wrapper */
.media-list-wrap {
    flex: 1;
    min-width: 0;
}

/* Override interest-item for media lists */
.media-list-wrap .interest-item {
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px dashed var(--border-alt);
    cursor: default;
}

/* Separator span in new markup */
.interest-sep {
    color: var(--border);
    flex-shrink: 0;
}

/* Tag color variants */
.itag {
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
}

.itag-purple { background: #ece8f4; color: #7a5299; }
.itag-blue   { background: #dbeafe; color: #1d4ed8; }
.itag-teal   { background: #ccfbf1; color: #0f766e; }
.itag-green  { background: #dcfce7; color: #15803d; }
.itag-orange { background: #ffedd5; color: #c2410c; }
.itag-pink   { background: #fce7f3; color: #be185d; }
.itag-red    { background: #fee2e2; color: #b91c1c; }
.itag-amber  { background: #fef3c7; color: #b45309; }
.itag-indigo { background: #e0e7ff; color: #4338ca; }

body.dark .itag-purple { background: #2d2040; color: #b592d8; }
body.dark .itag-blue   { background: #1e2a40; color: #60a5fa; }
body.dark .itag-teal   { background: #0f2a26; color: #2dd4bf; }
body.dark .itag-green  { background: #0f2a1a; color: #4ade80; }
body.dark .itag-orange { background: #2a1a0a; color: #fb923c; }
body.dark .itag-pink   { background: #2a0f1e; color: #f472b6; }
body.dark .itag-red    { background: #2a0f0f; color: #f87171; }
body.dark .itag-amber  { background: #2a1f0a; color: #fbbf24; }
body.dark .itag-indigo { background: #1a1e38; color: #818cf8; }

/* Hidden items */
.interest-hidden {
    display: none;
}

/* Show more button */
.show-more-btn {
    margin-top: 12px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.show-more-btn:hover {
    border-color: #7a5299;
    color: #7a5299;
}

/* Channels combined section dividers */
.channels-divider {
    font-size: 0.8rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 16px 0 8px;
}

/* Sports list overrides */
.sports-item {
    border-bottom: 1px dashed var(--border-alt);
    padding: 8px 0;
    align-items: center;
}

.sports-sport {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 400;
    width: 90px;
}

.sports-team {
    font-weight: 500;
}

/* Team logo chip (right-aligned in each sports row) */
.sports-logo-chip {
    margin-left: auto;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 4px 9px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 7px;
}

.sports-logo {
    display: block;
    height: 100%;
    width: auto;
    max-width: 96px;
    object-fit: contain;
}

/* Travel map on overview page */
#travel-map {
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-top: 16px;
}

.travel-legend {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-4);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    vertical-align: middle;
}

.legend-visited { background: #22c55e; }
.legend-wantto  { background: #f97316; }

