/* =============================================
   James Blackburn — Personal Site
   Clean, minimal, typographic
   ============================================= */

:root {
  --bg:         #fafaf8;
  --bg-card:    #ffffff;
  --text:       #1a1a1a;
  --text-muted: #666660;
  --accent:     #4a6741;
  --border:     #e4e4e0;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans:  -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --max-width:  860px;
  --radius:     6px;
}

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

html { font-size: 17px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ---- Nav ---- */
header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text);
  font-weight: normal;
  letter-spacing: 0.01em;
}
.nav-name:hover { text-decoration: none; color: var(--accent); }

nav ul {
  list-style: none;
  display: flex;
  gap: 1.75rem;
}

nav ul a {
  font-size: 0.875rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  transition: color 0.15s;
}
nav ul a:hover,
nav ul a.active {
  color: var(--text);
  text-decoration: none;
}
nav ul a.active { border-bottom: 2px solid var(--accent); padding-bottom: 2px; }

/* ---- Main ---- */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  flex: 1;
  width: 100%;
}

/* ---- Hero ---- */
.hero {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: normal;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

.tagline {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.card-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.see-all {
  font-size: 0.8rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

/* ---- Widget Grid ---- */
.widgets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.full-width { grid-column: 1 / -1; }

/* ---- Weather Card ---- */
.weather-main {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.weather-icon { font-size: 1.75rem; line-height: 1; }

#weather-temp {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: normal;
  line-height: 1;
}

#weather-desc {
  font-size: 0.95rem;
  color: var(--text);
  text-transform: capitalize;
  margin-bottom: 0.2rem;
}

.weather-hilo {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
}

.weather-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.weather-location {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ---- 7-Day Forecast ---- */
.forecast-row {
  display: flex;
  justify-content: space-between;
  gap: 0.25rem;
}

.forecast-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  flex: 1;
  padding: 0.5rem 0.25rem;
  border-radius: 4px;
}

.forecast-day:not(:last-child) {
  border-right: 1px solid var(--border);
}

.forecast-name {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.forecast-icon { font-size: 1.3rem; line-height: 1; }

.forecast-hi {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.forecast-lo {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---- Stoic Card ---- */
#stoic-quote {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.7;
  font-style: italic;
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  margin-bottom: 0.75rem;
}

#stoic-author {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: block;
}

/* ---- User Weather Search ---- */
.uw-search-form {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.uw-search-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem 0.65rem;
  font-size: 0.88rem;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  outline: none;
}
.uw-search-input:focus { border-color: var(--accent); }
.uw-search-input::placeholder { color: var(--text-muted); }

.uw-search-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  cursor: pointer;
}
.uw-search-btn:hover { opacity: 0.88; }

.uw-locate-btn {
  display: block;
  width: 100%;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  margin-bottom: 0.5rem;
}
.uw-locate-btn:hover:not([disabled]) { border-color: var(--accent); color: var(--accent); }
.uw-locate-btn[disabled] { opacity: 0.55; cursor: default; }

.uw-change-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-sans);
  margin-top: 0.4rem;
  text-decoration: underline;
}
.uw-change-btn:hover { color: var(--accent); }

/* ---- Readings summary on home ---- */
.reading-ref-list {
  list-style: none;
  font-size: 0.9rem;
}
.reading-ref-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.reading-ref-list li:last-child { border-bottom: none; }
.reading-ref-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 1px;
}
.reading-liturgical {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* ---- About ---- */
.about p { margin-bottom: 0.75rem; color: var(--text); }
.about p:last-child { margin-bottom: 0; }

/* ---- CV ---- */
.cv-main {
  max-width: 680px;
}

.cv-header {
  padding: 2.5rem 0 1.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.cv-header h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: normal;
  margin-bottom: 0.35rem;
}

.cv-contact {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cv-section {
  margin-bottom: 2.25rem;
}

.cv-section h2 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  margin-bottom: 1.25rem;
}

.cv-entry {
  margin-bottom: 1.5rem;
}

.cv-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.cv-role {
  font-weight: 600;
  font-size: 0.97rem;
}

.cv-dates {
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.cv-org {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  margin-top: 0.1rem;
}

.cv-entry ul {
  padding-left: 1.1rem;
  font-size: 0.92rem;
  color: var(--text);
}

.cv-entry ul li { margin-bottom: 0.25rem; }

.cv-skills {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* ---- Readings page ---- */
.page-header {
  padding: 2.5rem 0 1.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: normal;
  margin-bottom: 0.4rem;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.feed-section {
  margin-bottom: 3rem;
}

.feed-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: normal;
  margin-bottom: 0.25rem;
}

.feed-source {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* Feed entry cards */
.feed-entry {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  background: var(--bg-card);
}

.feed-entry-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.feed-entry-day {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.feed-stoic-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.97rem;
  line-height: 1.7;
  border-left: 3px solid var(--accent);
  padding-left: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.feed-stoic-author {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.feed-readings-list {
  list-style: none;
  font-size: 0.88rem;
}
.feed-readings-list li {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
}
.feed-readings-list li:last-child { border-bottom: none; }
.feed-readings-list .ref-label {
  color: var(--text-muted);
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  padding-top: 1px;
  min-width: 80px;
}
.commemoration {
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

/* ---- Pagination ---- */
.pagination {
  margin-top: 1rem;
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

.page-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  color: var(--accent);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.15s, color 0.15s;
}

.page-btn:hover:not([disabled]) {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.page-btn[disabled] {
  color: var(--border);
  border-color: var(--border);
  cursor: default;
}

.page-indicator {
  font-size: 0.82rem;
  color: var(--text-muted);
  min-width: 90px;
  text-align: center;
}

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}
footer a { color: var(--text-muted); }
footer a:hover { color: var(--accent); }

/* ---- Responsive ---- */
@media (max-width: 720px) {
  .widgets { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 1.75rem; }
  nav ul { gap: 1.25rem; }
  .cv-entry-header { flex-direction: column; gap: 0.1rem; }
}

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