/* Basic Reset & Body Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #0A0A14;
    color: #e0e0e0;
    line-height: 1.6;
    padding-top: 70px; /* Space for fixed header */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

body.modal-open-no-scroll {
    overflow: hidden; /* Prevent background scroll when modal is open */
}

/* Header Styles */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    background-color: transparent;
    transition: background-color 0.3s ease-in-out, padding 0.3s ease-in-out;
}

#main-header.scrolled {
    background-color: #0A0F29;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    padding: 10px 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.header-brand:hover {
    color: #00E0FF;
}

.header-logo {
    height: 28px;
    width: auto;
    margin-right: 10px;
}

.header-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

.header-nav a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #00E0FF;
    transition: width 0.3s ease-in-out;
}

.header-nav a:hover {
    color: #ffffff;
}

.header-nav a:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    margin: 5px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* Vibrant Hero Section Styling */
.vibrant-hero {
    min-height: calc(100vh - 70px); 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px; 
    text-align: center;
    position: relative;
    overflow: hidden; 
    background: linear-gradient(-45deg,
        #0A2463, #123B70, #2A6EA6, #4A95C2,
        #3A7FB0, #2A6EA6, #123B70
    );
    background-size: 600% 600%;
    animation: dynamicOceanWaves 25s ease-in-out infinite;
}

.vibrant-hero::before,
.vibrant-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: repeat;
    pointer-events: none;
    z-index: 0; /* Behind hero text, above main hero background potentially */
    /* Animation for twinkling (opacity) and floating (transform) */
    animation: 
        starShine var(--shine-duration, 5s) linear infinite,
        floatStars var(--float-duration, 20s) infinite alternate ease-in-out;
}

.vibrant-hero::before {
    background-image: 
        radial-gradient(circle, rgba(255, 255, 255, 0.9) 1px, transparent 1.5px), /* Star color and size */
        radial-gradient(circle, rgba(255, 255, 255, 0.7) 2px, transparent 2.5px);
    background-size: 
        180px 220px, /* Controls density - larger numbers = fewer stars */
        130px 190px;
    background-position: 
        5% 15%, /* Stagger starting positions */
        70% 85%;
    --shine-duration: 7s;
    --float-duration: 28s;
    animation-delay: 0s, -2s; /* Stagger animations slightly */
}

.vibrant-hero::after {
    background-image: 
        radial-gradient(circle, rgba(255, 255, 255, 0.8) 1.5px, transparent 2px),
        radial-gradient(circle, rgba(220, 220, 255, 0.6) 2.5px, transparent 3px); /* Slightly bluish tint for variety */
    background-size: 
        220px 280px,
        160px 230px;
    background-position: 
        30% 50%,
        85% 20%;
    --shine-duration: 6s;
    --float-duration: 35s;
    animation-delay: -3s, -5s; /* Stagger animations slightly */
}

/* Animation for the "shining" or "twinkling" effect via opacity */
@keyframes starShine {
    0%   { opacity: 0.5; }
    20%  { opacity: 1; }   /* Shine bright */
    40%  { opacity: 0.4; }
    60%  { opacity: 0.9; }   /* Another smaller shine */
    80%  { opacity: 0.5; }
    100% { opacity: 0.5; }
}

/* Animation for the subtle floating movement of stars */
@keyframes floatStars {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(2%, -3%); } /* Very subtle and slow drift */
}

