/* -------------------------------------------------
   Portfolio – Tyson | style.css
   Black background with red accents
   ------------------------------------------------- */

/* Color palette */
:root {
    --bg-color: #000000;
    --accent-color: #ff4d4d;
    --text-color: #ffffff;
    --header-bg: #111111;
    --footer-bg: #111111;
}

/* Global resets and layout */
html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

body {
    display: flex;
    flex-direction: column;
}

/* Header & Navigation */
header,
footer {
    background: var(--header-bg);
    padding: 1rem;
}

header h1 {
    margin: 0;
    text-align: center;
    color: var(--accent-color);
    font-size: 2rem;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 0.5rem;
}

nav a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

nav a:hover,
nav a:focus {
    text-decoration: underline;
}

/* Main content */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
    box-sizing: border-box;
}

/* Sections */
section {
    margin-bottom: 3rem;
}

section h2 {
    margin-bottom: 1rem;
    font-size: 1.75rem;
    color: var(--accent-color);
}

/* Skills list */
.skills ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    margin: 0;
}

.skills li {
    background: var(--header-bg);
    padding: 0.5rem;
    border-radius: 4px;
    text-align: center;
}

/* Projects */
.projects article {
    margin-bottom: 2rem;
}

.projects h3 {
    margin-bottom: 0.5rem;
    color: var(--accent-color);
    font-size: 1.5rem;
}

.projects a {
    color: var(--accent-color);
    text-decoration: none;
}

.projects a:hover,
.projects a:focus {
    text-decoration: underline;
}

/* Footer */
footer p {
    margin: 0;
    text-align: center;
    font-size: 0.875rem;
}

/* Images */
img,
picture {
    max-width: 100%;
    height: auto;
    display: block;
    margin: auto;
    border-radius: 8px;
}

/* Accessibility: focus outline */
a:focus,
button:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Responsive adjustments */
@media (min-width: 600px) {
    header h1 {
        text-align: left;
    }

    nav {
        justify-content: flex-start;
    }
}