:root {
    --bg-color: #02040a;
    --accent-red: #ff3333;
    --accent-red-glow: rgba(255, 51, 51, 0.5);
    --accent-blue: #00fff9;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --glass-bg: rgba(8, 12, 21, 0.85);
    --glass-border: rgba(255, 51, 51, 0.25);
    --font-main: 'Rajdhani', sans-serif;
    --font-accent: 'Orbitron', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    font-family: var(--font-main);
}

/* --- SCANLINE EFFECT --- */
body::after {
    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: 9999;
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    opacity: 0.3;
}

/* --- BACKGROUND --- */
#lab-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #010206;
    z-index: -2;
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 51, 51, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 51, 51, 0.08) 1px, transparent 1px);
    background-size: 80px 80px;
    z-index: -1;
    mask-image: radial-gradient(circle at center, black, transparent 95%);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8rem 2rem;
}

/* --- HEADER --- */
header {
    text-align: center;
    margin-bottom: 10rem;
}

.logo-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 51, 51, 0.1);
    border: 2px solid var(--accent-red);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3.5rem;
    color: var(--accent-red);
    box-shadow: 0 0 50px var(--accent-red-glow);
    margin: 0 auto 3rem;
    animation: breathe 4s infinite ease-in-out;
}

h1 {
    font-family: var(--font-accent);
    font-size: 7rem;
    font-weight: 900;
    letter-spacing: -4px;
    position: relative;
    display: inline-block;
    color: #fff;
    line-height: 1;
}

h1::before, h1::after {
    content: 'RedRiveRR Lab';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
}

h1::before {
    color: #ff0055;
    z-index: -1;
    animation: glitch-anim 0.3s infinite;
}

h1::after {
    color: #00fff9;
    z-index: -2;
    animation: glitch-anim 0.3s reverse infinite;
}

@keyframes glitch-anim {
    0% { transform: translate(0); }
    33% { transform: translate(-4px, 2px); }
    66% { transform: translate(4px, -2px); }
    100% { transform: translate(0); }
}

.tagline {
    font-family: var(--font-accent);
    font-size: 1.1rem;
    letter-spacing: 12px;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    opacity: 0.7;
}

/* --- STATS BAR --- */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-bottom: 10rem;
}

.stat-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--accent-red);
    box-shadow: 0 0 30px var(--accent-red-glow);
}

.stat-label {
    font-family: var(--font-accent);
    font-size: 0.75rem;
    color: var(--accent-red);
    letter-spacing: 4px;
    margin-bottom: 1.2rem;
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
}

/* --- CARDS & LINKS --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.glass-card:hover {
    border-color: #fff;
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 10rem;
    flex-wrap: wrap;
}

.social-links a {
    padding: 2.5rem 4rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-family: var(--font-accent);
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.social-links i {
    font-size: 2.5rem;
    color: var(--accent-red);
}

/* --- PROJECT SECTION --- */
.section-title {
    font-family: var(--font-accent);
    font-size: 1rem;
    letter-spacing: 15px;
    color: var(--accent-red);
    text-align: center;
    margin-bottom: 5rem;
}

.project-grid {
    display: flex;
    justify-content: center;
    margin-bottom: 10rem;
}

