/* Base Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --blood-red: #8b0000;
    --dark-red: #5a0000;
    --black: #0a0a0a;
    --ink-black: #121212;
    --gold: #d4af37;
    --pale-gold: #f5e6c8;
    --sakura-pink: #ffb7c5;
    --scrollbar-width: 10px;
    --section-glow: radial-gradient(ellipse at center, rgba(139, 0, 0, 0.3) 0%, transparent 70%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: var(--scrollbar-width);
    background-color: var(--ink-black);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--blood-red), var(--dark-red));
    border-radius: 5px;
    border: 2px solid var(--ink-black);
}

::-webkit-scrollbar-track {
    background-color: var(--ink-black);
}

/* Base Styles */
@font-face {
    font-family: 'Samurai';
    src: url('data:font/woff2;base64,d09GMgABAAAAA...') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;700&family=Zen+Old+Mincho:wght@400;700&display=swap');

body {
    font-family: 'Zen Old Mincho', serif;
    background-color: var(--black);
    color: var(--pale-gold);
    line-height: 1.8;
    overflow-x: hidden;
    background-image:
            radial-gradient(ellipse at 20% 20%, var(--dark-red) 0%, transparent 30%),
            radial-gradient(ellipse at 80% 80%, var(--blood-red) 0%, transparent 30%),
            url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path fill="none" stroke="%238b0000" stroke-width="0.5" stroke-opacity="0.08" d="M0 0 L100 0 L100 100 L0 100 Z M10 10 L90 10 L90 90 L10 90 Z M20 20 L80 20 L80 80 L20 80 Z M30 30 L70 30 L70 70 L30 70 Z M40 40 L60 40 L60 60 L40 60 Z" /></svg>');
    background-attachment: fixed;
    background-size: 300px;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* Animated Blood Mist Background */
.blood-mist {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
            radial-gradient(ellipse at 20% 30%, rgba(139, 0, 0, 0.15) 0%, transparent 40%),
            radial-gradient(ellipse at 80% 70%, rgba(139, 0, 0, 0.2) 0%, transparent 40%);
    animation: bloodPulse 15s infinite alternate;
    z-index: -2;
    pointer-events: none;
}

@keyframes bloodPulse {
    0% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
    100% { opacity: 0.7; transform: scale(1); }
}

/* Blood Drip Effect */
.blood-drip {
    position: fixed;
    top: -50px;
    width: 2px;
    height: 50px;
    background: linear-gradient(to bottom, transparent, var(--blood-red));
    filter: drop-shadow(0 0 3px var(--blood-red));
    z-index: -1;
    animation: drip 8s linear infinite;
    opacity: 0.6;
}

@keyframes drip {
    0% { top: -50px; opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { top: 100vh; opacity: 0; }
}

/* Main Container with Blood Stains */
.container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem;
    background-color: rgba(10, 10, 10, 0.85);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.7);
    min-height: 100vh;
    overflow: hidden;
    border-left: 1px solid rgba(139, 0, 0, 0.3);
    border-right: 1px solid rgba(139, 0, 0, 0.3);
}

.container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
            url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"><path fill="%238b0000" fill-opacity="0.03" d="M30,50 Q50,30 70,50 T110,50 Q130,30 150,50 T190,50 L190,150 Q170,170 150,150 T110,150 Q90,170 70,150 T30,150 Z" /></svg>');
    background-size: 400px;
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}

/* Header with Blood Stained Effect */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    margin-bottom: 4rem;
    position: relative;
    border-bottom: 1px solid rgba(139, 0, 0, 0.5);
}

header::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--blood-red), transparent);
}

.logo {
    font-family: 'Samurai', 'Noto Serif JP', serif;
    font-size: 3.5rem;
    color: var(--blood-red);
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: -1rem;
    line-height: 1;
    text-shadow: 0 0 10px rgba(139, 0, 0, 0.7);
    position: relative;
    padding: 1rem 0;
    transition: all 0.5s ease;
}

.logo:hover {
    text-shadow: 0 0 20px rgba(139, 0, 0, 0.9);
    transform: translateY(-5px);
}

.logo::before {
    content: "";
    position: absolute;
    top: 0;
    left: -15px;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom, transparent, var(--blood-red), transparent);
}

.logo span {
    display: block;
    font-size: 1.3rem;
    letter-spacing: normal;
    writing-mode: horizontal-tb;
    margin-top: 1.5rem;
    color: var(--pale-gold);
    font-family: 'Zen Old Mincho', serif;
}

/* Navigation with Blood Drop Hover */
nav ul {
    display: flex;
    list-style: none;
    gap: 3rem;
}

