/*
Theme Name: Institutum Analyticae Datorum
Theme URI: https://institutumanalyticaedatorum.com
Author: IAD
Author URI: https://institutumanalyticaedatorum.com
Description: Custom blog theme for Institutum Analyticae Datorum. Gold/white alternating archive grid, gold (EN) / white (KR) single post templates, Anton + Oswald typography, gold drop cap, IAD author box.
Version: 1.0
Text Domain: iad-blog
*/

:root {
  --gold: #EFC32A;
  --white: #FFFFFF;
  --text-on-gold: #5C4400;
  --sub-on-gold: #7A5E00;
  --text-on-white: #2B2200;
  --sub-on-white: #8A8A8A;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Oswald', sans-serif;
  background: #f4f4f4;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

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

/* ---------- Site header ---------- */
.iad-site-header {
  background: #FFFFFF;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
}
.iad-site-header .logo {
  font-family: 'Anton', sans-serif;
  font-size: 20px;
  letter-spacing: 0.5px;
  color: var(--text-on-white);
  text-transform: uppercase;
}
.iad-site-header nav a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-left: 28px;
  color: var(--text-on-white);
}

/* ---------- Archive grid ---------- */
.iad-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.iad-card {
  padding: 60px 44px;
  display: flex;
  flex-direction: column;
}
.iad-card.gold { background: var(--gold); }
.iad-card.white { background: var(--white); }
.iad-card.gold .eyebrow, .iad-card.gold .meta-date { color: var(--sub-on-gold); }
.iad-card.white .eyebrow, .iad-card.white .meta-date { color: var(--sub-on-white); }
.iad-card.gold .excerpt { color: var(--text-on-gold); opacity: .85; }
.iad-card.white .excerpt { color: var(--text-on-white); opacity: .75; }
.iad-card.gold h2 { color: var(--text-on-gold); }
.iad-card.white h2 { color: var(--text-on-white); }

.eyebrow {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 18px;
}
.eyebrow a { text-decoration: underline; }

.iad-card h2 {
  font-family: 'Anton', sans-serif;
  font-size: 30px;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 20px;
}
.iad-card h2 a { color: inherit; }

.excerpt {
  font-size: 15px;
  line-height: 1.65;
  font-weight: 300;
  margin-bottom: 32px;
  flex-grow: 1;
}

.read-more {
  display: inline-block;
  align-self: flex-start;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 14px 26px;
}
.iad-card.gold .read-more { background: var(--white); color: var(--text-on-gold); }
.iad-card.white .read-more { background: var(--gold); color: var(--text-on-white); }

.iad-pagination {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px;
  background: #fff;
}
.iad-pagination a, .iad-pagination span {
  display: inline-block;
  margin: 0 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
}

/* ---------- Single post ---------- */
.iad-post {
  max-width: 760px;
  margin: 0 auto;
  padding: 70px 60px 90px;
}
.iad-post.gold { background: var(--gold); }
.iad-post.white { background: var(--white); }

.iad-post .eyebrow { margin-bottom: 20px; }

.iad-post h1 {
  font-family: 'Anton', sans-serif;
  font-size: 42px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 36px;
}
.iad-post.gold h1 { color: var(--text-on-gold); }
.iad-post.white h1 { color: var(--text-on-white); }

.iad-post .entry-content h2 {
  font-family: 'Anton', sans-serif;
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin: 40px 0 16px;
}
.iad-post.gold .entry-content h2 { color: var(--sub-on-gold); }
.iad-post.white .entry-content h2 { color: var(--sub-on-white); }

.iad-post .entry-content h3 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 19px;
  margin: 28px 0 12px;
}
.iad-post.gold .entry-content h3 { color: var(--text-on-gold); }
.iad-post.white .entry-content h3 { color: var(--text-on-white); }

.iad-post .entry-content p {
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 18px;
}
.iad-post.gold .entry-content p { color: var(--text-on-gold); }
.iad-post.white .entry-content p { color: var(--text-on-white); }

.iad-post .entry-content > p:first-of-type::first-letter {
  font-family: 'Anton', sans-serif;
  font-size: 64px;
  line-height: 0.8;
  float: left;
  margin: 6px 10px 0 0;
  color: #FFFFFF;
  -webkit-text-stroke: 1px var(--gold);
}
.iad-post.white .entry-content > p:first-of-type::first-letter {
  color: var(--gold);
  -webkit-text-stroke: none;
}

/* ---------- Author box ---------- */
.iad-author-box {
  margin-top: 56px;
  padding: 26px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.iad-post.gold .iad-author-box { background: rgba(255,255,255,0.35); }
.iad-post.white .iad-author-box { background: #FAF6E8; }

.iad-author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Anton', sans-serif;
  font-size: 18px;
  color: #FFFFFF;
  flex-shrink: 0;
}
.iad-post.white .iad-author-avatar { color: #FFFFFF; }

.iad-author-info { flex-grow: 1; }
.iad-author-name {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 2px;
}
.iad-post.gold .iad-author-name { color: var(--text-on-gold); }
.iad-post.white .iad-author-name { color: var(--text-on-white); }

.iad-author-tagline {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.5px;
  margin: 0;
}
.iad-post.gold .iad-author-tagline { color: var(--sub-on-gold); }
.iad-post.white .iad-author-tagline { color: var(--sub-on-white); }

.iad-author-icons { display: flex; gap: 10px; flex-shrink: 0; }
.iad-author-icons a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.iad-post.gold .iad-author-icons a { background: #FFFFFF; }
.iad-post.white .iad-author-icons a { background: var(--gold); }
.iad-author-icons svg { width: 16px; height: 16px; }

.iad-back-link {
  display: inline-block;
  margin-top: 30px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.iad-post.gold .iad-back-link { color: var(--text-on-gold); }
.iad-post.white .iad-back-link { color: var(--sub-on-white); }

@media (max-width: 900px) {
  .iad-archive-grid { grid-template-columns: 1fr; }
  .iad-post { padding: 50px 26px 70px; }
}
