/* ===================================
   Nay Myo Mhan — ZORO THREE SWORD STYLE THEME
   Dark/Light Theme with Toggle
   =================================== */

/* ===== DARK THEME (Default) ===== */
:root {
    --bg-ocean: #0a0f0d;
    --bg-deep: #0c1712;
    --bg-card: rgba(12, 23, 18, 0.85);
    --bg-card-hover: rgba(18, 34, 26, 0.95);

    --text-primary: #dbe4de;
    --text-secondary: #b8a88a;
    --text-muted: #7a6b55;

    --gold: #40916c;
    --gold-light: #95d5b2;
    --gold-dark: #2d6a4f;
    --crimson: #dc3545;
    --crimson-light: #ff4757;
    --crimson-dark: #a71d2a;

    --ocean-blue: #2d6a4f;
    --ocean-light: #52b788;
    --ocean-deep: #081c15;
    --sky-blue: #74c69d;

    --treasure-brown: #495057;
    --parchment: #e6efe9;
    --parchment-dark: #c7d3cb;
    --wood-brown: #1b1b1b;
    --wood-light: #343a40;

    --luffy-red: #d32f2f;
    --gear5-white: #f5f5f5;
    --gear5-glow: rgba(255, 255, 255, 0.6);

    --accent-gradient: linear-gradient(135deg, var(--crimson), var(--gold));
    --ocean-gradient: linear-gradient(135deg, var(--ocean-deep), var(--ocean-light));
    --treasure-gradient: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light));
    --fire-gradient: linear-gradient(135deg, var(--crimson-dark), var(--crimson), #d00000);
    --night-ocean: linear-gradient(180deg, #0a0f0d 0%, #0c1712 40%, #0d1f17 100%);
    --straw-hat-gradient: linear-gradient(135deg, var(--gold), var(--crimson), var(--gold));

    --border-color: rgba(82, 183, 136, 0.15);
    --border-hover: rgba(82, 183, 136, 0.4);
    --glow-gold: rgba(82, 183, 136, 0.2);
    --glow-red: rgba(220, 53, 69, 0.15);

    --code-bg: #0d1117;
    --card-gradient-from: rgba(12, 23, 18, 0.9);
    --card-gradient-to: rgba(18, 34, 26, 0.85);
    --card-hover-from: rgba(18, 34, 26, 0.95);
    --card-hover-to: rgba(26, 42, 32, 0.9);
    --nav-bg: rgba(10, 15, 13, 0.95);
    --section-bg-a: rgba(12, 23, 18,0.5);
    --section-bg-b: rgba(13, 31, 23,0.3);
    --section-bg-c: rgba(10, 15, 13,0.5);
    --footer-bg: rgba(10, 15, 13,0.8);
    --wave1-from: rgba(45, 106, 79, 0.3);
    --wave1-to: rgba(27, 67, 50, 0.15);
    --wave2-from: rgba(82, 183, 136, 0.18);
    --wave2-to: rgba(45, 106, 79, 0.1);
    --wave3-from: rgba(82, 183, 136, 0.08);
    --wave3-to: rgba(116, 198, 157, 0.1);
    --watermark-opacity: 0.015;

    --font-pirate: 'Pirata One', cursive;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-display: 'Space Grotesk', sans-serif;

    --section-padding: 100px;
    --container-width: 1200px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    color-scheme: dark;
}

/* ===== LIGHT THEME — Aged One Piece map / parchment (warm, vintage) ===== */
[data-theme="light"] {
    --bg-ocean: #e7d9b6;
    --bg-deep: #d8c49a;
    --bg-card: rgba(244, 234, 206, 0.94);
    --bg-card-hover: rgba(250, 242, 220, 0.98);

    --text-primary: #2b2012;
    --text-secondary: #50402a;
    --text-muted: #7d6b4c;

    --gold: #1b6e4b;
    --gold-light: #2f9c67;
    --gold-dark: #14532d;
    --crimson: #9e2b25;
    --crimson-light: #c0392b;
    --crimson-dark: #7a1f1a;

    --ocean-blue: #2d6a4f;
    --ocean-light: #40916c;
    --ocean-deep: #14532d;
    --sky-blue: #52b788;

    --border-color: rgba(92, 70, 36, 0.30);
    --border-hover: rgba(92, 70, 36, 0.55);
    --glow-gold: rgba(27, 110, 75, 0.18);
    --glow-red: rgba(158, 43, 37, 0.12);

    --code-bg: #2b2316;
    --card-gradient-from: rgba(245, 236, 209, 0.95);
    --card-gradient-to: rgba(231, 217, 184, 0.92);
    --card-hover-from: rgba(250, 243, 222, 0.98);
    --card-hover-to: rgba(238, 226, 196, 0.95);
    --nav-bg: rgba(231, 217, 182, 0.96);
    --section-bg-a: rgba(219, 199, 156, 0.42);
    --section-bg-b: rgba(204, 181, 134, 0.32);
    --section-bg-c: rgba(231, 217, 182, 0.36);
    --footer-bg: rgba(222, 206, 170, 0.93);
    --night-ocean: linear-gradient(180deg, #efe2c2 0%, #e6d4ac 45%, #d9c599 100%);
    --wave1-from: rgba(45, 106, 79, 0.16);
    --wave1-to: rgba(20, 83, 45, 0.08);
    --wave2-from: rgba(64, 145, 108, 0.11);
    --wave2-to: rgba(45, 106, 79, 0.06);
    --wave3-from: rgba(158, 43, 37, 0.08);
    --wave3-to: rgba(120, 90, 40, 0.08);
    --watermark-opacity: 0.05;

    --accent-gradient: linear-gradient(135deg, var(--crimson), var(--gold));
    --treasure-gradient: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light));
    --fire-gradient: linear-gradient(135deg, var(--crimson-dark), var(--crimson), #c0392b);
    --ocean-gradient: linear-gradient(135deg, var(--ocean-deep), var(--ocean-light));

    color-scheme: light;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-primary);
    background: var(--night-ocean);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}

