/*
Theme Name: Ed Lopez Academic
Theme URI: https://edlopez.meetingsavvy.com
Author: Edward J. López
Description: Academic portfolio theme for economist Edward J. López — Research, Teaching, Service
Version: 1.0.8
License: GNU General Public License v2 or later
Text Domain: edlopez
*/

/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:    #0e2447;
  --dark:    #111827;
  --gold:    #b8912a;
  --cream:   #f4f1eb;
  --paper:   #faf8f4;
  --border:  #ddd8cc;
  --text:    #2c2c2c;
  --muted:   #6b6b6b;
  --white:   #ffffff;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans:  'Helvetica Neue', Arial, sans-serif;
}

html {
  font-size: 87.5%;
  scroll-behavior: smooth;
}

body {
  background: url('assets/images/bg.png') no-repeat bottom center fixed;
  background-size: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
}

a { color: var(--gold); text-decoration: underline; }
a:hover { color: var(--navy); text-decoration: underline; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  color: var(--navy);
  line-height: 1.25;
}

p { margin-bottom: 1.1rem; }
p:last-child { margin-bottom: 0; }

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

ul, ol { padding-left: 1.5rem; }

.container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ─── Header / Nav bar ──────────────────────────────────────── */
#site-header {
  background: var(--navy);
  position: relative;
  overflow: visible;
  z-index: 10;
}

/* ─── Top bar (nav row) ─────────────────────────────────────── */
.top-bar {
  position: relative;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.765rem 140px 0.765rem 1.5rem;
  max-width: 1060px;
  margin: 0 auto;
  gap: 0;
  min-height: 76.5px;
  position: relative;
}

/* ─── Pen header image ──────────────────────────────────────── */
.header-pen {
  position: absolute;
  right: -30px;
  top: 0px;
  height: 309px;
  width: 193px;
  display: block;
  z-index: 20;
  box-shadow: none;
}

.site-branding-inline {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
}

.site-name-link {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: normal;
  color: #ffffff;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
}

.site-name-link:hover {
  color: var(--gold);
  text-decoration: none;
}

.top-bar-contact {
  font-size: 0.97rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.05em;
}

#site-nav {
  align-self: stretch;
  display: flex;
  align-items: stretch;
}

#site-nav ul {
  list-style: none;
  display: flex;
  gap: 0;
  padding: 0;
  align-items: stretch;
}

#site-nav li {
  position: relative;
  display: flex;
  align-items: stretch;
}

#site-nav > ul > li > a {
  display: flex;
  align-items: center;
  align-self: stretch;
  padding: 1rem 1.3rem;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

#site-nav > ul > li > a:hover,
#site-nav > ul > li.current-menu-item > a {
  color: var(--gold);
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}

#site-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--navy);
  min-width: 180px;
  list-style: none;
  padding: 0.5rem 0;
  z-index: 100;
  border-top: 2px solid var(--gold);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

#site-nav li:hover > .sub-menu { display: block; }

#site-nav > ul > li.menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-left: 5px;
  opacity: 0.7;
  flex-shrink: 0;
}

#site-nav .sub-menu a {
  display: block;
  padding: 0.5rem 1.25rem;
  font-size: 1rem;
  color: #ffffff;
  text-transform: uppercase;
  text-decoration: none;
}

#site-nav .sub-menu a:hover { color: var(--gold); text-decoration: none; background: rgba(255,255,255,0.05); }

/* ─── Branding / Hero ───────────────────────────────────────── */
.branding {
  position: relative;
  z-index: 10;
  padding: 5rem 1.5rem 4.5rem;
  max-width: 1060px;
  margin: 0 auto;
}

.branding-eyebrow {
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
  display: block;
}

.branding h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 6.25vw, 4.375rem);
  color: var(--white);
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  margin-bottom: 0.35rem;
}

.branding .subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.75vw, 1.7rem);
  color: rgba(255,255,255,0.75);
  background: transparent;
  max-width: 600px;
}

/* ─── Layout: Main + Sidebar ────────────────────────────────── */
.content-area {
  background: transparent;
  padding: 2.5rem 0 3rem;
  flex: 1 0 auto;
}

