/* ==================== RESET & VARIABLES ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #ffffff;
    --bg-soft: #fafafa;
    --bg-muted: #f5f5f5;
    --border: #e8e8e8;
    --border-light: #f0f0f0;
    --text: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --accent: #1a1a1a;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ==================== HEADER (matches main site) ==================== */
a { color: inherit; text-decoration: none; }

.header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1280px; margin: 0 auto; padding: 0 2rem;
    height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.header-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem; font-weight: 600;
    color: var(--text); text-decoration: none; letter-spacing: -0.02em; flex-shrink: 0;
}
.header-logo span { font-weight: 400; color: var(--text-muted); }
.header-right { display: flex; align-items: center; gap: 0; }
.header-nav { display: flex; align-items: center; gap: 0; }
.header-nav a {
    color: var(--text-muted); text-decoration: none;
    font-size: 0.72rem; font-weight: 600;
    transition: color var(--transition);
    letter-spacing: 0.06em; text-transform: uppercase;
    padding: 0.3rem 0.75rem; border-radius: 6px;
}
.header-nav a:hover { color: var(--text); background: var(--bg-muted); }
.header-nav a.active { color: var(--text); }
.header-social {
    display: flex; gap: 0.5rem; align-items: center;
    margin-left: 1rem; padding-left: 1rem;
    border-left: 1px solid var(--border);
}
.header-social a {
    color: var(--text-muted); font-size: 0.85rem;
    padding: 0.35rem 0.4rem; border-radius: 6px;
    transition: all 0.3s ease; text-decoration: none;
}
.header-social a:hover { color: var(--text); background: var(--bg-muted); }

@media (max-width: 640px) {
    .header-nav { display: none; }
    .header-social { border: none; margin: 0; padding: 0; }
}

/* ==================== LAYOUT ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 4rem 0;
}

/* ==================== HERO ==================== */
.mem-hero {
    text-align: center;
    padding: 4rem 2rem 3rem;
    border-bottom: 1px solid var(--border);
}

.mem-overline {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.mem-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 1rem;
}

.mem-hero p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ==================== CARDS GRID ==================== */
.mem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.mem-card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mem-card:hover {
    background: var(--bg);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--text);
}

.mem-card-icon {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.mem-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.mem-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
}

.mem-card-tag {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-top: auto;
}

/* ==================== PAGE CONTENT ==================== */
.page-header {
    padding: 3rem 0 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 3rem;
}

.page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.page-header p {
    color: var(--text-secondary);
    max-width: 560px;
}