.centered-content {
    max-width: 750px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.striking-gradient {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 10px;
    background: linear-gradient(65deg, #FFFF99, #FFFFAA, #FFFAA0, #FFEA00, #FFD700, #FFC300, #FFA500, #FF8C00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 0.5px rgba(80, 50, 0, 0.4);
    text-stroke: 0.5px rgba(80, 50, 0, 0.4);
    text-shadow:
        0 0 5px rgba(255, 255, 224, 0.5),
        0 0 15px rgba(255, 223, 186, 0.4),
        0 0 30px rgba(255, 215, 0, 0.5),
        0 0 50px rgba(255, 165, 0, 0.3);
}

.hero-tagline {
    font-size: 1.3rem;
    font-weight: 400;
    color: #B0E0E6;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 25px;
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.intro-text {
    font-size: 1.20rem;
    color: #d0d8e0;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.skills-pills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px 15px;
    margin-top: 0;
    margin-bottom: 35px;
    position: relative;
    z-index: 2;
}

.skill-pill {
    background-color: rgba(200, 225, 255, 0.12);
    color: #B0E0E6;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    border: 1px solid rgba(176, 224, 230, 0.35);
    transition: transform 0.2s ease-out, background-color 0.2s ease;
    cursor: default;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.skill-pill:hover {
    transform: translateY(-2px) scale(1.03);
    background-color: rgba(176, 224, 230, 0.25);
}

.vibrant-button { 
    display: inline-block;
    background: #00E0FF;
    color: #011f2e; 
    padding: 16px 38px;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0px 5px 20px rgba(0, 224, 255, 0.3);
    border: none; 
    cursor: pointer; 
}

.vibrant-button:hover {
    background-color: #00FFFF;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0px 8px 25px rgba(0, 224, 255, 0.45);
}

.hero-skin-image {
    position: absolute;
    width: 300px;
    height: auto;
    z-index: 1;
}

.left-skin {
    top: 50%;
    left: calc(50% - (700px / 2) - 300px - 40px);
    animation: floatLeftAnimation 6s ease-in-out infinite;
}

.scroll-down-arrow {
    position: absolute;
    bottom: 30px; 
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    width: 24px;
    height: 40px;
    display: block;
}

.scroll-down-arrow span {
    display: block;
    width: 24px;
    height: 24px;
    border-left: 3px solid #B0E0E6;
    border-bottom: 3px solid #B0E0E6;
    transform: rotate(-45deg);
    animation: bounceArrow 2s infinite ease-in-out;
    box-sizing: border-box;
}

/* Content Section Styling (general for #about, #projects, #contact) */
.content-section {
    padding: 100px 20px 60px;
    min-height: 50vh;
    background-color: #0A0A14;
}
#projects.content-section,
#contact.content-section { 
    padding-bottom: 80px;
}


.content-section .section-container {
    max-width: 1100px; 
    margin: 0 auto;
}
#about .section-container,
#contact .section-container { 
    max-width: 800px;
}


.content-section .section-container > h2 {
    font-size: 2.8rem; 
    color: #fff;
    margin-bottom: 40px; 
    text-align: center; 
    font-weight: 700;
}

#projects .section-container > h2 {
    margin-bottom: 50px; 
}

.content-section > .section-container > p { 
    color: #ccc;
    font-size: 1.1rem;
    line-height: 1.7;
    text-align: center;
}


/* Projects Section - Featured Layout */
.project-entry {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 80px;
    background-color: #101629;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
}
.project-entry.layout-reversed {
    flex-direction: row-reverse;
}
.project-gallery-container {
    flex: 0 0 55%;
}
.image-tile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}
.image-tile {
    background-color: #2A3045;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #606880;
    font-size: 0.8rem;
    font-style: italic;
    overflow: hidden;
    transition: transform 0.3s ease;
}
.image-tile:hover {
    transform: scale(1.05);
}
.image-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.project-details-content {
    flex: 1;
    text-align: left;
}
.project-details-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #00E0FF;
    margin-bottom: 15px;
}
.project-details-content p {
    font-size: 1rem;
    color: #c0c8e0;
    line-height: 1.7;
    margin-bottom: 20px;
}
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    margin-bottom: 25px;
}
.project-tags span {
    background-color: rgba(0, 224, 255, 0.1);
    color: #00E0FF;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(0, 224, 255, 0.2);
}
.project-buttons-container {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.project-link-button {
    display: inline-block;
    padding: 10px 22px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, color 0.3s ease;
    text-align: center;
}
.project-link-button:hover {
    transform: translateY(-2px);
}
a.project-link-button {
    background-color: transparent;
    color: #FFD700;
    border: 1px solid #FFD700;
}
a.project-link-button:hover {
    background-color: rgba(255, 215, 0, 0.1);
    color: #FFEA00;
}
button.view-more-button.project-link-button { 
    background-color: #00E0FF;
    color: #011f2e;
    border: none; 
}
button.view-more-button.project-link-button:hover {
    background-color: #00FFFF;
}


/* Project Modal Styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}
.modal.open {
    display: flex;
}
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    cursor: pointer;
}
.modal-content-wrapper {
    position: relative;
    z-index: 2001;
    padding: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
}
.modal-content {
    background-color: #0F1322;
    padding: 30px 35px;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    position: relative;
    max-height: calc(85vh - 40px);
    overflow-y: auto;
    color: #e0e0e0;
}
.modal-close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 2.2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    transition: color 0.2s ease;
}
.modal-close-button:hover {
    color: #fff;
}
#modal-project-body h2 {
    font-size: 2rem;
    color: #00E0FF;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}
#modal-project-body h3 {
    font-size: 1.4rem;
    color: #FFD700;
    margin-top: 25px;
    margin-bottom: 10px;
    font-weight: 600;
}
#modal-project-body p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 15px;
    color: #c8c8d0;
}
#modal-project-body ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 15px;
    padding-left: 10px;
}
#modal-project-body ul li {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #b0b8d0;
}
#modal-project-body ul li strong {
    color: #e0e0e0;
    font-weight: 600;
}

/* Featured Webtoon Carousel Styles */
.featured-carousel-section {
    padding-top: 60px;
    padding-bottom: 40px;
    /* background-color: #0c0c18; /* Remove or comment out this static background */
    
    /* ADD these lines for the dynamic wave background */
    position: relative; /* Needed for ::before pseudo-element positioning */
    overflow: hidden;   /* Good practice if pseudo-elements are used */
    background: linear-gradient(-45deg,
        #0A2463, /* Very Dark Blue - for depth */
        #123B70, /* Darker Medium Blue */
        #2A6EA6, /* Medium Blue */
        #4A95C2, /* Lighter Medium Blue - this is now the 'brightest' wave part */
        #3A7FB0, /* Back to a Medium Blue */
        #2A6EA6, /* Medium Blue */
        #123B70  /* Darker Medium Blue */
    );
    background-size: 600% 600%;
    animation: dynamicOceanWaves 25s ease-in-out infinite;
}

.featured-carousel-section::before,
.featured-carousel-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: repeat;
    pointer-events: none;
    z-index: 0; /* Behind actual carousel content, but above the wave background if needed */
                /* The wave is on the main element, so z-index: 0 for pseudo is fine */
    animation: 
        starShine var(--shine-duration, 5s) linear infinite, /* Uses existing starShine keyframes */
        floatStars var(--float-duration, 20s) infinite alternate ease-in-out; /* Uses existing floatStars keyframes */
}

