/* nikhil */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css?family=VT323');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'VT323', monospace;
}

html {
    font-size: 10px;
}

:root {
    /* Classic amber theme with darker background */
    --base: #0a0a0a;
    --surface: #151515;
    --overlay: #2a261f;
    --muted: #8a7a5c;
    --subtle: #a39371;
    --text: #ffb347;
    --love: #ffb347;
    --gold: #ffb347;
    --rose: #ffb347;
    --pine: #ffb347;
    --foam: #ffb347;
    --iris: #ffb347;
    --highlight-low: #252118;
    --highlight-med: #403a2f;
    --highlight-high: #524a3d;
    
    /* CRT Console colors */
    --console-color: #ffb347;
    --console-bg: #0a0a0a;
}

body {
    background: #0a0a0a; /* Much darker background */
    color: var(--text);
    font-family: 'VT323', monospace;
    font-size: 38px; /* Universal font size */
    line-height: 1.2;
    height: 100vh;
    overflow: hidden;
    animation: turn-on 3s cubic-bezier(0.230, 1.000, 0.320, 1.000), vhs-flicker 8ms infinite;
    animation-fill-mode: forwards;
    -webkit-font-smoothing: none;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 8em rgba(0, 0, 0, 0.4);
    z-index: 1;
    pointer-events: none;
}

/* Text blur effect base class */
.text-blur {
    position: relative;
    display: inline-block;
}

.text-blur .content {
    filter: blur(1px);
}

.text-blur .blur {
    z-index: -1;
    user-select: none;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.5;
    filter: blur(10px);
}

.text-blur .flair {
    z-index: -1;
    user-select: none;
    position: absolute;
    top: 0;
    left: 0;
    transform: scale(1.1, 0.3);
    opacity: 0.5;
    filter: blur(20px);
}

/* Command autocomplete - Bottom Right Clean Style */
.command-suggestions {
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: auto;
    min-width: 120px;
    background: transparent;
    border: none;
    max-height: none;
    overflow: visible;
    z-index: 10;
    display: none;
    padding: 0;
    display: flex;
    flex-direction: column-reverse;
}

.suggestion-item {
    padding: 1px 8px;
    cursor: pointer;
    color: #5a5a5a;
    background: transparent;
    border: none;
    display: block;
    margin-bottom: 1px;
    position: relative;
    white-space: nowrap;
}

.suggestion-item:hover,
.suggestion-item.selected {
    color: var(--muted);
    text-shadow: none;
}

.suggestion-item.selected::before {
    content: "> ";
    color: var(--muted);
    margin-right: 4px;
}

.command-suggestions::before {
    display: none;
}

/* Standardize ALL text elements with consistent font properties */
.output-line,
.prompt,
.command-input,
.command-output,
.command-output *,
.welcome-art,
.help-command,
.command-list,
.timeline-year,
.project-title,
.skill-category,
.error,
.success,
.info,
.warning,
.boot-sequence,
.command-name,
.suggestion-item {
    font-family: 'VT323', monospace !important;
    font-size: 38px !important;
    line-height: 1.2 !important;
    font-weight: normal !important;
}

/* Reduce line spacing globally */
.output-line {
    margin: 1px 0;
    word-wrap: break-word;
    flex-shrink: 0;
    white-space: pre-wrap;
}

.prompt-line {
    position: relative;
    display: flex;
    align-items: center;
    margin: 2px 0;
    flex-shrink: 0;
    margin-top: auto;
}

/* Remove all previous font size overrides and use inheritance */
.command-output h1,
.command-output h2,
.command-output h3,
.command-output div,
.command-output pre,
.command-output ul,
.command-output li,
.command-output p,
.command-output span,
.command-output a {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    margin: 1px 0;
}

/* List items spacing */
ul {
    margin: 1px 0;
    padding-left: 20px;
}

li {
    margin: 0;
    line-height: 1.1;
}

