/* ================================================
   Terminal Style Theme for Fincodr
   Dark theme with terminal/hacker aesthetics
   ================================================ */

/* ================================================
   CSS Variables & Base Styles
   ================================================ */
:root {
    /* Color Palette */
    --bg-primary: #0a0e27;
    --bg-secondary: #16213e;
    --bg-terminal: #0f1419;
    --bg-terminal-header: #1a1f2e;
    
    --text-primary: #00ff41;
    --text-secondary: #0ce3ac;
    --text-muted: #6c757d;
    --text-white: #e0e0e0;
    --text-highlight: #00ffff;
    
    --accent-cyan: #00ffff;
    --accent-green: #00ff41;
    --accent-blue: #00bfff;
    
    --border-color: #2a3f5f;
    --shadow-glow: 0 0 10px rgba(0, 255, 65, 0.3);
    --shadow-strong: 0 0 20px rgba(0, 255, 65, 0.5);
    
    /* Button Colors */
    --btn-close: #ff5f56;
    --btn-minimize: #ffbd2e;
    --btn-maximize: #27c93f;
    
    /* Typography */
    --font-mono: 'Fira Code', 'Monaco', 'Cascadia Code', 'Consolas', 'Courier New', monospace;
    --font-size-base: 16px;
    --font-size-large: 2.5rem;
    --font-size-medium: 1.2rem;
    --line-height: 1.6;
}

/* ================================================
   Global Reset & Base Styles
   ================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--text-primary);
    background: #000000;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

/* ================================================
   CRT Display Effects
   ================================================ */

/* CRT Screen Overlay Container */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1000;
    
    /* Scanlines effect */
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15) 0px,
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    
    /* Subtle flicker animation */
    animation: crtFlicker 0.15s infinite alternate;
}

/* CRT Glow and Vignette */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999;
    
    /* Screen glow */
    background: radial-gradient(
        ellipse at center,
        rgba(0, 255, 65, 0.05) 0%,
        transparent 60%
    );
    
    /* Vignette effect */
    box-shadow: inset 0 0 200px rgba(0, 0, 0, 0.9),
                inset 0 0 100px rgba(0, 0, 0, 0.7);
}

/* CRT Flicker Animation */
@keyframes crtFlicker {
    0% {
        opacity: 0.97;
    }
    100% {
        opacity: 1;
    }
}

/* Phosphor glow on text */
.terminal-body {
    text-shadow: 0 0 2px rgba(0, 255, 65, 0.7),
                 0 0 5px rgba(0, 255, 65, 0.4);
}

.name,
.tagline,
.prompt-user,
.prompt-path,
.prompt-command,
.cv-title,
.link-text {
    text-shadow: 0 0 3px currentColor,
                 0 0 6px currentColor;
}

/* Noise/Static Texture Overlay */
@keyframes crtNoise {
    0%, 100% { 
        background-position: 0% 0%; 
    }
    10% { 
        background-position: 40% 50%; 
    }
    20% { 
        background-position: 80% 100%; 
    }
    30% { 
        background-position: 60% 20%; 
    }
    40% { 
        background-position: 20% 80%; 
    }
    50% { 
        background-position: 70% 60%; 
    }
    60% { 
        background-position: 30% 90%; 
    }
    70% { 
        background-position: 90% 30%; 
    }
    80% { 
        background-position: 10% 70%; 
    }
    90% { 
        background-position: 50% 40%; 
    }
}

/* ================================================
   Starfield Canvas (80's Asteroid Style)
   ================================================ */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: #000000;
}

/* ================================================
   Terminal Container
   ================================================ */
.terminal-container {
    width: 100%;
    max-width: 900px;
    background: rgba(15, 20, 25, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8),
                0 0 40px rgba(0, 255, 65, 0.2);
    overflow: hidden;
    border: 1px solid var(--border-color);
    animation: terminalFadeIn 0.5s ease-out;
    position: relative;
    z-index: 1;
}

@keyframes terminalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================================
   Terminal Header
   ================================================ */
.terminal-header {
    background: var(--bg-terminal-header);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.terminal-buttons {
    display: flex;
    gap: 8px;
    margin-right: 16px;
}

.terminal-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.terminal-button-close {
    background: var(--btn-close);
}

.terminal-button-minimize {
    background: var(--btn-minimize);
}

.terminal-button-maximize {
    background: var(--btn-maximize);
}

.terminal-title {
    color: var(--text-muted);
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* ================================================
   Terminal Body
   ================================================ */
.terminal-body {
    padding: 30px;
    min-height: 400px;
}

/* ================================================
   Terminal Prompt
   ================================================ */
.terminal-prompt {
    margin-bottom: 15px;
    font-size: 14px;
    user-select: none;
}

.prompt-user {
    color: var(--accent-cyan);
    font-weight: 600;
}

.prompt-separator {
    color: var(--text-white);
    margin: 0 4px;
}

.prompt-path {
    color: var(--accent-blue);
    font-weight: 600;
}

.prompt-symbol {
    color: var(--text-white);
    margin: 0 8px;
}

.prompt-command {
    color: var(--text-secondary);
}

/* ================================================
   Hero Section
   ================================================ */
.hero {
    margin-bottom: 40px;
    animation: sectionFadeIn 0.8s ease-out 0.2s both;
}

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.profile-image-container {
    position: relative;
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    border: 2px solid var(--text-primary);
    box-shadow: var(--shadow-glow);
    transition: all 0.3s ease;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.profile-image:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-strong);
    border-color: var(--accent-cyan);
}

.profile-info {
    flex: 1;
    min-width: 250px;
}

.name {
    font-size: var(--font-size-large);
    color: var(--text-white);
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.bracket {
    color: var(--text-primary);
    font-weight: 700;
}

.tagline-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--font-size-medium);
    min-height: 35px;
    line-height: 1.2;
}

