/* ==========================================================
   Hydra ヒドラ — dark purple / black / red
   Primary:   #7C3AED  (deep violet)
   Red mixin: #C41E3A  (crimson)
   Surface:   #080610  (near-black, purple cast)
   ========================================================== */

:root {
    --bs-font-sans-serif: 'Inter', system-ui, sans-serif;
    --bs-body-font-family: 'Inter', system-ui, sans-serif;
    --bs-font-monospace: 'DM Mono', SFMono-Regular, Menlo, Monaco, monospace;
    --bs-body-font-weight: 400;
    --bs-body-line-height: 1.6;

    --purple:     #7C3AED;
    --purple-lt:  #a78bfa;           /* lighter purple — readable on dark */
    --purple-dim: rgba(167, 139, 250, 0.7);  /* light purple, legible */
    --purple-xs:  rgba(124, 58, 237, 0.15);
    --red:        #E8000D;
    --red-dim:    rgba(232, 0, 13, 0.55);
    --red-xs:     rgba(232, 0, 13, 0.12);
    --bg:         #080610;
    --text:       #f0ecfa;           /* brighter white-purple */
    --text-muted: rgba(220, 210, 240, 0.7);  /* much more readable */
}

html, body {
    background-color: var(--bg);
    overscroll-behavior: none;
    min-height: 100vh;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text);
}

/* ============================================================
   HUD — main index layout
   ============================================================ */

.hud-frame {
    position: relative;
    min-height: calc(100vh - 57px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* scan line drifting top → bottom */
.hud-scanline {
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--red) 40%, rgba(232,0,13,0.8) 50%, var(--red) 60%, transparent 100%);
    animation: scanline 8s linear infinite;
    z-index: 10;
    pointer-events: none;
    opacity: 0.18;
}

@keyframes scanline {
    from { top: -2px; }
    to   { top: 100%; }
}


/* corner panels */
.hud-panel {
    position: absolute;
    font-family: 'DM Mono', monospace;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 2rem 1.8rem;
    animation: fadeIn 0.5s ease both;
}

.hud-tl { top: 0; left: 0;  animation-delay: 0.1s; }
.hud-tr { top: 0; right: 0; text-align: right; animation-delay: 0.15s; }
.hud-bl { bottom: 0; left: 0; animation-delay: 0.2s; }
.hud-br { bottom: 0; right: 0; text-align: right; animation-delay: 0.25s; }

.hud-label {
    color: var(--red);
    letter-spacing: 0.14em;
    font-size: 0.58rem;
}

.hud-label--sm {
    margin-top: 0.4rem;
    opacity: 0.7;
}


.hud-link {
    color: var(--text-muted) !important;
    text-decoration: none !important;
    letter-spacing: 0.08em;
    transition: color 0.2s;
}

.hud-link:hover {
    color: var(--red) !important;
}

.hud-stat {
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.hud-xmr {
    font-size: 0.48rem;
    color: rgba(220, 210, 240, 0.25);
    word-break: break-all;
    max-width: 180px;
    line-height: 1.5;
    margin-left: auto;
}

/* center block */
.hud-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    z-index: 2;
    animation: fadeUp 0.6s ease 0.1s both;
}


.hud-logo {
    width: 100px;
    height: 100px;
    display: block;
    border-radius: 4px;
    filter:
        drop-shadow(0 0 16px rgba(232, 0, 13,  0.35))
        drop-shadow(0 0 32px rgba(124, 58, 237, 0.25));
}

.hud-name {
    font-family: 'DM Mono', monospace;
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.45em;
    color: var(--text);
    text-align: center;
    margin-top: 0.4rem;
}

.hud-jp {
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--purple-lt);
    letter-spacing: 0.3em;
    opacity: 0.75;
    margin-top: 0.1rem;
}


/* mobile — collapse corners into center stack */
@media (max-width: 860px) {
    .hud-panel {
        position: static;
        text-align: left !important;
        padding: 0.6rem 0;
        border-top: 1px solid rgba(232, 0, 13, 0.12);
    }

    .hud-frame {
        flex-direction: column;
        align-items: center;
        padding: 2rem 1.5rem 4rem;
        gap: 0;
        min-height: auto;
    }

    .hud-scanline { display: none; }
.hud-xmr { margin-left: 0; max-width: 100%; }
    .hud-center { margin-bottom: 1rem; }
}

