/*
Theme Name: Mark S. Cogan Academic
Author: Mark S. Cogan
Description: A professional academic theme for an Associate Professor of Peace and Conflict Studies.
Version: 1.1
License: GNU General Public License v2 or later
Text Domain: msc-academic
*/

/* ============================================
   CSS VARIABLES — Saffron & Charcoal palette
   ============================================ */
:root {
  --charcoal:       #1e1e1e;
  --charcoal-mid:   #2e2e2e;
  --saffron:        #c97d0a;
  --saffron-light:  #e49a20;
  --cream:          #f7f4ed;
  --text-main:      #1e1e1e;
  --text-muted:     #56504a;
  --text-light:     #8a847e;
  --rule:           rgba(30,30,30,0.12);
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text-main);
  font-size: 16px;
  line-height: 1.7;
}

a { color: var(--saffron); text-decoration: none; }
a:hover { color: var(--charcoal); }
img { max-width: 100%; height: auto; display: block; }

/* ============================================
   SITE WRAPPER
   ============================================ */
.site-wrapper {
  max-width: 960px;
  margin: 0 auto;
  box-shadow: 0 0 40px rgba(0,0,0,0.10);
}

/* ============================================
   DECORATIVE RULE (top of site)
   ============================================ */
.decorative-rule {
  height: 5px;
  background: repeating-linear-gradient(
    -55deg,
    var(--saffron)       0px,
    var(--saffron)       8px,
    var(--saffron-light) 8px,
    var(--saffron-light) 14px,
    #8B4800              14px,
    #8B4800              18px,
    var(--saffron-light) 18px,
    var(--saffron-light) 24px
  );
}

/* ============================================
   TOP BAR
   ============================================ */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 2rem;
  background: var(--charcoal);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
  font-weight: 300;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.topbar-institution { color: rgba(255,255,255,0.78); }
.topbar-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.topbar-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.topbar-links a:hover { color: var(--saffron-light); }

/* ============================================
   SITE HEADER
   ============================================ */
.site-header {
  background: var(--charcoal);
  padding: 2.6rem 2rem 2.2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
}
.site-name {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-decoration: none;
  display: block;
}
.header-rule {
  height: 1px;
  background: var(--saffron);
  width: 40px;
  margin: 0.7rem 0;
}
.site-position {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.07em;
  line-height: 1.6;
}
.site-position strong { color: var(--saffron-light); font-weight: 400; }
.header-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
  flex-shrink: 0;
}
.btn-cv {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--saffron);
  color: var(--charcoal);
  background: var(--saffron);
  cursor: pointer;
  border-radius: 2px;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}
.btn-cv:hover { background: var(--saffron-light); border-color: var(--saffron-light); color: var(--charcoal); }
.btn-contact {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 1.1rem;
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.8);
  background: transparent;
  cursor: pointer;
  border-radius: 2px;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}
.btn-contact:hover { border-color: var(--saffron-light); color: var(--saffron-light); }

/* ============================================
   NAVIGATION
   ============================================ */