/* Star Layer 1 for Featured Carousel Section */
.featured-carousel-section::before {
    background-image: 
        radial-gradient(circle, rgba(255, 255, 255, 0.9) 1px, transparent 1.5px),
        radial-gradient(circle, rgba(255, 255, 255, 0.7) 2px, transparent 2.5px);
    background-size: 
        180px 220px, /* Density: larger numbers = fewer stars */
        130px 190px;
    background-position: 
        5% 15%, 
        70% 85%;
    --shine-duration: 7s;
    --float-duration: 28s;
    animation-delay: 0s, -2s; /* Stagger animations slightly */
}

/* Star Layer 2 for Featured Carousel Section */
.featured-carousel-section::after {
    background-image: 
        radial-gradient(circle, rgba(255, 255, 255, 0.8) 1.5px, transparent 2px),
        radial-gradient(circle, rgba(220, 220, 255, 0.6) 2.5px, transparent 3px); /* Slightly bluish tint */
    background-size: 
        220px 280px,
        160px 230px;
    background-position: 
        30% 50%,
        85% 20%;
    --shine-duration: 6s;
    --float-duration: 35s;
    animation-delay: -3s, -5s;
}

.featured-carousel-section .section-container > h2.featured-title {
    color: #fff;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.2rem;
}

.carousel-wrapper {
    position: relative; /* For positioning nav buttons and dots */
    max-width: 1000px;  /* Or your desired fixed width for the carousel's visible area */
    margin: 0 auto;     /* Center the carousel wrapper */
    overflow: hidden;   /* THIS IS CRUCIAL: Hides the parts of slides not in view */
    border-radius: 10px;
}

.featured-carousel { /* This div is inside carousel-wrapper */
    position: relative;
    width: 100%; /* Make sure it takes the full width of the wrapper */
}

.carousel-slides {
    display: flex; /* Lines up slides horizontally */
    /* The width of .carousel-slides will be (number of slides * 100% of a slide's width) */
    /* JavaScript will change this transform to show different slides */
    transition: transform 0.5s ease-in-out; 
}

.carousel-slide-item {
    min-width: 100%;  /* Each slide should take 100% of the .featured-carousel width */
    flex-shrink: 0;   /* Prevents slides from shrinking */
    position: relative; 
    aspect-ratio: 16 / 8; /* Or your preferred aspect ratio for the ENTIRE slide - e.g., 16/7 or 2/1 */
                         /* Using 16/8 for a slightly taller feel than 16/7 as an example */
    overflow: hidden;   /* Ensures content fits and clips if necessary */
    background-color: #1a1a2d; /* Fallback if image doesn't load or for loading state */
    display: block; /* Make the article itself a block container */
}

.carousel-slide-item > a { /* Make the anchor tag fill the entire slide item */
    display: block;
    width: 100%;
    height: 100%;
    position: relative; /* For positioning the caption absolutely within the link */
    text-decoration: none; /* Remove underline from link */
    color: inherit; /* Inherit text color for caption */
}

.carousel-slide-image { /* This div will now be the actual image container */
    width: 100%;
    height: 100%; /* Make it fill the parent <a> tag (which fills the slide item) */
    position: absolute; /* Position it to fill the <a> tag, underneath the caption */
    top: 0;
    left: 0;
    /* Removed aspect-ratio from here, it's now on .carousel-slide-item */
}

