/*
Theme Name: Academic Observer
Theme URI: https://academicobserver.com/
Description: Classic WordPress theme for The Academic Observer. Rebuilds the site's existing layout: announcement bar, navbar, hero, Articles & Opinions, Developing News, The Lighter Side, job listings, sponsor slot and a dark multi-column footer.
Version: 1.1.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: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: academic-observer
*/

/* ---------- Tokens (colors are overridden from the Customizer) ---------- */
:root {
	--ao-primary: #2e8555;
	--ao-primary-dark: #29784c;
	--ao-primary-darker: #277148;
	--ao-banner-bg: #ffffff;
	--ao-banner-text: #1c1e21;
	--ao-footer-bg: #303846;
	--ao-text: #1c1e21;
	--ao-muted: #606770;
	--ao-border: #dadde1;
	--ao-bg: #ffffff;
	--ao-bg-soft: #f5f6f7;
	--ao-font: "Times New Roman", Times, serif;
	--ao-container: 1140px;
	--ao-navbar-h: 60px;
	--ao-radius: 0.4rem;
	--ao-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--ao-font);
	font-size: 16px;
	line-height: 1.65;
	color: var(--ao-text);
	background: var(--ao-bg);
	-webkit-font-smoothing: antialiased;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ao-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--ao-primary-dark); text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { line-height: 1.25; font-weight: 700; margin: 0 0 .75rem; color: var(--ao-text); }
h1 { font-size: 3rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1.25rem; }
hr { border: 0; border-top: 1px solid var(--ao-border); margin: 2rem 0; }
blockquote { margin: 0 0 1.25rem; padding: 0 1rem; border-left: .25rem solid var(--ao-border); color: var(--ao-muted); }

.screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; z-index: 1000;
	top: .5rem; left: .5rem; padding: .75rem 1rem; background: #fff; color: var(--ao-primary);
	box-shadow: 0 0 0 2px var(--ao-primary); border-radius: var(--ao-radius);
}

.container { width: 100%; max-width: var(--ao-container); margin: 0 auto; padding: 0 1rem; }
.site-main { flex: 1 0 auto; }

/* ---------- Announcement bar ---------- */
.announcement-bar {
	background: var(--ao-banner-bg);
	color: var(--ao-banner-text);
	text-align: center;
	font-size: 85%;
	padding: .45rem 1rem;
	border-bottom: 1px solid var(--ao-border);
}
.announcement-bar a { color: inherit; text-decoration: underline; }
.announcement-bar a:hover { opacity: .85; }

/* ---------- Navbar ---------- */
.navbar {
	position: sticky; top: 0; z-index: 200;
	height: var(--ao-navbar-h);
	background: var(--ao-bg);
	box-shadow: var(--ao-shadow);
}
.admin-bar .navbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .navbar { top: 46px; } }
.navbar__inner {
	display: flex; align-items: center; justify-content: space-between;
	height: 100%; max-width: none; padding: 0 1rem;
}
.navbar__brand { display: flex; align-items: center; gap: .5rem; color: var(--ao-text); font-weight: 700; margin-right: 1rem; }
.navbar__brand:hover { color: var(--ao-text); text-decoration: none; }
.navbar__brand img, .navbar__brand .custom-logo { height: 32px; width: auto; }
.navbar__title { font-size: 1rem; white-space: nowrap; }
.navbar__menu { display: flex; align-items: center; flex: 1; }
.navbar__menu ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; flex-wrap: nowrap; }
.navbar__menu li { position: relative; }
.navbar__menu a {
	display: block; padding: .25rem .75rem; color: var(--ao-text); font-weight: 500; font-size: .95rem;
}
.navbar__menu a:hover,
.navbar__menu .current-menu-item > a,
.navbar__menu .current-menu-ancestor > a,
.navbar__menu .current_page_item > a { color: var(--ao-primary); text-decoration: none; }
.navbar__menu .sub-menu {
	display: none; position: absolute; top: 100%; left: 0; min-width: 12rem; padding: .5rem;
	background: #fff; border-radius: var(--ao-radius); box-shadow: 0 5px 40px rgba(0,0,0,.2); flex-direction: column; align-items: stretch;
}
.navbar__menu li:hover > .sub-menu, .navbar__menu li:focus-within > .sub-menu { display: flex; }
.navbar__menu .sub-menu a { border-radius: .25rem; padding: .3rem .75rem; }
.navbar__menu .sub-menu a:hover { background: var(--ao-bg-soft); }

.navbar__toggle {
	display: none; background: none; border: 0; padding: .25rem; cursor: pointer; color: var(--ao-text); margin-right: .5rem;
}
.navbar__toggle svg { display: block; }

