/*
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 */
  --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: "Verdana", Geneva, "Segoe UI", Roboto, sans-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 {
  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);
  padding: 1.25rem 1rem 0.75rem;
}

.masthead .masthead-row {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.masthead .logo {
  display: block;
  margin: 0;
  width: clamp(120px, 18vw, 220px);
}

.masthead .logo img {
  display: block;
  width: 100%;
  height: auto;
}

.masthead-date {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-left: 1px solid var(--rule);
  padding-left: 1.5rem;
}

.masthead-date .date-line {
  font-family: "Cardo", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--ink);
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.masthead-date .date-tagline {
  font-style: italic;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.35rem;
}

.masthead .tagline {
  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);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.primary-nav-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1100px;
  width: 100%;
}

.primary-nav a {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  color: #fff;
  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);
}

/* Search bar — pinned to the right edge, never affects centering of nav links */
.search-form {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.search-form input[type="search"] {
  background: #ffffff;
  border: 1px solid #ffffff;
  color: var(--ink);
  padding: 0.45rem 0.7rem;
  font-size: 0.85rem;
  width: 160px;
  border-radius: 2px;
  outline: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.search-form input[type="search"]::placeholder {
  color: var(--muted);
}

.search-form input[type="search"]:focus {
  background: #ffffff;
  border-color: var(--gold);
}

.search-form button {
  background: #ffffff;
  border: 1px solid #ffffff;
  color: var(--navy);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.search-form button:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-dark);
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* HOMEPAGE  */

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

/* top date banner */
.date-ribbon {
  text-align: center;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.6rem 1rem;
  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;
  transition: filter 0.3s ease;
}

.feature:hover {
  filter: saturate(1.2);
}

.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-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-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-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.side-item-link:hover {
  text-decoration: none;
}

.side-item-link:hover .side-item h3 {
  color: var(--crimson);
}

.side-item .meta {
  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: inherit;
  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-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);
}



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

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

.card {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-link:hover {
  text-decoration: none;
}

.card-link:hover .card h3 {
  color: var(--crimson);
}

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

.card:hover .thumb {
  filter: saturate(1.2);
}

.card .kicker {
  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: inherit;
  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-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.5rem;
}


/* =================== STORIES & ART (scrollable) =================== */

.stories-art {
  margin: 2.5rem 0;
}

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

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

.stories-art .scroll-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--navy) var(--rule);
}

.stories-art .scroll-track::-webkit-scrollbar {
  height: 8px;
}

.stories-art .scroll-track::-webkit-scrollbar-track {
  background: var(--rule);
  border-radius: 4px;
}

.stories-art .scroll-track::-webkit-scrollbar-thumb {
  background: var(--navy);
  border-radius: 4px;
}

.story-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.story-card:hover {
  border-color: var(--crimson);
  transform: translateY(-2px);
  text-decoration: none;
}

.story-card .thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #ddd;
  background-size: cover;
  background-position: center;
}

.story-card h3 {
  font-size: 1rem;
  line-height: 1.3;
  margin: 0.75rem 0.85rem 0.35rem;
  color: var(--ink);
}

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

.stories-art .empty {
  color: var(--muted);
  font-style: italic;
  padding: 1rem 0;
}


/* =================== 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 > div {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.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-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-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: 3px solid var(--rule);
  padding: 1.25rem 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}

.school .logo {
  width: 100%;
  max-width: 180px;
  aspect-ratio: 16 / 9;
  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;
  transition: transform 0.2s ease;
}

.school:hover .logo img,
.school:focus .logo img {
  transform: scale(1.08);
}

.school .name {
  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);
}

.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-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;
}

/* =================== SINGLE ARTICLE =================== */

.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;
}

.article-card h2 {
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
}

.article-card h2 a {
  color: var(--ink);
  text-decoration: none;
}

.article-card h2 a:hover {
  color: var(--crimson);
}

