/* Hacker/Terminal Theme for xdcyw.net */
:root {
    /* Synthwave '84 Inspired Theme */
    --bg-color: #2a2139;
    --text-color: #00e8c6;    /* Cyan */
    --accent-color: #ff79c6; /* Pink */
    --glow-color: rgba(255, 121, 198, 0.4);
    --red: #ff5555;
    --yellow: #f1fa8c;
    --font-display: 'VT323', monospace;
    --font-family: 'Roboto Mono', monospace;
    --font-sans-serif: 'Noto Sans JP', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family); /* Changed to Roboto Mono for better readability */
    font-size: 1.3rem; /* 全体的に少し大きく */
    line-height: 1.6;
    text-shadow: 0 0 2px var(--glow-color), 0 0 5px var(--glow-color);
    overflow-x: hidden;
}

/* Utility class */
.is-hidden {
    display: none !important;
}

/* CRT Scanline Effect */
.crt-container {
    min-height: 100vh;
    position: relative;
    animation: intermittent-shake 15s ease-in-out infinite;
}
.crt-container::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 1001; /* ターミナルより手前に表示 */
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 400;
    transition: background-color 0.2s, color 0.2s;
}
.btn:hover {
    background-color: var(--bg-color);
    color: var(--text-color);
    text-shadow: 0 0 8px var(--glow-color);
}

.btn__icon {
    width: 1.1em;
    height: 1.1em;
    stroke-width: 2.5;
    vertical-align: middle;
}

.btn--header-launch {
    border: 1px solid var(--accent-color);
    padding: 1rem 2rem; /* さらに拡大 */
    align-self: center;
    background-color: transparent;
    font-family: inherit;
    font-size: 1.5rem; /* さらに拡大 */
    text-shadow: 0 0 8px var(--glow-color);
    transition: text-shadow 0.2s, color 0.2s, background-color 0.2s;
    animation: pulse-glow 3s infinite ease-in-out;
    display: flex; /* アイコンとテキストを横並びにする */
    align-items: center;
    gap: 1rem; /* アイコンとテキストの間隔を調整 */
}

.btn--header-launch:hover {
    background-color: rgba(255, 121, 198, 0.15);
    animation: none; /* ホバー中はアニメーションを停止 */
}

/* --- Site Header --- */
.site-header {
    padding: 2.5rem 0 1.5rem;
    border-bottom: 1px solid var(--accent-color);
    position: relative;
    z-index: 3;
}

.site-header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.site-logo {
    font-family: var(--font-display);
    color: var(--text-color);
    font-size: 4.5rem;
    line-height: 1;
    text-align: center;
    text-shadow: 0 0 8px var(--glow-color), 0 0 15px var(--glow-color);
    margin: 0;
    flex-grow: 1;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: center; /* For mobile view */
    flex-wrap: wrap;
    gap: 1.5rem;
}
/* --- Main Content --- */
main {
    padding: 2rem 0;
}

section {
    padding: 2rem 0;
    border-bottom: 1px dashed var(--accent-color);
}
section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 1.8rem;
    font-family: var(--font-sans-serif);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 8px var(--glow-color), 0 0 15px var(--glow-color);
}

.profile-list {
    list-style: none;
    padding-left: 0;
    font-size: 1.1rem;
    line-height: 1.5;
}

.profile-list li {
    margin-bottom: 0.5em;
    display: flex;
}

.profile-marker {
    color: var(--accent-color);
    margin-right: 0.75em;
}

.terminal-prompt-section {
    text-align: center;
    font-size: 1.2rem;
}

.terminal-prompt-section p {
    margin: 0;
}

.btn-inline-link {
    background: none;
    border: none;
    color: var(--yellow);
    text-shadow: 0 0 5px var(--yellow);
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.btn-inline-link:hover {
    color: #fff;
    text-shadow: 0 0 8px var(--yellow);
}

.command-highlight {
    background-color: rgba(255, 121, 198, 0.15);
    color: var(--accent-color);
    padding: 0.1em 0.4em;
    border-radius: 3px;
    font-family: var(--font-family);
}

.about-content {
    margin-bottom: 2rem;
    font-family: var(--font-sans-serif);
}

.about-content p:not(:last-child) {
    margin-bottom: 1em;
}

.hero__quote {
    font-size: 1.5rem;
    color: var(--text-color);
    border-left: 2px solid var(--accent-color);
    padding-left: 1rem;
    min-height: 1.6em; /* line-heightと合わせる */
    position: relative;
    text-shadow: 0 0 5px var(--text-color), 0 0 15px var(--glow-color), 0 0 25px var(--glow-color);
}
.typing::after {
    content: '█';
    margin-left: 0.2em;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to {
        color: transparent;
    }
    50% {
        color: inherit;
    }
}

@keyframes pulse-glow {
    0%, 100% {
        text-shadow: 0 0 8px var(--glow-color);
        color: var(--text-color);
    }
    50% {
        text-shadow: 0 0 10px rgba(255, 121, 198, 0.8), 0 0 20px var(--glow-color);
        color: #f8f8f2; /* Bright white for pulse effect */
    }
}

/* --- フッター --- */
.footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--accent-color);
}

