:root {
    --bg-color: #1a1a1a;
    --text-color: #00ff00; /* Vibrant green for that terminal look */
    --accent-color: #00ff00;
    --secondary-text-color: #b0b0b0;
    --link-hover-color: #00ff66;
    --border-color: #333;
    --font-family-mono: 'Roboto Mono', monospace;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family-mono);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    /* Added text-shadow for a subtle glow effect */
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.4);
}

/* --- New Scanlines Effect --- */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.3),
        rgba(0, 0, 0, 0.3) 1px,
        transparent 1px,
        transparent 2px
    );
    animation: scan 10s linear infinite;
    opacity: 0.1;
    z-index: 1000;
}

@keyframes scan {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 100px;
    }
}
/* --- End Scanlines Effect --- */


h1, h2, h3 {
    color: var(--accent-color);
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--link-hover-color);
}

.main-header {
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
    border-bottom: 2px solid var(--border-color);
    min-height: 80px; /* Give it a minimum height to avoid layout shift */
}

.main-header h1 {
    font-size: 3rem;
    display: inline-block;
    position: relative;
    margin: 0;
    /* The blinking cursor will now be handled by the JS, so we keep the underscore */
}

.main-header h1::after {
    content: '_';
    opacity: 1;
    animation: blink 1s infinite;
}

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

.main-header nav ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.main-header nav a {
    font-weight: bold;
}

.terminal-section {
    max-width: 800px;
    margin: 4rem auto;
    padding: 2rem;
    border: 2px solid var(--border-color);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
}

.terminal-section h2 {
    border-bottom: 2px dashed var(--accent-color);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: #2b2b2b;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* Using flexbox for better alignment */
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 255, 0, 0.4);
}

/* Ensure the link is always at the bottom of the card */
.project-card p {
    flex-grow: 1;
}

.project-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.project-link:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
    text-shadow: none; /* Remove glow on hover for better contrast */
}

.blog-list {
    list-style: none;
    padding: 0;
}

.blog-list li {
    margin-bottom: 1.5rem;
}

.blog-list a {
    display: block;
    border-left: 3px solid var(--accent-color);
    padding-left: 1rem;
    transition: background-color 0.3s ease;
}

.blog-list a:hover {
    background-color: #2b2b2b;
}

.blog-date {
    font-size: 0.8rem;
    color: var(--secondary-text-color);
}

.links-list {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.links-list li a {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Responsiveness */
@media (max-width: 600px) {
    .main-header h1 {
        font-size: 2rem;
    }

    .main-header nav ul {
        flex-direction: column;
        gap: 1rem;
    }
}

.project-card .card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: var(--text-color);
}

.project-card .card-link p {
    flex-grow: 1;
}
