/* === Neovim Terminal Style === */
@import url("https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;700&family=Cascadia+Code:wght@400;700&display=swap");

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-cyan: #89b482;
    --primary-green: #a9b665;
    --primary-purple: #d3869b;
    --accent-orange: #e78a4e;
    --bg-dark: #141617;
    --bg-darker: #1d2021;
    --terminal-bg: #141617;
    --terminal-border: #504945;
    --text-primary: #ddc7a1;
    --text-secondary: #a89984;
    --text-dim: #928374;
    --nvim-blue: #7daea3;
    --nvim-yellow: #d8a657;
    --grid-color: rgba(137, 180, 130, 0.1);
    --scan-line-color: rgba(137, 180, 130, 0.3);
}

/* Animation system */
.animate-item {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

.animate-item.visible {
    opacity: 1;
    transform: translateY(0);
}

body {
    font-family: "Cascadia Code", "Fira Code", "Consolas", "Monaco", "Courier New", monospace;
    background: var(--bg-dark);
    color: var(--text-primary);
    height: 100vh;
    height: 100dvh;
        /* Dynamic viewport height for mobile */
        overflow: hidden;
    position: relative;
    display: flex;
        align-items: center;
        justify-content: center;
}

/* Background grid effect */
.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    animation: gridPulse 4s ease-in-out infinite alternate;
    will-change: opacity;
    transform: translateZ(0);
}

/* Scan line effect */
.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--scan-line-color), transparent);
    z-index: -1;
    animation: scanLine 3s linear infinite;
    will-change: transform;
    transform: translateZ(0);
}

/* Really message */
.really-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-cyan);
    text-shadow:
        0 0 20px rgba(137, 180, 130, 0.8),
        0 0 40px rgba(137, 180, 130, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}
/* Terminal container */
.terminal-container {
    max-width: 1200px;
    width: calc(100% - 4rem);
        max-height: calc(100vh - 4rem);
        max-height: calc(100dvh - 4rem);
        margin: 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--terminal-bg);
    border: 1px solid var(--terminal-border);
    border-radius: 8px;
    box-shadow:
        0 0 50px rgba(137, 180, 130, 0.2),
        inset 0 0 50px rgba(137, 180, 130, 0.05);
    overflow: hidden;
    position: relative;
    display: flex;
        transition: all 0.3s ease;
        flex-direction: column;
    /* Initial state for apparition animation */
        opacity: 0;
        transform: scale(0.8);
    }
    
    .terminal-container.loaded {
        opacity: 1;
        transform: scale(1);
        transition: opacity 0.5s ease, transform 0.5s ease;
}

.terminal-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(211, 134, 155, 0.1) 0%, rgba(137, 180, 130, 0.1) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Terminal header */
.terminal-header {
    background: var(--bg-darker);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--terminal-border);
    position: relative;
    z-index: 2;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

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

.terminal-button.close {
    background: #ff5f56;
    box-shadow: 0 0 10px rgba(255, 95, 86, 0.5);
}

.terminal-button.minimize {
    background: #ffbd2e;
    box-shadow: 0 0 10px rgba(255, 189, 46, 0.5);
}

.terminal-button.maximize {
    background: #27ca3f;
    box-shadow: 0 0 10px rgba(39, 202, 63, 0.5);
}

