/* ============================================
   georgekakouras.com — Global Stylesheet
   Reference: darioamodei.com
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,700;1,8..60,400&display=swap');

/* --- Color Tokens --- */
:root {
  --bg:               #f1eee6;
  --text:             #1f1e1d;
  --text-muted:       #767676;
  --link:             #1f1e1d;
  --nav-link:         #1f1e1d;
  --footer-link:      #1f1e1d;
  --blockquote-border:#d0d0d0;
  --blockquote-text:  #444444;
  --hr:               #e0e0e0;
  --toggle-icon:      #1f1e1d;
}

[data-theme="dark"] {
  --bg:               #1f1e1d;
  --text:             #f1eee6;
  --text-muted:       #888888;
  --link:             #f1eee6;
  --nav-link:         #f1eee6;
  --footer-link:      #f1eee6;
  --blockquote-border:#3a3a3a;
  --blockquote-text:  #b0aea9;
  --hr:               #2a2a2a;
  --toggle-icon:      #f1eee6;
}

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

html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
  line-height: 1.7;
  padding: 0 24px;
  transition: background 0.2s ease, color 0.2s ease;
}

/* --- Content Width --- */
.container {
  max-width: 740px;
  margin: 0 auto;
}

/* --- Links --- */
a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:visited {
  color: var(--link);
}

a:hover {
  color: var(--link);
}

/* --- Header / Navigation --- */
header {
  padding: 36px 0 44px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.site-name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 44px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.site-name:visited {
  color: var(--text);
}

.site-name:hover {
  color: var(--text);
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

nav a {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--nav-link);
  text-decoration: none;
}

nav a:visited {
  color: var(--nav-link);
}

nav a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- Theme Toggle Button --- */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: var(--toggle-icon);
  display: flex;
  align-items: center;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.theme-toggle:hover {
  opacity: 1;
}

.theme-toggle svg {
  display: block;
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- Bio / Intro --- */
.bio {
  margin-bottom: 84px;
}

.bio p {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 20px;
}

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

.bio-tagline {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 31px;
  font-weight: 400;
  line-height: 1.42;
  color: var(--text);
  margin-bottom: 10px;
}

.bio-more {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.bio-more.open {
  max-height: 600px;
}

.bio-more p {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 20px;
  padding-top: 6px;
}

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

.bio-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  color: var(--text-muted);
  display: inline;
  letter-spacing: 0;
  vertical-align: baseline;
}

.bio-toggle:hover {
  color: var(--text);
}

/* --- Content Sections --- */
.section {
  margin-bottom: 48px;
}

.section-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.section-subtitle {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
  margin-bottom: 20px;
}

.section-subtitle a {
  color: var(--text-muted);
  font-size: 14px;
}

/* --- Post List --- */
.post-list {
  list-style: none;
  padding-left: 16px;
}

.post-list li {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 5px 0;
  line-height: 1.5;
}

.post-list li::before {
  content: "•";
  position: absolute;
  left: -16px;
  color: var(--text);
}

.post-list li a {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 19px;
  font-weight: 400;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
  flex: 1;
  min-width: 0;
}

.post-list li a:visited {
  color: var(--link);
}

.post-date {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- Footer --- */
footer {
  padding: 40px 0 36px;
}

.footer-links {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  color: var(--footer-link);
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--footer-link);
  text-decoration: none;
  font-size: 15px;
}

.footer-links a:visited {
  color: var(--footer-link);
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-links span {
  color: var(--text-muted);
  margin: 0 6px;
}

.copyright {
  font-size: 14px;
  color: var(--text-muted);
}

/* --- About Page --- */
.about-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  margin-bottom: 36px;
  display: block;
}

.about-body p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 18px;
}

.about-body p:last-child {
  margin-bottom: 0;
}

.contact-links {
  margin-top: 40px;
  font-size: 17px;
}

.contact-label {
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

.contact-links a {
  color: var(--link);
  display: block;
  margin-bottom: 6px;
}

/* --- See all link --- */
.see-all {
  display: inline-block;
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-muted);
  text-decoration: none;
}

.see-all:visited {
  color: var(--text-muted);
}

.see-all:hover {
  color: var(--text);
  text-decoration: none;
}

/* --- Archive Page --- */
.archive-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 28px;
}

/* --- Article / Post Page --- */
.post-header {
  margin-bottom: 40px;
}

.post-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 20px;
}

.post-meta {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  color: var(--text-muted);
}

.post-body {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 20px;
  line-height: 1.7;
  color: var(--text);
}

.post-body p {
  margin-bottom: 22px;
}

.post-body h2 {
  font-family: inherit;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 36px 0 12px;
  line-height: 1.3;
}

.post-body h3 {
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 10px;
}

.post-body ul, .post-body ol {
  padding-left: 24px;
  margin-bottom: 22px;
}

.post-body li {
  margin-bottom: 6px;
}

.post-body strong {
  font-weight: 600;
}

.post-body a {
  color: var(--link);
}

.post-body blockquote {
  border-left: 3px solid var(--blockquote-border);
  padding-left: 20px;
  margin: 24px 0;
  color: var(--blockquote-text);
  font-style: italic;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--hr);
  margin: 36px 0;
}

/* --- Post label (newsletter vs essay) --- */
.post-label {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* --- Watch List table --- */
.watch-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 0 0 22px;
}

.watch-list td {
  padding: 8px 12px 8px 0;
  vertical-align: top;
  border-bottom: 1px solid var(--hr);
  color: var(--text);
  line-height: 1.5;
}

.watch-list td:first-child {
  white-space: nowrap;
  color: var(--text-muted);
  padding-right: 20px;
  width: 120px;
}

/* --- Post disclaimer --- */
.post-disclaimer {
  font-size: 14px;
  color: var(--text-muted);
}

.back-link {
  margin-top: 52px;
  font-size: 16px;
}

.back-link a {
  color: var(--nav-link);
  text-decoration: none;
}

.back-link a:hover {
  text-decoration: underline;
}

/* --- Mobile --- */
@media (max-width: 640px) {
  body {
    padding: 0 16px;
  }

  header {
    padding: 24px 0 36px;
  }

  .site-name {
    font-size: 32px;
  }

  .bio-tagline {
    font-size: 23px;
  }

  .bio p,
  .bio-more p {
    font-size: 19px;
  }

  .bio {
    margin-bottom: 60px;
  }

  .section-title {
    font-size: 22px;
  }

  .post-list li a {
    font-size: 17px;
  }

  .post-list li {
    flex-direction: column;
    gap: 2px;
    padding: 8px 0;
  }

  .post-date {
    font-size: 14px;
  }

  .post-title {
    font-size: 26px;
  }

  .archive-title {
    font-size: 24px;
  }
}