::selection { background: var(--crimson); color: #fff; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 24px; }

/* ---------- Pirate Text ---------- */
.pirate-text {
    font-family: var(--font-pirate);
    background: var(--treasure-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 12px rgba(82, 183, 136, 0.5));
}

/* ---------- Theme Toggle ---------- */
.theme-toggle {
    position: fixed; bottom: 28px; right: 28px; z-index: 1002;
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--accent-gradient);
    border: 2px solid var(--border-hover);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: #fff;
    box-shadow: 0 4px 20px rgba(220,53,69,0.3), 0 0 20px rgba(82, 183, 136,0.15);
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
}
.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 35px rgba(220,53,69,0.5), 0 0 40px rgba(82, 183, 136,0.25);
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { position: absolute; transition: all 0.3s ease; }
.theme-toggle .icon-sun { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.theme-toggle .icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }

[data-theme="light"] .theme-toggle .icon-sun { opacity: 1; transform: rotate(0deg) scale(1); }
[data-theme="light"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(90deg) scale(0.5); }

[data-theme="light"] .theme-toggle {
    background: linear-gradient(135deg, #40916c, #52b788);
    border-color: rgba(64, 145, 108, 0.4);
    box-shadow: 0 4px 20px rgba(64, 145, 108,0.3);
}

/* ---------- Ocean BG + Waves ---------- */
.ocean-bg {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 280px;
    z-index: 0; pointer-events: none; overflow: hidden;
}

.wave {
    position: absolute; bottom: 0; left: -50%; width: 200%; height: 120px;
    border-radius: 40% 45% 0 0;
}

.wave-1 {
    background: linear-gradient(180deg, var(--wave1-from), var(--wave1-to));
    animation: waveMove 8s ease-in-out infinite; bottom: 0;
}
.wave-2 {
    background: linear-gradient(180deg, var(--wave2-from), var(--wave2-to));
    animation: waveMove 10s ease-in-out infinite reverse; bottom: 15px;
}
.wave-3 {
    background: linear-gradient(180deg, var(--wave3-from), var(--wave3-to));
    animation: waveMove 12s ease-in-out infinite; bottom: 30px;
}

@keyframes waveMove {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(2%) translateY(-12px); }
}

/* ---------- Particles ---------- */
.particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.particle {
    position: absolute; border-radius: 50%; opacity: 0;
    animation: particleFloat 10s infinite ease-in-out;
}

@keyframes particleFloat {
    0%, 100% { opacity: 0; transform: translateY(100vh) scale(0); }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    50% { transform: translateY(-10vh) scale(1); }
}

/* Jolly Roger Watermark */
body::before {
    content: '⚔️'; position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%); font-size: 40vw; opacity: var(--watermark-opacity);
    z-index: 0; pointer-events: none;
}