.content-area .container {
  background: rgba(255, 255, 255, 0.96);
  padding: 2rem 2rem;
  box-shadow: 0 4px 40px rgba(0,0,0,0.13);
  margin-top: 60px;
  max-width: 848px;
}

/* default: 65% content / 35% sidebar */
.content-row {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

/* ─── Layout variants ───────────────────────────────────────── */
/* 100% full width */
.layout-full { display: block; }

/* 35% sidebar / 65% content */
.layout-sidebar-left { grid-template-columns: 280px 1fr; }

/* 25% / 50% / 25% */
.layout-three-col { grid-template-columns: 1fr 2fr 1fr; }

/* ─── Main Content ──────────────────────────────────────────── */
.site-main {}

/* ─── Section nav tabs (Research / Teaching / Service) ─────── */
.section-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 2rem;
}

.section-tabs a {
  padding: 0.55rem 1.2rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}

.section-tabs a:hover,
.section-tabs a.active {
  color: var(--navy);
  border-bottom-color: var(--gold);
  text-decoration: none;
}

/* ─── Blog Entry ────────────────────────────────────────────── */
article.entry {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
}

article.entry:first-child { padding-top: 0; }
article.entry:last-child { border-bottom: none; }

.entry-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 0.3rem;
}

.entry-title a {
  color: var(--navy);
}

.entry-title a:hover { color: var(--gold); text-decoration: none; }

.author-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.author-meta strong { color: var(--navy); }

.entry-summary { font-size: 0.93rem; color: var(--text); }

.entry-summary a {
  color: var(--gold);
  font-weight: 600;
}

.read-more {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.read-more:hover { color: var(--navy); text-decoration: none; }

/* ─── Pagination ────────────────────────────────────────────── */
.pagination {
  margin-top: 2rem;
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

.page-numbers {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  color: var(--navy);
  border-radius: 2px;
  transition: all 0.15s;
}

.page-numbers:hover { background: var(--navy); color: var(--white); border-color: var(--navy); text-decoration: none; }
.page-numbers.current { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ─── Research / Teaching / Service Cards ───────────────────── */
.pub-list { list-style: none; padding: 0; }

.pub-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.pub-item:last-child { border-bottom: none; }

.pub-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 0.2rem;
}

.pub-meta {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 0.4rem;
}

.pub-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.tag {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.55rem;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--muted);
}

/* ─── Sidebar ───────────────────────────────────────────────── */
.widget-area { }

.widget-profile-photo img {
  box-shadow: 0 3px 12px rgba(0,0,0,0.18);
}

.profile-caption {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

.widget {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.widget:last-child { border-bottom: none; }

.widgettitle {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold);
}

/* Search widget */
.searchform { display: flex; gap: 0; }
.searchform input[type=text] {
  flex: 1;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-right: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  background: var(--white);
  border-radius: 2px 0 0 2px;
}
.searchform input[type=submit] {
  padding: 0.45rem 0.85rem;
  background: var(--navy);
  color: var(--white);
  border: 1px solid var(--navy);
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: 0 2px 2px 0;
}
.searchform input[type=submit]:hover { background: var(--gold); border-color: var(--gold); }

/* Category/archive lists */
.widget ul { list-style: none; padding: 0; }
.widget ul li { padding: 0.3rem 0; border-bottom: 1px solid var(--cream); font-size: 0.85rem; }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--text); }
.widget ul li a:hover { color: var(--gold); text-decoration: none; }

/* Newsletter widget */
.newsletter-form input[type=email] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  border-radius: 2px;
  margin-bottom: 0.5rem;
  background: var(--white);
}
.newsletter-form button {
  width: 100%;
  padding: 0.5rem;
  background: var(--navy);
  color: var(--white);
  border: none;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.2s;
}
.newsletter-form button:hover { background: var(--gold); }

/* ─── Quotes Section ────────────────────────────────────────── */
.quotation-section {
  background: transparent;
  padding: 3rem 0;
}

.quotation-section .container {
  background: rgba(14, 36, 71, 0.92);
  padding: 2.5rem 2rem;
  box-shadow: 0 4px 40px rgba(0,0,0,0.18);
}

#quote-spinner {
  position: relative;
  min-height: 120px;
}

