/* coding.css */

/* ---------- Root theme tokens ---------- */

:root {
    --bg: #050816;
    --bg-elevated: #0b1022;
    --bg-elevated-soft: #111827;
    --accent: #6366f1;
    --accent-soft: rgba(99, 102, 241, 0.15);
    --accent-strong: #4f46e5;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --border-subtle: #1f2933;
    --danger: #f97373;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-pill: 999px;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.7);
    --shadow-subtle: 0 10px 25px rgba(15, 23, 42, 0.55);
    --shadow-hard: 0 22px 60px rgba(15, 23, 42, 0.85);
    --card-border: rgba(148, 163, 184, 0.16);
    --card-bg: radial-gradient(circle at top left, #1e293b 0, #020617 55%, #020617 100%);
    --footer-bg: linear-gradient(to top, #020617 0, #020617 40px, #050816 100%);
    --transition-fast: 160ms ease-out;
    --transition-med: 220ms ease-out;
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

/* ---------- Global reset / page shell ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    padding: 0;
    margin: 0;
}

body {
    min-height: 100vh;
    font-family: var(--font-sans);
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, #1e293b 0, #020617 55%, #020617 100%);
    -webkit-font-smoothing: antialiased;
}

/* page shell + footer separation fix */

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

/* ---------- Generic elements ---------- */

button {
    font-family: inherit;
    border: none;
    background: none;
    color: inherit;
    cursor: pointer;
}

button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    display: block;
}

/* ---------- Header ---------- */

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 80px 16px;
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(18px);
    background: linear-gradient(
        to bottom,
        rgba(5, 8, 22, 0.96),
        rgba(5, 8, 22, 0.86),
        rgba(5, 8, 22, 0.4),
        transparent
    );
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: radial-gradient(circle at 0 0, #a855f7, #6366f1 55%, #0ea5e9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e5e7eb;
    font-weight: 700;
    font-size: 22px;
    box-shadow: var(--shadow-soft);
}

.brand-text-main {
    font-weight: 600;
    letter-spacing: 0.02em;
    font-size: 17px;
}

.brand-text-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: radial-gradient(circle at 0 0, rgba(96,165,250,0.18), rgba(15,23,42,0.98));
    font-size: 11px;
    color: #e5e7eb;
    white-space: nowrap;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.3);
}

.nav-link {
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 13px;
    border: 1px solid rgba(148, 163, 184, 0.46);
    background: rgba(15, 23, 42, 0.8);
    color: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background var(--transition-fast), border-color var(--transition-fast),
        transform var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-fast);
}

.nav-link.secondary {
    background: transparent;
}

.nav-link.primary {
    background: radial-gradient(circle at 0 0, #a855f7, #6366f1 60%, #22c55e);
    border-color: transparent;
    color: #0b1022;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.6);
}

.nav-link:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-subtle);
}

/* ---------- Hero ---------- */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
    gap: 40px;
    padding: 40px 80px 32px;
}

.hero-main-title {
    font-size: 40px;
    line-height: 1.1;
    letter-spacing: 0.01em;
    margin: 0 0 18px;
}

.hero-main-title .accent {
    color: #22c55e;
}

.hero-subtitle {
    margin: 0 0 18px;
    max-width: 640px;
    color: var(--text-muted);
    font-size: 14px;
}

.hero-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.hero-chip {
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
}

.hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.hero-meta strong {
    color: #e5e7eb;
}

.badge {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.18);
    color: #bbf7d0;
    font-size: 11px;
    border: 1px solid rgba(22, 163, 74, 0.8);
}

/* hero side card */

.hero-card {
    border-radius: 20px;
    padding: 18px 18px 16px;
    background: radial-gradient(circle at 0 0, rgba(56,189,248,0.16), rgba(15,23,42,0.98));
    border: 1px solid rgba(148, 163, 184, 0.5);
    box-shadow: var(--shadow-soft);
    align-self: flex-start;
}

.hero-card-tagline {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #a5b4fc;
    margin-bottom: 6px;
}

.hero-card-headline {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.hero-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.hero-card-pill {
    border-radius: 14px;
    padding: 10px 10px 9px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.55);
}

.hero-card-pill .label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #9ca3af;
}

.hero-card-pill .value {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-top: 2px;
    margin-bottom: 3px;
}

.hero-card-footnote {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-top: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

.hero-card-footnote .hot {
    color: #fbbf24;
}

/* ---------- Language section ---------- */

.languages-section {
    padding: 32px 80px 96px; /* bottom padding keeps cards above footer */
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 18px;
}

.section-title-block h2 {
    margin: 0 0 4px;
    font-size: 20px;
}

.section-title-block p {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
    max-width: 620px;
}

.filters-row {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 7px;
}

.filter-pill {
    font-size: 11px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.8);
    color: #e5e7eb;
    transition: background var(--transition-fast), border-color var(--transition-fast),
        color var(--transition-fast), transform var(--transition-fast);
}

