/*
Theme Name: KISPADragon
Theme URI: https://kispa.net
Author: Sean
Description: Theme for the Korean International Scholastic Press Association.
Version: 1.0
Text Domain: kispa
*/

@import url('https://fonts.googleapis.com/css2?family=Cardo:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  /* Obangsaek-inspired accents (used sparingly) */
  --obang-blue:   #2a3e6c;  /* 청 (cheong) — east */
  --obang-red:    #b03a3a;  /* 적 (jeok) — south */
  --obang-yellow: #d9a441;  /* 황 (hwang) — center */
  --obang-white:  #f4f1ea;  /* 백 (baek) — base paper */
  --obang-black:  #1c1c1c;  /* 흑 (heuk) — type */

  /* Functional palette */
  --bg:        #ffffff;
  --paper:     #f4f1ea;
  --ink:       #1c1c1c;
  --muted:     #5a5a5a;
  --rule:      #e3ddd0;
  --navy:      #2f3a5a;
  --navy-dark: #232a44;
  --gold:      #c9a44a;
  --crimson:   #b03a3a;
  --link:      #2f3a5a;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Cardo", Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

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

h1, h2, h3, h4, h5, h6 {
  font-family: "Cardo", Georgia, serif;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.005em;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1rem; }

/* =================== HEADER / MASTHEAD =================== */

.masthead {
  background: #fff;
  border-bottom: 1px solid var(--rule);
  text-align: center;
  padding: 1.75rem 1rem 0.5rem;
}

.masthead .logo {
  font-family: "Cardo", serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  letter-spacing: 0.12em;
  line-height: 1;
  color: var(--ink);
  margin: 0;
}

.masthead .tagline {
  font-family: "Cardo", serif;
  font-style: italic;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* =================== PRIMARY NAV =================== */

.primary-nav {
  background: var(--navy);
  border-top: 1px solid var(--navy-dark);
  border-bottom: 1px solid var(--navy-dark);
}

.primary-nav .nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.primary-nav a {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  color: #fff;
  font-family: "Cardo", serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.15s ease;
}

.primary-nav a:hover { background: var(--navy-dark); text-decoration: none; }

.primary-nav a.current,
.primary-nav .current-menu-item > a {
  background: var(--gold);
  color: var(--navy-dark);
}

/* =================== HOMEPAGE LAYOUT =================== */

.page { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

/* Issue ribbon (sits between nav and content) */
.issue-ribbon {
  text-align: center;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.6rem 1rem;
  font-family: "Cardo", serif;
  font-style: italic;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 1.25rem auto 0;
  max-width: 1100px;
}

/* =================== FEATURE (HERO) + SIDEBAR =================== */

.hero-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.75rem;
  margin: 1.5rem 0;
}

.feature {
  position: relative;
  background: #2a2a2a;
  color: #fff;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.feature::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 35%,
    rgba(0,0,0,0.55) 75%,
    rgba(0,0,0,0.85) 100%);
}

.feature-content {
  position: relative;
  z-index: 1;
  padding: 1.5rem 1.75rem 1.75rem;
  width: 100%;
}

.feature .kicker {
  display: inline-block;
  background: var(--crimson);
  color: #fff;
  font-family: "Cardo", serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  margin-bottom: 0.75rem;
}

.feature h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  line-height: 1.2;
  color: #fff;
  margin-bottom: 0.6rem;
}

.feature h2 a { color: inherit; text-decoration: none; }
.feature h2 a:hover { text-decoration: underline; }

.feature .byline {
  font-style: italic;
  font-size: 0.85rem;
  color: #d8d8d8;
}

.side-list { padding-left: 0; margin: 0; }
.side-list .side-item {
  border-bottom: 1px solid var(--rule);
  padding: 0.9rem 0;
}
.side-list .side-item:last-child { border-bottom: 0; }

.side-item .meta {
  font-family: "Cardo", serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 0.35rem;
}

.side-item h3 {
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 0 0 0.35rem;
}

.side-item h3 a { color: var(--ink); text-decoration: none; }
.side-item h3 a:hover { color: var(--crimson); }

.side-item p {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
}

.side-item .byline {
  display: block;
  font-style: italic;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.view-all {
  display: inline-block;
  margin-top: 1rem;
  font-family: "Cardo", serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--crimson);
  text-decoration: none;
}
.view-all:hover { color: var(--ink); }

/* =================== STATS BAR =================== */

.stats {
  background: var(--navy);
  color: #fff;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
  padding: 1.75rem 0;
  margin: 0;
}

.stats .stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  border-right: 1px solid rgba(255,255,255,0.12);
  padding: 0.25rem 0.5rem;
}
.stats .stat:last-child { border-right: 0; }