nav a {
    text-decoration: none;
    color: var(--pale-gold);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 1rem;
    transition: all 0.4s ease;
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-shadow: 0 0 5px rgba(139, 0, 0, 0.5);
}

nav a span:first-child {
    font-family: 'Noto Serif JP', serif;
    color: var(--blood-red);
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
    transition: all 0.4s ease;
}

nav a:hover {
    color: white;
    transform: translateY(-3px);
}

nav a:hover span:first-child {
    color: white;
    text-shadow: 0 0 10px var(--blood-red);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--blood-red);
    transition: all 0.4s ease;
    box-shadow: 0 0 10px var(--blood-red);
}

nav a:hover::after {
    width: 80%;
}

/* Hero Section with Blood Splatter */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 80vh;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
    margin-bottom: 6rem;
}

.hero::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 0, 0, 0.2) 0%, transparent 60%);
    opacity: 0.5;
    z-index: -1;
    animation: pulse 8s infinite alternate;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.3; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.6; }
}

.hero h1 {
    font-family: 'Samurai', 'Noto Serif JP', serif;
    font-size: 6rem;
    margin-bottom: 2rem;
    color: var(--pale-gold);
    position: relative;
    z-index: 1;
    line-height: 1.1;
    text-shadow: 0 0 10px rgba(139, 0, 0, 0.7);
}

.hero h1 span {
    color: var(--blood-red);
    display: block;
    font-size: 7rem;
    line-height: 1;
    text-shadow: 0 0 20px var(--blood-red);
    margin-bottom: 1.5rem;
    position: relative;
    transition: all 0.5s ease;
}

.hero h1 span:hover {
    text-shadow: 0 0 30px var(--blood-red);
    transform: scale(1.05);
}

.hero h1 span::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--blood-red), transparent);
    box-shadow: 0 0 15px var(--blood-red);
}

.hero p {
    max-width: 800px;
    margin: 0 auto 4rem;
    font-size: 1.4rem;
    color: var(--pale-gold);
    opacity: 0.9;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Blood Splatter Button */
.cta-button {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: linear-gradient(135deg, var(--blood-red), var(--dark-red));
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    font-size: 1.2rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 5px 25px rgba(139, 0, 0, 0.5);
    border: none;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 35px rgba(139, 0, 0, 0.7);
    color: white;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.7s ease;
    z-index: -1;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path fill="none" stroke="%23ffffff" stroke-width="1" stroke-opacity="0.1" d="M20,20 Q30,10 40,20 T60,20 Q70,10 80,20 T100,20 L100,80 Q90,90 80,80 T60,80 Q50,90 40,80 T20,80 Z" /></svg>');
    background-size: 50px;
    opacity: 0.1;
    z-index: -2;
    animation: bloodFlow 20s linear infinite;
}

@keyframes bloodFlow {
    0% { transform: rotate(0deg) translateX(0); }
    100% { transform: rotate(360deg) translateX(0); }
}

/* Content Sections with Blood Stains */
section {
    margin: 8rem 0;
    position: relative;
    padding: 3rem;
    background-color: rgba(18, 18, 18, 0.7);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(139, 0, 0, 0.2);
}

section::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="%238b0000" fill-opacity="0.1" d="M30,50 Q50,20 70,50 T90,50 Q70,80 50,50 T10,50 Q30,20 50,50 Z" /></svg>');
    background-repeat: no-repeat;
    background-position: top right;
    opacity: 0.5;
    z-index: -1;
}

section h2 {
    font-family: 'Samurai', 'Noto Serif JP', serif;
    font-size: 3.5rem;
    margin-bottom: 3rem;
    color: var(--pale-gold);
    position: relative;
    display: inline-block;
    padding-bottom: 1.5rem;
    text-shadow: 0 0 10px rgba(139, 0, 0, 0.5);
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 70%;
    height: 4px;
    background: linear-gradient(to right, var(--blood-red), transparent);
    box-shadow: 0 0 10px var(--blood-red);
    border-radius: 2px;
}

section h2::before {
    content: attr(data-eng);
    position: absolute;
    bottom: -2rem;
    left: 0;
    font-size: 1.1rem;
    color: var(--blood-red);
    font-family: 'Zen Old Mincho', serif;
    font-weight: 400;
    letter-spacing: 1px;
}

.kanji-highlight {
    font-family: 'Noto Serif JP', serif;
    color: var(--blood-red);
    font-weight: 700;
    font-size: 1.4em;
    text-shadow: 0 0 5px rgba(139, 0, 0, 0.5);
    position: relative;
    padding: 0 0.3rem;
    transition: all 0.4s ease;
}

