/*
Theme Name: Gakujutsu Eigo — 学術英語
Theme URI: https://example.com/gakujutsu-eigo
Author: Shudong Wang
Description: 理工系大学院生のための学術英語モバイルラーニング教材サイト用テーマ。頻出専門用語、Academic Writing / Presentation / Reading / Listening、投稿・発表ツールの6メニューを備えたバイリンガル（日本語・英語）テーマです。A bilingual WordPress theme for an academic English mobile-learning course aimed at science and engineering graduate students.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gakujutsu-eigo
Tags: education, custom-menu, custom-logo, translation-ready, two-columns, right-sidebar
*/

/* ==================================================================
   1. Design tokens
   ================================================================== */

:root {
	--ae-navy: #12305c;
	--ae-navy-deep: #0a1c38;
	--ae-gold: #b5892f;
	--ae-gold-soft: #d9b768;
	--ae-accent: #12305c;

	--ae-paper: #fbfaf7;
	--ae-surface: #ffffff;
	--ae-tint: #f2f0ea;
	--ae-line: #e2ded3;
	--ae-line-strong: #cdc7b8;

	--ae-text: #1b2330;
	--ae-muted: #5d6675;

	--ae-serif: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
	--ae-sans: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Segoe UI", Roboto, sans-serif;
	--ae-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

	--ae-wrap: 1160px;
	--ae-radius: 14px;
	--ae-shadow: 0 1px 2px rgba(16, 30, 54, .05), 0 8px 24px rgba(16, 30, 54, .06);
	--ae-shadow-lg: 0 2px 4px rgba(16, 30, 54, .06), 0 18px 48px rgba(16, 30, 54, .12);
}

/* ==================================================================
   2. Base
   ================================================================== */

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

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

body {
	margin: 0;
	background: var(--ae-paper);
	color: var(--ae-text);
	font-family: var(--ae-sans);
	font-size: 16px;
	line-height: 1.85;
	font-feature-settings: "palt" 1;
	-webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; }
img { display: block; }

a { color: var(--ae-navy); text-decoration-color: rgba(18, 48, 92, .3); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

h1, h2, h3, h4 {
	font-family: var(--ae-serif);
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: .01em;
	margin: 0 0 .5em;
}

p { margin: 0 0 1.2em; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.ae-skip {
	position: absolute; left: -9999px; top: 0; z-index: 999;
	background: var(--ae-navy); color: #fff; padding: 12px 20px;
}
.ae-skip:focus { left: 0; }

.ae-wrap { width: min(100% - 40px, var(--ae-wrap)); margin-inline: auto; }

.ae-icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.15em; }

/* ==================================================================
   3. Header
   ================================================================== */

.ae-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(251, 250, 247, .92);
	backdrop-filter: saturate(160%) blur(10px);
	border-bottom: 1px solid var(--ae-line);
}

.ae-header-inner {
	width: min(100% - 40px, var(--ae-wrap));
	margin-inline: auto;
	display: flex; align-items: center; gap: 24px;
	min-height: 76px;
}

.ae-brand-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }

.ae-brand-mark {
	display: grid; place-items: center;
	width: 42px; height: 42px; flex: none;
	background: var(--ae-navy); color: #fff;
	font-family: var(--ae-serif); font-size: 22px; font-weight: 700;
	border-radius: 10px;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}

.ae-brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.ae-brand-ja { font-family: var(--ae-serif); font-size: 20px; font-weight: 700; color: var(--ae-navy-deep); }
.ae-brand-en { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ae-muted); }

.ae-nav { margin-left: auto; display: flex; align-items: center; gap: 20px; }

.ae-menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }

.ae-menu a {
	display: flex; flex-direction: column; gap: 1px;
	padding: 8px 12px; border-radius: 8px;
	font-size: 14px; font-weight: 500; line-height: 1.3;
	color: var(--ae-navy-deep); text-decoration: none;
	transition: background .18s ease, color .18s ease;
}
.ae-menu a:hover, .ae-menu .current-menu-item > a { background: var(--ae-tint); }
.ae-menu-en { font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--ae-muted); }

