
/* ========================================
   ROBERT'S GAME DEVELOPMENT WEBSITE
   Main stylesheet
   ======================================== */

html {
    background-color: #0d1117;
    color: #e6edf3;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #0d1117;
    color: #e6edf3;
    line-height: 1.7;
}

/* Main content */

.container {
    width: 90%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

main {
    min-height: 60vh;
    padding-top: 40px;
    padding-bottom: 40px;
}

section {
    margin-bottom: 40px;
}

/* Headings */

h1, h2, h3, h4 {
    color: #ffffff;
    line-height: 1.3;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -1px;
}

h2 {
    font-size: 1.8rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin-top: 0;
    margin-bottom: 20px;
    color: #aab4c0;
}

strong {
    color: #e6edf3;
}

/* Links */

a {
    color: #58a6ff;
    text-decoration: none;
}

a:hover {
    color: #79c0ff;
    text-decoration: underline;
}

a:focus {
    outline: 2px solid #58a6ff;
    outline-offset: 3px;
}

/* Header */

header {
    background-color: #161b22;
    border-bottom: 1px solid #30363d;
}

.header-inner {
    width: 90%;
    max-width: 1100px;
    min-height: 76px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: bold;
}

.site-title:hover {
    color: #58a6ff;
    text-decoration: none;
}

/* Navigation */

nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

nav a {
    color: #aab4c0;
    font-weight: 500;
}

nav a:hover,
nav .active {
    color: #58a6ff;
    text-decoration: none;
}

/* Homepage introduction */

.hero {
    padding-top: 60px;
    padding-bottom: 60px;
    text-align: center;
}

.hero h1 {
    margin-bottom: 20px;
}

.hero p {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.1rem;
}

/* Projects page introduction */

.projects-intro {
    padding-top: 20px;
    padding-bottom: 20px;
}

.projects-intro h1 {
    margin-bottom: 16px;
}

.projects-intro p {
    max-width: 760px;
}

/* Project cards */

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.card {
    padding: 24px;
    background-color: #161b22;
    border: 1px solid #30363d;
    border-radius: 10px;
}

.card:hover {
    border-color: #58a6ff;
}

.card h2,
.card h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

.card p:last-child {
    margin-bottom: 0;
}

/* Clickable project cards */

.project-card {
    display: block;
    min-width: 0;
    height: 100%;
    color: inherit;
    text-decoration: none;
    border-radius: 10px;
}

.project-card:hover {
    color: inherit;
    text-decoration: none;
}

.project-card .card {
    height: 100%;
    box-sizing: border-box;
    transition:
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.project-card:hover .card {
    border-color: #58a6ff;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.project-card:focus-visible {
    outline: 2px solid #58a6ff;
    outline-offset: 4px;
}

.project-card:focus-visible .card {
    border-color: #58a6ff;
}

.project-card .project-image {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background-color: #0d1117;
}

.project-card-content h3 {
    margin-top: 14px;
    margin-bottom: 12px;
}

.project-card-content p {
    margin-bottom: 18px;
}

.project-card-link {
    display: inline-block;
    color: #58a6ff;
    font-weight: 600;
}

.project-card:hover .project-card-link {
    color: #79c0ff;
}

/* Project status labels */

.project-status {
    display: inline-block;
    padding: 4px 9px;
    border: 1px solid #30363d;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.5;
}

.status-development {
    color: #79c0ff;
    background-color: #102744;
    border-color: #24476b;
}

.status-paused {
    color: #d2b48c;
    background-color: #29231b;
    border-color: #50402b;
}

/* Images */

img {
    max-width: 100%;
    height: auto;
}

.project-image {
    display: block;
    width: 100%;
    margin-bottom: 18px;
    border-radius: 8px;
}

/* Harry */

.harry-image {
    display: block;
    width: 285px;
    max-width: 95%;
    height: auto;
    margin: 0 auto 70px auto;

    /* Discourage dragging and selecting the image */
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}

/* Buttons */

.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #58a6ff;
    color: #08111f;
    border: 1px solid #58a6ff;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.button:hover {
    background-color: #79c0ff;
    border-color: #79c0ff;
    color: #08111f;
    text-decoration: none;
}

/* Code snippets */

code,
pre {
    font-family: Consolas, "Courier New", monospace;
}

code {
    padding: 2px 5px;
    background-color: #1c2330;
    color: #79c0ff;
    border-radius: 4px;
}

pre {
    overflow-x: auto;
    padding: 20px;
    background-color: #080c12;
    color: #e6edf3;
    border: 1px solid #30363d;
    border-radius: 8px;
    line-height: 1.5;
}

pre code {
    padding: 0;
    background-color: transparent;
}

/* Horizontal dividers */

hr {
    border: 0;
    border-top: 1px solid #30363d;
    margin-top: 30px;
    margin-bottom: 30px;
}

/* Forms */

input,
textarea,
select {
    max-width: 100%;
    padding: 12px;
    background-color: #0d1117;
    color: #e6edf3;
    border: 1px solid #30363d;
    border-radius: 6px;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 1rem;
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #58a6ff;
}

/* Footer */

footer {
    padding: 28px 20px;
    background-color: #161b22;
    border-top: 1px solid #30363d;
    text-align: center;
}

footer p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Text selection */

::selection {
    background-color: #58a6ff;
    color: #08111f;
}

/* Responsive layout: tablets */

@media screen and (max-width: 800px) {
    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .header-inner {
        padding-top: 16px;
        padding-bottom: 16px;
        flex-wrap: wrap;
        gap: 15px;
    }
}

/* Responsive layout: mobile phones */

@media screen and (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .container,
    .header-inner {
        width: 92%;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 35px;
        padding-bottom: 35px;
    }

    main {
        padding-top: 25px;
        padding-bottom: 25px;
    }

    nav {
        gap: 12px;
    }
}

/* Respect reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .project-card .card,
    .button {
        transition: none;
    }

    .project-card:hover .card {
        transform: none;
    }
}
