/* --- Retro-Futuristic Terminal Theme --- */

/* --- 0. Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* --- 1. Variables --- */
:root {
    --bg-color: #0d0d0d;
    --text-color: #ff9a00; /* Amber */
    --accent-color: #ff9a00;
    --accent-hover: #ffc940;
    --border-color: rgba(255, 154, 0, 0.3);
    --font-mono: 'Fira Code', 'Source Code Pro', 'Menlo', 'Consolas', 'Liberation Mono', monospace;
    --scanline-opacity: 0.05;
    --glow-shadow: 0 0 5px var(--accent-color), 0 0 10px var(--accent-color), 0 0 15px rgba(255, 154, 0, 0.5);
}

/* No separate dark theme needed, this is a dark-by-default design */

/* --- 2. General & CRT Effect --- */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-mono);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
    text-shadow: 0 0 2px var(--accent-color);
    animation: text-flicker 3s linear infinite;
}

/* Scanline Overlay */
body::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0) 0,
        rgba(0, 0, 0, 0) 2px,
        rgba(255, 255, 255, var(--scanline-opacity)) 3px,
        rgba(255, 255, 255, var(--scanline-opacity)) 4px
    );
    z-index: 10000;
    pointer-events: none;
    animation: scanlines 10s linear infinite;
}

@keyframes scanlines {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}

@keyframes text-flicker {
    0% { text-shadow: 0 0 2px var(--accent-color); }
    30% { text-shadow: 0 0 2px var(--accent-color); }
    30.1% { text-shadow: none; }
    30.2% { text-shadow: 0 0 2px var(--accent-color); }
    50% { text-shadow: 0 0 2px var(--accent-color); }
    50.1% { text-shadow: 0 0 5px var(--accent-color); }
    50.6% { text-shadow: 0 0 2px var(--accent-color); }
    100% { text-shadow: 0 0 2px var(--accent-color); }
}

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

/* --- 3. Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--accent-color);
    text-transform: uppercase;
}

h1 {
    font-size: 2.5rem;
    letter-spacing: 2px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

h2::before, h2::after {
    content: '========================================';
    display: block;
    font-size: 0.5em;
    letter-spacing: -2px;
    opacity: 0.5;
    overflow: hidden;
    white-space: nowrap;
}

h3 {
    font-size: 1.2rem;
}

p {
    margin-bottom: 1rem;
    max-width: 70ch;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

a:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
    text-shadow: none;
}

/* --- 4. Header & Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo a {
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-logo a::after {
    content: '_';
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.25rem 0;
}

.theme-toggle {
    display: none; /* No theme toggle for this design */
}

.mobile-toggle {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
}

/* --- 5. Sections & Hero --- */
.section {
    padding: 6rem 0;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    text-align: left;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
}

.btn {
    padding: 0.8rem 2.5rem;
    font-weight: 500;
    border: 1px solid var(--accent-color);
    background: transparent;
    color: var(--accent-color);
    transition: all 0.2s ease;
    cursor: pointer;
    text-transform: uppercase;
}

.btn:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
    box-shadow: var(--glow-shadow);
    text-shadow: none;
}

/* --- 6. ASCII-style Cards --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.project-card {
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    position: relative;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    border-color: var(--accent-hover);
    box-shadow: var(--glow-shadow);
}

.project-card::before, .project-card::after {
    content: '+';
    position: absolute;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--accent-color);
    transition: transform 0.3s;
}

.project-card::before {
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
}

.project-card::after {
    bottom: 0;
    right: 0;
    transform: translate(50%, 50%);
}

.project-card:hover::before { transform: translate(-50%, -50%) rotate(180deg); }
.project-card:hover::after { transform: translate(50%, 50%) rotate(180deg); }


.project-image {
    display: none; /* No images in this theme */
}

.project-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    color: var(--bg-color);
    background-color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-shadow: none;
}

.project-card h3 {
    margin-bottom: 0.5rem;
}

.project-card p {
    flex-grow: 1;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.project-link {
    font-size: 1rem;
}

/* --- 7. About & Contact --- */
#about .container, #contact .container {
    max-width: 800px;
}

.contact-form {
    margin-top: 3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    background-color: transparent;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: var(--glow-shadow);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

/* --- 8. Footer --- */
.footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.social-links a {
    font-size: 1.5rem;
}

.footer p {
    font-size: 0.9rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- 9. Image Grid --- */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.image-card {
    border: 1px solid var(--border-color);
    background-color: #1a1a1a;
    padding: 1rem;
    text-align: center;
}

.image-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2);
    mix-blend-mode: screen;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.image-card:hover img {
    opacity: 1;
}

.image-card-title {
    margin-top: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* --- 10. Responsive --- */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        flex-direction: column;
        background-color: var(--bg-color);
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 0;
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-item {
        width: 100%;
        text-align: center;
    }

    .nav-link {
        display: block;
        padding: 1rem;
    }

    .mobile-toggle {
        display: block;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    h1 { font-size: 1.8rem; }

    .hero-buttons {
        flex-direction: column;
    }
}