.site-nav {
  background: var(--charcoal-mid);
  border-bottom: 2px solid var(--saffron);
  padding: 0 2rem;
}
.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}
.site-nav ul ul { display: none; }
.site-nav ul li a {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  padding: 0.85rem 1.1rem;
  display: block;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.site-nav ul li a:hover,
.site-nav ul li.current-menu-item > a,
.site-nav ul li.current_page_item > a,
.site-nav ul li.current-menu-ancestor > a {
  color: #fff;
  border-bottom-color: var(--saffron);
}

/* ============================================
   CONTENT GRID
   ============================================ */
.content-area {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 0;
  background: var(--cream);
}

/* ============================================
   PRIMARY COLUMN
   ============================================ */
.primary {
  padding: 2rem;
  border-right: 1px solid var(--rule);
  min-width: 0;
}

/* BIO SECTION (homepage) */
.bio-section {
  display: flex;
  gap: 1.2rem;
  padding-bottom: 1.8rem;
  margin-bottom: 1.8rem;
  border-bottom: 1px solid var(--rule);
  align-items: flex-start;
}
.bio-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--charcoal-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--saffron);
  overflow: hidden;
}
.bio-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  display: block;
}
.bio-avatar-initials {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--saffron-light);
}
.bio-text {
  font-family: 'Source Serif 4', serif;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-main);
}
.bio-text em { font-style: italic; color: var(--text-muted); }
.credential-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}
.pill {
  font-family: 'DM Sans', sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.07em;
  padding: 0.22rem 0.65rem;
  border-radius: 2px;
  text-transform: uppercase;
}
.pill-charcoal { background: rgba(30,30,30,0.07); color: var(--charcoal); border: 1px solid rgba(30,30,30,0.15); }
.pill-saffron  { background: rgba(201,125,10,0.10); color: #7a4800; border: 1px solid rgba(201,125,10,0.25); }

/* SECTION LABEL */
.section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ARTICLE ITEMS */
.article-item {
  padding-bottom: 1.4rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--rule);
}
.article-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.article-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}
.article-region {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--saffron);
}
.article-date {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--text-light);
}
.article-sep { color: var(--text-light); font-size: 10px; }
.article-title-link {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  text-decoration: none;
  display: block;
  transition: color 0.2s;
}
.article-title-link:hover { color: var(--saffron); }
.article-excerpt {
  font-family: 'Source Serif 4', serif;
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-muted);
}
.read-more {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--saffron);
  text-decoration: none;
  font-weight: 500;
}
.read-more:hover { color: var(--charcoal); }

/* SINGLE POST */
.post-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--text-main);
  margin-top: 0.6rem;
  margin-bottom: 1.5rem;
}
.post-content { margin-top: 0.5rem; }
.post-content p { margin-bottom: 1.2rem; }
.post-content img { margin-top: 1.2rem; margin-bottom: 1.2rem; }
.post-content figure { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.post-content h2 { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 400; margin: 2rem 0 0.8rem; }
.post-content h3 { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 400; margin: 1.5rem 0 0.6rem; }
.post-content a { color: var(--saffron); border-bottom: 1px solid rgba(201,125,10,0.3); }
.post-content a:hover { color: var(--charcoal); border-bottom-color: var(--charcoal); }
.post-content blockquote {
  border-left: 3px solid var(--saffron);
  padding: 0.8rem 1.2rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
  font-family: 'Source Serif 4', serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
}
.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
.post-content li { margin-bottom: 0.3rem; }

/* STATIC PAGES */
.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 400;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}
.page-content {
  font-family: 'Source Serif 4', serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-main);
}
.page-content p { margin-bottom: 1.2rem; }
.page-content h2 { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 400; margin: 2rem 0 0.8rem; }
.page-content h3 { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 400; margin: 1.5rem 0 0.6rem; }
.page-content a { color: var(--saffron); border-bottom: 1px solid rgba(201,125,10,0.3); }
.page-content a:hover { color: var(--charcoal); border-bottom-color: var(--charcoal); }
.page-content ul, .page-content ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
.page-content li { margin-bottom: 0.4rem; }

/* PAGINATION */
.all-articles-link { text-align: right; margin-top: 1rem; }
.all-articles-link a {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--saffron);
  text-decoration: none;
  font-weight: 500;
}
.pagination { margin-top: 2rem; text-align: center; font-family: 'DM Sans', sans-serif; font-size: 13px; }
.pagination .page-numbers {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  margin: 0 2px;
  border: 1px solid var(--rule);
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 2px;
}
.pagination .page-numbers.current { background: var(--charcoal); color: #fff; border-color: var(--charcoal); }
.pagination .page-numbers:hover { border-color: var(--saffron); color: var(--saffron); }

/* ARCHIVE */
.archive-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 0.3rem;
}
.archive-title {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 400;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

/* BACK LINK */
.back-link {
  display: inline-block;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--saffron);
  text-decoration: none;
  font-weight: 500;
  width: 100%;
}
.back-link:hover { color: var(--charcoal); }

