/* css/style.css */

/* TEST: 20240603 - Commemorative Site Update */

/* Basic reset and global styles */
:root {
    --primary-color: #2563eb;
    --primary-color-rgb: 37, 99, 235; /* from #2563eb */
    --secondary-color: #059669;
    --secondary-color-rgb: 5, 150, 105; /* from #059669 */
    --background-color: #ffffff;
    --text-color: #1f2937;
    --card-bg-color: #f9fafb;
    --card-bg-color-rgb: 249, 250, 251; /* from #f9fafb */
    --border-color: #e5e7eb;
    --header-bg: #ffffff;
    --header-text: #111827;
    --link-hover-color: #1d4ed8;
    --link-hover-color-rgb: 29, 78, 216; /* from #1d4ed8 */
    --code-bg: #f3f4f6;
    --code-text: #1f2937;
    --button-outline: #2563eb;
    --glow-color: rgba(37, 99, 235, 0.2);
    --primary-color-light-rgb: 37, 99, 235; /* For blockquote bg in light theme */
}
html[data-theme="dark"] {
    --primary-color: #00aeff;
    --primary-color-rgb: 0, 174, 255; /* from #00aeff */
    --secondary-color: #0077cc; /* Adjusted for more sophistication if needed */
    --secondary-color-rgb: 0, 119, 204; /* from #0077cc */
    --background-color: #0a192f;
    --text-color: #e6f1ff;
    --card-bg-color: rgba(17, 34, 64, 0.88); /* Base for cards */
    --card-bg-color-rgb: 17, 34, 64; /* RGB part of --card-bg-color */
    --border-color: #233554;
    --header-bg: #0a192f;
    --header-text: #e6f1ff;
    --link-hover-color: #64ffda; /* Teal/Cyan accent */
    --link-hover-color-rgb: 100, 255, 218; /* from #64ffda */
    --code-bg: #011627;
    --code-bg-dark: #011627; /* Explicitly define if needed, same as --code-bg */
    --code-text: #d6deeb;
    --button-outline: #00aeff;
    --glow-color: rgba(0, 174, 255, 0.5);
    --text-shadow-dark: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

body {
	font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	line-height: 1.7;
	margin: 0;
	padding: 0;
	background-color: var(--background-color);
	color: var(--text-color);
	transition: background-color 0.3s ease, color 0.3s ease, text-shadow 0.3s ease;
	text-shadow: none;
	padding-bottom: 150px; /* Add padding to prevent content from being hidden by fixed player */
	background-image: url('../../assets/black.png');
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	position: relative;
}

/* Snake Background Canvas */
#snake-bg-canvas {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
	pointer-events: none;
}

html[data-theme="dark"] body,
html[data-theme="dark"] p,
html[data-theme="dark"] li,
html[data-theme="dark"] .milestone-excerpt, /* Updated class */
html[data-theme="dark"] .widget p,
html[data-theme="dark"] .resource-item p { /* ADDED for resource item text shadow */
    text-shadow: var(--text-shadow-dark);
}
/* Avoid double shadow on links if they already have text-shadow for glow */
html[data-theme="dark"] a {
    text-shadow: none; /* Override general body shadow for links initially */
}
html[data-theme="dark"] a:hover {
    /* Glow for links will be their primary shadow */
     text-shadow: 0 0 8px var(--link-hover-color);
}


.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

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

a:hover {
    color: var(--link-hover-color);
    text-decoration: none; 
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 4px; 
}

ul {
    list-style: none;
    padding: 0;
}

/* Pages header */
header {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 1.5rem 0; 
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem; /* Increase padding for more space */
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    position: relative;
    border-radius: 6px;
    z-index: 2;
   }
html[data-theme="dark"] header {
    box-shadow: 0 2px 15px rgba(0, 100, 150, 0.25); 
    background: rgba(var(--card-bg-color-rgb), 0.75);
    backdrop-filter: blur(10px);
}


header .logo h1 {
    margin: 0;
    font-size: 2rem; /* Slightly adjusted for longer department names */
    font-weight: 700; 
    letter-spacing: 1px; 
}
header .logo h1 a {
    color: var(--header-text);
    text-decoration: none;
    transition: text-shadow 0.3s ease;
}
html[data-theme="dark"] header .logo h1 a {
    text-shadow: 0 0 8px var(--glow-color); /* Original glow */
}
html[data-theme="dark"] header .logo h1 a:hover {
    text-shadow: 0 0 12px var(--glow-color);
}
header .logo p { /* Tagline */
    margin: 0;
    font-size: 0.85rem; /* Slightly smaller for tagline */
    opacity: 0.8;
}
html[data-theme="dark"] header .logo p {
    text-shadow: var(--text-shadow-dark);
}