.footer__keys {
    font-family: var(--font-family);
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    text-shadow: 0 0 5px var(--glow-color);
    word-break: break-all;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.key-info {
    display: flex;
    gap: 0.5em;
}

.key-label {
    color: var(--accent-color);
    flex-shrink: 0;
}

.key-info {
    display: flex;
    gap: 0.5em;
}

.key-label {
    color: var(--accent-color);
    flex-shrink: 0;
}

.footer__message {
    color: var(--accent-color);
    font-size: 0.9rem;
}

/* --- Animations --- */
@keyframes flicker {
    0% { opacity: 0.27861; }
    5% { opacity: 0.34769; }
    10% { opacity: 0.54165; }
    15% { opacity: 0.93603; }
    20% { opacity: 0.18312; }
    25% { opacity: 0.80891; }
    30% { opacity: 0.1823; }
    35% { opacity: 0.36988; }
    40% { opacity: 0.58634; }
    45% { opacity: 0.87733; }
    50% { opacity: 0.97282; }
    55% { opacity: 0.07984; }
    60% { opacity: 0.2518; }
    65% { opacity: 0.13872; }
    70% { opacity: 0.98412; }
    75% { opacity: 0.35423; }
    80% { opacity: 0.5978; }
    85% { opacity: 0.85371; }
    90% { opacity: 0.24435; }
    95% { opacity: 0.0864; }
    100% { opacity: 0.9443; }
}

@keyframes intermittent-shake {
    /* 15秒間のうち、最初の数パーセントだけ揺れる */
    0%, 100%, 3% { transform: translate(0, 0); }
    0.5% { transform: translate(1px, -1px); }
    1.0% { transform: translate(-1px, 1px); }
    1.5% { transform: translate(1px, 1px); }
    2.0% { transform: translate(-1px, -1px); }
    2.5% { transform: translate(1px, 0); }
}

/* --- Terminal Overlay --- */
.terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.terminal-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.terminal {
    width: 90%;
    height: 80%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    font-family: var(--font-family);

    /* Synthwave '84 Inspired Override for Terminal */
    --bg-color: #252133;
    --text-color: #f8f8f2;
    --accent-color: #ff79c6; /* Pink */
    --cyan: #8be9fd;
    --red: #ff5555;
    --yellow: #f1fa8c;
    
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 25px rgba(255, 121, 198, 0.5);
}

.terminal__header {
    background-color: #2a2139;
    color: var(--bg-color);
    padding: 0.25rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    cursor: move;
    text-shadow: none;
    flex-shrink: 0;
}

.terminal__controls {
    display: flex;
}

.terminal__control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid var(--bg-color);
    cursor: pointer;
}

.terminal__control--close {
    background-color: #ff5f56;
}

.terminal__screen {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: auto; /* Allow horizontal scrolling for wide content like neofetch */
    padding: 0.5rem;
    position: relative;
}

.terminal__prompt {
    display: flex;
    align-items: center;
}

.terminal__prompt input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

.prompt-user {
    color: var(--cyan);
}
.terminal.is-root .prompt-user {
    color: var(--red);
}
.prompt-at, .prompt-colon {
    color: var(--text-color);
}
.prompt-symbol {
    color: var(--yellow);
}

.terminal.is-root .prompt-at,
.terminal.is-root .prompt-host,
.terminal.is-root .prompt-colon,
.terminal.is-root .prompt-dir {
    display: none;
}

.line { padding: 0 0.25rem; }
.line--command { color: var(--text-color); }
.line--error { color: var(--red); }
.line--system { color: var(--cyan); }
.line--muted { opacity: 0.6; }
.line__note { opacity: 0.7; }

.neofetch-wrapper {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end; /* Align items to the bottom */
}

.neofetch-ascii {
    font-family: var(--font-display);
    color: var(--cyan);
    font-size: 1rem;
    line-height: 0.9;
    flex-shrink: 0;
    text-shadow: none;
}

.neofetch-info {
    line-height: 1.4;
}

.neofetch-info .info-label {
    color: var(--accent-color);
    font-weight: bold;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .site-header__container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .site-logo {
        font-size: 3.5rem;
    }

    .btn--header-launch {
        font-size: 1.2rem;
        padding: 0.75rem 1.5rem;
    }

    .neofetch-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .terminal {
        width: 95%; /* Use more horizontal space */
        height: 90%; /* Use more vertical space */
        font-size: 1rem; /* Reduce font size for better fit */
    }

    .footer__keys {
        align-items: flex-start;
    }
    .key-info {
        flex-direction: column;
    }
}