.ae-menu .sub-menu {
	list-style: none; margin: 0; padding: 8px;
	position: absolute; min-width: 220px;
	background: var(--ae-surface); border: 1px solid var(--ae-line);
	border-radius: 12px; box-shadow: var(--ae-shadow-lg);
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: .18s ease;
}
.ae-menu li { position: relative; }
.ae-menu li:hover > .sub-menu, .ae-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }

.ae-nav-search { display: flex; align-items: center; gap: 4px; }
.ae-nav-search input {
	width: 150px; padding: 8px 12px;
	border: 1px solid var(--ae-line-strong); border-radius: 999px;
	background: var(--ae-surface); font: inherit; font-size: 13px;
	transition: width .22s ease, border-color .18s ease;
}
.ae-nav-search input:focus { width: 200px; outline: none; border-color: var(--ae-navy); }
.ae-nav-search button {
	display: grid; place-items: center;
	width: 36px; height: 36px; padding: 0;
	border: 0; border-radius: 50%; background: var(--ae-navy); color: #fff;
	cursor: pointer;
}

.ae-nav-toggle {
	display: none; margin-left: auto;
	width: 44px; height: 44px; padding: 0;
	background: none; border: 1px solid var(--ae-line-strong); border-radius: 10px;
	cursor: pointer;
}
.ae-nav-toggle-bars { display: grid; gap: 5px; justify-items: center; }
.ae-nav-toggle-bars span { display: block; width: 20px; height: 2px; background: var(--ae-navy-deep); transition: .2s ease; }
.ae-nav-toggle[aria-expanded="true"] .ae-nav-toggle-bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ae-nav-toggle[aria-expanded="true"] .ae-nav-toggle-bars span:nth-child(2) { opacity: 0; }
.ae-nav-toggle[aria-expanded="true"] .ae-nav-toggle-bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==================================================================
   4. Hero
   ================================================================== */