.article-card p {
  color: var(--muted);
  margin: 0;
}

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

.article-layout {
  width: 70%;
  max-width: 1100px;
  margin: 2rem auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.headline {
  border-bottom: 3px solid var(--gold);
  padding-bottom: 0.3rem;
  margin-bottom: 0.5rem;
  color: var(--crimson);
}

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

.post-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.category-note {
  font-style: italic;
  color: var(--muted);
  margin-top: 1rem;
}

.sidebar {
  background: #faf6f4;
  border: 1px solid #e0d8d4;
  padding: 1.5rem;
}

/* =================== AUTHOR PAGE =================== */

.author-page-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.author-profile {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 30px;
  margin-bottom: 40px;
  border-bottom: 1px solid #eee;
}

.author-profile img {
  border-radius: 50%;
}

.author-title {
  margin: 0 0 10px 0;
  font-size: 1.8rem;
}

.author-bio {
  color: #555;
  line-height: 1.6;
}

.author-articles h2 {
  font-size: 1.4rem;
  margin-bottom: 20px;
}

.author-posts-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.author-post-card {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--rule);
  padding: 20px 0;
}

.author-post-card:first-child {
  padding-top: 0;
}

.author-post-card:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.author-post-card .post-title {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
}

.author-post-card .post-title a {
  text-decoration: none;
  color: #222;
}

.author-post-card .post-title a:hover {
  color: var(--crimson);
}

.author-post-card time {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.author-post-card .post-excerpt p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink);
}

@media (max-width: 600px) {
  .author-profile {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Comments */

.comment-list li {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.comment-form-url,
.comment-form-email,
.comment-notes {
  display: none; /* Hide unnecessary fields (maybe there is less janky way to do this but whatever) */
}

textarea {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 900px) {
  .hero-row,
  .featured-grid,
  .site-footer .grid,
  .article-layout {
    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 {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 1rem;
  }

  .primary-nav-links {
    width: 100%;
    justify-content: center;
  }

  .primary-nav a {
    padding: 0.75rem 1rem;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
  }

  .search-form {
    position: static;
    transform: none;
    width: 100%;
    justify-content: center;
    padding: 0.5rem 0 0.75rem;
    order: 2;
  }

  .search-form input[type="search"] {
    width: 100%;
    max-width: 320px;
  }

  .sidebar.articlesuggestions {
    display: none; /* Hide sidebar on small screens */
  }
}

@media (max-width: 600px) {
  .members .grid {
    grid-template-columns: 1fr;
  }

  .article-card {
    grid-template-columns: 1fr;
  }

  .article-thumb {
    max-width: 100%;
  }

  .primary-nav a {
    padding: 0.7rem 0.7rem;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }

  .primary-nav-links {
    gap: 0;
  }

  .masthead .masthead-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .masthead-date {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--rule);
    padding-top: 0.75rem;
    align-items: center;
    text-align: center;
  }
}

/* =================== TEAM / AUTHOR LIST =================== */

.team-page-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

.team-page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--gold);
}

.team-page-title {
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  margin: 0 0 0.5rem;
  color: var(--crimson);
}

.team-page-intro p {
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0;
}

.team-list {
  display: flex;
  flex-direction: column;
}

.team-member {
  display: flex;
  align-items: flex-start;
  gap: 1.75rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--rule);
}

.team-member:first-child {
  padding-top: 0;
}

.team-member:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.team-member-avatar {
  flex: 0 0 120px;
}

.team-member-avatar img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--rule);
}

.team-member-info {
  flex: 1 1 auto;
  min-width: 0;
}

.team-member-name {
  font-family: "Cardo", Georgia, serif;
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

.team-member-bio {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
}

.team-member-bio p {
  margin: 0 0 0.75rem;
}

.team-member-bio p:last-child {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .team-member {
    flex-direction: column;
    gap: 1rem;
  }

  .team-member-avatar {
    flex: 0 0 auto;
  }
}