@media (max-width: 996px) {
	.navbar__toggle { display: inline-flex; }
	.navbar__inner { justify-content: flex-start; }
	.navbar__menu {
		position: fixed; top: var(--ao-navbar-h); left: 0; bottom: 0; width: 83vw; max-width: 300px;
		background: #fff; box-shadow: var(--ao-shadow); transform: translateX(-100%); transition: transform .25s ease;
		align-items: flex-start; overflow-y: auto; padding: .5rem;
	}
	.admin-bar .navbar__menu { top: calc(var(--ao-navbar-h) + 46px); }
	.navbar.is-open .navbar__menu { transform: none; }
	.navbar__menu ul { flex-direction: column; align-items: stretch; width: 100%; }
	.navbar__menu a { padding: .5rem .75rem; }
	.navbar__menu .sub-menu { display: flex; position: static; box-shadow: none; padding-left: 1rem; }
}

/* ---------- Hero ---------- */
.hero {
	background: transparent;
	color: var(--ao-text);
	border-bottom: 1px solid var(--ao-border);
	text-align: center;
	padding: 4rem 0;
	position: relative;
	overflow: hidden;
}
.hero__title { color: var(--ao-text); font-size: 3.25rem; margin-bottom: .5rem; }
.hero__subtitle { font-size: 1.5rem; margin: 0; font-style: italic; color: var(--ao-muted); }
@media (max-width: 996px) {
	.hero { padding: 2rem; }
	.hero__title { font-size: 2.25rem; }
	.hero__subtitle { font-size: 1.2rem; }
}

/* ---------- Home sections ---------- */
.home-sections { padding-top: 2rem; padding-bottom: 3rem; }
.home-section { margin: 0 0 3rem; }
.home-section__title {
	font-size: 2rem; margin-bottom: 1.25rem; padding-bottom: .5rem; border-bottom: 1px solid var(--ao-border);
}
.home-section__more { font-weight: 600; display: inline-block; margin-top: .25rem; }

.entry-list { list-style: none; margin: 0; padding: 0; }
.entry-item { margin: 0 0 1.75rem; }
.entry-item__title { font-size: 1.35rem; margin: 0 0 .25rem; }
.entry-item__title a { color: var(--ao-primary); }
.entry-item__byline { font-style: italic; color: var(--ao-muted); margin: 0 0 .5rem; font-size: .95rem; }
.entry-item__excerpt p { margin: 0; }

.news-list .entry-item { margin-bottom: 1.25rem; }
.news-list .entry-item__date { font-weight: 700; margin-right: .35rem; color: var(--ao-text); }
.news-list .entry-item__title { font-size: 1.1rem; display: inline; }
.news-list .entry-item__excerpt { margin-top: .25rem; }

.lighter-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; }
.lighter-card {
	border: 1px solid var(--ao-border); border-radius: var(--ao-radius); overflow: hidden; background: #fff;
	transition: box-shadow .2s, transform .2s; display: flex; flex-direction: column;
}
.lighter-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.1); transform: translateY(-2px); }
.lighter-card__media img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.lighter-card__body { padding: .9rem 1rem 1rem; }
.lighter-card__title { font-size: 1.05rem; margin: 0; }
.lighter-card__title a { color: var(--ao-text); }
.lighter-card__title a:hover { color: var(--ao-primary); }

.widget-section .widget { margin-bottom: 1.5rem; }
.widget-section ul { padding-left: 1.25rem; }
.widget-section li { margin-bottom: .5rem; }
.sponsor-slot { text-align: center; }
.sponsor-slot img { margin: 0 auto; }

/* ---------- Homepage columns ---------- */
.home-container { max-width: 1320px; }
.home-columns { display: flex; gap: 0; align-items: stretch; margin-bottom: 3rem; }
.home-columns > .home-section { flex: 1 1 0; min-width: 0; margin: 0; padding: 0 1.5rem; border-left: 1px solid var(--ao-border); }
.home-columns > .home-section:first-child { padding-left: 0; border-left: 0; }
.home-columns > .home-section:last-child { padding-right: 0; }
.home-columns .home-section__title { font-size: 1.5rem; }
.home-columns .entry-item__title { font-size: 1.15rem; }
.home-columns .news-list .entry-item__date { display: block; font-size: .9rem; }
.home-columns .news-list .entry-item__title { display: block; font-size: 1.05rem; }
.home-columns .lighter-list { grid-template-columns: 1fr; gap: 1rem; }
@media (max-width: 1100px) {
	.home-columns { flex-wrap: wrap; row-gap: 2.5rem; }
	.home-columns > .home-section { flex: 1 1 calc(50% - 1px); }
	.home-columns > .home-section:nth-child(odd) { padding-left: 0; border-left: 0; }
	.home-columns > .home-section:nth-child(even) { padding-right: 0; }
}
@media (max-width: 700px) {
	.home-columns > .home-section { flex-basis: 100%; padding: 0; border-left: 0; }
}