header nav ul {
    display: flex;
    align-items: center; /* Align with theme toggle button */
}

header nav ul li {
    margin-left: 25px; /* Increase margin for more space between nav items */
}

header nav ul li a {
    color: var(--header-text);
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.3s ease;
}
html[data-theme="dark"] header nav ul li a {
   text-shadow: var(--text-shadow-dark); /* For non-active/hover states */
}

header nav ul li a.active,
header nav ul li a:hover {
    background: var(--primary-color);
    color: var(--card-bg-color); 
    text-decoration: none;
    box-shadow: 0 0 8px var(--glow-color);
    text-shadow: none; /* Override body shadow when active/hovered */
}
html[data-theme="dark"] header nav ul li a.active,
html[data-theme="dark"] header nav ul li a:hover {
    color: var(--background-color); 
    background: var(--primary-color); 
    box-shadow: 0 0 12px var(--glow-color), 0 0 5px var(--primary-color);
    text-shadow: none; /* Clear general text shadow, rely on button style */
}

#theme-toggle {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--button-outline);
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    margin-left: 25px; /* Space from nav */
}
html[data-theme="dark"] #theme-toggle {
    color: var(--primary-color);
    text-shadow: var(--text-shadow-dark); /* Text shadow for button text */
}
#theme-toggle:hover {
    background: var(--primary-color);
    color: var(--card-bg-color); 
    box-shadow: 0 0 8px var(--glow-color);
    text-shadow: none; /* Clear general text shadow, rely on button style */
}

html[data-theme="dark"] #theme-toggle:hover {
    color: var(--background-color); 
    background: var(--primary-color); 
    box-shadow: 0 0 12px var(--glow-color), 0 0 5px var(--primary-color);
    text-shadow: none; /* Clear general text shadow, rely on button style */
}