.carousel-slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This will crop/scale image to fit the container's aspect ratio */
    display: block;
}

.carousel-slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
    color: #fff;
    padding: 20px 25px;
    box-sizing: border-box;
    z-index: 1; /* Ensure caption is above the .carousel-slide-image */
}

.carousel-slide-caption h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #fff;
}

.carousel-slide-caption p {
    font-size: 0.95rem;
    margin: 0 0 10px 0;
    color: #e0e0e0;
    line-height: 1.4;
}
.slide-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.slide-genres span {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 500;
}


/* Carousel Navigation Buttons (ensure these are correctly styled too) */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
    border-radius: 5px;
}

.carousel-button:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.carousel-button.prev {
    left: 15px;
}

.carousel-button.next {
    right: 15px;
}

/* Carousel Dots */
.carousel-dots {
    position: absolute;
    bottom: 20px; 
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-dot.active {
    background-color: #ffffff;
}

/* Responsive adjustments for the new carousel */
@media (max-width: 768px) {
    .featured-carousel-section .section-container > h2.featured-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    .carousel-slide-caption h3 {
        font-size: 1.4rem;
    }
    .carousel-slide-caption p {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }
    .carousel-slide-item {
         aspect-ratio: 16 / 8; /* Adjust aspect ratio for mobile if needed */
    }
    .carousel-button {
        font-size: 1.2rem;
        padding: 8px 10px;
    }
    .carousel-dots {
        bottom: 10px;
    }
    .carousel-dot {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 480px) {
    .carousel-slide-caption h3 {
        font-size: 1.1rem;
    }
    .carousel-slide-caption p {
        font-size: 0.75rem;
    }
    .slide-genres span {
        font-size: 0.65rem;
        padding: 3px 7px;
    }
}

/* NEW: Series Detail Page Styles */
.series-detail-section.content-section {
    padding-top: 40px; /* Less top padding as breadcrumbs are there */
    background-color: #080B1A; /* Slightly different, very dark blue for series page */
}

.breadcrumbs {
    margin-bottom: 30px;
    font-size: 0.9rem;
    color: #888ea8; /* Muted color */
}

.breadcrumbs a {
    color: #a0a8c0; /* Slightly lighter for links */
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: #00E0FF; /* Accent color on hover */
}

.breadcrumbs span { /* For the current page title in breadcrumbs */
    color: #e0e0e0; /* Brighter for current page */
}

.series-info-banner {
    display: flex;
    gap: 30px; /* Space between cover and details */
    background-color: #101629; /* Card-like background */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    margin-bottom: 50px;
}

.series-cover-art-container {
    flex: 0 0 280px; /* Fixed width for the cover art, adjust as needed */
    max-width: 35%; /* Max width to prevent it being too large on some flex adjustments */
}

.series-cover-art-container img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4; /* Maintain aspect ratio */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.series-details-content {
    flex: 1; /* Takes remaining space */
    text-align: left;
}

.series-details-content h1 {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 5px;
    line-height: 1.2;
}

.korean-title {
    font-size: 1.3rem;
    color: #a0a8c0; /* Muted color */
    margin-bottom: 20px;
    font-weight: 500;
}

.series-synopsis {
    font-size: 0.95rem;
    color: #c0c8e0;
    line-height: 1.7;
    margin-bottom: 25px;
}

.series-metadata {
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Two columns for metadata */
    gap: 8px 20px; /* Row and column gap */
    margin-bottom: 10px;
}

.metadata-item {
    color: #a0a8c0;
}
.metadata-item strong {
    color: #d0d8e0; /* Slightly brighter label */
    margin-right: 5px;
}
.metadata-item span {
    color: #c0c8e0; /* Value color */
}

.metadata-genre {
    grid-column: 1 / -1; /* Make genre span full width if in the grid */
    /* Or style it separately if it's outside the grid like in the image */
    margin-top: 5px;
}
.metadata-genre span {
    display: inline-block; /* If genres are comma-separated */
}


.read-chapter-button { /* Extends .cta-button */
    padding: 12px 25px; /* Slightly smaller than main hero CTA */
    font-size: 1rem;
    background-color: #E53935; /* Reddish color like example */
    color: #fff;
    box-shadow: 0px 4px 15px rgba(229, 57, 53, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.read-chapter-button:hover {
    background-color: #C62828; /* Darker red on hover */
    box-shadow: 0px 6px 20px rgba(229, 57, 53, 0.4);
}
.read-chapter-button .arrow-icon {
    margin-left: 8px;
    font-weight: bold; /* Make arrow more visible */
}


.chapter-list-section {
    margin-top: 50px;
}

.chapter-list-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 25px;
    padding-left: 15px; /* Space for the pseudo-element bar */
    position: relative;
    border-bottom: 1px solid #2a3045; /* Subtle separator line */
    padding-bottom: 10px;
}

.chapter-list-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 70%; /* Adjust height of the bar */
    width: 5px;
    background-color: #E53935; /* Red accent color */
    border-radius: 2px;
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); /* Responsive chapter links */
    gap: 10px;
}

.chapter-link {
    display: block;
    background-color: #1A2035; /* Darker button background */
    color: #a0a8c0; /* Muted text color */
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #2A3045; /* Subtle border */
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.chapter-link:hover {
    background-color: #2A3045; /* Slightly lighter on hover */
    color: #00E0FF; /* Accent color text */
    border-color: #00E0FF;
}

/* Responsive adjustments for Series Detail Page */
@media (max-width: 900px) {
    .series-info-banner {
        flex-direction: column; /* Stack cover and details */
        padding: 20px;
    }
    .series-cover-art-container {
        flex-basis: auto; /* Reset basis */
        width: 200px; /* Fixed width for cover when stacked, centered */
        max-width: 60%; /* Max width relative to parent */
        margin: 0 auto 25px auto; /* Center it */
    }
    .series-details-content {
        text-align: center; /* Center text when stacked */
    }
    .series-details-content h1 {
        font-size: 2rem;
    }
    .korean-title {
        font-size: 1.1rem;
    }
    .metadata-grid {
        grid-template-columns: 1fr; /* Stack metadata items */
        text-align: center;
    }
     .metadata-item {
        justify-content: center; /* Center if metadata-item becomes flex */
    }
    .read-chapter-button {
        width: auto; /* Don't make it full width unless desired */
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
        display: block; /* To allow margin auto centering */
    }
    .chapter-list-title {
        font-size: 1.5rem;
        text-align: center;
        padding-left: 0;
    }
    .chapter-list-title::before {
        display: none; /* Hide bar on mobile or redesign */
    }
}

@media (max-width: 480px) {
    .series-details-content h1 {
        font-size: 1.7rem;
    }
    .korean-title {
        font-size: 1rem;
    }
    .series-synopsis {
        font-size: 0.9rem;
    }
    .metadata-item, .series-metadata {
        font-size: 0.85rem;
    }
    .read-chapter-button {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
    .chapter-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); /* Smaller chapter buttons */
        gap: 8px;
    }
    .chapter-link {
        font-size: 0.8rem;
        padding: 8px 10px;
    }
}

/* NEW: Chapter Reader Page Styles */
main.reader-main-content {
    padding-top: 20px; /* Space below fixed header */
    background-color: #000000; /* Black background for reader */
}
.reader-controls {
    background-color: rgba(10, 10, 20, 0.9); /* Dark, slightly transparent controls */
    backdrop-filter: blur(5px);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky; /* Sticky controls at top and bottom */
    width: 100%;
    z-index: 900; /* Below main header but above panels */
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.reader-controls.top-controls {
    top: 70px; /* Height of the main header */
    border-bottom: 1px solid #2a3045;
}
.reader-controls.bottom-controls {
    bottom: 0;
    border-top: 1px solid #2a3045;
    margin-top: 20px; /* Space above bottom controls */
}
#reader-chapter-title {
    color: #e0e0e0;
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
    flex-grow: 1; /* Allow title to take space */
    margin: 0 15px; /* Space around title */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.reader-nav-button {
    color: #b0b8d0;
    background-color: rgba(40, 40, 60, 0.5);
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s, color 0.3s;
    white-space: nowrap;
}
.reader-nav-button:hover {
    background-color: rgba(0, 224, 255, 0.2);
    color: #00E0FF;
}
.reader-nav-button.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}
.reader-panels-container {
    max-width: 800px; /* Max width for webtoon panels */
    margin: 20px auto 0 auto; /* Top margin, centered, no bottom margin to allow bottom controls to be sticky */
    padding-bottom: 80px; /* Space for the bottom controls if they are sticky and page is short */
}
#webtoon-panels-area img {
    display: block;
    width: 100%; /* Panels take full width of the container */
    height: auto;
    margin: 0; /* Remove any default margins from images */
    padding: 0;
    /* No vertical gap between panels */
}
.loading-text, .error-text {
    text-align: center;
    padding: 50px 20px;
    font-size: 1.1rem;
    color: #888ea8;
}
.error-text {
    color: #ff8a8a;
}

