/* ===== LANG.JOHLEM.NET - LIGHT BRUTALIST (matches johlem.net) ===== */

:root {
    --bg: #fafaf7;
    --surface: #ffffff;
    --text: #0a0a0a;
    --text-secondary: #4a4a4a;
    --text-muted: #888888;
    --rule: #1a1a1a;
    --rule-soft: #d8d8d4;
    --accent: #e8350a;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'IBM Plex Mono', 'JetBrains Mono', ui-monospace, 'Courier New', monospace;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 14px;
}

/* ===== TYPOGRAPHY ===== */

h1 {
    font-family: 'IBM Plex Sans Condensed', 'Arial Narrow', 'Helvetica Neue', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.005em;
    margin-bottom: 1rem;
    text-transform: uppercase;
    line-height: 1.02;
}

h2 {
    font-family: 'IBM Plex Sans Condensed', 'Arial Narrow', 'Helvetica Neue', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

h3 {
    font-family: 'IBM Plex Sans Condensed', 'Arial Narrow', 'Helvetica Neue', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.005em;
}

p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: var(--text);
}

a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    border-bottom: none;
    transition: color 0.15s ease;
    padding-bottom: 0;
}

a:hover {
    background: transparent;
    color: var(--accent);
}

/* ===== LAYOUT ===== */

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 2rem;
}

.header {
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    padding: 1.1rem 0;
    margin-bottom: 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.header-title {
    flex: 1;
}

.header-title h1 {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}

.header-title p {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0;
}

.header-nav {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.header-nav a {
    border: 1px solid var(--rule);
    padding: 8px 16px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: all 0.15s ease;
}

.header-nav a:hover {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

.footer {
    border-top: 1px solid var(--rule);
    padding: 40px 20px;
    margin-top: 60px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ===== GRID LAYOUTS ===== */

.grid {
    display: grid;
    gap: 24px;
    margin-bottom: 40px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ===== CARDS ===== */

.card {
    background: var(--surface);
    border: 1px solid var(--rule-soft);
    padding: 28px;
    transition: border-color 0.15s ease, transform 0.15s ease;
    position: relative;
    text-decoration: none;
    color: var(--text);
    display: block;
}

.card:hover {
    border-color: var(--accent);
    color: var(--text);
    background: var(--surface);
}

.card h3 {
    margin-bottom: 0.75rem;
}

.card p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.card-link {
    display: inline-block;
    border-bottom: 2px solid var(--accent);
    padding: 0 0 2px 0;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--text);
    transition: color 0.15s ease;
}

.card:hover .card-link {
    color: var(--accent);
}

/* ===== TABLES ===== */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--surface);
    border: 1px solid var(--rule-soft);
}

thead {
    background: var(--bg);
    color: var(--text);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.08em;
}

th {
    padding: 14px 15px;
    text-align: left;
    border-bottom: 2px solid var(--rule);
    font-weight: 600;
    font-size: 0.75rem;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--rule-soft);
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: rgba(232, 53, 10, 0.04);
}

/* ===== FORMS & BUTTONS ===== */

input[type="text"],
input[type="search"],
select,
textarea {
    background: var(--surface);
    border: 1px solid var(--rule);
    color: var(--text);
    padding: 12px 15px;
    font-family: 'IBM Plex Mono', 'JetBrains Mono', ui-monospace, 'Courier New', monospace;
    font-size: 0.9rem;
    margin-bottom: 15px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
}

input[type="text"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 53, 10, 0.15);
}

button,
.button {
    background: var(--text);
    color: var(--bg);
    border: 1px solid var(--text);
    padding: 10px 20px;
    font-family: 'IBM Plex Mono', 'JetBrains Mono', ui-monospace, 'Courier New', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.15s ease;
    letter-spacing: 0.08em;
}

button:hover,
.button:hover {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

button:active,
.button:active {
    transform: scale(0.98);
}

/* ===== ACCENT ELEMENTS ===== */

.accent-bar {
    height: 4px;
    background: var(--accent);
    margin: 20px 0;
    width: 3.5rem;
}

.accent-block {
    background: var(--surface);
    color: var(--text);
    padding: 24px;
    margin: 20px 0;
    border-left: 4px solid var(--accent);
    font-weight: 500;
    letter-spacing: 0.04em;
}

.highlight {
    background: var(--accent);
    color: var(--bg);
    padding: 2px 6px;
    font-weight: 600;
}

/* ===== MODAL ===== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.55);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border: 1px solid var(--rule);
    padding: 36px;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--rule);
}

.modal-header h2 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text);
    font-size: 28px;
    cursor: pointer;
    font-weight: 400;
    padding: 0 8px;
    transition: color 0.15s ease;
}

.close-btn:hover {
    color: var(--accent);
}

/* ===== SECTIONS ===== */

.section {
    margin-bottom: 48px;
}

.section-title {
    position: relative;
    margin-bottom: 28px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rule);
}

.section-title h2 {
    margin: 0;
}

/* ===== LANGUAGE SELECTOR ===== */

.language-selector {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.lang-btn {
    flex: 1;
    min-width: 200px;
    padding: 24px;
    border: 1px solid var(--rule-soft);
    background: var(--surface);
    color: var(--text);
    text-align: center;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.15s ease;
}

.lang-btn:hover,
.lang-btn.active {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

/* ===== CONJUGATION TABLE ===== */

.conjugation-tense {
    margin-bottom: 32px;
}

.tense-title {
    background: var(--text);
    color: var(--bg);
    padding: 12px 18px;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    margin-bottom: 0;
}

.conjugation-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--rule-soft);
}

.conjugation-table th {
    background: var(--bg);
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--rule);
    font-size: 0.7rem;
}

.conjugation-table td {
    padding: 12px;
    border-bottom: 1px solid var(--rule-soft);
}

.person-col {
    font-weight: 600;
    color: var(--accent);
    width: 22%;
}

.conjugation-form {
    font-family: 'IBM Plex Mono', 'JetBrains Mono', ui-monospace, 'Courier New', monospace;
    font-size: 1.05rem;
}

.stem {
    color: var(--text);
    font-weight: 600;
}

.ending {
    color: var(--accent);
    font-weight: 600;
    background: rgba(232, 53, 10, 0.08);
    padding: 2px 4px;
}

/* ===== PROGRESS BAR ===== */

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--rule-soft);
    margin: 20px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.3s ease;
}

/* ===== UTILITIES ===== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.mt-40 { margin-top: 40px; }
.mb-40 { margin-bottom: 40px; }
.hidden { display: none; }
.uppercase { text-transform: uppercase; }
.bold { font-weight: 600; }

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

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .header-content {
        flex-direction: column;
        gap: 20px;
    }

    .header-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 20px;
    }

    .container {
        padding: 20px 1.25rem;
    }

    .modal-content {
        max-width: 95vw;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.5rem; }
    body { font-size: 13px; }

    .header {
        padding: 0.8rem 0;
        margin-bottom: 24px;
    }

    th,
    td {
        padding: 8px;
        font-size: 0.8rem;
    }

    .card-link,
    button {
        font-size: 0.7rem;
        padding: 8px 12px;
    }
}