/* ---------- Treasure Cards ---------- */
.treasure-card {
    background: linear-gradient(135deg, var(--card-gradient-from), var(--card-gradient-to));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all var(--transition-base);
    position: relative; overflow: hidden;
}

.treasure-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--treasure-gradient); opacity: 0;
    transition: opacity var(--transition-base);
}

.treasure-card:hover {
    background: linear-gradient(135deg, var(--card-hover-from), var(--card-hover-to));
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px var(--glow-gold),
        inset 0 1px 0 rgba(82, 183, 136, 0.1);
}
.treasure-card:hover::before { opacity: 1; }

/* Light theme card shadows */
[data-theme="light"] .treasure-card:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 0 40px rgba(64, 145, 108,0.1),
        inset 0 1px 0 rgba(64, 145, 108,0.15);
}

/* ---------- Navbar ---------- */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 16px 0; transition: all var(--transition-base);
}

.navbar.scrolled {
    padding: 10px 0;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4), 0 0 20px var(--glow-gold);
}

[data-theme="light"] .navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06), 0 2px 10px rgba(64, 145, 108,0.08);
}

.nav-container {
    max-width: var(--container-width); margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
    display: flex; align-items: center; gap: 8px;
    font-family: var(--font-pirate); font-size: clamp(1rem, 2.5vw, 1.5rem);
    transition: transform var(--transition-fast);
    white-space: nowrap;
}
.nav-logo:hover { transform: scale(1.05); filter: drop-shadow(0 0 8px rgba(82, 183, 136, 0.4)); }

.jolly-roger { font-size: 1.5rem; animation: jollyBob 3s ease-in-out infinite; }
@keyframes jollyBob { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

.logo-text {
    background: var(--treasure-gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links { display: flex; align-items: center; gap: 4px; }

.nav-link {
    font-size: 0.9rem; font-weight: 500; color: var(--text-secondary);
    padding: 8px 16px; border-radius: var(--radius-sm);
    transition: all var(--transition-fast); position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--gold); }
.nav-link.active { background: rgba(82, 183, 136, 0.1); }

.nav-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px; z-index: 1001;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--gold); border-radius: 2px; transition: all var(--transition-base); }
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---------- Hero ---------- */
.hero {
    min-height: 100vh; display: flex; align-items: center;
    position: relative; padding: 100px 24px 60px; overflow: hidden; z-index: 1;
}

.hero::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 30% 50%, rgba(82, 183, 136, 0.06), transparent 60%),
        radial-gradient(ellipse 60% 50% at 70% 30%, rgba(220, 53, 69, 0.05), transparent 60%),
        radial-gradient(ellipse 40% 40% at 50% 80%, rgba(45, 106, 79, 0.08), transparent 60%);
    pointer-events: none;
}

.hero::after {
    content: ''; position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2340916c' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none; opacity: 0.5;
}

.hero-content {
    max-width: var(--container-width); margin: 0 auto;
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
    align-items: center; position: relative; z-index: 1;
}

.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 20px;
    background: rgba(82, 183, 136, 0.1);
    border: 1px solid rgba(82, 183, 136, 0.25);
    border-radius: 50px; font-size: 0.85rem; font-weight: 500;
    color: var(--gold); margin-bottom: 24px;
}

