/*
Theme Name: Scholarly
Theme URI: https://example.com/scholarly
Author: Your Name
Description: A simple, clean one-page academic/personal profile theme with a Welcome section, Biography (with Education / Academic Career / Current Roles cards), Research Areas, Recent Publications, and a separate Blog. Menu items link to sections on the homepage by ID.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.6
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: scholarly
*/

/* ========================================================================
   BASE
   ======================================================================== */

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: #ffffff;
  color: #333333;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

a{ color: #1a5c96; text-decoration: none; }
a:hover{ text-decoration: underline; }

img{ max-width: 100%; display: block; }
ul{ margin: 0; padding: 0; list-style: none; }

h1, h2, h3{
  color: #1a5c96;
  font-weight: 600;
  margin: 0 0 14px;
}

p{ margin: 0 0 14px; }

.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible{ outline: 2px solid #1a5c96; outline-offset: 2px; }

/* ========================================================================
   HEADER / NAV
   ======================================================================== */

.site-header{
  border-bottom: 1px solid #e2e2e2;
  background: #ffffff;
}
.site-header .container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.site-branding{
  font-size: 20px;
  font-weight: 700;
  color: #1a5c96;
}
.site-branding img{ max-height: 40px; width: auto; }

.main-navigation ul{
  display: flex;
  gap: 28px;
}
.main-navigation a{
  color: #333333;
  font-size: 14px;
  font-weight: 600;
}
.main-navigation a:hover,
.main-navigation .current-menu-item a{
  color: #1a5c96;
  text-decoration: underline;
}

.menu-toggle{
  display: none;
  background: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 40px;
  height: 36px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}
.menu-toggle span{ width: 18px; height: 2px; background: #333; display: block; }

@media (max-width: 780px){
  .menu-toggle{ display: flex; }
  .main-navigation{
    display: none;
    width: 100%;
    padding: 14px 0 20px;
  }
  .nav-open .main-navigation{ display: block; }
  .main-navigation ul{ flex-direction: column; gap: 14px; }
  .site-header .container{ flex-wrap: wrap; height: auto; padding-top: 16px; padding-bottom: 16px; }
}

/* ========================================================================
   PAGE TITLE (matches plain "Home" heading under the nav)
   ======================================================================== */

.page-title-bar{ padding: 26px 0 6px; }
.page-title-bar h1{
  font-size: 26px;
  margin: 0;
  color: #1a5c96;
}

/* ========================================================================
   SECTION SHELL
   ======================================================================== */

.section{ padding: 50px 0; scroll-margin-top: 90px; }
.section-alt{ background: #f4f4f4; }
.section-title{
  text-align: center;
  font-size: 22px;
  margin-bottom: 22px;
}
.section-intro{
  max-width: 900px;
  margin: 0 auto 26px;
  text-align: left;
}
.section-intro.centered{ text-align: center; }

/* ========================================================================
   WELCOME (photo + text)
   ======================================================================== */

.welcome-grid{
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 50px;
  align-items: start;
}
.welcome-photo{
  width: 100%;
  border: 1px solid #e2e2e2;
}
.welcome-photo img{ width: 100%; height: auto; }
.welcome-text h2{ text-align: center; }
.welcome-text p{ text-align: justify; }

@media (max-width: 780px){
  .welcome-grid{ grid-template-columns: 1fr; }
  .welcome-photo{ max-width: 320px; margin: 0 auto; }
}

/* ========================================================================
   BIOGRAPHY + CARDS
   ======================================================================== */

.bio-cards{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 30px;
}
.bio-card{
  background: #ffffff;
  border: 1px solid #e2e2e2;
  padding: 22px 24px;
  text-align: center;
}
.bio-card h3{
  font-size: 17px;
  margin-bottom: 14px;
}
.bio-card ul{
  text-align: left;
  display: grid;
  gap: 8px;
}
.bio-card ul li{
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  color: #333;
}
.bio-card ul li::before{
  content: "\2022";
  position: absolute;
  left: 0;
  color: #1a5c96;
}
.bio-card p{ text-align: left; font-size: 14px; }

@media (max-width: 900px){
  .bio-cards{ grid-template-columns: 1fr; }
}

/* ========================================================================
   BLOG (homepage preview + full archive)
   ======================================================================== */

.blog-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.blog-grid.is-archive{ grid-template-columns: repeat(2, 1fr); }
.post-card{
  background: #ffffff;
  border: 1px solid #e2e2e2;
}
.post-thumb{ aspect-ratio: 16/10; overflow: hidden; background: #eee; }
.post-thumb img{ width: 100%; height: 100%; object-fit: cover; }
.post-body{ padding: 18px 20px; }
.post-meta{ font-size: 12px; color: #888; margin-bottom: 8px; }
.post-body h3{ font-size: 16px; margin-bottom: 8px; }
.post-body p{ font-size: 13.5px; color: #555; margin-bottom: 10px; }
.post-readmore{ font-size: 13px; font-weight: 700; }
.section-footer-cta{ text-align: center; margin-top: 34px; }

@media (max-width: 780px){
  .blog-grid, .blog-grid.is-archive{ grid-template-columns: 1fr; }
}

/* ========================================================================
   BUTTONS
   ======================================================================== */

.btn{
  display: inline-block;
  padding: 10px 22px;
  border: 1px solid #1a5c96;
  color: #1a5c96;
  font-size: 14px;
  font-weight: 700;
  border-radius: 3px;
}
.btn:hover{ background: #1a5c96; color: #fff; text-decoration: none; }

/* ========================================================================
   SINGLE POST / GENERIC PAGE
   ======================================================================== */

.single-post{ padding: 40px 0 70px; }
.single-post .container{ max-width: 760px; }
.single-thumb{ margin-bottom: 26px; border: 1px solid #e2e2e2; }
.entry-content{ font-size: 15.5px; }
.entry-content img{ margin: 1.2em 0; }
.entry-content blockquote{
  border-left: 3px solid #1a5c96;
  margin: 1.4em 0;
  padding-left: 18px;
  color: #555;
  font-style: italic;
}
.entry-tags{ margin-top: 30px; }
.entry-tags a{
  font-size: 12.5px;
  border: 1px solid #e2e2e2;
  padding: 5px 12px;
  border-radius: 3px;
  margin-right: 8px;
  display: inline-block;
}

.page-content{ padding: 30px 0 70px; }
.page-content .container{ max-width: 760px; }

.pagination-wrap{ display: flex; justify-content: center; gap: 8px; margin-top: 36px; }
.pagination-wrap a, .pagination-wrap span{
  width: 36px; height: 36px;
  border: 1px solid #e2e2e2;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.pagination-wrap .current{ background: #1a5c96; color: #fff; border-color: #1a5c96; }

.no-results{ text-align: center; padding: 40px 0; color: #777; }

/* ========================================================================
   FOOTER
   ======================================================================== */

.site-footer{
  border-top: 1px solid #e2e2e2;
  background: #fafafa;
  padding: 26px 0;
  text-align: center;
  font-size: 13px;
  color: #777;
}

.screen-reader-text{
  position: absolute !important;
  clip: rect(1px,1px,1px,1px);
  width: 1px; height: 1px; overflow: hidden;
}