/* ============================================================
   Background wall
   ============================================================ */

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url('/assets/wall');
    background-size: cover;
    background-position: center;
    filter: blur(4px) brightness(0.35) saturate(0.6);
    transform: scale(1.08);
    z-index: -1;
}

/* ============================================================
   Navigation
   ============================================================ */

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 14px 32px;
    background: rgba(4, 2, 12, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(124, 58, 237, 0.18);
    position: sticky;
    top: 0;
    z-index: 100;
    animation: fadeIn 0.3s ease both;
}

.site-nav-brand {
    margin-right: auto;
}

.site-nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: block;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.site-nav-brand:hover .site-nav-avatar {
    opacity: 1;
}

.site-nav a {
    text-decoration: none;
    color: var(--purple-lt);
    font-weight: bold;
    opacity: 0.8;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.site-nav a:hover {
    opacity: 1;
    color: var(--red);
}

/* ============================================================
   Index page
   ============================================================ */

.index-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 2.5rem) 6rem;
}

.index-hero {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 3.5rem 0 3rem;
    border-bottom: 1px solid rgba(124, 58, 237, 0.12);
    animation: fadeUp 0.5s ease both;
}

/* ── floating avatar, no cage ── */
.index-avatar {
    width: 88px;
    height: 88px;
    flex-shrink: 0;
    display: block;
    border-radius: 6px;
    filter:
        drop-shadow(0 4px 18px rgba(124, 58, 237, 0.4))
        drop-shadow(0 2px 6px  rgba(196, 30, 58,  0.25));
    transition: filter 0.35s ease, transform 0.35s ease;
}

.index-avatar:hover {
    filter:
        drop-shadow(0 8px 28px rgba(124, 58, 237, 0.6))
        drop-shadow(0 4px 12px rgba(196, 30, 58,  0.4));
    transform: translateY(-3px);
}

.index-name {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: -0.025em;
    color: var(--text);
    margin: 0 0 0.3rem;
    text-shadow: none;
}

.index-jp {
    font-weight: 300;
    opacity: 0.5;
    font-size: 0.8em;
    letter-spacing: 0.06em;
    color: var(--purple-dim);
}

.index-tagline {
    font-family: 'DM Mono', monospace;
    font-size: 0.68rem;
    color: var(--purple-dim);
    letter-spacing: 0.12em;
    margin: 0;
}

.index-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.index-links a {
    font-family: 'DM Mono', monospace;
    font-size: 0.68rem;
    color: var(--text-muted) !important;
    letter-spacing: 0.06em;
    text-decoration: none !important;
    transition: color 0.2s;
    font-weight: 400 !important;
}

.index-links a:hover {
    color: var(--red) !important;
}

.index-about {
    padding: 2.8rem 0 0;
    max-width: 560px;
    animation: fadeUp 0.5s ease 0.06s both;
}

.about-line {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text);
    margin: 0 0 0.9rem;
    font-weight: 300;
    text-shadow: none;
}

.about-line--dim {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.index-section {
    padding: 2.8rem 0 0;
    animation: fadeUp 0.5s ease 0.08s both;
}

/* ============================================================
   Category / section headers
   ============================================================ */

.cat-header {
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--purple-dim);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
    text-shadow: none;
}

/* ============================================================
   Contact list
   ============================================================ */

.hydra-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hydra-list li a {
    font-family: 'DM Mono', monospace;
    font-size: 0.78rem;
    color: var(--text-muted) !important;
    text-decoration: none !important;
    letter-spacing: 0.04em;
    transition: color 0.2s;
}

.hydra-list li a:hover {
    color: var(--red) !important;
}

/* ============================================================
   Monero donation
   ============================================================ */

.monero-wrap {
    padding: 2.8rem 0 0;
    animation: fadeUp 0.5s ease 0.14s both;
}

.monero-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.58rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.monero-addr {
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-left: 2px solid var(--red-dim);
    border-radius: 3px;
    padding: 0.75rem 1rem;
    word-break: break-all;
    line-height: 1.7;
}

/* ============================================================
   Project / service cards
   ============================================================ */

.project-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 0.5rem;
}