.ae-hero {
	position: relative;
	background:
		radial-gradient(1000px 500px at 88% -8%, rgba(181, 137, 47, .22), transparent 62%),
		linear-gradient(160deg, var(--ae-navy-deep), var(--ae-navy) 62%, #1b3f75);
	color: #fff;
	overflow: hidden;
}
.ae-hero::after {
	content: ""; position: absolute; inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
	background-size: 56px 56px;
	mask-image: radial-gradient(700px 400px at 20% 20%, #000, transparent 75%);
	pointer-events: none;
}

.ae-hero-inner {
	position: relative; z-index: 1;
	width: min(100% - 40px, var(--ae-wrap));
	margin-inline: auto;
	padding: 84px 0 92px;
	display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center;
}

.ae-eyebrow {
	font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
	color: var(--ae-gold-soft); margin-bottom: 14px;
}

.ae-hero-title { margin: 0 0 20px; }
.ae-hero-title-ja { display: block; font-size: clamp(40px, 6vw, 66px); letter-spacing: .06em; }
.ae-hero-title-en {
	display: block; margin-top: 10px;
	font-family: var(--ae-sans); font-size: clamp(14px, 1.6vw, 18px);
	font-weight: 500; letter-spacing: .04em; color: rgba(255, 255, 255, .72);
}

.ae-hero-lead { max-width: 54ch; color: rgba(255, 255, 255, .84); font-size: 15px; }
.ae-hero-lead[lang="en"] { color: rgba(255, 255, 255, .6); font-size: 14px; }

.ae-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.ae-btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 13px 24px; border-radius: 999px;
	font-size: 15px; font-weight: 700; text-decoration: none;
	transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.ae-btn:hover { transform: translateY(-2px); }
.ae-btn-primary { background: var(--ae-gold); color: #17130a; box-shadow: 0 8px 22px rgba(181, 137, 47, .34); }
.ae-btn-primary:hover { background: var(--ae-gold-soft); }
.ae-btn-ghost { color: #fff; border: 1px solid rgba(255, 255, 255, .34); }
.ae-btn-ghost:hover { background: rgba(255, 255, 255, .1); }

/* Phone mockup */
.ae-hero-device { display: grid; place-items: center; }
.ae-device {
	width: 280px; padding: 12px 10px 20px;
	background: linear-gradient(#20242c, #12151b);
	border-radius: 34px;
	box-shadow: 0 30px 70px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .08);
	transform: rotate(-3deg);
}
.ae-device-screen {
	background: var(--ae-paper); color: var(--ae-text);
	border-radius: 24px; padding: 22px 16px 18px; text-align: center;
}
.ae-device-title { font-family: var(--ae-serif); font-size: 22px; font-weight: 700; color: var(--ae-navy); margin: 0 0 4px; }
.ae-device-sub { font-size: 10px; line-height: 1.6; color: var(--ae-muted); margin: 0 0 16px; }
.ae-device-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; list-style: none; margin: 0; padding: 0; }
.ae-device-grid li {
	display: grid; gap: 5px; justify-items: center;
	padding: 12px 6px; border-radius: 12px;
	background: #fff; border: 1px solid var(--ae-line);
	font-size: 9px; line-height: 1.35; color: var(--ae-text);
}
.ae-device-grid .ae-icon { width: 20px; height: 20px; color: var(--card-accent); }

/* ==================================================================
   5. Sections
   ================================================================== */

.ae-section { padding: 76px 0; }
.ae-section-tint { background: var(--ae-tint); }

.ae-section-head { margin-bottom: 36px; }
.ae-section-title {
	font-size: clamp(24px, 3vw, 32px); margin: 0;
	position: relative; padding-bottom: 14px;
}
.ae-section-title::after {
	content: ""; position: absolute; left: 0; bottom: 0;
	width: 52px; height: 3px; background: var(--ae-gold);
}
.ae-section-sub { margin: 10px 0 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ae-muted); }

/* Course cards */
.ae-course-grid {
	display: grid; gap: 20px;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.ae-course-card {
	position: relative; display: flex; flex-direction: column; gap: 8px;
	padding: 30px 26px 24px;
	background: var(--ae-surface); border: 1px solid var(--ae-line);
	border-radius: var(--ae-radius); text-decoration: none; color: inherit;
	box-shadow: var(--ae-shadow);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
	overflow: hidden;
}
.ae-course-card::before {
	content: ""; position: absolute; inset: 0 0 auto; height: 4px;
	background: var(--card-accent, var(--ae-navy));
}
.ae-course-card:hover { transform: translateY(-4px); box-shadow: var(--ae-shadow-lg); border-color: var(--card-accent); }

.ae-course-icon {
	display: grid; place-items: center;
	width: 46px; height: 46px; margin-bottom: 6px;
	border-radius: 12px;
	background: color-mix(in srgb, var(--card-accent) 12%, #fff);
	color: var(--card-accent);
}
.ae-course-icon .ae-icon { width: 24px; height: 24px; }

.ae-course-ja { font-family: var(--ae-serif); font-size: 19px; font-weight: 700; color: var(--ae-navy-deep); }
.ae-course-en { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--ae-muted); }
.ae-course-desc { margin-top: 6px; font-size: 13.5px; line-height: 1.8; color: var(--ae-muted); }
.ae-course-foot {
	display: flex; align-items: center; justify-content: space-between;
	margin-top: auto; padding-top: 18px;
	font-size: 12px; color: var(--card-accent); font-weight: 700;
}
.ae-course-card:hover .ae-course-foot .ae-icon { transform: translateX(4px); }
.ae-course-foot .ae-icon { transition: transform .18s ease; }

/* Fields */
.ae-field-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.ae-field-list a {
	display: inline-block; padding: 10px 20px;
	background: var(--ae-surface); border: 1px solid var(--ae-line);
	border-radius: 999px; font-size: 14px; text-decoration: none;
	transition: .18s ease;
}
.ae-field-list a:hover { border-color: var(--ae-navy); background: var(--ae-navy); color: #fff; }

/* Features */
.ae-feature-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.ae-feature { padding-top: 22px; border-top: 2px solid var(--ae-navy); }
.ae-feature-num { font-family: var(--ae-serif); font-size: 13px; color: var(--ae-gold); letter-spacing: .1em; margin: 0 0 8px; }
.ae-feature-title { font-size: 17px; margin: 0 0 4px; }
.ae-feature-en { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ae-muted); margin: 0 0 10px; }
.ae-feature-desc { font-size: 13.5px; line-height: 1.85; color: var(--ae-muted); margin: 0; }

/* ==================================================================
   6. Page heads
   ================================================================== */

.ae-page-head { padding: 52px 0 32px; border-bottom: 1px solid var(--ae-line); margin-bottom: 44px; }
.ae-page-head-accent {
	background: linear-gradient(180deg, color-mix(in srgb, var(--ae-accent) 8%, var(--ae-paper)), var(--ae-paper));
	border-bottom-color: color-mix(in srgb, var(--ae-accent) 22%, var(--ae-line));
}

.ae-breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--ae-muted); margin-bottom: 16px; }
.ae-breadcrumb a { color: var(--ae-muted); text-decoration: none; }
.ae-breadcrumb a:hover { color: var(--ae-navy); text-decoration: underline; }

.ae-page-icon {
	display: grid; place-items: center;
	width: 48px; height: 48px; margin-bottom: 14px;
	border-radius: 12px; background: var(--ae-accent); color: #fff;
}
.ae-page-icon .ae-icon { width: 24px; height: 24px; }

.ae-page-title { font-size: clamp(28px, 4vw, 42px); margin: 0 0 8px; color: var(--ae-navy-deep); }
.ae-page-en { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ae-muted); margin: 0 0 12px; }
.ae-page-desc { max-width: 70ch; color: var(--ae-muted); font-size: 14.5px; }