.badge-dot { width: 8px; height: 8px; background: #00d26a; border-radius: 50%; animation: pulseDot 2s ease-in-out infinite; }
@keyframes pulseDot { 0%, 100% { box-shadow: 0 0 0 0 rgba(0,210,106,0.4); } 50% { box-shadow: 0 0 0 6px rgba(0,210,106,0); } }

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800; line-height: 1.15; margin-bottom: 20px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

/* Bounty Poster — uses image now, old text styles removed */

.hero-typewriter {
    font-family: var(--font-mono);
    font-size: clamp(0.85rem, 1.8vw, 1.1rem);
    color: var(--gold-light); margin-bottom: 16px; min-height: 1.8rem;
}
.typewriter-prefix { color: var(--text-muted); }
.typewriter-cursor { animation: blink 1s step-end infinite; color: var(--crimson); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-description {
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    color: var(--text-secondary); max-width: 560px;
    margin-bottom: 32px; line-height: 1.8;
}

.hero-cta { display: flex; gap: 16px; margin-bottom: 48px; flex-wrap: wrap; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 28px; border-radius: 50px;
    font-family: var(--font-primary); font-size: 0.95rem; font-weight: 600;
    cursor: pointer; transition: all var(--transition-base); border: none;
    position: relative; overflow: hidden;
}

.btn-primary {
    background: var(--accent-gradient); color: #fff;
    box-shadow: 0 4px 20px rgba(220,53,69,0.3), 0 0 20px rgba(82, 183, 136,0.15);
}
.btn-primary:hover {
    box-shadow: 0 6px 35px rgba(220,53,69,0.5), 0 0 40px rgba(82, 183, 136,0.25);
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent; color: var(--gold);
    border: 1px solid var(--border-hover);
}
.btn-secondary:hover {
    background: rgba(82, 183, 136,0.1);
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(82, 183, 136,0.15);
}

/* Hero Stats */
.hero-stats { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.stat { text-align: center; }

.stat-number {
    font-family: var(--font-pirate); font-size: 2.4rem;
    background: var(--treasure-gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; filter: drop-shadow(0 0 6px rgba(82, 183, 136,0.3));
}
.stat-plus { font-size: 1.4rem; color: var(--crimson); }
.stat-label { display: block; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }
.stat-divider { color: var(--gold-dark); font-size: 1rem; opacity: 0.5; }

/* Hero Image */
.hero-image-side { display: flex; justify-content: center; }
.hero-image-frame { position: relative; max-width: 500px; width: 100%; }

.hero-image {
    width: 100%; height: auto; border-radius: var(--radius-lg);
    position: relative; z-index: 1;
    animation: heroFloat 6s ease-in-out infinite;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
}

@keyframes heroFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

.hero-image-glow {
    position: absolute; inset: -30px;
    background: radial-gradient(circle, rgba(82, 183, 136,0.15), rgba(220,53,69,0.1) 50%, transparent 70%);
    border-radius: 50%; z-index: 0;
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse { 0%, 100% { opacity: 0.5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }

/* Scroll Indicator */
.hero-scroll-indicator {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    color: var(--text-muted); font-size: 0.75rem; letter-spacing: 0.1em;
    text-transform: uppercase; animation: scrollBounce 2s ease-in-out infinite; z-index: 2;
}
.scroll-compass { font-size: 1.5rem; animation: compassSwing 3s ease-in-out infinite; }
@keyframes compassSwing { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes scrollBounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

/* ---------- Sections ---------- */
.section { padding: var(--section-padding) 0; position: relative; z-index: 1; }
.section-header { text-align: center; margin-bottom: 56px; }

.section-tag { font-family: var(--font-pirate); font-size: 1rem; color: var(--gold-dark); display: block; margin-bottom: 10px; letter-spacing: 0.05em; }
.section-title { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: 10px; text-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.section-subtitle { font-size: 1rem; color: var(--text-secondary); }

/* About */
.about { background: linear-gradient(180deg, var(--section-bg-a), var(--section-bg-b), var(--section-bg-c)); position: relative; }
.about::before { content: ''; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2340916c' fill-opacity='0.015'%3E%3Cpath d='M20 0L0 20h8l12-12 12 12h8z'/%3E%3C/g%3E%3C/svg%3E"); pointer-events: none; }

.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.about-card { padding: 36px 28px; text-align: center; }
.about-icon { font-size: 2.5rem; margin-bottom: 16px; }
.about-card h3 { font-family: var(--font-pirate); font-size: 1.5rem; color: var(--gold); margin-bottom: 12px; text-shadow: 0 0 15px rgba(82, 183, 136,0.2); }
.about-card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; }

/* Skills */
.skills { background: linear-gradient(180deg, var(--section-bg-c), var(--section-bg-a), var(--section-bg-c)); }
.skills-categories { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.skill-category { padding: 28px; }

.category-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; color: var(--gold); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.skill-tag {
    padding: 6px 16px; background: rgba(82, 183, 136,0.06);
    border: 1px solid rgba(82, 183, 136,0.12); border-radius: 50px;
    font-size: 0.85rem; font-weight: 500; color: var(--text-secondary);
    transition: all var(--transition-fast);
}
.skill-tag:hover { background: rgba(82, 183, 136,0.15); color: var(--gold); border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(82, 183, 136,0.15); }

/* Blog */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.blog-card { overflow: hidden; display: flex; flex-direction: column; cursor: pointer; }
.blog-card.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.2fr; }

.blog-card-badge { position: absolute; top: 16px; left: 16px; padding: 4px 14px; background: var(--accent-gradient); color: #fff; font-size: 0.75rem; font-weight: 700; border-radius: 50px; z-index: 2; box-shadow: 0 2px 10px rgba(220,53,69,0.3); }

.blog-card-image { position: relative; overflow: hidden; min-height: 200px; }
.blog-card.featured .blog-card-image { min-height: 300px; border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; min-height: inherit; transition: transform var(--transition-slow); }
.blog-card:hover .blog-card-image img { transform: scale(1.05); }

.blog-card-image-placeholder { width: 100%; height: 100%; min-height: inherit; background: var(--ocean-gradient); display: flex; align-items: center; justify-content: center; font-size: 3.5rem; }

.blog-card-content { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.blog-card.featured .blog-card-content { justify-content: center; padding: 36px; }
.blog-card-meta { display: flex; align-items: center; gap: 14px; font-size: 0.8rem; color: var(--text-muted); flex-wrap: wrap; }

.blog-card-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; line-height: 1.4; transition: color var(--transition-fast); }
.blog-card.featured .blog-card-title { font-size: 1.4rem; }
.blog-card:hover .blog-card-title { color: var(--gold); text-shadow: 0 0 20px rgba(82, 183, 136,0.2); }

.blog-card-excerpt { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag { padding: 3px 10px; font-size: 0.72rem; font-weight: 600; background: rgba(82, 183, 136,0.1); color: var(--gold); border-radius: 50px; border: 1px solid rgba(82, 183, 136,0.2); }

.blog-card-read-more { color: var(--gold); font-weight: 600; font-size: 0.88rem; margin-top: auto; transition: all var(--transition-fast); }
.blog-card:hover .blog-card-read-more { letter-spacing: 0.05em; text-shadow: 0 0 10px rgba(82, 183, 136,0.3); }

.blog-card.coming-soon { opacity: 0.4; cursor: default; }
.blog-card.coming-soon:hover { transform: none; opacity: 0.5; }

/* Contact */
.contact { background: linear-gradient(180deg, var(--section-bg-a), var(--section-bg-b), var(--section-bg-c)); }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 800px; margin: 0 auto; }
.contact-card { padding: 36px 24px; text-align: center; }

.contact-icon { width: 52px; height: 52px; background: rgba(82, 183, 136,0.1); border-radius: 14px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; color: var(--gold); font-size: 1.3rem; }
.contact-card h3 { font-family: var(--font-pirate); font-size: 1.3rem; color: var(--gold); margin-bottom: 8px; }
.contact-link { color: var(--text-secondary); font-size: 0.88rem; transition: color var(--transition-fast); }
a.contact-link:hover { color: var(--gold); }

/* Footer */
.footer { padding: 36px 0; border-top: 1px solid var(--border-color); z-index: 1; position: relative; background: var(--footer-bg); }
.footer-content { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-logo { font-family: var(--font-pirate); font-size: clamp(1rem, 2.5vw, 1.2rem); display: flex; align-items: center; gap: 8px; }
.footer-text { color: var(--text-muted); font-size: 0.85rem; }
.footer-links a { color: var(--text-secondary); font-size: 0.85rem; transition: color var(--transition-fast); }
.footer-links a:hover { color: var(--gold); }

/* ---------- Floating Pirate Ship & Jolly Flags ---------- */
.floating-ship {
    position: fixed;
    bottom: 20px;
    right: 10px;
    z-index: 0;
    pointer-events: none;
    animation: shipSail 6s ease-in-out infinite;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.5));
    opacity: 0.6;
}

.ship-img {
    width: clamp(80px, 14vw, 180px);
    height: auto;
}

@keyframes shipSail {
    0% { transform: translateY(0) rotate(-1.5deg); }
    20% { transform: translateY(-10px) rotate(0.5deg); }
    40% { transform: translateY(-4px) rotate(1.5deg); }
    60% { transform: translateY(-14px) rotate(-0.5deg); }
    80% { transform: translateY(-6px) rotate(1deg); }
    100% { transform: translateY(0) rotate(-1.5deg); }
}

.jolly-flag {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.jolly-flag-left {
    bottom: 140px;
    left: 12px;
    animation: flagFloatL 7s ease-in-out infinite;
}

.jolly-flag-right {
    bottom: 180px;
    right: 12px;
    animation: flagFloatR 8s ease-in-out infinite;
}

.flag-img {
    width: clamp(40px, 6vw, 70px);
    height: auto;
    animation: flagWave 4s ease-in-out infinite;
    opacity: 0.5;
    border-radius: 10px;
}

@keyframes flagFloatL {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    33% { transform: translateY(-14px) rotate(2deg); }
    66% { transform: translateY(-6px) rotate(-2deg); }
}

@keyframes flagFloatR {
    0%, 100% { transform: translateY(0) rotate(3deg); }
    33% { transform: translateY(-10px) rotate(-2deg); }
    66% { transform: translateY(-16px) rotate(1deg); }
}

/* ---------- Bounty Poster Image ---------- */
.bounty-poster-frame {
    display: inline-block;
    max-width: 240px;
    margin-bottom: 20px;
    animation: posterFloat 4s ease-in-out infinite;
    filter: drop-shadow(4px 4px 20px rgba(0,0,0,0.5)) drop-shadow(0 0 30px rgba(82, 183, 136,0.15));
    transform: rotate(-2deg);
    transition: transform var(--transition-base), filter var(--transition-base);
    cursor: default;
}

.bounty-poster-frame:hover {
    transform: rotate(0deg) scale(1.05);
    filter: drop-shadow(4px 4px 30px rgba(0,0,0,0.6)) drop-shadow(0 0 50px rgba(82, 183, 136,0.3));
}

.bounty-poster-img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

@keyframes posterFloat {
    0%, 100% { transform: rotate(-2deg) translateY(0); }
    50% { transform: rotate(0.5deg) translateY(-6px); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    :root { --section-padding: 80px; }
    .hero-content { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .hero-text-side { order: 1; }
    .hero-image-side { order: 0; }
    .hero-image-frame { max-width: 350px; }
    .hero-cta { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-description { margin-left: auto; margin-right: auto; }
}

@media (max-width: 768px) {
    :root { --section-padding: 60px; }
    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
        background: var(--bg-ocean); border-left: 1px solid var(--border-color);
        flex-direction: column; padding: 100px 32px 32px; gap: 4px;
        transition: right var(--transition-base); z-index: 999;
    }
    .nav-links.active { right: 0; }
    .nav-link { width: 100%; padding: 14px 16px; font-size: 1rem; }
    .about-grid { grid-template-columns: 1fr; }
    .floating-ship { bottom: 12px; right: 6px; opacity: 0.6; }
    .ship-img { width: 132px; }
    .jolly-flag { opacity: 0.2; }
    .jolly-flag-left { bottom: 80px; left: 6px; }
    .jolly-flag-right { bottom: 100px; right: 6px; }
    .flag-img { width: 30px; }
    .bounty-poster-frame { max-width: 180px; }
    .blog-card.featured { grid-template-columns: 1fr; }
    .blog-card.featured .blog-card-image { border-radius: var(--radius-lg) var(--radius-lg) 0 0; min-height: 200px; }
    .blog-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .hero-stats { gap: 20px; }
    .stat-divider { display: none; }
    .footer-content { flex-direction: column; text-align: center; }
    .hero-scroll-indicator { display: none; }
    .theme-toggle { bottom: 20px; right: 20px; width: 46px; height: 46px; font-size: 1.2rem; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.8rem; }
    .hero-cta { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
    .skills-categories { grid-template-columns: 1fr; }
    .bounty-poster-frame { max-width: 150px; }
    .floating-ship { bottom: 8px; right: 4px; opacity: 0.55; }
    .ship-img { width: 108px; }
    .jolly-flag-left { bottom: 60px; left: 4px; }
    .jolly-flag-right { bottom: 75px; right: 4px; }
    .flag-img { width: 22px; }
}

/* ===================================================================
   ⚓ IMMERSIVE UPGRADE — Preloader, Hero Video, Cinematic FX, Logo
   =================================================================== */

/* ---------- Preloader: "Hoist the Colors" ---------- */
.preloader {
    position: fixed; inset: 0; z-index: 10001;
    display: flex; align-items: center; justify-content: center;
    background:
        radial-gradient(ellipse 70% 60% at 50% 40%, rgba(45, 106, 79,0.15), transparent 70%),
        var(--night-ocean);
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
.preloader.done { animation: none; opacity: 0; visibility: hidden; pointer-events: none; }
/* No-JS / failsafe: fade the gate even if scripts never fire */
.preloader { animation: preloaderFailsafe 0.7s ease 6s forwards; }
@keyframes preloaderFailsafe { to { opacity: 0; visibility: hidden; } }
body.loaded { overflow: visible; }
.preloader-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 24px; }
.preloader-logo-wrap { position: relative; width: 140px; height: 140px; display: flex; align-items: center; justify-content: center; }
.preloader-logo {
    width: 110px; height: auto; z-index: 2;
    filter: drop-shadow(0 0 18px rgba(255,71,87,0.35)) drop-shadow(0 0 30px rgba(82, 183, 136,0.15));
    animation: jollyBob 3s ease-in-out infinite, logoEyes 2.2s ease-in-out infinite;
}
.preloader-ring {
    position: absolute; inset: 0; border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--crimson-light);
    border-right-color: var(--gold);
    animation: spin 1.1s linear infinite;
}
.preloader-title {
    font-family: 'Cinzel', var(--font-pirate); font-weight: 900;
    letter-spacing: 0.32em; font-size: clamp(0.85rem, 2.4vw, 1.15rem);
    background: var(--treasure-gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    padding-left: 0.32em;
}
.preloader-bar { width: min(240px, 70vw); height: 4px; border-radius: 4px; background: rgba(82, 183, 136,0.12); overflow: hidden; }
.preloader-bar span { display: block; height: 100%; width: 0%; border-radius: 4px; background: var(--accent-gradient); box-shadow: 0 0 12px rgba(82, 183, 136,0.5); transition: width 0.25s ease; }
.preloader-text { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); letter-spacing: 0.05em; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes logoEyes {
    0%, 100% { filter: drop-shadow(0 0 14px rgba(255,71,87,0.30)) drop-shadow(0 0 26px rgba(82, 183, 136,0.12)); }
    50% { filter: drop-shadow(0 0 22px rgba(255,71,87,0.6)) drop-shadow(0 0 40px rgba(82, 183, 136,0.22)); }
}

/* ---------- Cinematic Overlays (film grain + vignette) ---------- */
.grain-overlay {
    position: fixed; inset: 0; z-index: 9998; pointer-events: none; opacity: 0.05;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grainShift 0.6s steps(2) infinite;
}
@keyframes grainShift {
    0% { transform: translate(0,0); } 50% { transform: translate(-4%, 3%); } 100% { transform: translate(3%, -2%); }
}
.vignette-overlay {
    position: fixed; inset: 0; z-index: 9997; pointer-events: none;
    background: radial-gradient(ellipse 100% 100% at 50% 45%, transparent 55%, rgba(0,0,0,0.35) 100%);
}
[data-theme="light"] .vignette-overlay { background: radial-gradient(ellipse 100% 100% at 50% 45%, transparent 60%, rgba(60,40,10,0.10) 100%); }
[data-theme="light"] .grain-overlay { opacity: 0.03; }

/* ---------- New Jolly Roger Logo (nav / footer / flags) ---------- */
.nav-logo-img {
    width: 38px; height: 38px; object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(255,71,87,0.35));
    animation: jollyBob 3s ease-in-out infinite, logoEyes 2.6s ease-in-out infinite;
    transition: transform var(--transition-fast);
}
.nav-logo:hover .nav-logo-img { transform: scale(1.12) rotate(4deg); }
.footer-logo-img { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 0 5px rgba(255,71,87,0.3)); }
[data-theme="light"] .nav-logo-img,
[data-theme="light"] .footer-logo-img,
[data-theme="light"] .flag-img,
[data-theme="light"] .preloader-logo { filter: drop-shadow(0 0 6px rgba(220,53,69,0.35)) drop-shadow(0 1px 3px rgba(0,0,0,0.4)); }

/* ---------- Hero alias subtitle ---------- */
.hero-alias {
    display: block; font-family: var(--font-mono); font-weight: 500;
    font-size: clamp(0.7rem, 1.4vw, 0.95rem); letter-spacing: 0.08em;
    color: var(--text-muted); margin-top: 8px; opacity: 0.85;
}

/* ---------- Hero Cinematic Video Backdrop ---------- */
.hero-video-wrap { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-video {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    min-width: 100%; min-height: 100%; width: auto; height: auto; object-fit: cover;
    opacity: 0.22; filter: saturate(1.1) contrast(1.05);
}
.hero-video-overlay {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, var(--bg-ocean) 0%, transparent 25%, transparent 60%, var(--bg-ocean) 100%),
        radial-gradient(ellipse 60% 70% at 30% 50%, transparent 30%, rgba(10, 15, 13,0.55) 100%);
}
[data-theme="light"] .hero-video { opacity: 0.14; }
.hero-content { z-index: 3; }

/* ---------- Bounty Poster shine sweep ---------- */
.bounty-poster-frame { position: relative; }
.bounty-shine {
    position: absolute; inset: 0; border-radius: 6px; overflow: hidden; pointer-events: none;
}
.bounty-shine::after {
    content: ''; position: absolute; top: -60%; left: -120%; width: 60%; height: 220%;
    background: linear-gradient(115deg, transparent, rgba(255,255,255,0.45), transparent);
    transform: rotate(18deg); animation: bountySheen 5.5s ease-in-out infinite;
}
@keyframes bountySheen { 0%, 65% { left: -120%; } 85%, 100% { left: 160%; } }

/* ---------- Reduced motion: respect user preference ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    .grain-overlay, .hero-video { display: none; }
}

/* ---------- Responsive tweaks for new elements ---------- */
@media (max-width: 768px) {
    .nav-logo-img { width: 32px; height: 32px; }
    .hero-video { display: none; }
    .hero-video-overlay { background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(45, 106, 79,0.12), transparent 70%); }
    .preloader-logo { width: 88px; }
    .preloader-logo-wrap { width: 116px; height: 116px; }
}

/* ===================================================================
   ⚓  CV INTEGRATION — Bio intro, Voyage Log timeline, Side Quests
   =================================================================== */
.about-intro {
    max-width: 820px; margin: 0 auto 42px; text-align: center;
    color: var(--text-secondary); font-size: clamp(0.98rem, 1.4vw, 1.14rem); line-height: 1.95;
}
.about-intro strong { color: var(--gold); font-weight: 700; }
.inline-link { color: var(--gold); border-bottom: 1px dashed var(--border-hover); transition: all var(--transition-fast); }
.inline-link:hover { color: var(--gold-light); border-bottom-color: var(--gold); text-shadow: 0 0 12px var(--glow-gold); }
.hero-description .inline-link { font-weight: 600; }

/* Experience section background (alternating) */
.experience { background: linear-gradient(180deg, var(--section-bg-c), var(--section-bg-a), var(--section-bg-c)); }

/* Voyage Log timeline */
.timeline { position: relative; max-width: 820px; margin: 0 auto; padding-left: 40px; }
.timeline::before {
    content: ''; position: absolute; left: 12px; top: 8px; bottom: 8px; width: 2px;
    background: linear-gradient(180deg, var(--gold), var(--crimson) 60%, transparent);
    opacity: 0.5;
}
.timeline-item { padding: 22px 26px; margin-bottom: 22px; position: relative; }
.timeline-dot {
    position: absolute; left: -40px; top: 22px; width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
    background: var(--bg-deep); border: 2px solid var(--border-hover); border-radius: 50%;
    box-shadow: 0 0 16px var(--glow-gold); z-index: 1;
}
.timeline-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.timeline-role { font-family: var(--font-display); font-size: 1.08rem; font-weight: 700; color: var(--text-primary); }
.timeline-date { font-family: var(--font-mono); font-size: 0.76rem; color: var(--gold); white-space: nowrap; }
.timeline-item p { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.78; margin-bottom: 12px; }
.timeline-item em { color: var(--gold-light); font-style: italic; }
.timeline-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* Side Quests */
.sidequest-header { text-align: center; margin: 50px 0 24px; }
.sidequests { margin-top: 0; }

@media (max-width: 600px) {
    .timeline { padding-left: 30px; }
    .timeline-dot { left: -30px; width: 22px; height: 22px; font-size: 0.7rem; top: 20px; }
    .timeline-item { padding: 18px 18px; }
    .sidequests { grid-template-columns: 1fr; }
}

/* ===================================================================
   ⚔️  ZORO finishing — jade buttons + Three-Sword skill accents
   =================================================================== */
:root { --accent-gradient: linear-gradient(135deg, #1b4332, #40916c); }
[data-theme="light"] { --accent-gradient: linear-gradient(135deg, #14532d, #2d6a4f); }

.skill-category.sword-wado { box-shadow: inset 4px 0 0 #e9ecef; }
.skill-category.sword-kitetsu { box-shadow: inset 4px 0 0 #c1121f; }
.skill-category.sword-shusui { box-shadow: inset 4px 0 0 #6c757d; }
.skill-category.sword-enma { box-shadow: inset 4px 0 0 #2d6a4f; }
.skill-category.sword-haki { box-shadow: inset 4px 0 0 #adb5bd; }