.filter-pill[data-active="true"] {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.4);
}

.filter-pill:hover {
    transform: translateY(-1px);
}

/* grid */

.language-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

/* ---------- Language cards ---------- */

.lang-card {
    background: var(--card-bg);
    border-radius: 18px;
    border: 1px solid var(--card-border);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.7);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-med), box-shadow var(--transition-med),
        border-color var(--transition-med), background var(--transition-med);
}

.lang-card::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: radial-gradient(circle at 0 0, rgba(96,165,250,0.36), transparent 55%);
    transition: opacity var(--transition-med);
    pointer-events: none;
}

.card-main-btn {
    width: 100%;
    padding: 14px 14px 13px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: transparent;
}

/* Logo row: fixed height so short logos don't shift content up */

.card-media {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 56px;
}

/* Default logo sizing */

.card-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    object-position: center;
    image-rendering: auto;
}

/* summary */

.card-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-title-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: baseline;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
}

.card-tag {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #9ca3af;
}

.card-bio {
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-muted);
    min-height: 40px;
}

.card-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.card-badge {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.45);
    color: #e5e7eb;
}

.card-toggle {
    font-size: 10px;
    color: #a5b4fc;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.card-toggle-icon {
    font-size: 11px;
}

/* hover */

.lang-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hard);
    border-color: rgba(129, 140, 248, 0.8);
}

.lang-card:hover::before {
    opacity: 1;
}

/* ---------- Footer ---------- */

.site-footer {
    flex-shrink: 0;
    background: var(--footer-bg);
    border-top: 1px solid rgba(15, 23, 42, 0.9);
    padding: 20px 80px 30px;
    font-size: 11px;
    color: var(--text-muted);
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}

/* ---------- Modal: shared structure ---------- */

.modal-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    z-index: 80;
}

.modal-backdrop[aria-hidden="false"] {
    display: flex;
}

.modal-dialog {
    width: min(960px, 96vw);
    max-height: 90vh;
    border-radius: 20px;
    background: radial-gradient(circle at 0 0, #1f2937, #020617 60%);
    border: 1px solid rgba(148, 163, 184, 0.55);
    box-shadow: var(--shadow-hard);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 14px 20px 12px;
    border-bottom: 1px solid rgba(31, 41, 55, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.modal-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #9ca3af;
}

.modal-title {
    margin: 2px 0 0;
    font-size: 18px;
}

.modal-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-tag {
    font-size: 11px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.55);
}

.practice-btn {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.16);
    border: 1px solid rgba(22, 163, 74, 0.7);
    color: #bbf7d0;
    font-size: 11px;
}

.modal-close {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.4);
    font-size: 16px;
    line-height: 1;
}

.modal-body {
    padding: 16px 20px 18px;
    overflow-y: auto;
    font-size: 13px;
    color: #e5e7eb;
}

/* ---------- Practice modal ---------- */

#practice-modal .practice-dialog {
    width: min(1100px, 96vw);
    max-height: 92vh;
    border-radius: 22px;
    background: radial-gradient(circle at 0 0, #1f2937, #020617 60%);
    border: 1px solid rgba(148, 163, 184, 0.55);
    box-shadow: var(--shadow-hard);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.practice-header {
    padding: 12px 18px 10px;
    border-bottom: 1px solid rgba(31, 41, 55, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.practice-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #9ca3af;
}

.practice-title {
    font-size: 16px;
    margin-top: 3px;
}

.practice-close {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.9);
    font-size: 18px;
}

.practice-body {
    padding: 14px 16px 16px;
    overflow: hidden;
}

.practice-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 14px;
    height: 100%;
}

/* simulated desktop */