.ae-single-meta { font-size: 13px; color: var(--ae-muted); margin: 0; }
.ae-dot { margin: 0 8px; opacity: .6; }

/* ==================================================================
   7. Filters
   ================================================================== */

.ae-filterbar {
	display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
	margin-bottom: 28px; padding-bottom: 18px;
	border-bottom: 1px dashed var(--ae-line-strong);
}
.ae-filterbar-label { font-size: 12px; letter-spacing: .1em; color: var(--ae-muted); margin-right: 4px; }
.ae-filterbar a {
	padding: 6px 14px; border-radius: 999px; font-size: 13px;
	background: var(--ae-surface); border: 1px solid var(--ae-line);
	text-decoration: none; transition: .16s ease;
}
.ae-filterbar a:hover { background: var(--ae-navy); color: #fff; border-color: var(--ae-navy); }

.ae-glossary-tools { margin-bottom: 24px; }
.ae-glossary-search {
	display: flex; align-items: center; gap: 10px;
	max-width: 420px; margin-bottom: 18px;
	padding: 12px 18px; border-radius: 999px;
	background: var(--ae-surface); border: 1px solid var(--ae-line-strong);
}
.ae-glossary-search .ae-icon { color: var(--ae-muted); }
.ae-glossary-search input { flex: 1; border: 0; background: none; font: inherit; font-size: 14px; outline: none; }

/* ==================================================================
   8. Cards
   ================================================================== */

.ae-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.ae-grid-terms { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

.ae-card {
	display: flex; flex-direction: column;
	background: var(--ae-surface); border: 1px solid var(--ae-line);
	border-radius: var(--ae-radius); overflow: hidden;
	box-shadow: var(--ae-shadow);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.ae-card:hover { transform: translateY(-3px); box-shadow: var(--ae-shadow-lg); border-color: var(--card-accent); }

.ae-card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ae-tint); }
.ae-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ae-card:hover .ae-card-media img { transform: scale(1.04); }

.ae-card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }

.ae-card-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.ae-badge {
	display: inline-block; padding: 3px 10px; border-radius: 999px;
	font-size: 11px; font-weight: 700; letter-spacing: .03em;
	color: var(--card-accent, var(--ae-navy));
	background: color-mix(in srgb, var(--card-accent, var(--ae-navy)) 10%, #fff);
}

.ae-card-title { font-size: 17px; line-height: 1.55; margin: 0 0 8px; }
.ae-card-title a { color: var(--ae-navy-deep); text-decoration: none; }
.ae-card-title a:hover { color: var(--card-accent); }

.ae-term-reading { font-family: var(--ae-mono); font-size: 12.5px; color: var(--ae-muted); margin: 0 0 2px; }
.ae-term-ja { font-size: 13.5px; font-weight: 700; color: var(--ae-text); margin: 0 0 8px; }

.ae-card-excerpt { font-size: 13.5px; line-height: 1.8; color: var(--ae-muted); margin: 0 0 14px; }
.ae-card-meta { display: flex; align-items: center; gap: 6px; margin: auto 0 0; font-size: 12.5px; color: var(--ae-muted); }
.ae-ext { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--card-accent); text-decoration: none; }
.ae-ext:hover { text-decoration: underline; }

.ae-empty {
	padding: 60px 24px; text-align: center;
	background: var(--ae-surface); border: 1px dashed var(--ae-line-strong);
	border-radius: var(--ae-radius); color: var(--ae-muted);
}

/* ==================================================================
   9. Single content
   ================================================================== */

.ae-single { padding-bottom: 72px; }
.ae-single-media { margin-bottom: 32px; }
.ae-single-media img { width: 100%; border-radius: var(--ae-radius); }

.ae-prose { max-width: 780px; margin-inline: auto; font-size: 16.5px; }
.ae-prose h2 { font-size: 26px; margin: 2em 0 .7em; padding-left: 14px; border-left: 4px solid var(--ae-accent); }
.ae-prose h3 { font-size: 20px; margin: 1.8em 0 .6em; }
.ae-prose ul, .ae-prose ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.ae-prose li { margin-bottom: .5em; }
.ae-prose blockquote {
	margin: 1.8em 0; padding: 18px 24px;
	background: var(--ae-tint); border-left: 4px solid var(--ae-gold);
	border-radius: 0 10px 10px 0; color: var(--ae-muted);
}
.ae-prose code { font-family: var(--ae-mono); font-size: .9em; background: var(--ae-tint); padding: 2px 6px; border-radius: 5px; }
.ae-prose pre { background: var(--ae-navy-deep); color: #e8eefb; padding: 20px; border-radius: 12px; overflow-x: auto; }
.ae-prose pre code { background: none; color: inherit; }
.ae-prose table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 14.5px; }
.ae-prose th, .ae-prose td { padding: 11px 14px; border: 1px solid var(--ae-line); text-align: left; }
.ae-prose th { background: var(--ae-tint); font-weight: 700; }
.ae-prose img { border-radius: 10px; }

.ae-objective {
	max-width: 780px; margin: 0 auto 32px;
	padding: 22px 26px; border-radius: var(--ae-radius);
	background: color-mix(in srgb, var(--ae-accent) 7%, #fff);
	border: 1px solid color-mix(in srgb, var(--ae-accent) 26%, #fff);
}
.ae-objective-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ae-accent); font-weight: 700; margin: 0 0 6px; }
.ae-objective-text { margin: 0; font-size: 15px; }

.ae-embed { max-width: 780px; margin: 0 auto 32px; border-radius: var(--ae-radius); overflow: hidden; }
.ae-embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; display: block; }

.ae-audio { max-width: 780px; margin: 0 auto 32px; padding: 20px 24px; background: var(--ae-tint); border-radius: var(--ae-radius); }
.ae-audio-label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ae-muted); margin: 0 0 10px; }
.ae-audio audio { width: 100%; }

.ae-deflist { max-width: 780px; margin: 0 auto 36px; padding: 0; }
.ae-deflist > div { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--ae-line); }
.ae-deflist dt { font-size: 12.5px; font-weight: 700; color: var(--ae-muted); margin: 0; }
.ae-deflist dd { margin: 0; }
.ae-mono { font-family: var(--ae-mono); font-size: 17px; }