.quotation-section blockquote {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.quotation-section blockquote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  color: rgba(255,255,255,0.88);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.quotation-section blockquote header {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ─── Front Page Feature Sections ──────────────────────────── */
.feature-strip {
  background: transparent;
  padding: 2.5rem 0;
  margin-top: 25px;
}

.feature-strip .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  background: rgba(255, 255, 255, 0.96);
  padding: 2rem 2rem;
  box-shadow: 0 4px 40px rgba(0,0,0,0.13);
}

.feature-block {
  text-align: center;
}

.feature-block .icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  background: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-block h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
}

.feature-block p { font-size: 0.88rem; color: var(--muted); }

.feature-block a {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
}

/* ─── Inner Page ────────────────────────────────────────────── */
.page-banner {
  position: relative;
  z-index: 10;
  padding: 2.5rem 1.5rem;
  max-width: 1060px;
  margin: 0 auto;
}

.page-banner h1 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ─── Gutenberg block support ───────────────────────────────── */
.wp-block-columns {
  display: flex !important;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.wp-block-column {
  flex: 1 1 0;
  min-width: 0;
}

/* ─── Full-Width Paragraph block pattern ───────────────────── */
/* ─── Two-Column Text block pattern ────────────────────────── */
p.text-two-col {
  background: rgba(255, 255, 255, 0.96);
  padding: 2rem 2rem 2rem 47px;
  box-shadow: 0 4px 40px rgba(0,0,0,0.13);
  margin-left: 0;
  margin-right: 0;
}

p.para-band {
  background: rgba(255, 255, 255, 0.96);
  padding: 2rem 2rem 2rem 47px;
  box-shadow: 0 4px 40px rgba(0,0,0,0.13);
  margin-left: 0;
  margin-right: 0;
}

/* ─── Single Post ───────────────────────────────────────────── */
.single-post-header { margin-bottom: 2rem; }
.single-post-header h1 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin-bottom: 0.4rem; }

.entry-content h2, .entry-content h3 { margin: 1.5rem 0 0.75rem; }
.entry-content ul, .entry-content ol { margin-bottom: 1rem; }
.entry-content blockquote {
  border-left: 3px solid var(--gold);
  padding: 0.5rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--muted);
  font-style: italic;
}

/* ─── Footer ────────────────────────────────────────────────── */
#site-footer {
  background: rgba(17, 24, 39, 0.88);
  color: rgba(255,255,255,0.55);
  font-size: 0.82rem;
  padding: 1.5rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-inner a { color: rgba(255,255,255,0.45); transition: color 0.2s; }
.footer-inner a:hover { color: var(--gold); text-decoration: none; }

/* ─── Utility ───────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.55rem 1.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-primary { background: var(--gold); color: var(--dark); border-color: var(--gold); }
.btn-primary:hover { background: #9e7b22; border-color: #9e7b22; color: var(--white); text-decoration: none; }

.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: var(--white); text-decoration: none; }

/* ─── Hamburger toggle ──────────────────────────────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 860px) {
  .content-row { grid-template-columns: 1fr; }
  .feature-strip .container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  /* hamburger */
  .nav-toggle { display: flex; }
  .top-bar-inner { padding: 0 1.5rem; }
  .header-pen { display: none; }

  /* mobile nav dropdown */
  #site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    border-top: 2px solid var(--gold);
    z-index: 50;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  }
  #site-nav.is-open { display: block; }
  #site-nav ul { flex-direction: column; gap: 0; }
  #site-nav > ul > li > a {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-decoration: none;
  }

  /* sub-menus: touch-triggered, static position */
  #site-nav .sub-menu {
    position: static;
    border-top: none;
    box-shadow: none;
    background: rgba(0,0,0,0.2);
    min-width: 0;
    padding: 0;
    display: none;
  }
  #site-nav li.sub-open > .sub-menu { display: block; }
  #site-nav .sub-menu a { padding: 0.75rem 2rem; text-decoration: none; }
  #site-nav > ul > li.sub-open > a::after { transform: rotate(180deg); }

  /* layouts */
  .layout-three-col { grid-template-columns: 1fr; }
  .layout-sidebar-left { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .top-bar-contact { display: none; }
  .feature-strip .container { grid-template-columns: 1fr; }
  .branding { padding: 2rem 1.5rem 1.75rem; }
}
