/* Import IBM Plex Mono */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap');

/* Global Color Palette & Variables */
:root {
    --color-near-black: #1a1a1a;
    --color-dark-gray: #464646;
    --color-light-gray: #e5e5e5;
    --color-light-blue: #bde0fe;
    --color-navy-blue: #003049;
    --color-orange: #f77f00; /* Dev mode */
    --color-leather-brown: #8b5a2b;
    
    --font-primary: 'IBM Plex Mono', monospace;
}

body {
    margin: 0;
    font-family: var(--font-primary);
    background-color: var(--color-near-black);
    color: var(--color-light-gray);
}

/* Sticky Navigation */
.nav {
    position: sticky;
    top: 0;
    background-color: var(--color-light-gray);
    color: var(--color-near-black);
    padding: 1rem 2rem;
    z-index: 1000; /* Keeps nav above all other scrolling content */
    display: flex;
    gap: 1.5rem;
    border-bottom: 2px solid var(--color-navy-blue);
}

.nav__link {
    cursor: pointer;
    font-weight: 600;
}

.nav__link:hover {
    color: var(--color-orange);
}

/* Hero Banner */
.hero {
    background-color: var(--color-light-blue);
    color: var(--color-navy-blue);
    text-align: center;
    padding: 4rem 2rem;
    border-bottom: 4px solid var(--color-near-black);
}

.hero__title {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
}

.hero__subtitle {
    margin: 0 0 2rem 0;
    font-size: 1.25rem;
}

.hero__socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    fill: var(--color-navy-blue);
    transition: fill 0.2s ease;
}

.social-icon:hover {
    fill: var(--color-orange);
}

/* Portfolio Container & Search */
.portfolio {
    padding: 3rem 2rem;
}

.portfolio__header {
    text-align: center;
    margin-bottom: 3rem;
}

.portfolio__title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.portfolio__search-input {
    padding: 0.5rem 1rem;
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    border: none;
    font-family: var(--font-primary);
    background-color: var(--color-light-gray);
    color: var(--color-near-black);
}

/* The CSS Grid */
.portfolio__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Project Cards */
.project-card {
    background-color: var(--color-dark-gray);
    border: 2px solid var(--color-light-gray);
    border-radius: 8px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-orange);
}

.project-card__title {
    padding: 1.5rem;
    margin: 0;
    text-align: center;
}

.project-card__tag-ribbon {
    background-color: var(--color-orange);
    color: var(--color-near-black);
    padding: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modal Overlay */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.is-active {
    display: flex;
}

.modal__content {
    background-color: var(--color-light-blue);
    color: var(--color-near-black);
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    border-radius: 8px;
    position: relative;
    border: 3px solid var(--color-near-black);
}

.modal__close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    font-family: var(--font-primary);
}

.modal__title {
    margin-top: 0;
}

.modal__actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.modal__btn--play {
    background-color: var(--color-near-black);
    color: var(--color-light-gray);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
}

.modal__btn--play:hover {
    background-color: var(--color-orange);
    color: var(--color-near-black);
}

.modal__link {
    color: var(--color-navy-blue);
    text-decoration: underline;
}

.modal__warning {
    margin-top: 1.5rem;
    background-color: #ffb3ba;
    color: #900;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

/* 503 Error Page */
.error-page {
    text-align: center;
    padding: 5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.error-page__code {
    font-size: 6rem;
    color: var(--color-orange);
    margin: 0;
    line-height: 1;
}

.error-page__title {
    font-size: 2rem;
    color: var(--color-light-blue);
    margin: 1rem 0;
}

.error-page__desc {
    color: var(--color-light-gray);
    font-size: 1.1rem;
}