.kanji-highlight:hover {
    color: white;
    text-shadow: 0 0 10px var(--blood-red);
}

.kanji-highlight::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--blood-red);
    opacity: 0.5;
    transition: all 0.4s ease;
}

.kanji-highlight:hover::after {
    opacity: 1;
    height: 3px;
    background: linear-gradient(to right, var(--blood-red), var(--gold));
}

/* Samurai Grid with Blood Splatter Cards */
.samurai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.samurai-card {
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.8), rgba(10, 10, 10, 0.9));
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    border: 1px solid rgba(139, 0, 0, 0.3);
}

.samurai-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 20px 50px rgba(139, 0, 0, 0.4);
    z-index: 2;
}

.samurai-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to right, var(--blood-red), var(--gold));
    z-index: 2;
}

.samurai-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.1), transparent);
    opacity: 0;
    transition: all 0.6s ease;
    z-index: 1;
}

.samurai-card:hover::after {
    opacity: 1;
}

.samurai-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    filter: sepia(50%) contrast(110%) brightness(0.7);
    transition: all 0.6s ease;
}

.samurai-card:hover img {
    filter: sepia(20%) contrast(120%) brightness(0.8);
}

.samurai-card-content {
    padding: 2.5rem;
    position: relative;
    z-index: 3;
}

.samurai-card h3 {
    font-family: 'Samurai', 'Noto Serif JP', serif;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--pale-gold);
    position: relative;
    display: flex;
    align-items: center;
}

.samurai-card h3 span {
    color: var(--blood-red);
    margin-left: 1.5rem;
    font-size: 1.8rem;
    transition: all 0.4s ease;
}

.samurai-card:hover h3 span {
    color: var(--gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.samurai-card p {
    margin-bottom: 2rem;
    color: var(--pale-gold);
    opacity: 0.9;
}

/* Blood Drop Link */
.card-link {
    display: inline-flex;
    align-items: center;
    color: var(--blood-red);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.4s ease;
    position: relative;
    padding: 0.5rem 1rem 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.card-link:hover {
    color: white;
    transform: translateX(10px);
}

.card-link::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, var(--blood-red), transparent);
    transition: all 0.4s ease;
}

.card-link:hover::before {
    background: linear-gradient(to right, white, transparent);
}

.card-link::after {
    content: "→";
    margin-left: 1rem;
    transition: all 0.4s ease;
    color: var(--gold);
}

.card-link:hover::after {
    transform: translateX(5px);
    color: white;
}

/* Blood River Timeline */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 5rem auto;
    padding: 0 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 100%;
    background: linear-gradient(to bottom, var(--blood-red), var(--gold), var(--blood-red));
    background-size: 100% 200%;
    animation: gradientScroll 10s linear infinite;
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.5);
}

@keyframes gradientScroll {
    0% { background-position: 0% 0%; }
    100% { background-position: 0% 100%; }
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    width: 100%;
}

.timeline-item:nth-child(odd) {
    padding-right: calc(50% + 3rem);
    text-align: right;
}

.timeline-item:nth-child(even) {
    padding-left: calc(50% + 3rem);
    text-align: left;
}

.timeline-content {
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.8), rgba(10, 10, 10, 0.9));
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(139, 0, 0, 0.3);
}

.timeline-item:hover .timeline-content {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(139, 0, 0, 0.4);
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 30px;
    width: 30px;
    height: 30px;
    background: var(--black);
    border: 4px solid var(--blood-red);
    border-radius: 50%;
    box-shadow: 0 0 0 5px var(--black), 0 0 20px var(--blood-red);
    transition: all 0.4s ease;
}

.timeline-item:hover .timeline-content::before {
    border-color: var(--gold);
    box-shadow: 0 0 0 5px var(--black), 0 0 25px var(--gold);
    transform: scale(1.1);
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -15px;
    transform: translateX(50%);
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -15px;
    transform: translateX(-50%);
}

.timeline-year {
    font-weight: bold;
    color: var(--gold);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(139, 0, 0, 0.3);
    border-radius: 30px;
    border: 1px solid var(--blood-red);
    box-shadow: 0 0 10px rgba(139, 0, 0, 0.3);
    transition: all 0.4s ease;
}

.timeline-item:hover .timeline-year {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    color: white;
}

.timeline h3 {
    font-family: 'Samurai', 'Noto Serif JP', serif;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--pale-gold);
    position: relative;
}

.timeline h3::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--blood-red);
    transition: all 0.4s ease;
}