/* Hero Section (New for Homepage) */
.hero-section {
    background-color: var(--card-bg-color); /* Or a specific color/image */
    color: var(--text-color);
    padding: 50px 20px;
    margin-bottom: 30px;
    text-align: center;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.hero-section img.hero-image {
    max-width: 100%;
    max-height: 500px;
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
html[data-theme="dark"] .hero-section {
    background-color: rgba(var(--card-bg-color-rgb), 0.8); /* Slightly less transparent than cards */
    backdrop-filter: blur(3px);
    box-shadow: 0 0 25px rgba(0, 122, 204, 0.2);
    color: var(--text-color);
}
html[data-theme="dark"] .hero-section h2,
html[data-theme="dark"] .hero-section p {
    text-shadow: var(--text-shadow-dark);
}
.hero-section h2 {
    font-size: 2.8rem;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
}
.hero-section p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 20px auto;
}

/* Main content area */
main {
    display: flex;
    gap: 30px;
    position: relative;
    z-index: 1;
   }

.content-area { /* Replaces .posts-list for general use */
    flex: 3;
}
.page-title { /* For pages like Timeline, Gallery etc. */
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
}
html[data-theme="dark"] .page-title {
    text-shadow: var(--text-shadow-dark);
    border-bottom-color: var(--primary-color);
}


.sidebar {
    flex: 1;
    background-color: var(--card-bg-color); 
    padding: 25px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    align-self: flex-start;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
html[data-theme="dark"] .sidebar {
    background-color: rgba(var(--card-bg-color-rgb), 0.75);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(0, 122, 204, 0.25); 
}

/* Milestone preview (homepage) - adapted from .post-preview */
.milestone-preview {
    background: var(--card-bg-color); 
    margin-bottom: 30px;
    padding: 25px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    gap: 25px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, border-color 0.3s ease, background-color 0.3s ease;
}
.milestone-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
html[data-theme="dark"] .milestone-preview {
    background-color: rgba(var(--card-bg-color-rgb), 0.75);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(0, 122, 204, 0.2); 
}
html[data-theme="dark"] .milestone-preview:hover {
    background-color: rgba(var(--card-bg-color-rgb), 0.92); 
    box-shadow: 0 5px 25px var(--glow-color), 0 0 8px var(--primary-color); 
    border-color: var(--primary-color);
}

.milestone-thumbnail { /* adapted from .post-thumbnail */
    width: 200px;
    height: 130px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}
.milestone-content-preview { /* adapted from .post-content-preview */
    flex: 1;
}
.milestone-preview h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.6rem;
}
/* Titles should also have the text shadow in dark mode */
html[data-theme="dark"] .milestone-preview h3,
html[data-theme="dark"] .milestone-detail .milestone-header h1, /* Updated class */
html[data-theme="dark"] .content-detail h2, /* Updated class */
html[data-theme="dark"] .widget h4,
html[data-theme="dark"] #tributes h2, /* Updated class */
html[data-theme="dark"] .page-title,
html[data-theme="dark"] .resource-item h3 { /* ADDED for resource item title */
    text-shadow: var(--text-shadow-dark);
}
/* Specific link styling for titles */
html[data-theme="dark"] .milestone-preview h3 a,
html[data-theme="dark"] .resource-item h3 a { /* ADDED for resource item title link */
    text-shadow: var(--text-shadow-dark); /* Base shadow */
}
html[data-theme="dark"] .milestone-preview h3 a:hover,
html[data-theme="dark"] .resource-item h3 a:hover { /* ADDED for resource item title link hover */
    text-shadow: 0 0 8px var(--primary-color); /* Glow on hover, overrides base shadow */
}
html[data-theme="dark"] .milestone-detail .milestone-header h1 { /* If h1 is not a link, its glow is separate */
     text-shadow: 0 0 15px var(--glow-color), 0 0 5px var(--primary-color), var(--text-shadow-dark); 
}


.milestone-preview h3 a {
    color: var(--text-color);
    transition: color 0.2s ease;
}
.milestone-preview h3 a:hover {
    color: var(--primary-color);
}
.milestone-meta { /* adapted from .post-meta */
    font-size: 0.8rem;
    color: #777; 
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}
html[data-theme="dark"] .milestone-meta {
    color: #a0b0d0; 
    text-shadow: 1px 1px 2px rgba(0,0,0,0.4); 
}
.milestone-excerpt { /* adapted from .post-excerpt */
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
}
.details-link { /* adapted from .read-more */
    display: inline-block;
    background: transparent;
    color: var(--primary-color);
    padding: 10px 18px;
    border-radius: 4px;
    text-decoration: none;
    border: 1px solid var(--button-outline);
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
html[data-theme="dark"] .details-link {
    color: var(--primary-color);
    border-color: var(--primary-color); 
    text-shadow: var(--text-shadow-dark);
}
.details-link:hover {
    background: var(--primary-color);
    color: var(--card-bg-color); 
    box-shadow: 0 0 8px var(--glow-color);
    text-shadow: none;
}
html[data-theme="dark"] .details-link:hover {
    background: var(--primary-color); 
    color: var(--background-color); 
    box-shadow: 0 0 12px var(--glow-color), 0 0 5px var(--primary-color);
    text-shadow: none;
}

/* Single Milestone/Event Detail Page - adapted from .full-post */
.milestone-detail {
    background: var(--card-bg-color); 
    padding: 30px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    flex: 3;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
html[data-theme="dark"] .milestone-detail {
    background-color: rgba(var(--card-bg-color-rgb), 0.75);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 25px rgba(0, 122, 204, 0.25); 
}

.milestone-detail .milestone-header h1 { /* adapted from .full-post .post-header h1 */
    margin-top: 0;
    font-size: 2.5rem;
    color: var(--primary-color);
    line-height: 1.3;
}
.milestone-detail .milestone-header .milestone-meta span {
    margin: 0 5px;
}

.milestone-detail .featured-image-video { /* adapted from .featured-image */
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    margin-bottom: 30px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
}
.content-detail h2 { /* adapted from .post-content h2 */
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 8px;
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.8rem;
}
html[data-theme="dark"] .content-detail h2 {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color); 
}
.content-detail blockquote { /* adapted from .post-content blockquote */
    border-left: 5px solid var(--primary-color); 
    margin: 20px 0;
    padding: 15px 25px; 
    font-style: italic;
    background-color: rgba(var(--primary-color-light-rgb), 0.05); 
    color: #555;
    border-radius: 0 4px 4px 0;
    box-shadow: 3px 3px 8px rgba(0,0,0,0.04); 
}
html[data-theme="dark"] .content-detail blockquote {
    border-left-color: var(--primary-color);
    background-color: rgba(var(--card-bg-color-rgb), 0.75); 
    backdrop-filter: blur(3px); 
    color: #c0d0f0; 
    box-shadow: 0 0 12px var(--glow-color) inset, 2px 2px 5px rgba(0,0,0,0.2); 
}
html[data-theme="dark"] .content-detail blockquote p, 
html[data-theme="dark"] .content-detail blockquote footer {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6); 
}
.content-detail blockquote footer {
    margin-top: 10px;
    font-size: 0.9em;
}
.content-detail pre { /* adapted from .post-content pre */
    background: var(--code-bg); 
    color: var(--code-text);
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    font-family: 'Fira Code', 'Consolas', 'Menlo', 'Courier New', monospace; 
    font-size: 0.9em;
    line-height: 1.5;
    text-shadow: none !important; 
}
html[data-theme="dark"] .content-detail pre {
    background: var(--code-bg-dark); 
    box-shadow: 0 0 15px rgba(0,0,0,0.3), 0 0 8px var(--glow-color); 
    border: 1px solid var(--primary-color);
}
html[data-theme="dark"] .content-detail pre code {
    text-shadow: none !important; 
}

.related-media {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}
.related-media h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}
html[data-theme="dark"] .related-media h3 {
    text-shadow: var(--text-shadow-dark);
}
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}
.media-grid img, .media-grid video {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}