.project-box {
    position: relative;
    overflow: hidden;
    min-height: 100px;
    padding: 1rem 1.1rem 0.9rem;
    background: rgba(4, 2, 14, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    border: 1px solid rgba(124, 58, 237, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    text-align: left;
    text-decoration: none;
    color: inherit;
}

/* shimmer: purple → red */
.project-box::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--purple), var(--red), transparent);
    transition: left 0.45s ease;
}

.project-box:hover::before {
    left: 100%;
}

.project-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7), 0 0 20px rgba(124, 58, 237, 0.12);
    border-color: rgba(124, 58, 237, 0.45);
    background: rgba(124, 58, 237, 0.06);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.project-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    text-shadow: none;
    transition: color 0.2s ease;
}

.project-box:hover .project-title {
    color: #fff;
}

.project-description {
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    font-weight: 300;
    color: var(--purple-dim);
    line-height: 1.45;
    flex: 1;
}

.project-links {
    margin-top: 0.5rem;
}

.project-links .bi {
    font-size: 0.9rem;
    color: rgba(124, 58, 237, 0.3);
    transition: color 0.22s ease, transform 0.22s ease;
    display: inline-block;
}

.project-box:hover .project-links .bi {
    color: var(--red);
    transform: scale(1.15);
}

@media (max-width: 767px) {
    .project-container { grid-template-columns: 1fr; }
}

@media (min-width: 768px) and (max-width: 900px) {
    .project-container { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Animations
   ============================================================ */

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0);    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

/* ============================================================
   Log — terminal themed
   ============================================================ */

.log-page {
    max-width: 660px;
    width: 100%;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 48px) 100px;
    box-sizing: border-box;
    text-align: left;
    font-family: monospace;
    animation: fadeUp 0.4s ease both;
}

.log-page-header {
    padding: 56px 0 40px;
    border-bottom: 1px solid rgba(124, 58, 237, 0.2);
    margin-bottom: 32px;
}

.log-page-title {
    font-size: 1.4em;
    font-family: monospace;
    color: var(--purple-lt);
    letter-spacing: 0.02em;
}

.log-page-title::before {
    content: '> ';
    opacity: 0.4;
}

.log-page-sub {
    margin-top: 6px;
    font-size: 0.78em;
    opacity: 0.35;
    font-family: monospace;
}

.log-feed {
    display: flex;
    flex-direction: column;
}

.log-date {
    font-size: 0.72em;
    opacity: 0.38;
    font-family: monospace;
    white-space: nowrap;
}

.log-content {
    color: rgba(255, 255, 255, 0.75);
    text-shadow: none;
    line-height: 1.6;
    font-size: 0.9em;
}

.log-content p { margin: 0; }

.log-entry {}

