@import url('https://fonts.googleapis.com/css2?family=Geist:wght@100..900&display=swap');

:root {
  --background-color: #EFEFEF; /* Light grey from caiguangxi.com */
  --text-color: #1C1C1C; /* Black text from caiguangxi.com */
  --h1-text-color: #1C1C1C; /* Specific H1 color from caiguangxi.com */
  --link-color: #0000EE; /* Blue link color from caiguangxi.com */
  --link-hover-opacity: 0.7;
  
  /* Button styles will need to be re-evaluated based on caiguangxi.com's minimal style */
  /* For now, let's make them simple and clean */
  --button-bg-color: #FFFFFF; /* White background */
  --button-text-color: #1C1C1C; /* Black text */
  --button-border-color: #CCCCCC; /* Lighter grey border */
  --button-hover-bg-color: #F5F5F5; /* Slightly darker on hover */
  --button-hover-border-color: #BBBBBB;

  /* Player styles - simplify for the new theme */
  --player-bg-color: #FFFFFF; /* White background for player */
  --player-border-color: #DDDDDD; /* Light border */
  --player-text-color: var(--text-color);
  --progress-bar-color: var(--link-color);

  /* Custom cursor color - already set as per user request */
  --custom-cursor-color: rgba(0, 0, 0, 0.6);
}

body {
  font-family: 'Geist', sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--background-color);
  color: var(--text-color);
  font-size: 16px; /* Base font size for readability */
  line-height: 1.7; /* Increased for better readability */
  cursor: none; 
  transition: background-color 0.3s ease, color 0.3s ease; 
}

.container {
  max-width: 1400px; /* Wider container for header */
  margin: 40px auto;
  padding: 0 20px; /* Reduced padding by half as requested */
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Geist', sans-serif;
  margin-top: 1.5em;
  margin-bottom: 0.8em;
  font-weight: 500; /* Consistent weight, can be adjusted per level */
  color: var(--text-color); /* Default to main text color */
  text-shadow: none; /* Ensure no shadows */
}

header h1, /* This is the main title on the project page */
.main-title-h1 /* A general class for such titles if needed elsewhere */
{
  font-size: 48px; /* As per caiguangxi.com H1 */
  font-weight: 500;
  color: var(--h1-text-color);
  margin-bottom: 0.5em;
  text-align: left; /* Left-aligned for project page */
}

h2 {
  font-size: 1.5em;
  border-bottom: none; /* Remove border as requested */
  padding-bottom: 0.3em;
}

h3 {
  margin-top: 1.2em;
  font-size: 1.2em; 
  margin-bottom: 1.2em; /* Slightly more spacing */
  color: var(--text-color);
}

p, li {
  font-size: 1em; /* 16px */
  margin-bottom: 1.2em; /* Slightly more spacing */
  color: #585858;
  line-height: 2; /* Increased for better readability */
  font-weight: 400;
}

ul {
  padding-left: 20px;
}

b {
  color: #1C1C1C;
  font-weight: 500;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: none; /* Remove all transitions */
}

a:hover {
  opacity: 1; /* No opacity change */
  text-decoration: none; /* Remove underline on all hover states */
}

/* Custom Cursor - Updated with fade in/out effect but original style */
.custom-cursor {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #fff;
  position: fixed;
  pointer-events: none;
  left: -100px; /* Position off-screen initially */
  top: -100px; /* Position off-screen initially */
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out, opacity 0.3s ease; /* Added opacity transition */
  opacity: 0; /* Start with invisible cursor */
  mix-blend-mode: difference; /* Restore original cursor style */
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5), 0 0 0 4px rgba(0, 0, 0, 0.3);
}

/* Image Styles - Updated for consistent width and hover effect */
.project-image {
    width: 100%;
    max-width: 720px; /* Increased to match banner image width */
    height: auto;
    border-radius: 5px; 
    margin: 25px auto; /* Center images */
    box-shadow: none; 
    transition: transform 0.3s ease; /* Add transition for hover effect */
    display: block; /* Ensure proper centering */
}