.item-navigation { /* adapted from .post-navigation */
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}
.prev-item, .next-item { /* adapted from .prev-post, .next-post */
    width: 48%;
}
.prev-item a, .next-item a {
    display: block;
    padding: 12px 15px; 
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
    background-color: var(--card-bg-color); 
}
html[data-theme="dark"] .prev-item a, 
html[data-theme="dark"] .next-item a {
    background-color: rgba(var(--card-bg-color-rgb), 0.85); 
    backdrop-filter: blur(4px);
    text-shadow: var(--text-shadow-dark); 
}
.prev-item a:hover, .next-item a:hover {
    border-color: var(--primary-color);
    background-color: rgba(var(--primary-color-rgb),0.1); 
    box-shadow: 0 0 8px var(--glow-color);
}
html[data-theme="dark"] .prev-item a:hover,
html[data-theme="dark"] .next-item a:hover {
    background-color: rgba(var(--card-bg-color-rgb), 0.9);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--glow-color);
}


#tributes { /* adapted from #comments */
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}
#tributes h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
}


/* Sidebar widgets */
.widget {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}
.widget:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.widget h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.2rem;
    border-bottom: 1px solid var(--secondary-color);
    padding-bottom: 8px;
}
html[data-theme="dark"] .widget h4 {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color); 
}
.widget ul li {
    margin-bottom: 10px;
}
.widget ul li a {
    color: var(--text-color); 
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: block;
}
.widget ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px; 
}