/* Micro post */
.micro-post {
    padding: 14px 0 14px 14px;
    border-left: 1px solid rgba(196, 30, 58, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: border-left-color 0.2s ease;
}

.micro-post:hover {
    border-left-color: var(--red);
}

.micro-prompt {
    font-family: monospace;
    color: var(--purple-lt);
    opacity: 0.7;
    font-size: 0.8em;
    margin-bottom: 4px;
}

/* Article card */
.article-card {
    display: block;
    padding: 18px 20px;
    margin: 10px 0;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-left: 2px solid var(--red-dim);
    border-radius: 0;
    text-decoration: none;
    transition: transform 0.2s ease, border-left-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
    transform: translateY(-2px);
    border-left-color: var(--red);
    background: rgba(124, 58, 237, 0.05);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    text-decoration: none;
}

.article-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.article-card-date {
    font-size: 0.7em;
    font-family: monospace;
    opacity: 0.38;
}

.article-card-tag {
    font-size: 0.68em;
    font-family: monospace;
    color: var(--purple-lt);
    opacity: 0.7;
}

.article-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.article-card-title {
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.2s ease;
}

.article-card:hover .article-card-title {
    color: #fff;
}

.article-card-arrow {
    font-family: monospace;
    color: var(--red);
    opacity: 0.4;
    transition: opacity 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.article-card:hover .article-card-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* ============================================================
   Island (article page)
   ============================================================ */

.island-wrapper {
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
    padding: 0 clamp(28px, 6vw, 80px) 100px;
    box-sizing: border-box;
}

.island-header {
    padding: 52px 0 36px;
    animation: fadeUp 0.5s ease both;
}

.back-link {
    font-size: 0.85em;
    opacity: 0.6;
    text-decoration: none;
    transition: opacity 0.2s ease, color 0.2s ease;
    display: inline-block;
    margin-bottom: 28px;
    color: var(--purple-lt);
}

.back-link:hover {
    opacity: 1;
    color: var(--red);
    text-decoration: none;
}

.island-title {
    font-size: 2.6em;
    font-weight: bold;
    line-height: 1.15;
    margin: 0 0 12px;
    background: linear-gradient(120deg, #ffffff 0%, #a78bfa 55%, #7C3AED 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeUp 0.5s ease 0.08s both;
}

.island-date {
    display: block;
    font-family: monospace;
    font-size: 0.8em;
    letter-spacing: 0.06em;
    opacity: 0.38;
    margin-bottom: 28px;
    animation: fadeIn 0.5s ease 0.14s both;
}

.island-rule {
    height: 1px;
    background: linear-gradient(90deg, var(--red) 0%, rgba(124, 58, 237, 0.3) 50%, transparent 100%);
    animation: fadeIn 0.6s ease 0.18s both;
}

.island-body {
    animation: fadeUp 0.6s ease 0.22s both;
}

.island-content {
    margin-top: 36px;
    line-height: 1.8;
    font-size: 1.05em;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: none;
}

.island-content h2 {
    font-size: 1.45em;
    margin: 2.2em 0 0.6em;
    color: var(--purple-lt);
}

.island-content h3 {
    font-size: 1.15em;
    margin: 1.8em 0 0.5em;
    opacity: 0.9;
}

.island-content p {
    margin: 0 0 1.2em;
}

.island-content code {
    background: var(--purple-xs);
    border: 1px solid rgba(124, 58, 237, 0.2);
    padding: 1px 6px;
    font-size: 0.9em;
    color: #a78bfa;
    font-family: monospace;
}

.island-content pre {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(124, 58, 237, 0.15);
    border-left: 2px solid var(--red);
    padding: 20px;
    overflow-x: auto;
    margin: 1.5em 0;
}

.island-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
}

.island-content blockquote {
    border-left: 3px solid var(--red);
    margin: 1.5em 0;
    padding: 4px 0 4px 20px;
    opacity: 0.8;
    font-style: italic;
}

.island-content a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--red-dim);
    transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.island-content a:hover {
    text-decoration-color: var(--red);
    color: #fff;
}

@media only screen and (max-width: 767px) {
    .island-title { font-size: 1.8em; }
    .site-nav     { padding: 12px 16px; gap: 16px; }
}

/* ============================================================
   Terminal post layout
   ============================================================ */

.tpost-wrapper {
    max-width: 720px;
    width: 100%;
    margin: 40px auto 80px;
    padding: 0 clamp(20px, 5vw, 40px);
    box-sizing: border-box;
    animation: fadeUp 0.4s ease both;
}

.tpost-chrome {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: none;
    padding: 10px 14px;
}

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

.tpost-path {
    margin-left: 8px;
    font-family: monospace;
    font-size: 0.75em;
    opacity: 0.38;
}

.tpost-body {
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 24px 28px 28px;
    font-family: monospace;
}

.tpost-prompt {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.85em;
}

.tpost-ps1 {
    color: var(--purple-lt);
    white-space: nowrap;
}

.tpost-dir {
    color: #7eb8f7;
}

.tpost-cmd {
    color: rgba(255, 255, 255, 0.65);
}

.tpost-meta {
    font-size: 0.82em;
    line-height: 1.9;
    opacity: 0.6;
    margin-bottom: 4px;
}

.tpost-field {
    color: var(--purple-lt);
}

.tpost-sep {
    border-color: rgba(255, 255, 255, 0.07);
    margin: 20px 0;
}

.tpost-content {
    font-family: inherit;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92em;
    margin-bottom: 28px;
}

.tpost-content p   { margin: 0 0 1em; }
.tpost-content h2  { color: var(--purple-lt); margin: 1.8em 0 0.5em; }
.tpost-content code {
    background: var(--purple-xs);
    padding: 1px 5px;
    font-family: monospace;
}

.tpost-end {
    margin-top: 0;
    margin-bottom: 0;
    opacity: 0.5;
}

.tpost-cursor {
    animation: blink 1.1s step-end infinite;
    color: var(--red);
}
