/**
 * Terminal Noir / Wttr-Classic Theme
 * A retro CLI aesthetic for recruiter-focused view
 */

:root {
    --noir-bg: #000000;
    --noir-fg: #d3d3d3;
    --noir-cyan: #00ffff;
    --noir-yellow: #ffff00;
    --noir-magenta: #ff00ff;
    --noir-blue: #5fafff;
    --noir-green: #00ff00;
    --noir-dim: #808080;
    --noir-font: 'Courier New', 'Ubuntu Mono', 'Consolas', 'Liberation Mono', monospace;
}

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

html, body {
    height: 100%;
    overflow-x: hidden; /* Prevent horizontal scroll on mobile */
}

body {
    background-color: var(--noir-bg);
    color: var(--noir-fg);
    font-family: var(--noir-font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: unset;
    max-width: 100vw; /* Ensure body doesn't exceed viewport */
}

/* Terminal Container */
.terminal-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* Prevent horizontal overflow */
}

/* Header */
.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--noir-dim);
}

.back-link {
    color: var(--noir-cyan);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--noir-yellow);
}

.terminal-title {
    color: var(--noir-green);
    font-weight: bold;
    letter-spacing: 1px;
}

/* Main Content */
.terminal-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Terminal Box (CSS bordered sections) */
.terminal-box {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--noir-cyan);
    border-radius: 0;
    position: relative;
}

.box-header {
    color: var(--noir-cyan);
    font-size: 14px;
    line-height: 1;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--noir-cyan);
    display: flex;
    align-items: center;
}

.box-header::before {
    content: '[ ';
    color: var(--noir-cyan);
}

.box-header::after {
    content: ' ]';
    color: var(--noir-cyan);
}

.box-label {
    color: var(--noir-cyan);
    font-weight: bold;
    letter-spacing: 1px;
}

.box-content {
    padding: 0.75rem 1rem;
    min-height: 60px;
}

/* Loading State */
.loading {
    color: var(--noir-dim);
    font-style: italic;
}

.loading::after {
    content: '';
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { content: '_'; }
    50% { content: ''; }
}

/* Profile Section Styles */
.profile-name {
    font-size: 1.5rem;
    color: var(--noir-yellow);
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.profile-title {
    color: var(--noir-cyan);
    margin-bottom: 0.25rem;
}

.profile-location {
    color: var(--noir-dim);
    margin-bottom: 1rem;
}

.profile-description {
    color: var(--noir-fg);
    line-height: 1.6;
}

/* Experience Section Styles */
.experience-item {
    margin-bottom: 1rem;
}

.experience-item:last-child {
    margin-bottom: 0;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.company-name {
    color: var(--noir-yellow);
    font-weight: bold;
}

.date-range {
    color: var(--noir-dim);
    font-size: 0.9rem;
}

.role-item {
    margin-left: 1.5rem;
    margin-top: 0.25rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.role-item::before {
    content: '└─ ';
    color: var(--noir-cyan);
}

.role-title {
    color: var(--noir-fg);
}

.role-date {
    color: var(--noir-dim);
    font-size: 0.85rem;
}

/* Projects Section Styles */
.project-item {
    margin-bottom: 0.5rem;
}

.project-item::before {
    content: '• ';
    color: var(--noir-cyan);
}

.project-link {
    color: var(--noir-blue);
    text-decoration: none;
}

.project-link:hover {
    color: var(--noir-yellow);
    text-decoration: underline;
}

/* Contact Section Styles */
.contact-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    align-items: baseline;
}

.contact-row:last-child {
    margin-bottom: 0;
}

.contact-label {
    color: var(--noir-magenta);
    min-width: 100px;
    font-weight: bold;
}

.contact-value {
    color: var(--noir-blue);
    text-decoration: none;
}

.contact-value:hover {
    color: var(--noir-yellow);
}

/* Footer */
.terminal-footer {
    margin-top: 2rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--noir-dim);
    text-align: center;
    color: var(--noir-dim);
    font-size: 0.85rem;
}

.terminal-footer a {
    color: var(--noir-cyan);
    text-decoration: none;
}

.terminal-footer a:hover {
    color: var(--noir-yellow);
}

/* Error State */
.error {
    color: #ff6b6b;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        font-size: 12px;
    }

    .terminal-container {
        padding: 0.5rem;
        max-width: 100vw; /* Prevent overflow on mobile */
    }

    .terminal-box {
        max-width: 100%; /* Prevent box overflow */
    }

    .terminal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .box-header {
        font-size: 12px;
        padding: 0.4rem 0.75rem;
    }

    .box-content {
        padding: 0.5rem 0.75rem;
    }

    .experience-header,
    .role-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .contact-row {
        flex-direction: column;
        gap: 0.25rem;
    }

    .contact-label {
        min-width: auto;
    }

    /* Increase touch targets */
    .back-link {
        padding: 0.5rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .contact-value {
        padding: 0.25rem 0;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .project-link {
        padding: 0.25rem 0;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

/* Small phones */
@media (max-width: 600px) {
    body {
        font-size: 11px;
    }

    .terminal-title {
        font-size: 0.85rem;
    }

    .profile-name {
        font-size: 1.25rem;
    }

    .box-header {
        font-size: 11px;
    }
}

/* Very small screens */
@media (max-width: 400px) {
    body {
        font-size: 10px;
    }

    .terminal-container {
        padding: 0.25rem;
    }

    .box-content {
        padding: 0.4rem 0.5rem;
    }

    .profile-name {
        font-size: 1.1rem;
    }

    .terminal-title {
        font-size: 0.75rem;
    }
}

/* Print Styles - Clean for printing */
@media print {
    body {
        background-color: white;
        color: black;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .terminal-container {
        max-width: 100%;
    }

    .back-link {
        display: none;
    }

    .box-header,
    .box-footer {
        color: #333;
    }

    .box-content {
        border-color: #333;
    }

    .profile-name,
    .company-name {
        color: black;
    }

    .profile-title,
    .project-link,
    .contact-value {
        color: #0066cc;
    }

    a {
        text-decoration: none;
    }

    a[href]::after {
        content: ' (' attr(href) ')';
        font-size: 0.8em;
        color: #666;
    }

    .terminal-footer a[href]::after {
        content: none;
    }
}