/* Add hover effect to all images and videos */
.project-image:hover,
.project-banner-image-container img:hover,
.video-container:hover,
figure img:hover,
figure video:hover {
    transform: scale(1.1); /* Scale up on hover */
}

/* Video container styles */
.video-container {
    width: 100%;
    max-width: 720px; /* Match image width */
    margin: 25px auto;
    transition: transform 0.3s ease;
}

.video-container video {
    width: 100%;
    border-radius: 5px;
}

/* Multi-image layouts */
.image-pair {
    display: flex;
    justify-content: space-between;
    gap: 20px; 
    margin: 25px auto;
    width: 100%;
    max-width: 720px; /* Match other images */
}

.image-pair img {
    width: calc(50% - 10px); 
    height: auto;
    border-radius: 5px;
    box-shadow: none;
    transition: transform 0.3s ease;
}

.image-pair img:hover {
    transform: scale(1.1);
}

/* Three images in a row */
.image-trio {
    display: flex;
    justify-content: space-between;
    gap: 15px; 
    margin: 25px auto;
    width: 100%;
    max-width: 720px; /* Match other images */
}

.image-trio img {
    width: calc(33.333% - 10px); 
    height: auto;
    border-radius: 5px;
    box-shadow: none;
    transition: transform 0.3s ease;
}

.image-trio img:hover {
    transform: scale(1.1);
}

/* Header Enhancements */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 20px; /* Add horizontal padding to ensure content doesn't touch edges */
  border-bottom: none; /* Removed border-bottom */
  margin-bottom: 60px; /* Increased space before hero */
  width: calc(100%); /* Adjust width to account for padding */
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.logo a {
  font-size: 1.8em;
  font-weight: 700;
  color: var(--text-color);
  text-decoration: none;
}

.site-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
}

.site-nav li {
  margin-left: 30px; /* Adjusted spacing */
  margin-bottom: 0;
}

.site-nav a {
  font-size: 1em;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  position: relative;
}

.site-nav a.active::after, 
.site-nav a:hover::after {
  content: ".";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -8px;
  font-size: 2em;
  line-height: 0.5;
  color: var(--text-color);
}