/* NEW: Back to Top Button */
.back-to-top-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: rgba(0, 224, 255, 0.7); /* Use your accent cyan, semi-transparent */
    color: #0A0F29; /* Dark text */
    width: 45px;
    height: 45px;
    border-radius: 50%;
    text-align: center;
    font-size: 1.5rem; /* Size of the arrow character */
    line-height: 45px; /* Vertically center the arrow */
    text-decoration: none;
    z-index: 999; /* Below header/modal, but above most content */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.back-to-top-button.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-button:hover {
    background-color: #00FFFF; /* Brighter cyan on hover */
    transform: translateY(-2px);
}

/* NEW: Webtoon Listing Page Styles */
.webtoon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* Responsive grid */
    gap: 25px;
    margin-top: 30px;
}

.webtoon-card {
    background-color: #101629; /* Consistent with project-entry */
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none; /* Remove underline from link */
    color: inherit; /* Inherit text color */
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.webtoon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 224, 255, 0.1); /* Accent shadow */
}

.webtoon-cover-image {
    width: 100%;
    aspect-ratio: 3 / 4; /* This defines the shape of the image container */
    background-color: #2A3045; /* Placeholder color */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #606880;
    font-size: 0.9rem;
    font-style: italic;
    overflow: hidden; /* Important to clip the image if object-fit is cover/contain */
}