/* ============================================
   SIDEBAR
   ============================================ */
.widget-area { padding: 2rem 1.5rem; background: var(--cream); }
.sidebar-block { margin-bottom: 2rem; }
.sidebar-block:last-child { margin-bottom: 0; }

/* Research Tags */
.research-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.research-tag {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 400;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--saffron);
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  background: #fff;
}

/* Publications */
.pub-item { padding: 0.65rem 0; border-bottom: 1px solid var(--rule); }
.pub-item:last-child { border-bottom: none; }
.pub-title {
  font-family: 'Source Serif 4', serif;
  font-size: 13px;
  font-style: italic;
  font-weight: 300;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 0.2rem;
}
.pub-detail { font-family: 'DM Sans', sans-serif; font-size: 11px; color: var(--text-light); }

/* Currently Working On */
.current-project-text {
  font-family: 'Source Serif 4', serif;
  font-size: 13.5px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.65;
  color: var(--text-muted);
  padding: 0.8rem 0.9rem;
  border-left: 3px solid var(--saffron);
  background: rgba(201,125,10,0.04);
}

/* In the Media */
.media-item {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--rule);
}
.media-item:last-child { border-bottom: none; }
.media-outlet {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 0.2rem;
}
.media-headline {
  font-family: 'Source Serif 4', serif;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.4;
  color: var(--text-main);
}
.media-headline a {
  color: var(--text-main);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color 0.2s, border-color 0.2s;
}
.media-headline a:hover { color: var(--saffron); border-bottom-color: var(--saffron); }
.media-date {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 0.2rem;
}

/* Affiliations */
.affil-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.affil-item:last-child { border-bottom: none; }
.affil-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--saffron); margin-top: 4px; flex-shrink: 0;
}
.affil-name { color: var(--text-main); font-weight: 500; display: block; }

/* Contact links */
.contact-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0;
  transition: color 0.2s;
}
.contact-link:hover { color: var(--saffron); }
.contact-link svg { width: 14px; height: 14px; color: var(--saffron); flex-shrink: 0; }

/* Sidebar more link */
.sidebar-more-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--saffron);
  text-decoration: none;
  font-weight: 500;
  display: block;
  margin-top: 0.6rem;
}
.sidebar-more-link:hover { color: var(--charcoal); }

/* WordPress default widgets */
.widget { margin-bottom: 1.5rem; }
.widget .section-label { font-size: 9.5px; }
.widget ul { list-style: none; padding: 0; }
.widget ul li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--rule);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--text-muted);
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--text-muted); text-decoration: none; }
.widget ul li a:hover { color: var(--saffron); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--charcoal);
  padding: 1.4rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.04em;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,0.55); text-decoration: none; }
.footer-links a:hover { color: var(--saffron-light); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 700px) {
  .content-area { grid-template-columns: 1fr; }
  .widget-area { border-top: 1px solid var(--rule); }
  .site-header { padding: 1.8rem 1.2rem; flex-direction: column; align-items: flex-start; }
  .primary { padding: 1.5rem; }
  .topbar { padding: 0.5rem 1rem; }
  .site-nav { padding: 0 0.5rem; }
  .bio-section { flex-direction: column; }
  .header-actions { flex-direction: row; align-items: center; }
}

/* ============================================
   WORDPRESS ALIGNMENT & UTILITY
   ============================================ */
.alignnone { margin: 5px 20px 20px 0; }
.aligncenter { display: block; margin: 0 auto 20px; }
.alignright { float: right; margin: 5px 0 20px 20px; }
.alignleft { float: left; margin: 5px 20px 20px 0; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12px; color: var(--text-light); text-align: center; margin-top: 4px; font-family: 'DM Sans', sans-serif; }
.screen-reader-text { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