.themes-keywords a { /* adapted from .tag-cloud a */
    display: inline-block;
    background-color: transparent; 
    color: var(--secondary-color);
    padding: 6px 12px; 
    margin-right: 8px;
    margin-bottom: 8px;
    border-radius: 20px; 
    font-size: 0.85em;
    border: 1px solid var(--secondary-color);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
html[data-theme="dark"] .themes-keywords a {
    color: var(--link-hover-color); 
    border-color: var(--link-hover-color);
    text-shadow: var(--text-shadow-dark);
}
.themes-keywords a:hover {
    background-color: var(--secondary-color);
    color: var(--card-bg-color); 
    text-decoration: none;
    transform: translateY(-2px) scale(1.03); 
    box-shadow: 0 2px 8px var(--glow-color);
    text-shadow: none; 
}
html[data-theme="dark"] .themes-keywords a:hover {
    background-color: rgba(var(--link-hover-color-rgb), 0.7); 
    color: var(--text-color); 
    box-shadow: 0 0 10px var(--link-hover-color), 0 0 5px var(--link-hover-color);
    transform: translateY(-2px) scale(1.05); 
    text-shadow: none; 
}

/* Timeline Page Styles */
.timeline-container {
    position: relative;
    min-height: 800px; /* 保证有空间显示轴线 */
    z-index: 10;
}
.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 8px;
    background: linear-gradient(180deg, #00aeff 0%, #8A78F5 100%);
    box-shadow: 0 0 16px 4px #00aeff88;
    border-radius: 4px;
    transform: translateX(-50%);
    z-index: 11 !important;
    opacity: 0.95;
}
.timeline-event {
    position: relative;
    width: 50%;
    margin-bottom: 48px;
    background: rgba(20, 30, 60, 0.95); /* 深色卡片更突出 */
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0,174,255,0.10), 0 1.5px 8px #8A78F533;
    padding: 32px 40px;
    border: 2px solid #00aeff;
    z-index: 12 !important;
    left: 0;
    transition: box-shadow 0.2s, transform 0.2s;
}
.timeline-event:hover {
    box-shadow: 0 12px 32px #00aeff55, 0 2px 12px #8A78F5aa;
    transform: translateY(-4px) scale(1.03);
}
.timeline-event:nth-child(even) {
    left: 50%;
}
.timeline-event::before {
    content: '';
    position: absolute;
    top: 36px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 30%, #00aeff 70%, #8A78F5 100%);
    border: 4px solid #fff;
    box-shadow: 0 0 24px 8px #00aeffcc, 0 0 0 8px #8A78F555;
    left: -16px;
    z-index: 13 !important;
    animation: timeline-glow 2s infinite alternate;
}
.timeline-event:nth-child(even)::before {
    left: auto;
    right: -16px;
}
@keyframes timeline-glow {
    0% { box-shadow: 0 0 24px 8px #00aeffcc, 0 0 0 8px #8A78F555; }
    100% { box-shadow: 0 0 40px 16px #00aeff, 0 0 0 16px #8A78F5aa; }
}
.timeline-date {
    font-weight: bold;
    color: #00aeff;
    margin-bottom: 12px;
    font-size: 1.2rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #8A78F5aa;
}
.timeline-event h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.5rem;
    color: #8A78F5;
    text-shadow: 0 2px 8px #00aeff88;
}
@media (max-width: 900px) {
    .timeline-event, .timeline-event:nth-child(even) {
        width: 100%;
        left: 0;
        padding-left: 56px;
        padding-right: 24px;
    }
    .timeline-event::before, .timeline-event:nth-child(even)::before {
        left: -16px;
        right: auto;
    }
    .timeline-container::before {
        left: 24px;
    }
}


/* Gallery Page Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.gallery-item {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
html[data-theme="dark"] .gallery-item {
    background-color: rgba(var(--card-bg-color-rgb), 0.75);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 15px rgba(var(--primary-color-rgb),0.2);
}
.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
html[data-theme="dark"] .gallery-item:hover {
     box-shadow: 0 5px 25px var(--glow-color), 0 0 8px var(--primary-color); 
}
.gallery-item img, .gallery-item video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.gallery-item-caption {
    padding: 15px;
    font-size: 0.9rem;
}
html[data-theme="dark"] .gallery-item-caption {
    text-shadow: var(--text-shadow-dark);
}
.gallery-filters {
    margin-bottom: 25px;
    text-align: center;
}
.gallery-filters button {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--button-outline);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    margin: 0 5px 10px;
    transition: background-color 0.2s ease, color 0.2s ease;
}
html[data-theme="dark"] .gallery-filters button {
    text-shadow: var(--text-shadow-dark);
}
.gallery-filters button:hover, .gallery-filters button.active {
    background: var(--primary-color);
    color: var(--card-bg-color);
    text-shadow: none;
}
html[data-theme="dark"] .gallery-filters button:hover, 
html[data-theme="dark"] .gallery-filters button.active {
     color: var(--background-color);
}


/* Our People Page Styles */
.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}
.person-profile {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
html[data-theme="dark"] .person-profile {
    background-color: rgba(var(--card-bg-color-rgb), 0.75);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 15px rgba(var(--primary-color-rgb),0.2);
}
.person-profile:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
html[data-theme="dark"] .person-profile:hover {
     box-shadow: 0 5px 25px var(--glow-color), 0 0 8px var(--primary-color); 
}
.person-profile img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--border-color);
}
html[data-theme="dark"] .person-profile img {
    border-color: var(--primary-color);
}
.person-profile h4 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 1.3rem;
    color: var(--primary-color);
}
.person-profile .role {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-style: italic;
}
html[data-theme="dark"] .person-profile h4,
html[data-theme="dark"] .person-profile .role,
html[data-theme="dark"] .person-profile p {
    text-shadow: var(--text-shadow-dark);
}

/* Footer */
footer {
    background: var(--header-bg); 
    color: var(--header-text);
    text-align: center;
    padding: 25px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
   }
html[data-theme="dark"] footer {
    background: rgba(var(--card-bg-color-rgb), 0.75);
    backdrop-filter: blur(10px);
    box-shadow: 0 -2px 15px rgba(0, 100, 150, 0.25); 
}
footer p {
    margin: 8px 0;
    opacity: 0.8;
}
html[data-theme="dark"] footer p {
    text-shadow: var(--text-shadow-dark);
}


/* ------ START: NEW STYLES FOR RESOURCES PAGE ------ */
.resource-list {
    /* No specific styles for the list container itself, items are styled */
}

