/* InfoSec Judo - Cybersecurity Theme */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #0f0f18;
    --bg-card: #12121c;
    --text-primary: #e0e0e0;
    --text-secondary: #8888aa;
    --accent: #00ff88;
    --accent-dim: #00aa55;
    --accent-glow: rgba(0, 255, 136, 0.3);
    --danger: #ff4444;
    --warning: #ffaa00;
    --success: #00ff88;
    --belt-white: #f0f0f0;
    --belt-yellow: #ffd700;
    --belt-orange: #ff8c00;
    --belt-green: #228b22;
    --belt-brown: #8b4513;
    --belt-black: #1a1a1a;
    --font-display: 'Orbitron', monospace;
    --font-body: 'Rajdhani', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Matrix Rain Canvas */
#matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.15;
}

.scan-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 255, 136, 0.2);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-svg {
    width: 40px;
    height: 40px;
    color: var(--accent);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-text .accent { color: var(--accent); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--accent);
    transition: 0.3s;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav-links a:hover::after { width: 100%; }

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 2rem;
    position: relative;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.glitch {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    color: var(--text-primary);
    position: relative;
    text-transform: uppercase;
    animation: glitch 2s infinite;
}

@keyframes glitch {
    0%, 90%, 100% { text-shadow: none; }
    92% { text-shadow: -2px 0 var(--accent), 2px 0 var(--danger); }
    94% { text-shadow: 2px 0 var(--accent), -2px 0 var(--danger); }
    96% { text-shadow: -1px 0 var(--danger), 1px 0 var(--accent); }
}

.tagline {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin: 1rem 0 2rem;
}

.kanji {
    font-size: 2rem;
    color: var(--accent);
    margin-right: 0.5rem;
}

.terminal-box {
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.terminal-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca40; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: auto;
}

.terminal-body {
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 1rem;
}

.prompt { color: var(--accent); margin-right: 0.5rem; }

.cursor {
    animation: blink 1s infinite;
    color: var(--accent);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-family: var(--font-mono);
    font-size: 1rem;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
    border: 2px solid var(--accent);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-secondary:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

.hero-emblem {
    flex: 1;
    max-width: 400px;
    display: flex;
    justify-content: center;
}

.emblem-svg {
    width: 100%;
    max-width: 350px;
    animation: rotate 60s linear infinite;
}

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

.emblem-svg .ring {
    fill: none;
    stroke: var(--accent);
    stroke-width: 1;
    opacity: 0.3;
}

.emblem-svg .r1 { animation: pulse-ring 3s ease-in-out infinite; }
.emblem-svg .r2 { animation: pulse-ring 3s ease-in-out infinite 0.5s; }
.emblem-svg .r3 { animation: pulse-ring 3s ease-in-out infinite 1s; }

@keyframes pulse-ring {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}

.emblem-svg .tomoe-bg { fill: var(--bg-secondary); stroke: var(--accent); stroke-width: 2; }
.emblem-svg .tomoe-fill { fill: var(--accent); }
.emblem-svg .dot-light { fill: var(--bg-secondary); }
.emblem-svg .dot-dark { fill: var(--accent); }
.emblem-svg .lock rect { fill: var(--accent); }
.emblem-svg .corner { fill: none; stroke: var(--accent); stroke-width: 2; }

/* Sections */
.section {
    padding: 6rem 2rem;
}

.section-alt {
    background: var(--bg-secondary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-kanji {
    font-size: 3rem;
    color: var(--accent);
    opacity: 0.5;
    display: block;
    margin-bottom: 0.5rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-line {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 1rem auto;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Philosophy Cards */
.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s;
}

.card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.1);
}

.card-icon {
    margin-bottom: 1rem;
}

.kanji-icon {
    font-size: 3rem;
    color: var(--accent);
}

.card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card h3 span {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: normal;
}

.card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.card code {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    background: rgba(0, 255, 136, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.principles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.principle {
    text-align: center;
    padding: 2rem;
}

.principle-kanji {
    font-size: 2rem;
    color: var(--accent);
    display: block;
    margin-bottom: 0.5rem;
}

.principle h4 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.principle p {
    color: var(--text-secondary);
}

/* Arsenal Grid */
.arsenal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 255, 136, 0.15);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s;
    position: relative;
}

.tool-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.tool-card.featured {
    border-color: rgba(0, 255, 136, 0.4);
    background: linear-gradient(135deg, var(--bg-card), rgba(0, 255, 136, 0.05));
}

.tool-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 255, 136, 0.2);
    color: var(--accent);
    border-radius: 3px;
    margin-bottom: 0.75rem;
}

.tool-card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.tool-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.tool-card a {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
}

.tool-card a:hover { text-decoration: underline; }

.tool-tech {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    opacity: 0.7;
}

.arsenal-cta {
    text-align: center;
}

/* Techniques */
.techniques-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

.technique-group h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.technique-group h3 span {
    font-family: var(--font-body);
    font-weight: normal;
    color: var(--text-secondary);
}

.belt {
    width: 30px;
    height: 8px;
    border-radius: 2px;
}

.belt.white { background: var(--belt-white); }
.belt.yellow { background: var(--belt-yellow); }
.belt.orange { background: var(--belt-orange); }
.belt.green { background: var(--belt-green); }
.belt.brown { background: var(--belt-brown); }
.belt.black { background: var(--belt-black); border: 1px solid #333; }

.technique {
    background: var(--bg-card);
    border-left: 3px solid var(--accent);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.technique-jp {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.technique-jp span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

.technique h4 {
    font-family: var(--font-display);
    margin-bottom: 0.5rem;
}

.technique p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Sensei */
.sensei-content {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: center;
}

.sensei-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-card), var(--accent-dim));
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
}

.avatar-kanji {
    font-size: 5rem;
    color: var(--accent);
}

.sensei-info {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
}

.sensei-info h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.sensei-title {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.sensei-info blockquote {
    font-style: italic;
    color: var(--text-secondary);
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
    margin: 1rem 0;
}

.credentials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.credential {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 4px;
}

.credential span {
    display: block;
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.sensei-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
}

.sensei-links a {
    font-family: var(--font-mono);
    color: var(--accent);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent);
    border-radius: 4px;
    transition: all 0.3s;
}

.sensei-links a:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badges span {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 3px;
    color: var(--accent);
}

/* Writings */
.books-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.book-feature {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.book {
    perspective: 1000px;
}

.book-cover-img {
    width: 180px;
    height: 260px;
    object-fit: cover;
    border-radius: 0 8px 8px 0;
    box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.5);
    transform: rotateY(-10deg);
    transition: transform 0.3s;
}

.book:hover .book-cover-img {
    transform: rotateY(0);
}

.book-cover {
    width: 180px;
    height: 260px;
    background: linear-gradient(135deg, #1a472a, #0d2818);
    border-radius: 0 8px 8px 0;
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.5);
    border-left: 8px solid #0a1a10;
    transform: rotateY(-10deg);
    transition: transform 0.3s;
}

.book-cover-ai {
    background: linear-gradient(135deg, #1a1a4a, #0d0d28);
    border-left-color: #0a0a1a;
}

.book:hover .book-cover {
    transform: rotateY(0);
}

.book-cover .publisher {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.book-cover h3 {
    font-family: var(--font-body);
    font-size: 1rem;
    color: white;
    line-height: 1.3;
}

.book-cover .author {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.book-info {
    flex: 1;
    min-width: 200px;
}

.book-info h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.book-info p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.writings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.writings-col h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.writings-col ul {
    list-style: none;
}

.writings-col li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.writings-col .year {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    margin-right: 0.5rem;
}

.writings-col .venue {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent);
    text-decoration: none;
    font-family: var(--font-mono);
}

.read-more:hover { text-decoration: underline; }

/* Contact */
.contact-content {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-terminal {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

.contact-terminal .terminal-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
}

.contact-terminal .terminal-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.contact-terminal .output {
    color: var(--text-secondary);
    margin: 0.5rem 0;
}

.contact-terminal .ok { color: var(--success); }

.contact-methods {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.method {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.method .icon {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--accent);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: 4px;
}

.method h4 {
    font-family: var(--font-display);
    margin-bottom: 0.25rem;
}

.method p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid rgba(0, 255, 136, 0.2);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-kanji {
    color: var(--accent);
    margin-right: 0.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.footer-links a:hover { color: var(--accent); }

.motto {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.openbsd {
    color: var(--warning);
    font-family: var(--font-mono);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        display: none;
        border-bottom: 1px solid rgba(0, 255, 136, 0.2);
    }

    .nav-links.active { display: flex; }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 8rem;
    }

    .hero-emblem { order: -1; max-width: 250px; }

    .cta-group { justify-content: center; }

    .principles { grid-template-columns: 1fr; }

    .techniques-grid { grid-template-columns: 1fr; }

    .sensei-content { flex-direction: column; align-items: center; text-align: center; }

    .sensei-info blockquote { text-align: left; }

    .credentials { text-align: left; }

    .books-showcase { grid-template-columns: 1fr; }

    .book-feature { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .glitch { font-size: 2rem; }

    .section { padding: 4rem 1rem; }

    .section-header h2 { font-size: 1.8rem; }

    .arsenal-grid { grid-template-columns: 1fr; }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section {
    animation: fadeIn 0.6s ease-out;
}