.terminal-title {
    color: var(--text-secondary);
    font-size: 0.9rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Terminal body */
.terminal-body {
    padding: 1rem 2rem 0 2rem;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    flex: 1;
        min-height: 0;
    overflow: visible;
}

/* Terminal content wrapper */
.terminal-content {
    padding-bottom: 2rem;
    flex: 1;
    overflow-y: auto;
        overflow-x: hidden;
}

/* Command line */
.command-line {
    margin-bottom: 1rem;
    font-size: 1rem;
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

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

.command {
    color: var(--text-primary);
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 18px;
    background: var(--primary-cyan);
    margin-left: 2px;
    opacity: 0;
    animation: blink 1s infinite;
}

.cursor[data-delay] {
    animation-delay: var(--delay);
}

/* Neovim startup screen */
.nvim-startup {
    opacity: 0;
    text-align: center;
    margin: 2rem 0;
    transition: opacity 0.5s ease;
}

.nvim-startup.visible {
    opacity: 1;
}

.nvim-logo {
    margin-bottom: 1rem;
}

.nvim-line {
    opacity: 0;
    color: var(--nvim-blue);
    font-size: 0.8rem;
    line-height: 1.2;
    margin-bottom: 0.1rem;
    transition: opacity 0.3s ease;
}

.nvim-line.visible {
    opacity: 1;
}

.nvim-version {
    opacity: 0;
    color: var(--primary-green);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    transition: opacity 0.5s ease;
}

.nvim-version.visible {
    opacity: 1;
}

.nvim-subtitle {
    opacity: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    transition: opacity 0.5s ease;
}

.nvim-subtitle.visible {
    opacity: 1;
}

/* Neovim content */
.nvim-content {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.nvim-content.visible {
    opacity: 1;
}

/* Main title */
.main-title {
    text-align: center;
    margin: 1rem 0 2rem 0;
    position: relative;
}

.main-title::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(137, 180, 130, 0.3) 0%, transparent 70%);
    z-index: 0;
    border-radius: 50%;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

.title-text {
    font-family: "Cascadia Code", "Fira Code", "Consolas", "Monaco", "Courier New", monospace;
    font-size: clamp(2.5rem, 6vw, 6rem);
    font-weight: 900;
    background: linear-gradient(
        45deg,
        var(--primary-cyan),
        var(--primary-purple),
        var(--primary-green)
    );
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
    letter-spacing: 3px;
    filter: drop-shadow(0 0 20px rgba(137, 180, 130, 0.6))
        drop-shadow(0 0 40px rgba(211, 134, 155, 0.4));
    will-change: background-position;
}

.glitch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    font-family: "Cascadia Code", "Fira Code", "Consolas", "Monaco", "Courier New", monospace;
    font-size: clamp(2.5rem, 6vw, 6rem);
    font-weight: 900;
    color: var(--accent-orange);
    opacity: 0;
    z-index: 1;
    letter-spacing: 3px;
    animation: glitch 4s infinite;
    text-align: center;
    will-change: transform, opacity;
    transform: translateZ(0);
}

/* Subtitle */
.subtitle {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.role-item {
    display: inline-block;
    white-space: nowrap;
    margin: 0.2rem 0;
}

.bracket {
    color: var(--primary-cyan);
}

.role {
    color: var(--primary-green);
    text-transform: lowercase;
    letter-spacing: 1px;
    margin: 0 0.1rem;
}

.eacc-logo {
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-left: 0.15rem;
    vertical-align: middle;
    color: var(--primary-cyan);
    filter: drop-shadow(0 0 8px rgba(137, 180, 130, 0.6));
}
/* Quote container */
.quote-container {
    margin: 2rem 0 1rem 0;
    padding: 1.5rem;
    border: 1px solid var(--terminal-border);
    border-radius: 8px;
    background: rgba(211, 134, 155, 0.05);
}

.quote-line {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.quote-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.highlight {
    color: var(--primary-cyan);
    text-shadow: 0 0 10px rgba(137, 180, 130, 0.5);
}

.quote-author {
    color: var(--text-secondary);
    font-style: italic;
    text-align: right;
}

/* Navigation links */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--terminal-border);
    border-radius: 4px;
    background: rgba(137, 180, 130, 0.05);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(137, 180, 130, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 20px rgba(137, 180, 130, 0.3);
    transform: translateY(-2px);
}

.link-prefix {
    color: var(--primary-green);
}

.link-suffix {
    color: var(--primary-purple);
}

/* Status bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0 1rem 0;
    padding: 1rem;
    background: var(--bg-darker);
    border-radius: 4px;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.status-item {
    color: var(--text-secondary);
}

.status-online {
    color: var(--primary-green);
    animation: pulse 2s infinite;
}

.eacc-pulse {
    color: white;
    animation: pulse 2s infinite;
}
.status-active {
    color: var(--accent-orange);
    animation: pulse 2s infinite;
}

/* Neovim status line */
.nvim-statusline {
    opacity: 0;
    background: var(--bg-darker);
    border-top: 1px solid var(--terminal-border);
    padding: 0.3rem 2rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-left: -2rem;
    margin-right: -2rem;
    margin-bottom: 0;
    position: relative;
    transition: opacity 0.4s ease;
        flex-shrink: 0;
    }
    
    .nvim-statusline.visible {
        opacity: 1;
}

.nvim-mode {
    color: var(--nvim-yellow);
}

.nvim-file {
    color: var(--text-primary);
    position: absolute;
        left: 50%;
        transform: translateX(-50%);
}

.nvim-position {
    color: var(--text-secondary);
}

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

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes glitch {
    0%,
    100% {
        opacity: 0;
        transform: translate(0px, 0px) translateZ(0);
    }
    8% {
        opacity: 0;
        transform: translate(0px, 0px) translateZ(0);
    }
    8.5% {
        opacity: 0.8;
        transform: translate(-4px, 2px) translateZ(0);
        color: #ff0040;
        text-shadow:
            3px -2px 0 var(--primary-cyan),
            -2px 3px 0 var(--primary-green);
    }
    10% {
        opacity: 0;
        transform: translate(0px, 0px) translateZ(0);
    }
    28% {
        opacity: 0;
        transform: translate(0px, 0px) translateZ(0);
    }
    28.3% {
        opacity: 0.9;
        transform: translate(5px, -4px) translateZ(0);
        color: #00ff40;
        text-shadow:
            -5px 4px 0 var(--accent-orange),
            4px -5px 0 var(--primary-purple);
    }
    28.7% {
        opacity: 0.7;
        transform: translate(-3px, -2px) translateZ(0);
        color: #ff4000;
        text-shadow: 3px 2px 0 var(--primary-cyan);
    }
    30% {
        opacity: 0;
        transform: translate(0px, 0px) translateZ(0);
    }
    52% {
        opacity: 0;
        transform: translate(0px, 0px) translateZ(0);
    }
    52.2% {
        opacity: 0.85;
        transform: translate(2px, 4px) translateZ(0);
        color: #4000ff;
        text-shadow: -2px -4px 0 var(--primary-green);
    }
    53.2% {
        opacity: 0;
        transform: translate(0px, 0px) translateZ(0);
    }
    73% {
        opacity: 0;
        transform: translate(0px, 0px) translateZ(0);
    }
    73.4% {
        opacity: 0.8;
        transform: translate(-2px, -3px) translateZ(0);
        color: #ff0040;
        text-shadow:
            2px 3px 0 var(--primary-cyan),
            -3px 2px 0 var(--accent-orange);
    }
    74% {
        opacity: 0.9;
        transform: translate(4px, 3px) translateZ(0);
        color: #00ff40;
        text-shadow: -4px -3px 0 var(--primary-purple);
    }
    75.2% {
        opacity: 0;
        transform: translate(0px, 0px) translateZ(0);
    }
    93% {
        opacity: 0;
        transform: translate(0px, 0px) translateZ(0);
    }
    93.3% {
        opacity: 0.75;
        transform: translate(-5px, 3px) translateZ(0);
        color: #ff4000;
        text-shadow: 5px -3px 0 var(--primary-cyan);
    }
    94.5% {
        opacity: 0;
        transform: translate(0px, 0px) translateZ(0);
    }
}

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

@keyframes scanLine {
    0% {
        transform: translateY(0) translateZ(0);
        opacity: 1;
    }
    90% {
        transform: translateY(100vh) translateZ(0);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateZ(0);
        opacity: 0;
    }
}

@keyframes gridPulse {
    0% {
        opacity: 0.3;
    }
    100% {
        opacity: 0.7;
    }
}

@keyframes titleGlow {
    0% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .terminal-container {
        margin: 0.5rem;
        border-radius: 4px;
        max-width: calc(100vw - 1rem);
    }

    .terminal-body {
        padding: 1rem 1rem 2rem 1rem;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }

    .nav-link {
        width: 90%;
        text-align: center;
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    .status-bar {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        margin: 1rem -1rem -1rem -1rem;
        padding: 1rem;
    }

    .subtitle {
        font-size: 0.9rem;
        gap: 0.3rem;
    }

    .role-item {
        margin: 0.1rem 0;
    }

    .quote-container {
        padding: 1rem;
        margin: 1.5rem 0;
    }

    .quote-text {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .nvim-statusline {
        margin: 0 -1rem 0 -1rem;
        padding: 0.3rem 1rem;
        font-size: 0.7rem;
    }

    .title-text {
        font-size: clamp(2rem, 10vw, 4rem);
        letter-spacing: 2px;
    }

    .glitch-overlay {
        font-size: clamp(2rem, 10vw, 4rem);
        letter-spacing: 2px;
    }
}

@media (max-width: 480px) {
    .terminal-container {
        margin: 0.25rem;
    }

    .terminal-header {
        padding: 6px 10px;
    }

    .terminal-title {
        font-size: 0.7rem;
    }

    .terminal-body {
        padding: 0.8rem 0.8rem 2rem 0.8rem;
    }

    .command-line {
        font-size: 0.8rem;
        margin-bottom: 0.8rem;
    }

    .nav-link {
        width: 95%;
        padding: 0.7rem 0.8rem;
        font-size: 0.8rem;
    }

    .subtitle {
        font-size: 0.8rem;
        line-height: 1.4;
        gap: 0.2rem;
    }

    .role-item {
        font-size: 0.8rem;
    }

    .quote-container {
        padding: 0.8rem;
        margin: 1rem 0;
    }

    .quote-text {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .quote-author {
        font-size: 0.75rem;
    }

    .status-bar {
        font-size: 0.8rem;
        padding: 0.8rem;
        margin: 1rem -0.8rem -1rem -0.8rem;
    }

    .nvim-statusline {
        margin: 0 -0.8rem 0 -0.8rem;
        padding: 0.3rem 0.8rem;
        font-size: 0.65rem;
    }

    .title-text {
        font-size: clamp(1.5rem, 12vw, 3rem);
        letter-spacing: 1px;
    }

    .glitch-overlay {
        font-size: clamp(1.5rem, 12vw, 3rem);
        letter-spacing: 1px;
    }
}