.practice-desktop {
    border-radius: 16px;
    background: radial-gradient(circle at 0 0, #1f2937, #020617 60%);
    border: 1px solid rgba(30, 64, 175, 0.7);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.desktop-top-bar {
    height: 26px;
    background: linear-gradient(to right, #020617, #0f172a);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    font-size: 11px;
    color: #e5e7eb;
}

.desktop-icons-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 10px 10px 6px;
    align-content: flex-start;
}

.desktop-icon {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: transparent;
    border-radius: 10px;
    padding: 6px 4px 4px;
    font-size: 12px;
    color: #e5e7eb;
    border: 1px solid transparent;
}

.desktop-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.desktop-icon-label {
    font-size: 11px;
}

.desktop-icon-passive {
    opacity: 0.55;
    cursor: default;
}

.desktop-window {
    position: relative;
    margin: 4px 10px 0;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(30, 64, 175, 0.7);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.9);
    display: none;
    flex-direction: column;
    min-height: 150px;
}

.desktop-window[aria-hidden="false"] {
    display: flex;
}

.window-titlebar {
    height: 26px;
    background: linear-gradient(to right, #020617, #111827);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px 0 8px;
    font-size: 11px;
    color: #e5e7eb;
    border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.window-title-left {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.window-title-buttons {
    display: inline-flex;
    gap: 2px;
}

.win-btn {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.96);
    font-size: 10px;
}

.win-btn-close {
    background: rgba(239, 68, 68, 0.9);
}

/* explorer */

.window-body-explorer {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    min-height: 170px;
}

.explorer-sidebar {
    border-right: 1px solid rgba(31, 41, 55, 0.95);
    padding: 8px 8px 10px;
    font-size: 11px;
}

.explorer-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #9ca3af;
    margin: 4px 0;
}

.explorer-list {
    list-style: none;
    padding: 0;
    margin: 0 0 4px;
}

.explorer-list li {
    padding: 3px 2px;
}

.explorer-main {
    padding: 8px 10px 10px;
    font-size: 11px;
}

.explorer-path {
    margin-bottom: 6px;
    color: #9ca3af;
}

.explorer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 6px;
}

/* notepad */

.window-body-notepad {
    display: flex;
    flex-direction: column;
    min-height: 170px;
}

.notepad-menu {
    height: 22px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 11px;
    background: #020617;
    border-bottom: 1px solid rgba(31, 41, 55, 0.95);
}

.notepad-editor-wrap {
    flex: 1 1 auto;
    padding: 4px 6px;
}

.notepad-editor {
    width: 100%;
    height: 100%;
    resize: none;
    border-radius: 8px;
    border: 1px solid rgba(31, 41, 55, 0.95);
    background: #020617;
    color: #e5e7eb;
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
        "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    padding: 6px 8px;
}

.notepad-footer {
    border-top: 1px solid rgba(31, 41, 55, 0.95);
    padding: 6px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.notepad-btn {
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.16);
    border: 1px solid rgba(34, 197, 94, 0.7);
    color: #bbf7d0;
    font-size: 11px;
}

.notepad-btn-secondary {
    background: transparent;
    border-color: rgba(148, 163, 184, 0.6);
    color: #e5e7eb;
}

.notepad-status {
    color: #a5b4fc;
}

/* browser / preview */

.window-body-browser {
    min-height: 170px;
}

.browser-frame {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0 0 10px 10px;
    background: #020617;
}

/* taskbar */

.practice-taskbar {
    height: 24px;
    border-top: 1px solid rgba(31, 41, 55, 0.95);
    background: #020617;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    font-size: 11px;
}

.taskbar-start {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.6);
}

.taskbar-hint {
    color: #9ca3af;
}

/* practice right-hand column */

.practice-instructions {
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: radial-gradient(circle at 0 0, rgba(79, 70, 229, 0.2), #020617 60%);
    padding: 10px 12px 10px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.practice-step-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #a5b4fc;
}

.practice-step-text {
    font-size: 12px;
    color: #e5e7eb;
}

.practice-snippet-header {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

.practice-snippet-code {
    margin: 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: #020617;
    border: 1px solid rgba(31, 41, 55, 0.95);
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
        "Liberation Mono", "Courier New", monospace;
    font-size: 11px;
    max-height: 160px;
    overflow: auto;
}

.practice-complete-btn {
    margin-top: 4px;
    align-self: flex-start;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.18);
    border: 1px solid rgba(22, 163, 74, 0.8);
    color: #bbf7d0;
    font-size: 11px;
}

.practice-log {
    margin-top: 4px;
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(31, 41, 55, 0.95);
    min-height: 40px;
    max-height: 130px;
    overflow-y: auto;
    font-size: 11px;
}

/* ---------- Logo-specific tweaks (exactly what you asked) ---------- */

/* 1) HTML / CSS / JS keep white tile but pull it in slightly */
.lang-card[data-language="html"] .card-image,
.lang-card[data-language="css"] .card-image,
.lang-card[data-language="javascript"] .card-image {
    width: 36px;
    height: 36px;
}

/* 2) MATLAB, SQL, Shell/Bash – crop out the white tile look */
.lang-card[data-language="matlab"] .card-media,
.lang-card[data-language="sql"] .card-media,
.lang-card[data-language="shell"] .card-media {
    overflow: hidden;
}

.lang-card[data-language="matlab"] .card-image,
.lang-card[data-language="sql"] .card-image,
.lang-card[data-language="shell"] .card-image {
    width: 64px;
    height: 64px;
    object-fit: cover;   /* zoom slightly so the white frame sits outside the crop */
}

/* ---------- Responsive ---------- */

@media (max-width: 1200px) {
    .language-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .site-header {
        padding-inline: 32px;
    }

    .hero {
        padding-inline: 32px;
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-card {
        order: -1;
    }

    .languages-section {
        padding-inline: 32px;
    }

    .site-footer {
        padding-inline: 32px;
    }

    .language-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .practice-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .main-nav {
        align-self: stretch;
        justify-content: space-between;
    }

    .hero {
        padding: 28px 20px 20px;
    }

    .languages-section {
        padding: 20px 20px 80px;
    }

    .language-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-footer {
        padding-inline: 20px;
        align-items: flex-start;
    }

    .footer-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 520px) {
    .language-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-card-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}