/* Headers consistent spacing */
h1, h2, h3 {
    margin: 2px 0 1px 0;
    line-height: 1.1;
}

/* Standardize special text elements */
.welcome-art,
.help-command,
.command-list,
.timeline-year,
.project-title,
.skill-category,
.error,
.success,
.info,
.warning,
.boot-sequence,
.command-name {
    font-size: 38px !important;
    font-family: 'VT323', monospace;
    line-height: 1.1;
}

/* Only TERMINAL-01 overlay gets different size */
.crt-overlay {
    color: var(--text);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 77px;
    font-weight: 600;
    visibility: visible;
    pointer-events: none;
    z-index: 10;
    text-shadow: 0 0 20px var(--text), 0 0 40px var(--text), 0 0 60px var(--text);
    animation: textShadow 1.6s infinite;
}

/* CRT Frame and Effects */
.crt-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    border-radius: 2rem;
    border: 1rem solid;
    border-bottom-color: #121212;
    border-left-color: #080808;
    border-right-color: #080808;
    border-top-color: #020202;
    box-shadow:
        inset 0 0 18rem black,
        inset 0 0 3rem black,
        0 0 10rem black;
    pointer-events: none;
    z-index: 100;
}

.crt-scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.2) 70%,
        rgba(0,0,0,0.6)
    );
    background-size: 100% 0.4rem;
    border-radius: 2rem;
    pointer-events: none;
    z-index: 99;
}

.crt-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center,
        rgba(255, 179, 71, 1) 0%,
        rgba(255, 179, 71, 0.88) 58%,
        rgba(255, 191, 102, 0.57) 80%,
        rgba(139, 115, 85, 0.27) 93%,
        rgba(26, 17, 6, 0) 100%);
    opacity: 0.15;
    pointer-events: none;
    z-index: 98;
    animation: crt-glow 60s infinite;
}

@keyframes crt-glow {
    0% { opacity: 0.1; }
    50% { opacity: 0.2; }
}

@keyframes crt-output {
    0% { opacity: 0.9; }
    50% { opacity: 1; }
}

.terminal-container {
    height: 100vh;
    background-color: var(--console-bg);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 2px solid var(--overlay);
    animation: crt-output 10ms infinite;
    text-shadow: 0rem 0.2rem 1rem rgba(3, 30, 17, 0.8);
    box-shadow: 0 0 25px #ffb34766, inset 0 0 25px #ffb34730;
}

/* Make text selection look good */
::-moz-selection {
    background-color: var(--console-color);
    color: var(--console-bg);
}

::selection {
    background-color: var(--console-color);
    color: var(--console-bg);
}

/* Advanced CRT Effects */
@keyframes flicker {
    0% { opacity: 0.27861; }
    5% { opacity: 0.34769; }
    10% { opacity: 0.23604; }
    15% { opacity: 0.90626; }
    20% { opacity: 0.18128; }
    25% { opacity: 0.83891; }
    30% { opacity: 0.65583; }
    35% { opacity: 0.67807; }
    40% { opacity: 0.26559; }
    45% { opacity: 0.84693; }
    50% { opacity: 0.96019; }
    55% { opacity: 0.08594; }
    60% { opacity: 0.20313; }
    65% { opacity: 0.71988; }
    70% { opacity: 0.53455; }
    75% { opacity: 0.37288; }
    80% { opacity: 0.71428; }
    85% { opacity: 0.70419; }
    90% { opacity: 0.7003; }
    95% { opacity: 0.36108; }
    100% { opacity: 0.24387; }
}