.webtoon-cover-image img { 
    width: 100%;
    height: 100%; /* Make image fill the container */
    object-fit: cover; /* Scales image to maintain aspect ratio while filling container, crops if necessary */
    display: block; /* Removes extra space below image */
}


.webtoon-card-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allows info to take remaining space if card height is fixed by grid row */
}

.webtoon-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #E0E0E0; /* Main text color for title */
    margin-bottom: 5px;
    line-height: 1.3;
    /* Truncate long titles with ellipsis (optional) */
    /* display: -webkit-box; */
    /* -webkit-line-clamp: 2; */
    /* -webkit-box-orient: vertical;   */
    /* overflow: hidden; */
    /* text-overflow: ellipsis; */
    /* height: 2.6em; /* Adjust based on line-height and font-size for 2 lines */
}

.webtoon-latest-chapter {
    font-size: 0.8rem;
    color: #888ea8; /* Muted color */
    margin-bottom: 10px;
}
.webtoon-latest-chapter:contains("New") { /* Example: Style if "New" is present */
    color: #00E0FF;
    font-weight: bold;
}

.webtoon-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: auto; /* Pushes genres to the bottom of the card info */
}

.webtoon-genres span {
    background-color: rgba(0, 224, 255, 0.08);
    color: #00BCD4; /* Slightly different cyan for genre tags */
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid rgba(0, 224, 255, 0.15);
}

/* Contact Form Styling */
.contact-intro { 
    color: #b0b8d0;
    font-size: 1.1rem;
    line-height: 1.7;
    text-align: center;
    margin-bottom: 40px;
    max-width: 600px; 
    margin-left: auto;
    margin-right: auto;
}
.contact-form {
    max-width: 700px; 
    margin: 0 auto; 
    display: flex;
    flex-direction: column;
    gap: 20px; 
}
.form-group {
    display: flex;
    flex-direction: column;
}
.form-group label {
    margin-bottom: 8px;
    color: #B0E0E6; 
    font-size: 0.9rem;
    font-weight: 500;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background-color: rgba(20, 30, 50, 0.5); 
    border: 1px solid rgba(176, 224, 230, 0.3); 
    border-radius: 6px;
    color: #e0e0e0; 
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-group input[type="text"]::placeholder,
.form-group input[type="email"]::placeholder,
.form-group input[type="password"]::placeholder, 
.form-group textarea::placeholder {
    color: #707890; 
    opacity: 1; 
}
.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00E0FF; 
    box-shadow: 0 0 0 2px rgba(0, 224, 255, 0.2); 
}
.form-group textarea {
    resize: vertical; 
    min-height: 120px;
}
.recaptcha-container { 
    display: flex;
    justify-content: center;
    margin: 10px 0 20px 0; /* Added more bottom margin */
}
.form-submit-button { 
    margin-top: 0; /* Adjusted as reCAPTCHA now has bottom margin */
    padding: 14px 30px; 
    font-size: 1.05rem;
    width: auto; 
    align-self: center; 
}
.form-messages { 
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
}
.form-messages.success {
    background-color: rgba(0, 224, 255, 0.15); 
    color: #00E0FF; 
    border: 1px solid rgba(0, 224, 255, 0.3);
}
.form-messages.error {
    background-color: rgba(255, 100, 100, 0.15); 
    color: #ff8a8a; 
    border: 1px solid rgba(255, 100, 100, 0.3);
}
.password-input-container {
    position: relative;
    display: flex; /* Aligns input and button if button is external */
}