.timeline-item:hover h3::after {
    width: 80px;
    background: var(--gold);
}

/* Blood Moon Quote Section */
.quote-section {
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.9), rgba(30, 0, 0, 0.8));
    color: white;
    padding: 8rem 4rem;
    text-align: center;
    position: relative;
    margin: 8rem -3rem;
    overflow: hidden;
    border-top: 1px solid rgba(139, 0, 0, 0.5);
    border-bottom: 1px solid rgba(139, 0, 0, 0.5);
    box-shadow: 0 0 50px rgba(139, 0, 0, 0.3);
}

.quote-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(to right, var(--blood-red), var(--gold), var(--blood-red));
    box-shadow: 0 0 20px var(--blood-red);
}

.quote-section::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 0, 0, 0.1) 0%, transparent 70%);
    opacity: 0.5;
    z-index: 0;
    animation: pulse 8s infinite alternate;
}

.quote {
    font-family: 'Samurai', 'Noto Serif JP', serif;
    font-size: 2.5rem;
    max-width: 1000px;
    margin: 0 auto 2rem;
    line-height: 1.6;
    position: relative;
    font-weight: 500;
    z-index: 1;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

.quote::before,
.quote::after {
    content: '"';
    font-size: 4rem;
    color: var(--blood-red);
    opacity: 0.5;
    position: absolute;
    font-family: 'Zen Old Mincho', serif;
}

.quote::before {
    top: -2rem;
    left: -3rem;
}

.quote::after {
    bottom: -4rem;
    right: -3rem;
}

.quote-author {
    font-style: italic;
    color: var(--gold);
    font-size: 1.5rem;
    position: relative;
    display: inline-block;
    padding: 0 3rem;
    z-index: 1;
}

.quote-author::before,
.quote-author::after {
    content: "―";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--blood-red);
    opacity: 0.7;
    font-size: 2rem;
}

.quote-author::before {
    left: 0;
}

.quote-author::after {
    right: 0;
}

/* Blood Splatter Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 250px);
    gap: 1.5rem;
    margin: 4rem 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(139, 0, 0, 0.2);
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(139, 0, 0, 0.4);
    z-index: 2;
}

.gallery-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item:nth-child(5) {
    grid-column: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(60%) contrast(120%) brightness(0.6);
    transition: all 0.6s ease;
}

.gallery-item:hover img {
    filter: sepia(30%) contrast(130%) brightness(0.7);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    transform: translateY(100%);
    transition: all 0.4s ease;
    opacity: 0;
    z-index: 3;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
    opacity: 1;
}

/* Blood Stained Principles */
.principles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin: 4rem 0;
}

.principle-card {
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.8), rgba(10, 10, 10, 0.9));
    padding: 3rem 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    border-top: 5px solid var(--blood-red);
    border-bottom: 1px solid rgba(139, 0, 0, 0.3);
}

.principle-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(139, 0, 0, 0.4);
    border-top-color: var(--gold);
}

.principle-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path fill="%238b0000" fill-opacity="0.05" d="M30,50 Q50,30 70,50 T90,50 Q70,70 50,50 T10,50 Q30,30 50,50 Z" /></svg>');
    background-size: 200px;
    opacity: 0.3;
    z-index: 0;
}

.principle-kanji {
    font-family: 'Noto Serif JP', serif;
    font-size: 4rem;
    color: var(--blood-red);
    line-height: 1;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    transition: all 0.4s ease;
    z-index: 1;
}

.principle-card:hover .principle-kanji {
    color: var(--gold);
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.principle-kanji::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--blood-red), transparent);
    transition: all 0.4s ease;
}

.principle-card:hover .principle-kanji::after {
    background: linear-gradient(to right, var(--gold), transparent);
}

.principle-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--pale-gold);
    position: relative;
    z-index: 1;
}

.principle-card p {
    color: var(--pale-gold);
    opacity: 0.9;
    z-index: 1;
    position: relative;
}

/* Blood Stained Footer */
footer {
    text-align: center;
    padding: 6rem 0 4rem;
    margin-top: 8rem;
    border-top: 1px solid rgba(139, 0, 0, 0.5);
    position: relative;
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.9), rgba(20, 0, 0, 0.8));
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--blood-red), var(--gold), var(--blood-red), transparent);
    box-shadow: 0 0 20px var(--blood-red);
}

.footer-kanji {
    font-family: 'Samurai', 'Noto Serif JP', serif;
    font-size: 5rem;
    color: var(--blood-red);
    line-height: 1;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    text-shadow: 0 0 15px rgba(139, 0, 0, 0.7);
    transition: all 0.5s ease;
}