.resource-item {
    background: var(--card-bg-color);
    margin-bottom: 25px; 
    padding: 20px; 
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, border-color 0.3s ease, background-color 0.3s ease;
}

.resource-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

html[data-theme="dark"] .resource-item {
    background-color: rgba(var(--card-bg-color-rgb), 0.75);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(0, 122, 204, 0.2);
}

html[data-theme="dark"] .resource-item:hover {
    background-color: rgba(var(--card-bg-color-rgb), 0.92);
    box-shadow: 0 5px 25px var(--glow-color), 0 0 8px var(--primary-color);
    border-color: var(--primary-color);
}

.resource-item h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.4rem; 
}
/* Dark theme text shadow for resource-item h3 is already covered by the general rule */

.resource-item h3 a {
    color: var(--text-color); 
    text-decoration: none;
    transition: color 0.2s ease;
}
/* Dark theme text shadow for resource-item h3 a is already covered by the general rule */

.resource-item h3 a:hover {
    color: var(--primary-color); 
    text-decoration: underline;
}
/* Dark theme text shadow for resource-item h3 a:hover is already covered by the general rule */


.resource-item p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0;
}
/* Dark theme text shadow for resource-item p is already covered by the general rule */
/* ------ END: NEW STYLES FOR RESOURCES PAGE ------ */


/* ------ START: MUSIC PLAYER STYLES (REVISED) ------ */
#music-player-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px; /* Initial width for the disk only */
    height: 60px; /* Initial height for the disk only */
    z-index: 1000;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* Bounce effect for expand/collapse */
    display: flex; 
    align-items: center;
    justify-content: center;
    overflow: visible; /* Allow playlist to pop out without being clipped by initial small size */
}

#music-player-container.expanded {
    width: 350px; 
    height: auto; 
    min-height: 180px; 
    background-color: var(--card-bg-color);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    /* The container itself will manage the layout of the disk and expanded UI */
    flex-direction: column; /* Stack disk and UI vertically when expanded */
    align-items: center; /* Center content horizontally */
}

html[data-theme="dark"] #music-player-container.expanded {
    background-color: rgba(var(--card-bg-color-rgb), 0.92);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 30px rgba(var(--primary-color-rgb), 0.25);
    border: 1px solid var(--primary-color);
}

.player-disk { /* This is #player-disk-clickable in HTML */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    /* background-color set by JS or default in HTML */
    border: 3px solid var(--primary-color);
    box-shadow: 0 2px 10px rgba(var(--primary-color-rgb), 0.3);
    cursor: pointer;
    position: relative; 
    overflow: hidden;
    transition: width 0.3s ease-in-out, height 0.3s ease-in-out, margin-bottom 0.3s ease-in-out;
    flex-shrink: 0; 
}

#music-player-container.expanded .player-disk {
    width: 80px; 
    height: 80px;
    margin-bottom: 15px; 
}

.player-disk:hover {
    transform: scale(1.05); /* Slightly less aggressive hover */
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.5);
}

.player-disk img { /* This is #album-artwork-player in HTML */
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: rotateDisk 12s linear infinite paused;
}

.player-disk.playing img {
    animation-play-state: running;
}

.player-disk::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background-color: var(--background-color); 
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 5px rgba(var(--primary-color-rgb), 0.2);
    z-index: 1;
}
html[data-theme="dark"] .player-disk::after {
     background-color: var(--card-bg-color); /* Use card bg for better contrast on dark disk */
     border-color: var(--primary-color);
}

/* Expanded UI elements */
.player-ui-expanded {
    display: none; 
    opacity: 0;
    transform: translateY(10px) scale(0.95); /* Initial state for animation */
    transition: opacity 0.3s ease-out 0.1s, transform 0.3s ease-out 0.1s; /* Slight delay for opacity/transform */
    width: 100%;
    flex-direction: column; 
    align-items: center; /* Center children */
}

#music-player-container.expanded .player-ui-expanded {
    display: flex; 
    opacity: 1;
    transform: translateY(0) scale(1);
}

.track-info-expanded {
    text-align: center;
    margin-bottom: 15px;
    min-width: 0; 
    width: 100%; /* Ensure it takes full width for ellipsis */
}
#track-title-expanded {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#track-artist-expanded {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
html[data-theme="dark"] #track-title-expanded,
html[data-theme="dark"] #track-artist-expanded {
    color: var(--text-color); /* Already var(--text-color) */
    text-shadow: var(--text-shadow-dark);
}