/* Adjust input padding if button is inside */
.form-group input[type="password"].password-input-with-toggle {
    padding-right: 40px; /* Make space for the toggle button if it's inside */
}

.password-toggle-button {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #B0E0E6; /* Light blue, matching labels */
    cursor: pointer;
    font-size: 1.2rem; /* Adjust size of eye icon (using text for now) */
    padding: 5px;
    line-height: 1; /* Ensure icon is centered */
}

.password-toggle-button:hover {
    color: #00E0FF; /* Accent color on hover */
}


/* Footer Styles */
#main-footer {
    background-color: #0A0F1A;
    color: #888ea8;
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid #1a2035;
    margin-top: auto;
}
.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.footer-social-links {
    display: flex;
    gap: 20px;
}
.footer-social-links a {
    color: #888ea8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}
.footer-social-links a:hover {
    color: #00E0FF;
}
.footer-copyright {
    font-size: 0.85rem;
}
a.footer-back-to-top { 
    color: #888ea8;
    text-decoration: none;
    font-size: 0.85rem;
    margin-top: 10px; 
    display: inline-block;
}
a.footer-back-to-top:hover {
    color: #00E0FF;
}


/* KEYFRAME ANIMATIONS */
@keyframes dynamicOceanWaves {
    0% { background-position: 0% 50%; }
    25% { background-position: 75% 0%; }
    50% { background-position: 100% 75%; }
    75% { background-position: 25% 100%; }
    100% { background-position: 0% 50%; }
}
@keyframes floatLeftAnimation {
    0%   { transform: translateY(-50%) translateY(0px); }
    50%  { transform: translateY(-50%) translateY(-20px); }
    100% { transform: translateY(-50%) translateY(0px); }
}
@keyframes simpleFloatLeftTablet {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}
@keyframes simpleFloatLeftMobile {
    0%   { transform: translateY(0px); }
    50%  { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}
@keyframes bounceArrow {
    0%, 20%, 50%, 80%, 100% {
        transform: rotate(-45deg) translateY(0);
    }
    40% {
        transform: rotate(-45deg) translateY(-10px);
    }
    60% {
        transform: rotate(-45deg) translateY(-5px);
    }
}


/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 768px) {
    body { padding-top: 60px; }
    #main-header { padding: 10px 0; }
    #main-header.scrolled { padding: 8px 0; }
    .header-nav { display: none; position: absolute; top: 100%; left: 0; width: 100%; background-color: #0A0F29; box-shadow: 0 4px 10px rgba(0,0,0,0.2); padding-bottom: 10px; }
    .header-nav a.nav-auth-link {  border: 1px solid #00E0FF; padding: 5px 10px; border-radius: 5px; color: #00E0FF;}
    .header-nav a.nav-auth-link:hover {background-color: #00E0FF; color: #0A0F29;}
    .header-nav.active { display: block; }
    .header-nav ul { flex-direction: column; align-items: center; width: 100%; gap: 0; }
    .header-nav li { width: 100%; text-align: center; }
    .header-nav a { display: block; width: 100%; padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .header-nav li:last-child a { border-bottom: none; }
    .header-nav a::after { display: none; }
    .mobile-menu-toggle { display: block; }
    .vibrant-hero { padding: 30px 15px; }
    .striking-gradient { font-size: 3.2rem; }
    .hero-tagline { font-size: 1rem; }
    .intro-text { font-size: 1.1rem; }
    .skills-pills-container { gap: 8px 10px; margin-bottom: 30px; }
    .skill-pill { font-size: 0.8rem; padding: 6px 15px; }
    .hero-skin-image.left-skin { width: 100px; bottom: 10%; left: 10px; animation: simpleFloatLeftMobile 6s ease-in-out infinite; }
    .project-entry, .project-entry.layout-reversed { flex-direction: column; gap: 20px; padding: 20px; margin-bottom: 40px; }
    .project-gallery-container { flex-basis: auto; width: 100%; }
    .image-tile-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .project-details-content { text-align: center; }
    .project-details-content h3 { font-size: 1.6rem; }
    .project-details-content p { text-align: center; font-size: 0.95rem; }
    .project-tags { justify-content: center; }
    .project-buttons-container { justify-content: center; }
    .project-link-button { font-size: 0.85rem; padding: 9px 18px; margin-bottom: 10px; }
    .modal-content-wrapper { width: 95%; padding: 10px; }
    .modal-content { padding: 25px 20px; max-height: calc(90vh - 20px); }
    #modal-project-body h2 { font-size: 1.8rem; }
    #modal-project-body h3 { font-size: 1.3rem; }
    #modal-project-body p, #modal-project-body ul li { font-size: 0.9rem; }
    .footer-container { flex-direction: column; gap: 20px; }
    .footer-social-links { order: 1; gap: 25px; }
    .footer-copyright { order: 2; font-size: 0.8rem; }
    .contact-intro { font-size: 1rem; margin-bottom: 30px; } 
    .form-group input[type="text"], .form-group input[type="email"], .form-group textarea { padding: 10px 12px; font-size: 0.95rem;}
    .form-submit-button { width: 100%; } 
    .recaptcha-container { transform: scale(0.9); transform-origin: center; margin-left: auto; margin-right: auto; max-width: fit-content; }
}

@media (min-width: 901px) and (max-width: 1200px) {
    .striking-gradient { font-size: 4.5rem; }
    .hero-tagline { font-size: 1.2rem; }
    .intro-text { font-size: 1.2rem; }
    .hero-skin-image.left-skin { width: 220px; left: calc(50% - (700px / 2) - 220px - 30px); }
    .header-brand { font-size: 1.5rem; }
    .header-logo { height: 26px; }
    .project-entry { gap: 30px; }
    .project-gallery-container { flex-basis: 50%; }
    .image-tile-grid { gap: 12px; }
    .project-details-content h3 { font-size: 1.8rem; }
}

@media (min-width: 769px) and (max-width: 900px) {
    body { padding-top: 65px; }
    #main-header.scrolled { padding: 8px 0; }
    .header-brand { font-size: 1.4rem; }
    .header-logo { height: 24px; }
    .header-nav { display: flex !important; position: static; background-color: transparent; box-shadow: none; padding-bottom: 0; }
    .header-nav ul { flex-direction: row; }
    .header-nav li { width: auto; text-align: left; }
    .header-nav a { padding: 5px 0; border-bottom: none; }
    .header-nav a::after { display: block; }
    .mobile-menu-toggle { display: none; }
    .striking-gradient { font-size: 3.8rem; }
    .hero-tagline { font-size: 1.1rem; letter-spacing: 1px; }
    .intro-text { font-size: 1.15rem; }
    .skills-pills-container { gap: 8px 12px; }
    .skill-pill { font-size: 0.8rem; padding: 7px 16px; }
    .hero-skin-image.left-skin { width: 120px; top: auto; bottom: 15%; left: 3%; animation: simpleFloatLeftTablet 6s ease-in-out infinite; }
    .project-entry { gap: 25px; }
    .project-gallery-container { flex-basis: 45%; }
    .image-tile-grid { gap: 10px; }
    .project-details-content h3 { font-size: 1.7rem; }
}

@media (max-width: 600px) {
    .vibrant-hero { min-height: calc(100vh - 60px); padding: 30px 15px 70px; }
    .striking-gradient { font-size: 3rem; }
    .hero-tagline { font-size: 0.9rem; margin-bottom: 20px; }
    .intro-text { font-size: 1.05rem; margin-bottom: 25px; }
    .skills-pills-container { margin-bottom: 30px; }
    .vibrant-button { padding: 14px 30px; font-size: 0.9rem; }
    .hero-skin-image.left-skin { width: 80px; bottom: 8%; left: 5px; }
    .scroll-down-arrow { bottom: 20px; }
}

@media (max-width: 480px) {
    .striking-gradient { font-size: 2.5rem; }
    .hero-tagline { font-size: 0.8rem; letter-spacing: 0.5px; }
    .intro-text { font-size: 0.95rem; }
    .skills-pills-container { gap: 6px 8px; margin-bottom: 25px; }
    .skill-pill { font-size: 0.75rem; padding: 5px 12px; }
    .vibrant-button { padding: 12px 25px; font-size: 0.85rem; }
    .hero-skin-image.left-skin { display: none; }
    .scroll-down-arrow span { width: 20px; height: 20px; border-left-width: 2px; border-bottom-width: 2px; }
    .image-tile-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .image-tile { font-size: 0.7rem; }
    .project-details-content h3 { font-size: 1.4rem; }
    .project-details-content p { font-size: 0.9rem; }
    .project-tags span { font-size: 0.7rem; padding: 4px 10px; }
    .modal-content { padding: 20px 15px; }
    #modal-project-body h2 { font-size: 1.6rem; }
    #modal-project-body h3 { font-size: 1.2rem; }
    .footer-social-links a { font-size: 0.85rem; }
    .recaptcha-container { transform: scale(0.85); transform-origin: center; } 
}

@media (max-width: 400px) {
    .striking-gradient { font-size: 2.2rem; }
    .hero-tagline { font-size: 0.75rem; }
    .intro-text { font-size: 0.9rem; }
    .recaptcha-container { transform: scale(0.77); transform-origin: center; } 
}