:root {
    --bg-color: #020617; /* Deep Obsidian */
    --text-color: #00f2fe; /* Electric Teal */
    --accent-color: #4facfe; /* Sky Blue */
    --dim-text: #0f4c75;
    --cursor-color: #00f2fe;
    --header-bg: rgba(15, 23, 42, 0.8);
    --window-border: rgba(79, 172, 254, 0.3);
    --crt-line-opacity: 0.15;
    --font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
    --glow-spread: rgba(0, 242, 254, 0.2);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(79, 172, 254, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(0, 242, 254, 0.05) 0%, transparent 50%);
}

/* CRT EFFECTS */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
    z-index: 10;
    pointer-events: none;
    background-size: 100% 3px, 3px 100%;
    opacity: 0.7;
}

.scanline {
    width: 100%;
    height: 15vh;
    z-index: 11;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(0, 242, 254, 0.08) 50%, rgba(0, 0, 0, 0) 100%);
    opacity: 0.6;
    position: absolute;
    bottom: 100%;
    animation: scanline 6s linear infinite;
    pointer-events: none;
}

@keyframes scanline {
    0% { bottom: 100%; }
    100% { bottom: -20vh; }
}

/* TERMINAL WINDOW */
.terminal {
    width: 95%;
    max-width: 1000px;
    height: 85vh;
    border: 1px solid var(--window-border);
    border-radius: 12px;
    box-shadow: 0 0 40px var(--glow-spread), inset 0 0 20px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    background-color: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1;
    overflow: hidden;
}

.terminal-header {
    background-color: var(--header-bg);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--window-border);
    backdrop-filter: blur(5px);
}

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

.btn {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: inset 0 0 4px rgba(255,255,255,0.2);
}

.btn.red { background-color: #ff5f56; }
.btn.yellow { background-color: #ffbd2e; }
.btn.green { background-color: #27c93f; }

.title {
    flex-grow: 1;
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
    letter-spacing: 1px;
}

.terminal-body {
    flex-grow: 1;
    padding: 25px;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.7;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) rgba(0,0,0,0.3);
}

.terminal-body::-webkit-scrollbar {
    width: 8px;
}

.terminal-body::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
}

.terminal-body::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 4px;
}

/* CONTENT STYLES */
.output-row {
    margin-bottom: 12px;
    display: flex;
    gap: 12px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.prompt {
    color: var(--accent-color);
    font-weight: 700;
    text-shadow: 0 0 5px rgba(79, 172, 254, 0.5);
}

.command {
    color: #f8fafc;
    font-weight: 400;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.response {
    margin-bottom: 30px;
    padding-left: 15px;
    border-left: 2px solid transparent;
    transition: border-color 0.3s;
    animation: fadeIn 0.4s ease-out;
    color: #cbd5e1;
}

.response:hover {
    border-left-color: var(--window-border);
}

.hidden {
    display: none;
}

/* TYPOGRAPHY & HIGHLIGHTS */
strong {
    color: var(--text-color);
    font-weight: 700;
    text-shadow: 0 0 8px rgba(0, 242, 254, 0.3);
}

.hero-name {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4), 0 0 5px var(--text-color);
    letter-spacing: -0.5px;
}

.hero-title {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 8px;
    font-weight: 300;
}

.hero-loc {
    color: #64748b;
    font-size: 0.95rem;
}

/* GRID LAYOUTS */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 0;
}

.skills-grid span {
    border: 1px solid var(--window-border);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    background: rgba(79, 172, 254, 0.05);
    color: var(--text-color);
    transition: all 0.2s ease;
    backdrop-filter: blur(2px);
}

.skills-grid span:hover {
    background: rgba(79, 172, 254, 0.15);
    border-color: var(--text-color);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
    transform: translateY(-2px);
}

/* EXPERIENCE */
.exp-item {
    margin-bottom: 20px;
    position: relative;
    padding-left: 15px;
}

.exp-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--text-color);
}

.exp-item .date {
    color: #64748b;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 4px;
}

.exp-item .exp-header {
    color: #f1f5f9;
    font-size: 1.05rem;
    margin-bottom: 2px;
}

.exp-item .exp-details {
    color: #94a3b8;
    font-size: 0.9rem;
}

.metrics-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 242, 254, 0.05);
    padding: 15px 30px;
    border-left: 3px solid var(--text-color);
    margin-bottom: 20px;
}

.metric {
    text-align: center;
}

.metric .val {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--text-color);
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

.metric .plus {
    font-size: 1.5rem;
    color: #f1f5f9;
    font-weight: bold;
}

.metric .label {
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: uppercase;
    margin-top: 5px;
    letter-spacing: 1px;
}

/* PROJECTS */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.project-card {
    border: 1px solid var(--window-border);
    background: rgba(15, 23, 42, 0.4);
    padding: 18px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 242, 254, 0.1);
    border-color: var(--accent-color);
    background: rgba(15, 23, 42, 0.6);
}

