/* ==========================================
   TERMINAL-STYLE AI RESEARCH PORTFOLIO
   Black background, green/white text, monospace
   ========================================== */

:root {
    /* Terminal Colors */
    --bg: #030303;
    --bg-terminal: rgba(13, 13, 13, 0.9);
    --bg-header: #1a1a1a;

    --green: #00ff41;
    --green-dim: #008f11;
    --green-glow: rgba(0, 255, 65, 0.2);

    --white: #ffffff;
    --white-dim: #b3b3b3;
    --gray: #666666;
    --gray-dim: #333333;

    --yellow: #ffd700;
    --cyan: #00f2ff;
    --red: #ff3e3e;
    --orange: #ff9d00;

    /* Typography */
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    /* Sizing */
    --terminal-padding: clamp(1.5rem, 4vw, 3.5rem);
}

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 15px;
}

body {
    font-family: var(--font-mono);
    background: var(--bg);
    color: var(--white-dim);
    line-height: 1.7;
    overflow-x: hidden;
}

#canvas-3d {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

::selection {
    background: var(--green);
    color: var(--bg);
}

a {
    color: var(--green);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--white);
    text-shadow: 0 0 10px var(--green-glow);
}

/* ==========================================
   CRT EFFECTS
   ========================================== */
.scanlines {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.1) 0px,
            rgba(0, 0, 0, 0.1) 1px,
            transparent 1px,
            transparent 2px);
    pointer-events: none;
    z-index: 9999;
    opacity: 0.4;
}

.crt-flicker {
    position: fixed;
    inset: 0;
    background: transparent;
    pointer-events: none;
    z-index: 9998;
    animation: flicker 0.1s infinite;
    opacity: 0.02;
}

@keyframes flicker {
    0% {
        opacity: 0.02;
    }

    50% {
        opacity: 0.04;
    }

    100% {
        opacity: 0.02;
    }
}

/* ==========================================
   TERMINAL WINDOW
   ========================================== */
.terminal {
    max-width: 1100px;
    margin: 4rem auto;
    background: var(--bg-terminal);
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 30px 80px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(0, 255, 65, 0.1);
}

/* Terminal Header */
.terminal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-header);
    border-bottom: 1px solid #333;
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
}

.terminal-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.btn-close {
    background: #ff5f56;
}

.btn-minimize {
    background: #ffbd2e;
}

.btn-maximize {
    background: #27ca40;
}

.terminal-title {
    flex: 1;
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray);
}

.terminal-nav {
    display: flex;
    gap: 1.5rem;
}

.terminal-nav a {
    font-size: 0.8rem;
    color: var(--gray);
}

.terminal-nav a:hover {
    color: var(--green);
}

/* Terminal Body */
.terminal-body {
    padding: var(--terminal-padding);
}

/* Terminal Footer */
.terminal-footer {
    padding: 1rem;
    border-top: 1px solid #222;
    text-align: center;
}

.footer-text {
    font-size: 0.75rem;
    color: var(--gray-dim);
}

/* ==========================================
   PROMPT & COMMANDS
   ========================================== */
.prompt-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.prompt {
    color: var(--green);
    font-weight: 500;
}

.command {
    color: var(--white);
}

.typing {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 1.5s steps(20) forwards;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

.cursor {
    color: var(--green);
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* ==========================================
   OUTPUT SECTIONS
   ========================================== */
.section {
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.output {
    padding: 1rem 0 1rem 1.5rem;
    border-left: 2px solid #333;
    margin-bottom: 2rem;
}

.section-title {
    color: var(--green);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.subsection-title {
    color: var(--cyan);
    font-size: 0.95rem;
    font-weight: 500;
    margin: 2rem 0 1rem;
}

/* ==========================================
   TEXT STYLES
   ========================================== */
.highlight-green {
    color: var(--green);
}

.highlight-white {
    color: var(--white);
    font-weight: 500;
}

.dim {
    color: var(--gray);
}

.strikethrough {
    text-decoration: line-through;
}

/* ==========================================
   HERO
   ========================================== */
.ascii-art {
    color: var(--green);
    font-size: 0.85rem;
    line-height: 1.1;
    margin-bottom: 2rem;
    overflow-x: auto;
    text-shadow: 0 0 15px var(--green-glow);
    font-weight: bold;
}

.hero-title {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.hero-desc {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

.hero-desc em {
    color: var(--white);
    font-style: normal;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.stat {
    padding: 0.5rem 0;
}

.stat-label {
    color: var(--gray);
}

.stat-value {
    color: var(--white);
    margin-left: 0.5rem;
}

/* ==========================================
   RESEARCH SECTION
   ========================================== */
.research-block {
    margin-bottom: 1.5rem;
}

.research-item {
    margin-bottom: 0.75rem;
    padding-left: 0;
}

.bullet {
    color: var(--green);
    margin-right: 0.75rem;
}

.courses-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.course {
    padding: 0.4rem 0.8rem;
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid #333;
    font-size: 0.85rem;
}

/* ==========================================
   FILE LISTING
   ========================================== */
.file-listing {
    font-size: 0.9rem;
}

.file-item {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px dashed #222;
}

.file-item:last-child {
    border-bottom: none;
}

.file-perms {
    color: var(--gray-dim);
    font-size: 0.8rem;
}

.file-name {
    color: var(--green);
    font-weight: 500;
    min-width: 120px;
}

.file-desc {
    color: var(--gray);
    flex: 1;
}

/* ==========================================
   ABOUT
   ========================================== */
.about-text {
    margin-bottom: 1rem;
    line-height: 1.9;
}

.about-text em {
    color: var(--cyan);
    font-style: italic;
}

/* ==========================================
   TIMELINE (GIT LOG)
   ========================================== */
.timeline {
    font-size: 0.9rem;
}

.timeline-year {
    margin: 2rem 0 1rem;
}

.year-marker {
    color: var(--yellow);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 0, 0.1);
    border-left: 3px solid var(--yellow);
}

.commit {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.6rem 0;
    border-bottom: 1px dashed #1a1a1a;
    transition: all 0.2s ease;
}

.commit:hover {
    background: rgba(0, 255, 0, 0.02);
    padding-left: 0.5rem;
    border-color: var(--green);
}

.commit.current {
    background: rgba(0, 255, 0, 0.05);
    border-left: 3px solid var(--green);
    padding-left: 1rem;
}

.commit.featured {
    background: rgba(255, 170, 0, 0.03);
}

.hash {
    color: var(--orange);
    font-size: 0.8rem;
}

.message {
    flex: 1;
    min-width: 200px;
}

.date {
    font-size: 0.8rem;
}

.tag {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    background: var(--green);
    color: var(--bg);
    font-weight: 600;
}

.tag.award {
    background: var(--orange);
}

.tag.special {
    background: var(--cyan);
}

.link {
    font-size: 0.8rem;
}

.link a {
    color: var(--cyan);
}

/* ==========================================
   CONTACT
   ========================================== */
.contact-text {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-link {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 255, 0, 0.02);
    border: 1px solid #222;
    transition: all 0.2s ease;
}

.contact-link:hover {
    border-color: var(--green);
    background: rgba(0, 255, 0, 0.05);
}

.link-label {
    color: var(--gray);
}

.link-value {
    color: var(--white);
}

.prompt-line.final {
    margin-top: 3rem;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .terminal {
        margin: 0;
        border-radius: 0;
        border: none;
    }

    .terminal-nav {
        display: none;
    }

    .ascii-art {
        font-size: 0.35rem;
    }

    .commit {
        flex-direction: column;
        gap: 0.25rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}