.project-card {
    width: 480px !important;
    height: 480px !important;
    padding: 5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.project-icon {
    font-size: 6rem;
    color: var(--accent-red);
    margin-bottom: 2.5rem;
    filter: drop-shadow(0 0 20px var(--accent-red-glow));
}

.project-card h3 {
    font-family: var(--font-accent);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.project-card p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 3rem;
}

.project-status {
    background: rgba(255, 51, 51, 0.1);
    border: 1px solid var(--accent-red);
    padding: 1rem 2.5rem;
    border-radius: 4px;
    font-family: var(--font-accent);
    font-size: 0.8rem;
    letter-spacing: 4px;
    font-weight: bold;
}

/* --- TECH STACK --- */
.tech-grid {
    display: flex;
    justify-content: center;
    gap: 6rem;
    padding: 6rem;
    flex-wrap: wrap;
}

.tech-item {
    font-size: 5rem;
    color: var(--text-secondary);
    transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tech-item:hover {
    color: var(--accent-red);
    transform: rotate(15deg) scale(1.4);
    filter: drop-shadow(0 0 30px var(--accent-red-glow));
}

/* --- TERMINAL WINDOW --- */
.terminal-window {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 500px;
    height: 350px;
    border-radius: 12px;
    z-index: 5000;
    box-shadow: 0 40px 100px rgba(0,0,0,1);
    background: #050505;
    border: 1px solid var(--accent-red);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Taşmayı engeller */
}

.terminal-header {
    background: #111;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 51, 51, 0.3);
}

.terminal-title {
    font-family: var(--font-accent);
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
    flex: 1;
}

.close-icon {
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: 0.3s;
}

.close-icon:hover {
    color: var(--accent-red);
    transform: rotate(90deg);
}

/* --- TERMINAL TOGGLE --- */
.terminal-window.hidden {
    display: none;
}

.terminal-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 1rem 1.5rem;
    display: none;
    align-items: center;
    gap: 12px;
    color: #fff;
    cursor: pointer;
    z-index: 4999;
    font-family: var(--font-accent);
    font-weight: 700;
    border-color: var(--accent-red);
}

.terminal-toggle-btn.visible {
    display: flex;
    animation: slideIn 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes slideIn {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.terminal-body {
    flex: 1;
    padding: 20px;
    font-size: 0.95rem;
    color: #22c55e;
    overflow-y: auto;
    font-family: 'Courier New', Courier, monospace;
}

.terminal-input-area {
    background: #000;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-top: 1px solid rgba(255, 51, 51, 0.15);
}

.prompt {
    color: var(--accent-red);
    font-weight: 900;
    font-size: 1.2rem;
}

#terminal-input {
    background: transparent;
    border: none;
    color: #fff;
    width: 100%;
    outline: none;
    font-family: monospace;
    font-size: 1.1rem;
}

/* --- FOOTER --- */
footer {
    padding-bottom: 8rem;
    text-align: center;
}

.footer-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
    opacity: 0.3;
    margin-bottom: 3rem;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); box-shadow: 0 0 50px var(--accent-red-glow); }
    50% { transform: scale(1.05); box-shadow: 0 0 80px var(--accent-red); }
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1024px) {
    h1 { font-size: 4.5rem; }
    .project-card { width: 400px !important; height: 400px !important; padding: 3rem; }
    .terminal-window { width: 400px; height: 300px; }
}

@media (max-width: 768px) {
    .container { padding: 4rem 1.5rem; }
    
    h1 { font-size: 3rem; letter-spacing: -1px; }
    .tagline { font-size: 0.8rem; letter-spacing: 4px; }
    
    .logo-circle { width: 100px; height: 100px; font-size: 2.5rem; }

    .stats-bar { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .stat-item { padding: 1.5rem; }
    .stat-value { font-size: 1.8rem; }

    .social-links { gap: 1rem; }
    .social-links a { padding: 1.5rem; width: 100%; justify-content: center; font-size: 1rem; }

    .project-card { 
        width: 100% !important; 
        height: auto !important; 
        aspect-ratio: 1/1 !important;
        padding: 2.5rem; 
    }
    .project-card h3 { font-size: 1.8rem; }
    .project-card p { font-size: 0.9rem; }

    .tech-grid { gap: 3rem; padding: 2rem; }
    .tech-item { font-size: 3.5rem; }

    .terminal-window { 
        width: calc(100% - 40px); 
        height: 300px; 
        bottom: 20px; 
        right: 20px; 
    }
    
    .terminal-toggle-btn {
        bottom: 20px;
        right: 20px;
        padding: 0.8rem 1.2rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2.2rem; }
    .stats-bar { grid-template-columns: 1fr; }
    .terminal-window { width: calc(100% - 20px); right: 10px; bottom: 10px; }
    .terminal-toggle-btn { right: 10px; bottom: 10px; }
}