.player-progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 15px;
    font-size: 0.75rem;
    color: var(--text-color);
    opacity: 0.8;
}
html[data-theme="dark"] .player-progress-container {
    /* color already var(--text-color) */
    text-shadow: var(--text-shadow-dark);
}

.progress-bar-wrapper {
    flex-grow: 1;
    height: 6px;
    background-color: rgba(var(--primary-color-rgb), 0.15);
    border-radius: 3px;
    cursor: pointer;
    position: relative; 
}
html[data-theme="dark"] .progress-bar-wrapper {
    background-color: rgba(var(--primary-color-rgb), 0.25);
}

.progress-bar-filled {
    width: 0%; 
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: width 0.1s linear; 
}

.player-buttons-expanded {
    display: flex;
    justify-content: space-around; 
    align-items: center;
    width: 100%;
    margin-bottom: 10px; 
}

.player-buttons-expanded .player-button { 
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem; 
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
}
html[data-theme="dark"] .player-buttons-expanded .player-button {
    color: var(--text-color); /* Already correct */
    text-shadow: var(--text-shadow-dark);
}

.player-buttons-expanded .player-button:hover {
    color: var(--primary-color);
    background-color: rgba(var(--primary-color-rgb), 0.08);
}
.player-buttons-expanded .player-button:active {
    transform: scale(0.95);
}
html[data-theme="dark"] .player-buttons-expanded .player-button:hover {
    color: var(--primary-color); /* Already correct */
    background-color: rgba(var(--primary-color-rgb), 0.15);
}

.volume-control-expanded {
    display: flex;
    align-items: center;
}
/* Ensure the volume button within this control also uses .player-button styles */
.volume-control-expanded .player-button {
    margin-right: 5px; /* Space between icon and slider */
    width: auto; /* Allow icon button to size naturally if needed, or keep fixed */
    height: auto;
    padding: 5px; /* Smaller padding for icon button if desired */
    font-size: 1.2rem; /* Maybe smaller icon for volume */
}

#volume-slider-expanded {
    width: 70px; 
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(var(--text-color), 0.2);
    border-radius: 2.5px;
    cursor: pointer;
    /* margin-left: 8px; Removed, spacing handled by button margin */
}
#volume-slider-expanded::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}
#volume-slider-expanded::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}
html[data-theme="dark"] #volume-slider-expanded {
    background: rgba(var(--text-color), 0.3);
}

.playlist-toggle-expanded {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 1rem;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: center; 
    margin-top: 5px; /* Add some space if needed */
}
.playlist-toggle-expanded:hover {
    background-color: var(--primary-color);
    color: var(--card-bg-color); 
    border-color: var(--primary-color);
}
html[data-theme="dark"] .playlist-toggle-expanded {
    border-color: var(--primary-color);
    color: var(--text-color); /* Already correct */
    text-shadow: var(--text-shadow-dark);
}
html[data-theme="dark"] .playlist-toggle-expanded:hover {
    background-color: var(--primary-color); /* Already correct */
    color: var(--background-color); /* Already correct */
    text-shadow: none;
}

.playlist-container-expanded {
    display: none; 
    opacity: 0;
    position: absolute; 
    bottom: calc(100% + 10px); 
    left: 50%;
    transform: translateX(-50%) translateY(20px); 
    width: calc(100% - 20px); /* Slightly less than player width when expanded */
    max-width: 330px; /* Match expanded player width less padding */
    max-height: 200px; 
    background-color: var(--card-bg-color);
    border-radius: 8px;
    box-shadow: 0 -3px 15px rgba(0,0,0,0.1);
    padding: 10px;
    overflow-y: auto;
    z-index: 1001; 
    transition: opacity 0.3s ease-out, transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

#music-player-container.expanded .playlist-container-expanded.show {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0); 
}

html[data-theme="dark"] .playlist-container-expanded {
    background-color: rgba(var(--card-bg-color-rgb), 0.95);
    backdrop-filter: blur(5px);
    box-shadow: 0 -5px 20px rgba(var(--primary-color-rgb),0.2);
    border: 1px solid var(--primary-color);
}

.playlist-container-expanded h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1rem;
    color: var(--primary-color);
    text-align: center;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}
html[data-theme="dark"] .playlist-container-expanded h4 {
    text-shadow: var(--text-shadow-dark);
    border-bottom-color: var(--primary-color);
}

