/* ========================================
   UNDERTALE-INSPIRED PERSONAL WEBSITE
   ======================================== */

/* ========================================
   FONT FACE DECLARATIONS
   ======================================== */

@font-face {
    font-family: 'Determination Mono';
    src: url('fonts/DTM-Mono.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Determination Mono', 'VT323', monospace;
    background-color: #000000;
    color: #ffffff;
    line-height: 1.6;
    font-size: 20px;
}

/* ========================================
   LAYOUT & CONTAINERS
   ======================================== */

.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.container {
    max-width: 800px;
    width: 100%;
}

/* ========================================
   TITLE SCREEN
   ======================================== */

.title-screen {
    text-align: center;
}

.pixel-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 36px;
    color: #ff0000;
    margin-bottom: 20px;
    text-shadow: 4px 4px 0 #ffffff;
    letter-spacing: 2px;
}

.subtitle {
    font-family: 'Press Start 2P', monospace;
    font-size: 16px;
    color: #ffd700;
    margin-bottom: 40px;
}

.tagline {
    font-size: 18px;
    color: #f0f0f0;
    margin-bottom: 60px;
    line-height: 1.5;
}

/* Main Menu */
.main-menu {
    margin-bottom: 80px;
}

.main-menu ul {
    list-style: none;
    display: inline-block;
    text-align: left;
}

.main-menu li {
    margin-bottom: 20px;
}

.menu-item {
    font-family: 'Press Start 2P', monospace;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.menu-item:hover {
    color: #ffff00;
}

.menu-item:hover .selector {
    color: #ffff00;
    animation: pulse 0.5s ease-in-out infinite;
}

.selector {
    color: #ff0000;
    margin-right: 10px;
    display: inline-block;
    min-width: 20px;
}

/* Press Start Text */
.press-start {
    font-size: 16px;
    color: #888888;
    margin-top: 40px;
    cursor: pointer;
    user-select: none;
}

.press-start:hover {
    color: #cccccc;
}

.press-start:active {
    color: #ff0000;
}

.press-start:focus {
    outline: 2px solid #ffff00;
    outline-offset: 4px;
}

.cursor {
    animation: blink 1s step-start infinite;
}

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

@keyframes pulse {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(5px);
    }
}

/* ========================================
   SECTION BOXES (Game-like UI)
   ======================================== */

.section-box {
    border: 4px solid #ffffff;
    padding: 40px;
    background-color: #0a0a0a;
    box-shadow: 8px 8px 0 #333333;
}

.section-title {
    font-family: 'Press Start 2P', monospace;
    font-size: 24px;
    color: #ffff00;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.content {
    font-size: 18px;
    line-height: 1.6;
}

.content p {
    margin-bottom: 20px;
}

.section-intro {
    color: #ffd700;
    margin-bottom: 30px;
}

/* Back to Title Link */
.back-link {
    display: inline-block;
    margin-top: 40px;
    font-size: 16px;
    color: #888888;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    border: 2px solid #444444;
    padding: 12px 20px;
    background-color: #000000;
}

.back-link:hover {
    color: #ffff00;
    border-color: #ffff00;
    transform: translateX(-5px);
}

.back-link:hover .back-arrow {
    animation: slideBack 0.5s ease-in-out infinite;
}

.back-arrow {
    display: inline-block;
    margin-right: 8px;
    color: #ff0000;
}

@keyframes slideBack {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(-3px);
    }
}

/* ========================================
   ABOUT SECTION
   ======================================== */

.about-section .content p {
    margin-bottom: 20px;
}

.skills-box {
    margin-top: 40px;
    padding: 20px;
    border: 2px solid #00ffff;
    background-color: #000000;
}

.skills-label {
    color: #00ffff;
    margin-bottom: 15px;
}

.skills-box p:last-child {
    color: #f0f0f0;
    margin-bottom: 0;
}

/* ========================================
   PROJECTS SECTION
   ======================================== */

.project-list {
    margin-top: 30px;
}

.project-item {
    margin-bottom: 40px;
    padding: 20px;
    border: 2px solid #444444;
    background-color: #000000;
    transition: border-color 0.3s ease;
}

.project-item:hover {
    border-color: #ff0000;
}

.project-name {
    font-family: 'Press Start 2P', monospace;
    font-size: 14px;
    color: #ff0000;
    margin-bottom: 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.project-name:focus {
    outline: 2px solid #ffff00;
    outline-offset: 4px;
}

.project-item.expanded .project-name {
    margin-bottom: 15px;
}

.expand-indicator {
    font-size: 11px;
    color: #555555;
    flex-shrink: 0;
    margin-left: 12px;
}

.project-item.expanded .expand-indicator {
    color: #ff0000;
}

.project-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.project-item.expanded .project-body {
    max-height: none;
}

.project-desc {
    font-size: 18px;
    color: #f0f0f0;
    margin-bottom: 10px;
    line-height: 1.5;
}

.project-tech {
    font-size: 16px;
    color: #888888;
    margin-bottom: 15px;
}

.project-link {
    font-size: 16px;
    color: #00ffff;
    text-decoration: none;
    display: inline-block;
    transition: color 0.2s ease;
}

.project-link:hover {
    color: #ffff00;
}

.project-link-placeholder {
    font-size: 16px;
    color: #777777;
    font-style: italic;
}

/* ========================================
   CONTACT SECTION
   ======================================== */

.contact-list {
    list-style: none;
    margin-top: 30px;
}

.contact-list li {
    margin-bottom: 20px;
}

.contact-link {
    font-family: 'Press Start 2P', monospace;
    font-size: 14px;
    color: #00ffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: #ffff00;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    padding: 40px 20px;
    text-align: center;
    border-top: 2px solid #333333;
}

.footer p {
    font-size: 14px;
    color: #777777;
    margin-bottom: 10px;
    line-height: 1.8;
}

.footer-credit {
    color: #666666;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .pixel-title {
        font-size: 24px;
    }

    .subtitle {
        font-size: 14px;
    }

    .tagline {
        font-size: 11px;
    }

    .menu-item {
        font-size: 14px;
    }

    .section-box {
        padding: 30px 20px;
    }

    .section-title {
        font-size: 18px;
    }

    .content {
        font-size: 11px;
    }

    body {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .pixel-title {
        font-size: 18px;
        text-shadow: 2px 2px 0 #ffffff;
    }

    .section-box {
        padding: 20px 15px;
        box-shadow: 4px 4px 0 #333333;
    }

    .section-title {
        font-size: 16px;
    }

    .content {
        font-size: 10px;
    }

    .project-item {
        padding: 15px;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Skip to main content link (for keyboard users) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #ff0000;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
    outline: 2px solid #ffff00;
    outline-offset: 4px;
}

/* Ensure sufficient contrast for all text */
::selection {
    background: #ff0000;
    color: #ffffff;
}

/* Respect OS-level reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .cursor,
    .menu-item:hover .selector,
    .back-link:hover .back-arrow {
        animation: none;
    }
}