.breadcrumb {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb a:hover { color: var(--text); }

/* ==================== BUTTONS ==================== */
button, .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

button:hover, .btn:hover {
    background: var(--text);
    color: white;
    border-color: var(--text);
}

.btn-primary {
    background: var(--text);
    color: white;
    border-color: var(--text);
}

.btn-primary:hover {
    background: #333;
}

/* ==================== GAME AREAS ==================== */
.game-area {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.counter, .score {
    display: inline-flex;
    gap: 2rem;
    justify-content: center;
    padding: 1rem 2rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.counter span, .score span {
    color: var(--text);
    font-size: 1.2rem;
}

/* Memory pairs game */
.memory-game {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 580px;
    margin: 0 auto 1.5rem;
}

.memory-card {
    width: 100px;
    height: 120px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.memory-card.flip { transform: rotateY(180deg); }

.memory-card .front-face,
.memory-card .back-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-sm);
    backface-visibility: hidden;
}

.memory-card .front-face {
    transform: rotateY(180deg);
    object-fit: contain;
    padding: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.memory-card .back-face {
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
    font-family: 'Playfair Display', serif;
}

/* Sequence game */
#sequence-container {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: var(--text);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    margin: 1.5rem 0;
}

input[type="text"], input[type="number"], textarea, select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color var(--transition);
}

input:focus, textarea:focus, select:focus {
    border-color: var(--text);
}

/* ==================== LISTS & ACTIVITIES ==================== */
.activity {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.activity h2, .activity h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.activity p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.advice {
    background: var(--bg-soft);
    border-left: 4px solid var(--text);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
}

ul {
    list-style: none;
    margin: 1rem 0;
}

ul li {
    padding: 0.75rem 1rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==================== TEST SECTIONS ==================== */
.test-section {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.test-section h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

/* ==================== SCORE / STATS ROW ==================== */
.score-row {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.score-item { text-align: center; }

.score-value {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.score-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* ==================== BACK LINK ==================== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color var(--transition);
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    margin-top: 0;
}

.back-link:hover { color: var(--text); background: var(--bg-muted); }

/* Back link inside page body (not header) gets top spacing */
.container .back-link,
.section .back-link { margin-top: 2rem; display: inline-flex; }

a {
    color: var(--text);
    text-decoration: none;
    transition: opacity var(--transition);
}

a:hover { opacity: 0.7; }

h1, h2, h3 { color: var(--text); }

/* ==================== MODERN HERO (two-column) ==================== */
.mem-hero-modern {
    padding: 5rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 1px solid var(--border);
}
.mem-hero-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    align-items: center;
    gap: 4rem;
}
.mem-hero-overline {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.18em; color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.mem-hero-overline::before {
    content: ''; display: block; width: 24px; height: 1px;
    background: var(--border-mid, #d4d4d4);
}
.mem-hero-modern h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.08;
    color: var(--text);
    margin-bottom: 1.25rem;
}
.mem-hero-modern h1 em { font-style: italic; font-weight: 400; }
.mem-hero-desc {
    font-size: 1.02rem;
    color: var(--text-secondary);
    max-width: 480px;
    line-height: 1.8;
    margin-bottom: 2.25rem;
}
.mem-hero-cta {
    display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 3rem;
}
.btn-dark {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: var(--text); color: white;
    padding: 0.85rem 1.75rem; border-radius: var(--radius-sm);
    font-size: 0.85rem; font-weight: 600; text-decoration: none;
    border: 1px solid var(--text);
    cursor: pointer; font-family: inherit;
    transition: all var(--transition);
}
.btn-dark:hover { background: #333; transform: translateY(-1px); color: white; }
.btn-outline {
    display: inline-flex; align-items: center; gap: 0.5rem;
    border: 1px solid var(--border); color: var(--text); background: var(--bg);
    padding: 0.85rem 1.75rem; border-radius: var(--radius-sm);
    font-size: 0.85rem; font-weight: 600; text-decoration: none;
    cursor: pointer; font-family: inherit;
    transition: all var(--transition);
}
.btn-outline:hover { border-color: var(--text); transform: translateY(-1px); color: var(--text); background: var(--bg); }

.mem-hero-stats {
    display: flex; gap: 2.5rem; flex-wrap: wrap;
}
.mem-stat-num {
    font-family: 'Playfair Display', serif;
    font-size: 2rem; font-weight: 700; line-height: 1;
    color: var(--text);
}
.mem-stat-lbl {
    font-size: 0.68rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--text-muted); margin-top: 0.25rem;
}

/* Brain grid visual */
.brain-visual { display: flex; justify-content: center; align-items: center; }
.brain-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 200px;
}
.brain-cell {
    aspect-ratio: 1;
    border-radius: 8px;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s ease;
}
.brain-cell.active {
    background: var(--text);
    border-color: var(--text);
    transform: scale(1.04);
}

@media (max-width: 900px) {
    .mem-hero-modern { padding: 3.5rem 1.5rem 3rem; }
    .mem-hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .brain-visual { order: -1; }
}

/* ==================== SECTION INTRO (overline + title + desc) ==================== */
.section-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: end;
    margin-bottom: 2.5rem;
}
@media (max-width: 700px) {
    .section-intro { grid-template-columns: 1fr; gap: 1rem; }
}
.section-overline {
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.16em; color: var(--text-muted); margin-bottom: 0.65rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.section-overline::before {
    content: ''; width: 20px; height: 1px;
    background: var(--border-mid, #d4d4d4); flex-shrink: 0;
}
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 600; letter-spacing: -0.03em; line-height: 1.1;
}
.section-desc {
    font-size: 0.95rem; color: var(--text-secondary); line-height: 1.75;
    max-width: 360px;
    align-self: end;
}

/* ==================== FILTER TABS ==================== */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition);
}
.filter-btn:hover {
    border-color: var(--text);
    color: var(--text);
    background: var(--bg);
}
.filter-btn.active {
    background: var(--text);
    color: white;
    border-color: var(--text);
}
.game-card.hidden { display: none; }

/* ==================== MODERN CARD (matches index.html) ==================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.card {
    background: var(--bg-soft);
    padding: 1.75rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,0.015) 100%);
    pointer-events: none;
}
.card:hover {
    background: var(--bg);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--text);
    opacity: 1;
}
.card-num {
    font-family: 'Playfair Display', serif;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--border-mid, #d4d4d4);
    margin-bottom: 1.25rem;
    letter-spacing: 0.05em;
}
.card-icon {
    width: 40px; height: 40px; margin-bottom: 1rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: var(--text-secondary);
    background: var(--bg-muted); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.card-title {
    font-size: 0.95rem; font-weight: 600;
    margin-bottom: 0.5rem; color: var(--text);
    letter-spacing: -0.01em; line-height: 1.3;
}
.card-desc {
    font-size: 0.83rem; color: var(--text-secondary);
    line-height: 1.65; flex: 1; margin-bottom: 1.25rem;
}
.card-action {
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.72rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.08em;
    transition: all var(--transition);
}
.card-action i { font-size: 0.6rem; transition: transform var(--transition); }
.card:hover .card-action { color: var(--text); }
.card:hover .card-action i { transform: translateX(3px); }

.badge-new {
    position: absolute;
    top: 1rem; right: 1rem;
    background: var(--text);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    z-index: 2;
}

/* ==================== PROGRESS CARD (modernized) ==================== */
.progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.prog-card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: all var(--transition);
}
.prog-card:hover {
    border-color: var(--text);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.prog-icon {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; color: var(--text-secondary);
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}
.prog-name {
    font-size: 0.7rem; font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.prog-value {
    font-family: 'Playfair Display', serif;
    font-size: 1.85rem; font-weight: 700;
    color: var(--text); line-height: 1;
}
.prog-label {
    font-size: 0.75rem; color: var(--text-muted);
}

/* ==================== DARK ABOUT SECTION ==================== */
.mem-about {
    background: var(--text);
    color: white;
    padding: 5rem 0;
}
.mem-about-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 2rem;
    display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center;
}
@media (max-width: 800px) {
    .mem-about-inner { grid-template-columns: 1fr; gap: 2.5rem; }
}
.mem-about-overline {
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.16em; color: rgba(255,255,255,0.35);
    display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.25rem;
}
.mem-about-overline::before {
    content: ''; width: 20px; height: 1px; background: rgba(255,255,255,0.2);
}
.mem-about h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 600; letter-spacing: -0.03em; line-height: 1.15;
    margin-bottom: 1.25rem; color: white;
}
.mem-about h2 em { font-style: italic; font-weight: 400; }
.mem-about p {
    font-size: 0.95rem; color: rgba(255,255,255,0.65);
    line-height: 1.85; margin-bottom: 1rem;
}
.mem-about-quote {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
    font-style: italic; font-weight: 400;
    line-height: 1.55; color: rgba(255,255,255,0.85);
    margin-bottom: 2rem;
    padding-left: 1.5rem;
    border-left: 2px solid rgba(255,255,255,0.2);
}
.mem-about-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    border: 1px solid rgba(255,255,255,0.25); color: white;
    padding: 0.8rem 1.6rem; border-radius: var(--radius-sm);
    font-size: 0.82rem; font-weight: 600; text-decoration: none;
    transition: all var(--transition);
}
.mem-about-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.4);
    opacity: 1; color: white;
}