.playlist-items-expanded .playlist-item {
    padding: 8px 12px;
    font-size: 0.9rem;
    color: var(--text-color);
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.playlist-items-expanded .playlist-item:last-child {
    margin-bottom: 0;
}
.playlist-items-expanded .playlist-item:hover {
    background-color: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
}
.playlist-items-expanded .playlist-item.active {
    background-color: var(--primary-color);
    color: var(--card-bg-color); 
    font-weight: 500;
}
html[data-theme="dark"] .playlist-items-expanded .playlist-item {
    color: var(--text-color); /* Already correct */
    text-shadow: var(--text-shadow-dark);
}
html[data-theme="dark"] .playlist-items-expanded .playlist-item:hover {
    background-color: rgba(var(--primary-color-rgb), 0.2);
    color: var(--primary-color); /* Already correct */
}
html[data-theme="dark"] .playlist-items-expanded .playlist-item.active {
    background-color: var(--primary-color); /* Already correct */
    color: var(--background-color); 
    text-shadow: none;
}

@keyframes rotateDisk {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


/* Responsive design */
@media (max-width: 992px) { /* Adjust breakpoint for sidebar earlier */
    main {
        flex-direction: column;
    }
    .content-area, .milestone-detail { /* ensure these take full width */
        flex: auto;
    }
    .sidebar {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }
    header .logo {
        margin-bottom: 15px;
    }
    header nav {
        width: 100%;
        margin-bottom: 10px;
    }
    header nav ul {
        flex-direction: column;
        margin-top: 10px;
        width: 100%;
    }
    header nav ul li {
        margin: 8px 0;
        text-align: center;
    }
    #theme-toggle {
        margin-top: 10px;
        margin-left: 0; /* Center toggle on mobile */
    }

    .hero-section h2 {
        font-size: 2.2rem;
    }
    .hero-section p {
        font-size: 1rem;
    }

    .milestone-preview {
        flex-direction: column;
    }
    .milestone-thumbnail {
        width: 100%;
        height: 200px;
        margin-bottom: 15px;
    }
    .milestone-detail .featured-image-video {
        max-height: 300px;
    }

    .timeline-container::before {
        left: 20px; /* Move line to the left */
    }
    .timeline-event, .timeline-event:nth-child(even) {
        width: calc(100% - 40px); /* Adjust width to fit */
        left: 40px; /* Position relative to the new line */
        padding-left: 30px;
        padding-right: 20px;
    }
    .timeline-event::after, 
    .timeline-event:nth-child(odd)::after,
    .timeline-event:nth-child(even)::after {
        left: -8px; /* (16/2) for the dot */
        transform: translateX(-100%); /* Adjust to align with moved line */
    }
     .timeline-event:nth-child(odd) {
        left: 40px;
    }


    .item-navigation {
        flex-direction: column;
        gap: 15px;
    }
    .prev-item, .next-item {
        width: 100%;
    }
}

/* Responsive adjustments for music player */
@media (max-width: 480px) {
    #music-player-container {
        /* Initial non-expanded state, ensure it's not too intrusive */
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    #music-player-container .player-disk { /* Non-expanded disk size */
        width: 50px;
        height: 50px;
    }

    #music-player-container.expanded {
        width: calc(100% - 20px); /* Almost full width on small screens */
        bottom: 10px;
        left: 10px; /* Center it */
        right: 10px;
        padding: 15px;
        min-height: 160px;
    }
    #music-player-container.expanded .player-disk {
        width: 60px; /* Slightly smaller disk in expanded view on mobile */
        height: 60px;
        margin-bottom: 10px;
    }
    .track-info-expanded #track-title-expanded {
        font-size: 1rem;
    }
    .track-info-expanded #track-artist-expanded {
        font-size: 0.8rem;
    }
    .player-buttons-expanded {
        gap: 5px; /* Reduce gap between buttons */
    }
    .player-buttons-expanded .player-button {
        font-size: 1.3rem; /* Slightly smaller icons */
        width: 40px;
        height: 40px;
    }
     .volume-control-expanded {
        /* Could hide volume slider on very small screens, or make button just a mute toggle */
        /* display: none; */
    }
    #volume-slider-expanded {
        width: 50px; /* Shorter volume slider */
    }

    .playlist-container-expanded {
        max-width: calc(100% - 20px); /* Full width minus padding */
        left: 10px; /* Align with expanded player */
        right: 10px;
        bottom: calc(100% + 5px); /* Closer to player */
        transform: translateX(0) translateY(15px);
    }
     #music-player-container.expanded .playlist-container-expanded.show {
        transform: translateX(0) translateY(0);
    }
    .playlist-items-expanded .playlist-item {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
}
/* ------ END: MUSIC PLAYER STYLES (REVISED) ------ */