.footer-kanji:hover {
    color: var(--gold);
    text-shadow: 0 0 25px rgba(212, 175, 55, 0.7);
    transform: scale(1.1);
}

.footer-kanji::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: linear-gradient(to right, var(--blood-red), var(--gold), var(--blood-red));
    border-radius: 3px;
    box-shadow: 0 0 15px var(--blood-red);
    transition: all 0.5s ease;
}

.footer-kanji:hover::after {
    background: linear-gradient(to right, var(--gold), var(--blood-red), var(--gold));
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.7);
}

footer p {
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.2rem;
    color: var(--pale-gold);
    opacity: 0.8;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--pale-gold);
    text-decoration: none;
    transition: all 0.4s ease;
    position: relative;
    padding: 0.5rem 0;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links a:hover {
    color: white;
}

.footer-links a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--blood-red);
    transition: all 0.4s ease;
}

.footer-links a:hover::after {
    width: 100%;
    background: var(--gold);
}

.copyright {
    margin-top: 3rem;
    font-size: 0.9rem;
    color: var(--blood-red);
    opacity: 0.7;
}

/* Floating Blood Cells */
.blood-cell {
    position: fixed;
    border-radius: 50%;
    background: radial-gradient(circle, var(--blood-red), transparent);
    opacity: 0.1;
    filter: blur(1px);
    z-index: -1;
    pointer-events: none;
    animation: float linear infinite;
}

@keyframes float {
    0% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-50vh) translateX(20px); }
    100% { transform: translateY(-100vh) translateX(0); }
}

/* Blood Sword Cursor */
.blood-cursor {
    position: fixed;
    width: 40px;
    height: 40px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%238b0000" d="M18.5,12L12,18.5L5.5,12L12,5.5L18.5,12M12,0L0,12L12,24L24,12L12,0Z" /></svg>');
    background-size: contain;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
    mix-blend-mode: difference;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        padding: 2.5rem;
    }

    .hero h1 {
        font-size: 5rem;
    }

    .hero h1 span {
        font-size: 6rem;
    }

    .gallery {
        grid-template-rows: repeat(3, 200px);
    }
}

@media (max-width: 992px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(4, 180px);
    }

    .gallery-item:nth-child(1) {
        grid-column: span 3;
        grid-row: span 2;
    }

    .gallery-item:nth-child(5) {
        grid-column: span 1;
    }

    .timeline::before {
        left: 3rem;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        padding-left: 5rem;
        padding-right: 0;
        text-align: left;
    }

    .timeline-item:nth-child(odd) .timeline-content::before,
    .timeline-item:nth-child(even) .timeline-content::before {
        left: -15px;
        right: auto;
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }

    .logo {
        writing-mode: horizontal-tb;
        text-orientation: mixed;
        letter-spacing: normal;
        margin-right: 0;
        margin-bottom: 2rem;
        font-size: 3rem;
        padding: 0;
    }

    .logo::before {
        display: none;
    }

    nav ul {
        flex-direction: column;
        gap: 1.5rem;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .hero h1 span {
        font-size: 4.5rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .samurai-grid {
        grid-template-columns: 1fr;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(5, 150px);
    }

    .quote {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 1.5rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero h1 span {
        font-size: 3.5rem;
    }

    section h2 {
        font-size: 2.5rem;
    }

    .gallery {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 120px);
    }

    .quote {
        font-size: 1.6rem;
    }

    .quote::before,
    .quote::after {
        font-size: 3rem;
    }

    .quote::before {
        left: -1rem;
    }

    .quote::after {
        right: -1rem;
    }
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease, transform 1s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: opacity 1s ease, transform 1s ease;
}

.fade-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-right {
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 1s ease, transform 1s ease;
}

.fade-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 1s ease, transform 1s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Blood Splash Effect */
.blood-splash {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="%238b0000" fill-opacity="0.05" d="M30,50 Q50,30 70,50 T90,50 Q70,70 50,50 T10,50 Q30,30 50,50 Z" /></svg>');
    background-size: 200px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Kanji Stroke Animation */
.kanji-stroke {
    position: absolute;
    background: var(--blood-red);
    z-index: -1;
    opacity: 0.1;
}

/* Add this to maintain hover effects on the logo link */
.logo span a {
    color: var(--pale-gold) !important;
    text-decoration: none !important;
    transition: all 0.5s ease;
}

.logo:hover span a {
    color: white !important;
    text-shadow: 0 0 10px var(--blood-red);
}