/* ==================== MARQUEE STRIP ==================== */
.marquee-wrap {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden; padding: 0.9rem 0;
    background: var(--bg-soft);
}
.marquee-track {
    display: flex; gap: 3rem; width: max-content;
    animation: marquee 28s linear infinite;
}
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
    display: flex; align-items: center; gap: 0.6rem; white-space: nowrap;
    font-size: 0.72rem; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.1em;
}
.marquee-item i { font-size: 0.65rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ==================== FOOTER (matches index.html) ==================== */
.mem-footer { border-top: 1px solid var(--border); padding: 3rem 2rem; }
.mem-footer-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem;
}
.footer-brand { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 600; color: var(--text); }
.footer-brand span { font-weight: 400; color: var(--text-muted); }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { font-size: 0.78rem; color: var(--text-muted); text-decoration: none; transition: color var(--transition); }
.footer-links a:hover { color: var(--text); opacity: 1; }
.footer-copy { font-size: 0.72rem; color: var(--text-muted); }
.footer-social { display: flex; gap: 0.75rem; }
.footer-social a { color: var(--text-muted); font-size: 0.9rem; transition: color var(--transition); }
.footer-social a:hover { color: var(--text); opacity: 1; }

/* Extra var for border-mid compatibility */
:root { --border-mid: #d4d4d4; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 600px) {
    .container { padding: 0 1rem; }
    .memory-game { max-width: 100%; }
    .memory-card { width: 80px; height: 95px; }
    .section { padding: 2.5rem 0; }
    .mem-about { padding: 3.5rem 0; }
    .mem-about-inner { padding: 0 1.25rem; }
}