/* ---------- Articles / pages ---------- */
.content-area { padding: 2.5rem 0 3rem; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; }
@media (min-width: 997px) { .layout.has-sidebar { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); } }
.article { max-width: 46rem; }
.layout.has-sidebar .article { max-width: none; }
.article__header { margin-bottom: 1.5rem; }
.article__title { font-size: 2.5rem; }
.article__meta { color: var(--ao-muted); font-size: .95rem; }
.article__meta .sep { margin: 0 .4rem; }
.article__thumb { margin: 0 0 1.75rem; border-radius: var(--ao-radius); overflow: hidden; }
.article__content { font-size: 1.05rem; }
.article__content h2 { margin-top: 2.25rem; }
.article__content h3 { margin-top: 1.75rem; }
.article__content figure { margin: 0 0 1.5rem; }
.article__content figcaption { font-size: .875rem; color: var(--ao-muted); text-align: center; margin-top: .5rem; }
.article__content table { border-collapse: collapse; width: 100%; margin-bottom: 1.5rem; }
.article__content th, .article__content td { border: 1px solid var(--ao-border); padding: .5rem .75rem; }
.article__content tr:nth-child(2n) { background: var(--ao-bg-soft); }
.article__footer { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--ao-border); color: var(--ao-muted); font-size: .9rem; }
.tags a { display: inline-block; border: 1px solid var(--ao-border); border-radius: var(--ao-radius); padding: .1rem .55rem; margin: 0 .3rem .3rem 0; color: var(--ao-muted); }
.tags a:hover { border-color: var(--ao-primary); color: var(--ao-primary); text-decoration: none; }

.archive-header { margin-bottom: 2rem; }
.archive-header h1 { font-size: 2.5rem; }
.archive-description { color: var(--ao-muted); }

.post-navigation, .pagination { margin-top: 2.5rem; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.post-navigation a {
	display: block; border: 1px solid var(--ao-border); border-radius: var(--ao-radius); padding: .9rem 1rem; height: 100%;
}
.post-navigation a:hover { border-color: var(--ao-primary); text-decoration: none; }
.post-navigation .nav-next { text-align: right; }
.post-navigation .meta-nav { display: block; font-size: .85rem; color: var(--ao-muted); }
.pagination .nav-links { display: flex; gap: .35rem; flex-wrap: wrap; }
.pagination .page-numbers { padding: .3rem .75rem; border-radius: var(--ao-radius); color: var(--ao-text); }
.pagination .page-numbers.current { background: var(--ao-primary); color: #fff; }
.pagination a.page-numbers:hover { background: var(--ao-bg-soft); text-decoration: none; }

/* Sidebar */
.sidebar .widget { margin-bottom: 2rem; }
.sidebar .widget-title { font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ao-muted); }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li { padding: .3rem 0; border-bottom: 1px solid var(--ao-bg-soft); }

/* Forms */
.search-form { display: flex; gap: .5rem; max-width: 30rem; }
input[type="search"], input[type="text"], input[type="email"], input[type="url"], textarea {
	font: inherit; width: 100%; padding: .55rem .75rem; border: 1px solid var(--ao-border); border-radius: var(--ao-radius); background: #fff; color: var(--ao-text);
}
input:focus, textarea:focus { outline: 2px solid var(--ao-primary); outline-offset: 1px; }
.button, button[type="submit"], input[type="submit"], .wp-block-button__link {
	font: inherit; font-weight: 700; cursor: pointer; border: 1px solid var(--ao-primary); background: var(--ao-primary); color: #fff;
	padding: .55rem 1.25rem; border-radius: var(--ao-radius); transition: background .2s;
}
.button:hover, button[type="submit"]:hover, input[type="submit"]:hover, .wp-block-button__link:hover { background: var(--ao-primary-dark); color: #fff; text-decoration: none; }

/* Comments */
.comments-area { margin-top: 3rem; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.5rem; }
.comment-body { border-bottom: 1px solid var(--ao-border); padding: 1rem 0; }
.comment-meta { font-size: .9rem; color: var(--ao-muted); }
.comment-author .avatar { float: left; margin-right: .75rem; border-radius: 50%; }

/* 404 */
.not-found { text-align: center; padding-top: 4rem; padding-bottom: 4rem; }
.not-found .search-form { margin: 1.5rem auto 0; }

/* WordPress alignment / core classes */
.alignleft { float: left; margin: .3rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .3rem 0 1rem 1.5rem; }
.aligncenter { margin-left: auto; margin-right: auto; }
.alignwide { margin-left: -4rem; margin-right: -4rem; max-width: calc(100% + 8rem); }
.alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
@media (max-width: 996px) { .alignwide { margin-left: 0; margin-right: 0; max-width: 100%; } }
.wp-caption-text, .gallery-caption { font-size: .875rem; color: var(--ao-muted); }
.sticky, .bypostauthor { display: block; }

/* ---------- Footer ---------- */
.site-footer {
	background: var(--ao-footer-bg);
	color: #ebedf0;
	padding: 2rem 0 1.5rem;
	margin-top: auto;
}
.footer__links { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; margin-bottom: 1rem; }
.footer__title { color: #fff; font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.footer__col ul { list-style: none; margin: 0; padding: 0; }
.footer__col li { line-height: 2; }
.footer__col a { color: #ebedf0; }
.footer__col a:hover { color: var(--ao-primary); text-decoration: none; filter: brightness(1.6); }
.footer__bottom { text-align: center; font-size: .95rem; color: #ebedf0; padding-top: 1rem; }
@media (max-width: 996px) { .footer__links { grid-template-columns: 1fr; text-align: center; } }
