/*
Theme Name: Shah Rukh
Description: Personal AI policy / academic website — warm editorial style
Version: 2.0
Author: Shah Rukh
*/

/* ─────────────────────────────────────────
   Warm editorial — inspired by Cold Takes,
   Works in Progress, thoughtful policy writing
   ───────────────────────────────────────── */

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

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

/* ── Base ── */
html { font-size: 17px; }

body {
  background: #faf8f3;
  color: #2a2018;
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  line-height: 1.72;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

/* ── Links ── */
a {
  color: #2a2018;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: #c5b9a8;
  transition: text-decoration-color 0.15s;
}
a:hover { text-decoration-color: #2a2018; }

/* ── Header / nav ── */
header {
  padding: 2.8rem 0 1.8rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #e5ddd0;
  margin-bottom: 2.8rem;
}

.site-name {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;
  text-decoration: none;
  color: #2a2018;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* Nav: Inter, small, muted */
nav ul {
  list-style: none;
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}
nav ul li { display: inline; }
nav ul li a {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8rem;
  color: #a09080;
  text-decoration: none;
  letter-spacing: 0.01em;
}
nav ul li a:hover,
nav ul li.current-menu-item a,
nav ul li.current_page_item a,
nav ul li.current-page-ancestor a {
  color: #2a2018;
}

/* ── Typography ── */
h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

h2 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #b5aa99;
  margin-top: 2.8rem;
  margin-bottom: 1rem;
}

h3 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

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

hr {
  border: none;
  border-top: 1px solid #e5ddd0;
  margin: 2rem 0;
}

/* ── About / intro ── */
.intro {
  font-size: 1.05rem;
  line-height: 1.78;
  margin-bottom: 0.5rem;
}
.intro p { margin-bottom: 0.85rem; }

.contact-line {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8rem;
  color: #a09080;
  margin-top: 1.4rem;
}
.contact-line a {
  color: #a09080;
  text-decoration-color: transparent;
  margin-right: 1.2rem;
}
.contact-line a:hover { color: #2a2018; text-decoration-color: #2a2018; }

/* ── Photo — larger portrait, floated right ── */
.photo-wrap {
  float: right;
  margin: 0.3rem 0 1.4rem 2rem;
}
.photo-wrap img {
  width: 130px;
  height: 165px;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: 3px;
  filter: sepia(8%);
}
.photo-placeholder {
  width: 130px;
  height: 165px;
  background: #ede7dc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  color: #c0b5a0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 3px;
}

/* ── Writing list ── */
.writing-list {
  list-style: none;
  margin-top: 0.3rem;
}
.writing-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #ede7dc;
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 0 1rem;
  align-items: baseline;
}
.writing-list li:first-child { border-top: 1px solid #ede7dc; }

.wl-date {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  color: #c0b5a0;
}
.wl-title { font-size: 0.97rem; }
.wl-title a { text-decoration-color: transparent; }
.wl-title a:hover { text-decoration-color: #2a2018; }
.wl-desc {
  grid-column: 2;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: #9a8e7e;
  margin-top: 0.15rem;
  line-height: 1.45;
}

/* ── Work / research ── */
.work-item { margin-bottom: 1.9rem; }
.work-item h3 a { text-decoration: none; }
.work-item h3 a:hover { text-decoration: underline; text-decoration-color: #2a2018; }

.work-meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: #b5aa99;
  margin-bottom: 0.4rem;
}
.work-desc {
  font-size: 0.95rem;
  color: #5a4f3e;
  line-height: 1.65;
  margin-bottom: 0.4rem;
}
.work-links {
  font-family: 'Inter', sans-serif;
  font-size: 0.76rem;
}
.work-links a { margin-right: 0.8rem; text-decoration-color: transparent; }
.work-links a:hover { text-decoration-color: #2a2018; }

details.abstract summary {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  color: #b5aa99;
  cursor: pointer;
  list-style: none;
  display: inline;
}
details.abstract summary::-webkit-details-marker { display: none; }
details.abstract summary::after { content: ' [+]'; }
details[open].abstract summary::after { content: ' [−]'; }
details.abstract p {
  margin-top: 0.6rem;
  font-size: 0.88rem;
  color: #6a5e4e;
  line-height: 1.65;
  padding-left: 0.9rem;
  border-left: 2px solid #e5ddd0;
}

/* ── Status tag ── */
.status {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #b5aa99;
  border: 1px solid #ddd5c8;
  padding: 1px 5px;
  border-radius: 2px;
  vertical-align: middle;
  margin-left: 0.4rem;
  font-weight: 500;
}

/* ── Background / CV ── */
.bg-item {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 0 1rem;
  margin-bottom: 0.9rem;
  font-size: 0.93rem;
  align-items: baseline;
}
.bg-year {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  color: #c0b5a0;
}
.bg-body { color: #5a4f3e; }
.bg-body strong { font-weight: 500; color: #2a2018; }
.bg-body em { font-style: italic; color: #7a6e5e; }

/* ── Post body ── */
.post-header { margin-bottom: 2.2rem; }
.post-header h1 { font-size: 1.45rem; margin-bottom: 0.3rem; }
.post-byline {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: #b5aa99;
}

.post-body { font-size: 1rem; line-height: 1.78; }
.post-body p { margin-bottom: 1.15rem; }

.entry-content p { margin-bottom: 1rem; }
.entry-content h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  color: #2a2018;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}
.entry-content blockquote {
  border-left: 2px solid #e5ddd0;
  padding-left: 1.1rem;
  color: #7a6e5e;
  font-style: italic;
  margin: 1.4rem 0;
}
.entry-content img { max-width: 100%; height: auto; }
.entry-content figure { margin: 1.6rem 0; }
.entry-content figcaption {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  color: #c0b5a0;
  margin-top: 0.4rem;
}

.back-link {
  display: inline-block;
  margin-top: 2.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: #b5aa99;
  text-decoration: none;
}
.back-link:hover { color: #2a2018; }

/* ── Slideshow ── */
.slideshow {
  position: relative;
  margin: 2rem 0;
  user-select: none;
}

.slides {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #ede7dc;
  border-radius: 3px;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.slide.active { opacity: 1; }

.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(250, 248, 243, 0.82);
  border: none;
  color: #2a2018;
  font-size: 1.1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  line-height: 1;
}
.slide-btn:hover { background: #faf8f3; }
.slide-prev { left: 10px; }
.slide-next { right: 10px; }

.slide-caption {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  color: #b5aa99;
  margin-top: 0.6rem;
  min-height: 1.1em;
  text-align: center;
  font-style: italic;
}

.slide-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 0.6rem;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ddd5c8;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}
.dot.active { background: #2a2018; }

/* ── Minimal writing list (titles only) ── */
.writing-list-minimal {
  list-style: none;
  margin-top: 0.3rem;
}
.writing-list-minimal li {
  padding: 0.55rem 0;
  border-bottom: 1px solid #ede7dc;
  font-size: 1rem;
}
.writing-list-minimal li:first-child { border-top: 1px solid #ede7dc; }
.writing-list-minimal li a { text-decoration-color: transparent; }
.writing-list-minimal li a:hover { text-decoration-color: #2a2018; }

/* ── Footer ── */
footer {
  margin-top: 4rem;
  padding-top: 1.2rem;
  border-top: 1px solid #e5ddd0;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  color: #c0b5a0;
}

/* ── Responsive ── */
@media (max-width: 500px) {
  html { font-size: 16px; }
  header { flex-direction: column; gap: 0.8rem; padding-top: 1.8rem; }
  .photo-wrap { float: none; margin: 0 0 1.4rem 0; }
  .photo-wrap img, .photo-placeholder { width: 100px; height: 128px; }
  .writing-list li { grid-template-columns: 1fr; }
  .wl-date { margin-bottom: 0.1rem; }
  .wl-desc { grid-column: 1; }
  .bg-item { grid-template-columns: 1fr; gap: 0; }
  .bg-year { margin-bottom: 0.1rem; }
}