.ae-term-title { font-family: var(--ae-sans); letter-spacing: -.01em; }
.ae-term-reading-lg { font-family: var(--ae-mono); font-size: 17px; color: var(--ae-muted); margin: 0 0 6px; }

.ae-postnav {
	max-width: 780px; margin: 48px auto 0;
	display: flex; justify-content: space-between; gap: 16px;
	padding-top: 24px; border-top: 1px solid var(--ae-line);
	font-size: 14px;
}
.ae-postnav a { text-decoration: none; }
.ae-postnav a:hover { text-decoration: underline; }
.ae-postnav-next { margin-left: auto; text-align: right; }

/* Pagination */
.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 52px 0 0; }
.pagination .page-numbers {
	display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px;
	background: var(--ae-surface); border: 1px solid var(--ae-line);
	border-radius: 10px; text-decoration: none; font-size: 14px;
}
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--ae-navy); color: #fff; border-color: var(--ae-navy); }

/* ==================================================================
   10. Footer
   ================================================================== */

.ae-footer { margin-top: 0; background: var(--ae-navy-deep); color: rgba(255, 255, 255, .8); }
.ae-footer-inner {
	width: min(100% - 40px, var(--ae-wrap)); margin-inline: auto;
	padding: 64px 0 40px;
	display: grid; gap: 40px; grid-template-columns: 1.4fr 1fr 1fr;
}
.ae-footer-brand .ae-brand-mark { background: rgba(255, 255, 255, .12); margin-bottom: 14px; }
.ae-footer-name { font-family: var(--ae-serif); font-size: 20px; font-weight: 700; color: #fff; margin: 0 0 8px; }
.ae-footer-desc { font-size: 13px; line-height: 1.9; color: rgba(255, 255, 255, .58); margin: 0; }

.ae-footer-heading { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ae-gold-soft); margin: 0 0 16px; font-family: var(--ae-sans); }
.ae-footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ae-footer-nav a { color: rgba(255, 255, 255, .8); text-decoration: none; font-size: 14px; }
.ae-footer-nav a:hover { color: #fff; text-decoration: underline; }

.ae-copyright {
	margin: 0; padding: 22px 20px;
	border-top: 1px solid rgba(255, 255, 255, .12);
	text-align: center; font-size: 12px; color: rgba(255, 255, 255, .5);
}

/* ==================================================================
   11. Responsive
   ================================================================== */

@media (max-width: 1000px) {
	.ae-hero-inner { grid-template-columns: 1fr; padding: 60px 0 68px; }
	.ae-hero-device { order: -1; }
	.ae-device { transform: none; width: 250px; }
	.ae-footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
	.ae-nav-toggle { display: grid; place-items: center; }
	.ae-nav {
		position: absolute; top: 100%; left: 0; right: 0;
		flex-direction: column; align-items: stretch; gap: 12px;
		padding: 18px 20px 24px;
		background: var(--ae-paper); border-bottom: 1px solid var(--ae-line);
		box-shadow: var(--ae-shadow-lg);
		display: none;
	}
	.ae-nav.is-open { display: flex; }
	.ae-menu { flex-direction: column; align-items: stretch; gap: 2px; }
	.ae-menu a { padding: 12px 14px; border-radius: 10px; }
	.ae-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding-left: 12px; }
	.ae-nav-search input, .ae-nav-search input:focus { width: 100%; }
	.ae-nav-search { width: 100%; }
}

@media (max-width: 640px) {
	body { font-size: 15px; }
	.ae-section { padding: 56px 0; }
	.ae-page-head { padding: 36px 0 26px; margin-bottom: 32px; }
	.ae-grid, .ae-course-grid { grid-template-columns: 1fr; }
	.ae-deflist > div { grid-template-columns: 1fr; gap: 4px; }
	.ae-footer-inner { grid-template-columns: 1fr; padding: 48px 0 32px; }
	.ae-prose { font-size: 15.5px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