/* Footer Button - Updated to match daneden.me style */
.footer-button {
  display: inline-block;
  padding: 12px 24px;
  background-color: #000000; /* Black background */
  color: #FFFFFF; /* White text */
  border: 1px solid #000000; /* Black border */
  border-radius: 5px; /* Slightly rounded corners */
  text-decoration: none;
  font-size: 1em;
  font-weight: 600; /* Bolder */
  text-transform: uppercase; /* Uppercase text */
  letter-spacing: 0.5px; /* Slight letter spacing */
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.footer-button:hover {
  background-color: #333333; /* Darker black on hover */
  border-color: #333333;
  color: #FFFFFF;
  opacity: 1; /* No opacity change */
  text-decoration: none; /* No underline */
}

/* Footer adjustments */
.site-footer {
    text-align: center; /* Center all footer content */
    margin-top: 80px; /* More space before footer */
    padding: 30px 20px; /* Add horizontal padding to ensure content doesn't touch edges */
    border-top: none; /* Remove border as requested */
}

.copyright-text {
    font-size: 1em;
    color: var(--text-color);
    opacity: 0.7;
    margin-top: 15px;
}

/* Project Detail Page Specific Styles - to ensure daneden.me layout */
.project-article-container .container {
    max-width: 720px; /* Increased to match banner image width */
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px; /* Added padding to prevent content from touching edges */
}

.project-header-container {
    text-align: center; /* Center-aligned as requested */
    margin-bottom: 30px;
}

.project-header-container .main-title-h1 {
    text-align: center; /* Center-aligned as requested */
    font-size: 3em; /* Adjust based on daneden.me feel */
    margin-bottom: 10px;
}

.project-header-container .brix-title-h1 {
    text-align: center; /* Center-aligned as requested */
    font-size: 2.4em; /* Adjust based on daneden.me feel */
    margin-bottom: 10px;
}

.project-subtitle {
    font-size: 1.2em;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 30px;
}

.project-banner-image-container {
    margin-bottom: 40px;
    width: 100%;
    max-width: 720px; /* Ensure banner container matches content width */
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px; /* Added padding to prevent images from touching edges */
    box-sizing: border-box; /* Ensure padding is included in width calculation */
}

.full-width-image {
    width: 100%; /* Full width of container */
    max-width: 720px; /* Match banner width */
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* Content container with consistent width and centered alignment */
.project-content-container {
    font-size: 1.1em; /* Slightly larger base font for article content */
    line-height: 1.8;
    max-width: 720px; /* Match banner width */
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px; /* Added padding to prevent content from touching edges */
    box-sizing: border-box; /* Ensure padding is included in width calculation */
}

/* Figure elements for images */
figure {
    margin: 25px auto;
    max-width: 720px; /* Match banner width */
    width: 100%;
    padding: 0;
}

figure img, figure video {
    width: 100%;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.project-content-container h2 {
    font-size: 1.5em; /* Adjust section titles */
    margin-top: 2em;
    margin-bottom: 0;
    border-bottom-width: 1px;
}

.project-content-container h4 {
    font-size: 1.1em;
    font-weight: 500;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: var(--text-color);
}

.project-content-container p, .project-content-container li {
    margin-bottom: 1.5em;
}

.article-player-wrapper {
    margin-top: 30px;
    margin-bottom: 30px;
}
.visit-link h4 {
    color: #6572E0;
}
.spacer {
  height: 10px;
}

@media (max-width: 1536px) {
    .site-header {
        padding: 20px 20px; /* Ensure horizontal padding for tablet */
        margin-bottom: 40px;
        width: calc(100% - 40px); /* Adjust width to account for padding */
    }
    .container {
        padding: 0 20px; /* Ensure consistent padding */
    }
    .project-article-container .container {
        padding: 0 20px; /* Consistent padding */
    }
    .project-banner-image-container {
        padding: 0 20px; /* Ensure images don't touch edges */
    }
    .project-content-container {
        padding: 0 20px; /* Ensure content doesn't touch edges */
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 20px 20px; /* Ensure horizontal padding for tablet */
        margin-bottom: 40px;
        width: calc(100% - 40px); /* Adjust width to account for padding */
    }
    .container {
        padding: 0 20px; /* Ensure consistent padding */
    }
    .project-article-container .container {
        padding: 0 20px; /* Consistent padding */
    }
    .project-banner-image-container {
        padding: 0 20px; /* Ensure images don't touch edges */
    }
    .project-content-container {
        padding: 0 20px; /* Ensure content doesn't touch edges */
        font-size: 1.1em;
    }
    .project-header-container .main-title-h1 {
        font-size: 2.5em;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 15px; /* Adjust base for mobile */
    }
    .container {
        padding: 0 20px; /* Ensure consistent padding */
    }
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 20px; /* Ensure horizontal padding for mobile */
        margin-bottom: 30px;
        width: calc(100% - 40px); /* Adjust width to account for padding */
    }
    .site-nav {
        margin-top: 15px;
        padding-left: 0; /* Ensure no extra padding */
        width: 100%; /* Full width */
    }
    .site-nav ul {
        width: 100%; /* Full width */
    }
    .site-nav li {
        margin-left: 0;
        margin-right: 20px;
    }
    .project-article-container .container {
        padding: 0 20px; /* Increased padding for mobile */
    }
    .project-banner-image-container {
        padding: 0 20px; /* Ensure images don't touch edges */
    }
    .project-content-container {
        padding: 0 20px; /* Ensure content doesn't touch edges */
        font-size: 1.1em;
    }
    .project-header-container .main-title-h1 {
        font-size: 2.5em;
    }
    .image-pair {
        flex-direction: column;
    }
    .image-pair img {
        width: 100%;
    }
    .image-trio {
        flex-direction: column;
    }
    .image-trio img {
        width: 100%;
    }
}
