/* languageengineer.hu: one stylesheet, no web fonts, no scripts. */

:root {
    --bg: #fbfaf7;
    --fg: #1f2328;
    --muted: #59636e;
    --line: #e2ded5;
    --accent: #2457a6;
    --accent-soft: #e8eef8;
    --code-bg: #f1eee8;
    --max: 46rem;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #16181c;
        --fg: #e6e6e3;
        --muted: #9aa3ad;
        --line: #2c3036;
        --accent: #7aa7ec;
        --accent-soft: #1e2a3d;
        --code-bg: #22252b;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font: 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a {
    color: var(--accent);
    text-underline-offset: 0.15em;
}

a:hover {
    text-decoration-thickness: 2px;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

code,
kbd {
    font: 0.9em/1 ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
    background: var(--code-bg);
    border-radius: 4px;
    padding: 0.1em 0.35em;
}

kbd {
    border: 1px solid var(--line);
    border-bottom-width: 2px;
}

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.skip {
    position: absolute;
    left: -999px;
}

.skip:focus {
    z-index: 10;
    left: 1rem;
    top: 1rem;
    background: var(--bg);
    padding: 0.5rem 0.75rem;
}

/* Header */

.site-header {
    border-bottom: 1px solid var(--line);
}

.site-header .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.brand {
    font-weight: 600;
    color: var(--fg);
    text-decoration: none;
}

.site-header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    font-size: 0.95rem;
}

.site-header nav a {
    color: var(--muted);
    text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
    color: var(--fg);
}

.site-header nav .lang {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 0.6rem;
}

/* Content */

main {
    padding: 3rem 0 4rem;
}

h1,
h2,
h3 {
    line-height: 1.25;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(2rem, 5vw, 2.6rem);
    margin: 0 0 0.25rem;
}

h2 {
    font-size: 1.4rem;
    margin: 3rem 0 0.75rem;
}

h3 {
    font-size: 1.1rem;
    margin: 1.75rem 0 0.4rem;
}

.lead {
    font-size: 1.2rem;
    color: var(--muted);
    margin-top: 0;
}

.note {
    background: var(--accent-soft);
    border-radius: 8px;
    padding: 0.85rem 1.1rem;
}

ul {
    padding-left: 1.25rem;
}

li + li {
    margin-top: 0.35rem;
}

/* Project card on the home page */

.card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.25rem 1.4rem;
    transition: border-color 0.15s;
}

.card:hover,
.card:focus-within {
    border-color: var(--accent);
}

.card h3 a {
    text-decoration: none;
}

/* The title link covers the whole card, so all of it is clickable. */
.card h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.card h3 {
    margin: 0 0 0.35rem;
}

.card p {
    margin: 0;
}

/* Screenshots */

.screenshot {
    margin: 2rem 0;
}

.screenshot img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.screenshot figcaption {
    margin-top: 0.5rem;
    font-size: 0.92rem;
    color: var(--muted);
}

/* Download buttons */

.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.button {
    display: inline-block;
    border-radius: 8px;
    padding: 0.55rem 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--accent);
}

.button.primary {
    background: var(--accent);
    color: var(--bg);
}

.small {
    font-size: 0.92rem;
    color: var(--muted);
}

/* Footer */

.site-footer {
    border-top: 1px solid var(--line);
    padding: 1.5rem 0 2.5rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.site-footer a {
    color: inherit;
}