.stats .icon {
  width: 22px;
  height: 22px;
  color: var(--gold);
  display: block;
  margin-bottom: 0.2rem;
}

.stats .num {
  font-family: "Cardo", serif;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

.stats .label {
  font-family: "Cardo", serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #d8d8d8;
}

/* =================== FEATURED CARDS (3-up) =================== */

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin: 2.5rem 0;
}

.card .thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #ddd;
  background-size: cover;
  background-position: center;
  margin-bottom: 0.85rem;
}

.card .kicker {
  font-family: "Cardo", serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 0.35rem;
}

.card h3 {
  font-size: 1.15rem;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--crimson); }

.card p {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
}

.card .byline {
  display: block;
  font-style: italic;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* =================== MISSION / ABOUT BAND =================== */

.mission {
  background: var(--paper);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 3rem 0;
  margin: 2rem 0;
}

.mission .grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.mission h2 {
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  line-height: 1.2;
  margin-bottom: 0.85rem;
}

.mission p {
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 1.25rem;
  max-width: 60ch;
}

.btn {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-family: "Cardo", serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.8rem 1.2rem;
  text-decoration: none;
  margin-right: 0.5rem;
  border: 1px solid var(--navy);
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--gold); color: var(--navy-dark); border-color: var(--gold); text-decoration: none; }

.btn-outline {
  background: transparent;
  color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: #fff; }

/* =================== MEMBER SCHOOLS =================== */

.members {
  margin: 2.5rem auto 3rem;
  max-width: 1100px;
  padding: 0 1.25rem;
}

.members .head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}

.members h2 {
  font-size: 1.5rem;
  margin: 0;
}

.members .head a {
  font-family: "Cardo", serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--crimson);
}

.members .grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.school {
  text-align: center;
  background: #fff;
  border: 1px solid var(--rule);
  padding: 1.25rem 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.school .logo {
  width: 100%;
  max-width: 120px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.school .logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.school .name {
  font-family: "Cardo", serif;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 0.2rem;
  line-height: 1.25;
}

.school .pub {
  font-style: italic;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Subtle obangsaek accent: tint the frame on alternating cards */
.school:nth-child(5n+1) { border-color: var(--navy); }
.school:nth-child(5n+2) { border-color: var(--crimson); }
.school:nth-child(5n+3) { border-color: var(--gold); }
.school:nth-child(5n+4) { border-color: var(--ink); }
.school:nth-child(5n+5) { border-color: var(--navy); }

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

.site-footer {
  background: var(--navy-dark);
  color: #d8d8d8;
  padding: 2.5rem 0 0;
  margin-top: 2rem;
}

.site-footer .grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding: 0 1.25rem;
}

.site-footer h4 {
  font-family: "Cardo", serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.85rem;
}

.site-footer .brand {
  font-family: "Cardo", serif;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.1em;
  color: #fff;
  margin: 0 0 0.25rem;
}

.site-footer .ko {
  font-style: italic;
  font-size: 0.85rem;
  color: #c8c8c8;
  margin: 0 0 0.85rem;
}

.site-footer p { color: #c8c8c8; font-size: 0.95rem; }

.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0.35rem 0; font-size: 0.95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }

.legal {
  max-width: 1100px;
  margin: 2rem auto 0;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: #a8a8a8;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* =================== INTERNAL PAGES =================== */

.internal {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1.25rem;
}

.internal h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.internal .post-meta {
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.post-body {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 70ch;
}

.articles-list .article-card {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 1.25rem;
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 0;
  align-items: start;
}

.articles-list .article-card h2 {
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
}
.articles-list .article-card h2 a { color: var(--ink); text-decoration: none; }
.articles-list .article-card h2 a:hover { color: var(--crimson); }
.articles-list .article-card p { color: var(--muted); margin: 0; }

.articles-list .article-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* =================== RESPONSIVE =================== */

@media (max-width: 900px) {
  .hero-row,
  .featured-grid,
  .mission .grid,
  .site-footer .grid {
    grid-template-columns: 1fr;
  }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats .stat:nth-child(2) { border-right: 0; }
  .members .grid { grid-template-columns: repeat(2, 1fr); }
  .feature { min-height: 320px; }
  .primary-nav a { padding: 0.75rem 1rem; font-size: 0.72rem; letter-spacing: 0.18em; }
}

@media (max-width: 600px) {
  .members .grid { grid-template-columns: 1fr; }
  .articles-list .article-card { grid-template-columns: 1fr; }
  .articles-list .article-thumb { max-width: 100%; }
}