@keyframes textShadow {
    0% { text-shadow: 0.2px 0 1px rgba(255, 179, 71, 0.3), -0.2px 0 1px rgba(255, 179, 71, 0.2), 0 0 3px; }
    5% { text-shadow: 1.4px 0 1px rgba(255, 179, 71, 0.3), -1.4px 0 1px rgba(255, 179, 71, 0.2), 0 0 3px; }
    10% { text-shadow: 0.01px 0 1px rgba(255, 179, 71, 0.3), -0.01px 0 1px rgba(255, 179, 71, 0.2), 0 0 3px; }
    15% { text-shadow: 0.2px 0 1px rgba(255, 179, 71, 0.3), -0.2px 0 1px rgba(255, 179, 71, 0.2), 0 0 3px; }
    20% { text-shadow: 1.7px 0 1px rgba(255, 179, 71, 0.3), -1.7px 0 1px rgba(255, 179, 71, 0.2), 0 0 3px; }
    25% { text-shadow: 0.8px 0 1px rgba(255, 179, 71, 0.3), -0.8px 0 1px rgba(255, 179, 71, 0.2), 0 0 3px; }
    30% { text-shadow: 0.3px 0 1px rgba(255, 179, 71, 0.3), -0.3px 0 1px rgba(255, 179, 71, 0.2), 0 0 3px; }
    35% { text-shadow: 1.9px 0 1px rgba(255, 179, 71, 0.3), -1.9px 0 1px rgba(255, 179, 71, 0.2), 0 0 3px; }
    40% { text-shadow: 1.9px 0 1px rgba(255, 179, 71, 0.3), -1.9px 0 1px rgba(255, 179, 71, 0.2), 0 0 3px; }
    45% { text-shadow: 1.1px 0 1px rgba(255, 179, 71, 0.3), -1.1px 0 1px rgba(255, 179, 71, 0.2), 0 0 3px; }
    50% { text-shadow: 0.04px 0 1px rgba(255, 179, 71, 0.3), -0.04px 0 1px rgba(255, 179, 71, 0.2), 0 0 3px; }
    55% { text-shadow: 1.2px 0 1px rgba(255, 179, 71, 0.3), -1.2px 0 1px rgba(255, 179, 71, 0.2), 0 0 3px; }
    60% { text-shadow: 1.1px 0 1px rgba(255, 179, 71, 0.3), -1.1px 0 1px rgba(255, 179, 71, 0.2), 0 0 3px; }
    65% { text-shadow: 1.4px 0 1px rgba(255, 179, 71, 0.3), -1.4px 0 1px rgba(255, 179, 71, 0.2), 0 0 3px; }
    70% { text-shadow: 0.2px 0 1px rgba(255, 179, 71, 0.3), -0.2px 0 1px rgba(255, 179, 71, 0.2), 0 0 3px; }
    75% { text-shadow: 0.9px 0 1px rgba(255, 179, 71, 0.3), -0.9px 0 1px rgba(255, 179, 71, 0.2), 0 0 3px; }
    80% { text-shadow: 0.04px 0 1px rgba(255, 179, 71, 0.3), -0.04px 0 1px rgba(255, 179, 71, 0.2), 0 0 3px; }
    85% { text-shadow: 0.05px 0 1px rgba(255, 179, 71, 0.3), -0.05px 0 1px rgba(255, 179, 71, 0.2), 0 0 3px; }
    90% { text-shadow: 1.7px 0 1px rgba(255, 179, 71, 0.3), -1.7px 0 1px rgba(255, 179, 71, 0.2), 0 0 3px; }
    95% { text-shadow: 1.1px 0 1px rgba(255, 179, 71, 0.3), -1.1px 0 1px rgba(255, 179, 71, 0.2), 0 0 3px; }
    100% { text-shadow: 1.3px 0 1px rgba(255, 179, 71, 0.3), -1.3px 0 1px rgba(255, 179, 71, 0.2), 0 0 3px; }
}

.terminal-container::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(18, 16, 16, 0.1);
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

.terminal-container::before {
    content: " ";
    display: block;
    position: absolute;
    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, 179, 71, 0.03), rgba(255, 179, 71, 0.01), rgba(255, 179, 71, 0.03));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

.terminal-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 3;
    animation: textShadow 1.6s infinite, vhs-track 8ms infinite, vhs-terminal-distort 8s infinite;
    scroll-behavior: smooth;
}