.proj-name {
    color: var(--text-color);
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.proj-desc {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.5;
}

.project-card.interactive {
    cursor: pointer;
}

.project-card.interactive:hover {
    border-color: var(--text-color);
    box-shadow: 0 5px 20px rgba(0, 242, 254, 0.15);
    background: rgba(15, 23, 42, 0.75);
}

.click-hint {
    display: block;
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--text-color);
    opacity: 0.6;
    font-weight: 700;
}

/* CONTACT */
.contact-info p {
    margin-bottom: 10px;
}

.contact-info a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px dashed transparent;
}

.contact-info a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    border-bottom: 1px dashed var(--text-color);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--accent-color);
    color: #000;
    text-decoration: none;
    font-weight: 700;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.download-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px var(--accent-color);
    transform: translateY(-2px);
}

.download-note {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #64748b;
}

.social-icons {
    margin-top: 20px;
    display: flex;
    gap: 18px;
}

.social-icons a {
    color: #94a3b8;
    border: none;
}

.social-icons a:hover {
    color: var(--text-color);
    transform: scale(1.1);
}

/* INPUT LINE */
.input-line {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed rgba(79, 172, 254, 0.2);
}

input {
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: var(--font-family);
    font-size: 1rem;
    outline: none;
    flex-grow: 1;
    text-shadow: 0 0 2px rgba(255,255,255,0.3);
    min-width: 0;
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 18px;
    background-color: var(--cursor-color);
    animation: blink 1.2s step-end infinite;
    margin-left: -10px; /* Offset to sit nicely next to text */
    pointer-events: none;
    box-shadow: 0 0 5px var(--text-color);
}

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

/* FOOTER */
.terminal-footer {
    padding: 12px 25px;
    font-size: 0.8rem;
    color: #64748b;
    border-top: 1px solid var(--window-border);
    background-color: rgba(15, 23, 42, 0.5);
    display: flex;
    justify-content: space-between;
}

/* SIDE WIDGETS */
.side-widget {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 220px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--window-border);
    border-radius: 8px;
    padding: 15px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 0; /* Ensures it slips behind the main terminal when space is tight */
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.1);
    animation: fadeIn 0.8s ease-out;
}

.left-widget {
    left: 20px;
}

.right-widget {
    right: 20px;
}

.widget-header {
    font-size: 0.75rem;
    color: var(--dim-text);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    border-bottom: 1px dashed var(--window-border);
    padding-bottom: 5px;
    font-weight: 700;
}

.widget-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.node-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.node-item svg {
    filter: drop-shadow(0 0 3px rgba(0, 242, 254, 0.4));
    opacity: 0.9;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.node-item:hover svg {
    opacity: 1;
    filter: drop-shadow(0 0 8px var(--text-color));
    transform: scale(1.1);
}

.node-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.node-info span {
    font-size: 0.85rem;
    color: #e2e8f0;
    font-weight: 700;
}

.node-info small {
    font-size: 0.7rem;
    color: var(--accent-color);
}

.telemetry-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.75rem;
    color: #e2e8f0;
}

.telemetry-item > span {
    font-weight: 700;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--window-border);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    background: var(--text-color);
    box-shadow: 0 0 5px var(--text-color);
}

.net-stats {
    color: var(--accent-color);
    font-family: var(--font-family);
    font-size: 0.75rem;
}

/* RESPONSIVE - TABLET & MEDIUM SCREENS */
@media (max-width: 1024px) {
    .terminal {
        width: 98%;
        height: 96vh;
    }
    .side-widget {
        display: none; /* Hide background widgets on smaller screens */
    }
}

/* RESPONSIVE - SMALL TABLETS / LARGE PHONES */
@media (max-width: 768px) {
    .terminal {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        border: none;
        max-width: none;
        box-shadow: none;
    }
    
    .terminal-header {
        padding: 10px 15px;
    }

    .terminal-body {
        padding: 15px;
        font-size: 0.9rem;
    }

    .hero-name {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 1.05rem;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .output-row {
        gap: 8px;
    }
    
    .input-line {
        gap: 8px;
    }
}

/* RESPONSIVE - MOBILE PHONES */
@media (max-width: 480px) {
    .hero-name {
        font-size: 1.6rem;
    }
    
    .hero-title {
        font-size: 0.95rem;
    }
    
    .terminal-body {
        padding: 12px;
        font-size: 0.85rem;
    }
    
    .prompt {
        font-size: 0.8rem;
    }
    
    .skills-grid span {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 12px;
        height: 12px;
    }
    
    .title {
        font-size: 0.75rem;
    }
    
    .terminal-footer {
        padding: 10px 15px;
        font-size: 0.75rem;
    }
}