.prompt-symbol-inline {
    color: var(--text-primary);
    font-size: 1.5rem;
}

.tagline-wrapper {
    display: inline-block;
    white-space: nowrap;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.tagline {
    color: var(--text-secondary);
    font-weight: 500;
    display: inline;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

/* ================================================
   Cursor Animation (Block Style - Old School)
   ================================================ */
.cursor {
    color: var(--text-primary);
    animation: cursorBlink 0.8s infinite;
    font-weight: 400;
    font-style: normal;
    display: inline-block;
    line-height: 1;
    vertical-align: baseline;
    margin-left: 0;
}

.cursor-footer {
    color: var(--text-primary);
    animation: cursorBlink 0.8s infinite;
    font-weight: 400;
    margin-left: 4px;
    display: inline-block;
}

@keyframes cursorBlink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* ================================================
   Info Section
   ================================================ */
.info-section {
    margin-bottom: 40px;
    animation: sectionFadeIn 0.8s ease-out 0.4s both;
}

.info-content {
    margin-top: 15px;
    padding: 15px;
    background: rgba(22, 33, 62, 0.3);
    border-left: 3px solid var(--text-primary);
    border-radius: 4px;
}

.info-line {
    margin-bottom: 10px;
    font-size: 14px;
}

.info-line:last-child {
    margin-bottom: 0;
}

.info-label {
    color: var(--accent-cyan);
    font-weight: 600;
    margin-right: 10px;
}

.info-value {
    color: var(--text-white);
}

/* ================================================
   CV Section
   ================================================ */
.cv-section {
    margin-bottom: 40px;
    animation: sectionFadeIn 0.8s ease-out 0.6s both;
}

.cv-content {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.cv-category {
    background: rgba(22, 33, 62, 0.3);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--text-primary);
    border-radius: 4px;
    padding: 20px;
    transition: all 0.3s ease;
}

.cv-category:hover {
    background: rgba(0, 255, 65, 0.05);
    border-left-color: var(--accent-cyan);
}

.cv-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.cv-icon {
    font-size: 20px;
}

.cv-title {
    color: var(--accent-cyan);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.cv-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cv-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: rgba(15, 20, 25, 0.4);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.cv-item:hover {
    background: rgba(0, 255, 65, 0.08);
    transform: translateX(5px);
}

.cv-item-title {
    color: var(--text-white);
    font-weight: 600;
    font-size: 14px;
}

.cv-item-detail {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
}

/* ================================================
   Social Links Section
   ================================================ */
.social-section {
    margin-bottom: 40px;
    animation: sectionFadeIn 0.8s ease-out 0.8s both;
}

.social-links {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(22, 33, 62, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.social-link:hover {
    background: rgba(0, 255, 65, 0.1);
    border-color: var(--text-primary);
    transform: translateX(10px);
    box-shadow: var(--shadow-glow);
}

.link-prefix {
    color: var(--text-muted);
    font-weight: 600;
}

.link-icon {
    font-size: 18px;
}

.link-text {
    color: var(--text-white);
    font-weight: 600;
    min-width: 80px;
}

.link-arrow {
    color: var(--text-primary);
    margin: 0 8px;
}

.link-url {
    color: var(--text-secondary);
    flex: 1;
}

/* ================================================
   Footer
   ================================================ */
.terminal-footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    animation: sectionFadeIn 0.8s ease-out 0.8s both;
}

.copyright {
    margin-top: 15px;
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
}

/* CRT effect now applied globally via body::before */

/* ================================================
   Responsive Design
   ================================================ */
@media (max-width: 768px) {
    :root {
        --font-size-base: 14px;
        --font-size-large: 2rem;
        --font-size-medium: 1rem;
    }
    
    body {
        padding: 10px;
    }
    
    .terminal-body {
        padding: 20px;
    }
    
    .profile-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .profile-image {
        width: 100px;
        height: 100px;
    }
    
    .name {
        font-size: 1.8rem;
    }
    
    .tagline-container {
        font-size: 0.9rem;
        flex-wrap: wrap;
    }
    
    .social-link {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .link-text {
        min-width: 70px;
    }
    
    .social-link:hover {
        transform: translateX(5px);
    }
}

@media (max-width: 480px) {
    .terminal-header {
        padding: 10px 12px;
    }
    
    .terminal-title {
        font-size: 12px;
    }
    
    .terminal-button {
        width: 10px;
        height: 10px;
    }
    
    .profile-image {
        width: 80px;
        height: 80px;
    }
    
    .name {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
    
    .link-icon {
        font-size: 16px;
    }
}

/* ================================================
   Print Styles
   ================================================ */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .terminal-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .terminal-header {
        background: #f0f0f0;
    }
    
    .cursor,
    .cursor-footer {
        display: none;
    }
}

/* ================================================
   Accessibility
   ================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 4px;
}

/* ================================================
   Selection Styles
   ================================================ */
::selection {
    background: var(--text-primary);
    color: var(--bg-terminal);
}

::-moz-selection {
    background: var(--text-primary);
    color: var(--bg-terminal);
}