@keyframes vhs-track {
    0% { 
        opacity: 1;
        top: 0;
        left: 0;
        transform: scale(1, 1) skew(0, 0);
    }
    40% { 
        opacity: 1;
        top: 0;
        left: 0;
        transform: scale(1, 1) skew(0, 0);
    }
    41% { 
        opacity: 0.95;
        top: 0;
        left: -2px;
        transform: scale(1, 1.01) skew(0.2deg, 0);
    }
    42% { 
        opacity: 0.95;
        top: 0;
        left: 2px;
        transform: scale(1, 1.01) skew(-0.3deg, 0);
    }
    43% { 
        opacity: 1;
        top: 0;
        left: 0;
        transform: scale(1, 1) skew(0, 0);
    }
    100% { 
        opacity: 1;
        top: 0;
        left: 0;
        transform: scale(1, 1) skew(0, 0);
    }
}

.terminal-output {
    flex: 1;
    margin-bottom: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.output-line {
    margin: 1px 0;
    word-wrap: break-word;
    flex-shrink: 0;
    white-space: pre-wrap;
}

.prompt-line {
    display: flex;
    align-items: center;
    margin: 2px 0;
    position: relative;
    flex-shrink: 0;
    margin-top: auto;
}

.prompt {
    color: var(--text);
    font-weight: 600;
    margin-right: 8px;
    flex-shrink: 0;
    animation: textShadow 1.6s infinite;
    text-shadow: 0 0 10px var(--text), 0 0 20px var(--text), 0 0 30px var(--text);
}

.command-input {
    background: transparent;
    border: none;
    color: var(--text);
    outline: none;
    flex: 1;
    caret-color: var(--console-color);
    animation: textShadow 1.6s infinite;
    text-shadow: 0 0 10px var(--text);
    position: relative;
    z-index: 2;
}

/* Remove all cursor implementation styles */
.command-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.command-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    animation: none;
}

/* Portfolio signature at bottom */
.portfolio-signature {
    display: none;
}

/* Text effects for different elements */
.output-line,
.prompt,
.command-input,
.command-output,
.command-output h1,
.command-output h2,
.command-output h3,
.command-output li,
.welcome-art,
.help-command,
.command-list,
.timeline-year,
.project-title,
.skill-category,
.error,
.success,
.info,
.warning,
.boot-sequence {
    font-size: 38px !important;
}

/* Mobile responsiveness - maintain consistent font sizing */
@media (max-width: 768px) {
    .crt-frame {
        border-width: 0.5rem;
        border-radius: 1rem;
    }
    
    body {
        font-size: 32px;
    }
    
    .output-line,
    .prompt,
    .command-input,
    .command-output,
    .command-output *,
    .welcome-art,
    .help-command,
    .command-list,
    .timeline-year,
    .project-title,
    .skill-category,
    .error,
    .success,
    .info,
    .warning,
    .boot-sequence,
    .suggestion-item,
    .command-name {
        font-size: 32px !important;
        line-height: 1.2 !important;
    }
    
    .terminal-body {
        padding: 15px;
    }
    
    .crt-overlay {
        font-size: 58px;
    }
    
    .command-suggestions {
        right: 10px;
        bottom: 60px;
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 28px;
    }
    
    .output-line,
    .prompt,
    .command-input,
    .command-output,
    .command-output *,
    .welcome-art,
    .help-command,
    .command-list,
    .timeline-year,
    .project-title,
    .skill-category,
    .error,
    .success,
    .info,
    .warning,
    .boot-sequence,
    .suggestion-item,
    .command-name {
        font-size: 28px !important;
        line-height: 1.2 !important;
    }
    
    .terminal-body {
        padding: 10px;
    }
    
    .crt-frame {
        border-width: 0.25rem;
        border-radius: 0.5rem;
    }
    
    .command-suggestions {
        right: 5px;
        bottom: 50px;
        min-width: 80px;
    }
}