/* Matt Lakeman "Toujours" style - adapted for Kyle Giffin */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Alegreya+Sans:ital,wght@0,300;0,500;1,300;1,500&family=Merriweather:ital,wght@0,400;0,700;1,400;1,700&display=swap');

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

/* Base */
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body {
  background: #eee;
  color: #404040;
  font-family: "Merriweather", Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.8;
}

a { color: #2590ec; text-decoration: none; transition: color 0.15s; }
a:hover { color: #666; }

h1, h2, h3, h4, h5, h6 {
  font-family: "Alegreya Sans", "Helvetica Neue", Helvetica, sans-serif;
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 20px;
}
h1 { font-size: 40px; }
h2 { font-size: 35px; }
h3 { font-size: 30px; }
h4 { font-size: 20px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; }
h5 { font-size: 18px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; }
h6 { font-size: 16px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; }

p { margin-bottom: 1.5em; }

img { max-width: 100%; height: auto; }

blockquote {
  border-left: 4px solid #f0f0f0;
  color: #888;
  margin: 1.5em 0;
  padding: 0 1.5em;
}

ul, ol { margin: 0 0 1.5em 1.5em; }
li { margin-bottom: 0.5em; }

/* Page container */
#page {
  max-width: 1280px;
  margin: 30px auto;
  border: 1px solid #ccc;
  padding: 60px 0 0;
  background: #fff;
}

.wrap {
  margin-left: 60px;
  margin-right: 60px;
}

/* Header */
.site-header {
  text-align: center;
}

.site-title {
  font-family: "Alegreya Sans", "Helvetica Neue", Helvetica, sans-serif;
  font-size: 75px;
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 0;
}

.site-title a {
  color: #000;
  text-decoration: none;
}

.site-title a:hover {
  color: #2590ec;
}

/* Navigation */
.main-navigation {
  border-bottom: 4px double #e1e1e1;
  border-top: 4px double #e1e1e1;
  margin-top: 60px;
  padding: 5px 0;
  text-align: center;
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation li {
  display: inline-block;
  margin: 0;
}

.main-navigation a {
  color: #333;
  font-size: 15px;
  padding: 10px 20px;
  text-decoration: none;
  display: block;
}

.main-navigation a:hover,
.main-navigation .current a {
  color: #2590ec;
}

/* Tagline */
#tagline {
  text-align: center;
}

#tagline .wrap {
  border-bottom: 4px double #e1e1e1;
  margin-top: 5px;
  padding: 30px 0;
}

#tagline p {
  color: #666;
  font-family: "Alegreya Sans", "Helvetica Neue", Helvetica, sans-serif;
  font-size: 32px;
  font-weight: 300;
  line-height: 1.2;
  margin: 0;
}

/* Content area */
#content .wrap {
  padding: 45px 0 30px;
  display: flex;
  flex-wrap: wrap;
}

#primary {
  min-height: 200px;
  width: calc(66.666% - 10px);
}

#secondary {
  border-left: 1px solid #e1e1e1;
  padding-left: 30px;
  width: calc(33.333% - 20px);
  margin-left: auto;
}

/* No sidebar layout */
.no-sidebar #primary {
  margin: auto;
  max-width: 760px;
  width: 100%;
}

.no-sidebar #content .wrap {
  display: block;
}

/* Articles / entries */
.hentry {
  margin: 0 0 90px;
  position: relative;
}

.entry-header {
  border-bottom: 1px solid #e1e1e1;
  margin-bottom: 30px;
  padding-bottom: 10px;
}

.entry-title {
  font-size: 40px;
  margin-bottom: 10px;
}

.entry-title a {
  color: #333;
  text-decoration: none;
}

.entry-title a:hover {
  color: #2590ec;
}

.entry-meta {
  color: #999;
  font-size: 15px;
  font-style: italic;
  line-height: 1.5;
}

.entry-meta span {
  font-family: "Alegreya Sans", "Helvetica Neue", Helvetica, sans-serif;
  font-size: 13.5px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entry-meta .sep {
  display: inline-block;
  font-size: 18px;
  margin: 0 10px;
}

.entry-content {
  margin-bottom: 20px;
}

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

.entry-footer {
  border-top: 1px solid #efefef;
  padding-top: 10px;
  color: #999;
  font-size: 15px;
  font-style: italic;
}

.entry-footer span {
  font-family: "Alegreya Sans", "Helvetica Neue", Helvetica, sans-serif;
  font-size: 13.5px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entry-footer .sep {
  display: inline-block;
  font-size: 18px;
  margin: 0 10px;
}

.more-link {
  font-family: "Alegreya Sans", "Helvetica Neue", Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Sidebar */
#secondary .widget {
  padding-bottom: 60px;
}

#secondary .widget a {
  color: #666;
}

#secondary .widget a:hover {
  color: #2590ec;
}

.widget {
  font-size: 90%;
}

.widget-title {
  font-family: "Alegreya Sans", "Helvetica Neue", Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 15px;
}

.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget li {
  padding: 5px 0;
  border-bottom: 1px solid #f0f0f0;
}

.widget li:last-child {
  border-bottom: none;
}

/* Footer */
#colophon {
  background-color: #333;
  color: #7b7b7b;
  font-size: 15px;
  padding: 60px 0;
  font-style: italic;
  text-align: center;
}

#colophon a {
  color: #999;
}

#colophon a:hover {
  color: #ccc;
  text-decoration: underline;
}

/* Books page - bookshelf grid */
.bookshelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.book-card {
  position: relative;
  cursor: pointer;
}

.book-card img {
  width: 100%;
  display: block;
  border: 1px solid #ddd;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  border-radius: 3px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-card:hover img {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.book-card-label {
  margin-top: 8px;
  text-align: center;
}

.book-card-label h4 {
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  margin-bottom: 2px;
  line-height: 1.3;
  color: #333;
}

.book-card-label .book-card-author {
  font-size: 11px;
  color: #999;
  font-style: italic;
}

/* Book detail popup on click */
.book-detail-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

.book-detail-overlay.open {
  display: flex;
}

.book-detail {
  background: #fff;
  border-radius: 10px;
  max-width: 600px;
  width: 100%;
  padding: 35px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

.book-detail-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
}

.book-detail-close:hover { color: #333; }

.book-detail h3 {
  font-size: 28px;
  margin-bottom: 5px;
}

.book-detail .book-author {
  color: #999;
  font-style: italic;
  margin-bottom: 15px;
  font-size: 15px;
}

.book-detail .book-description {
  margin-bottom: 15px;
  line-height: 1.8;
}

.book-detail .book-link {
  font-family: "Alegreya Sans", "Helvetica Neue", Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 680px) {
  .bookshelf { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}

/* Book lists (read / to-read) */
.book-list-section {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 4px double #e1e1e1;
}

.book-list-section h2 {
  font-size: 30px;
  margin-bottom: 20px;
}

.book-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 40px;
}

.book-list li {
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
  break-inside: avoid;
  font-size: 15px;
  line-height: 1.5;
}

.book-list .book-list-title {
  color: #333;
}

.book-list .book-list-author {
  color: #999;
  font-style: italic;
}

@media (max-width: 680px) {
  .book-list { columns: 1; }
}

/* Films page */
.films-intro {
  margin-bottom: 40px;
}

.films-quote {
  text-align: center;
  font-style: italic;
  color: #888;
  font-size: 20px;
  margin: 30px 0 40px;
}

.film-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 60px;
}

.film-card {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
}

.film-card img {
  width: 100%;
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.film-card:hover img {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.film-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 40px 15px 15px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.film-card:hover .film-caption {
  transform: translateY(0);
}

.film-caption .film-quote {
  color: #fff;
  font-style: italic;
  font-size: 14px;
  margin-bottom: 5px;
  line-height: 1.4;
}

.film-caption h4 {
  color: #90caf9;
  font-size: 14px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  margin-bottom: 0;
}

/* Books info tooltip */
.books-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid #999;
  color: #999;
  font-family: "Merriweather", Georgia, serif;
  font-size: 13px;
  font-style: italic;
  cursor: help;
  position: relative;
  vertical-align: middle;
  margin-left: 10px;
  transition: border-color 0.15s, color 0.15s;
}

.books-info-icon:hover {
  border-color: #2590ec;
  color: #2590ec;
}

.books-tooltip {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 12px;
  background: #333;
  color: #eee;
  font-family: "Merriweather", Georgia, serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.7;
  padding: 20px 24px;
  border-radius: 8px;
  width: 450px;
  max-width: 90vw;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  z-index: 50;
}

.books-tooltip::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #333;
}

.books-info-icon:hover .books-tooltip {
  display: block;
}

/* Investments page */
.investment-entry {
  margin-bottom: 60px;
  display: flex;
  gap: 30px;
  align-items: center;
}

.investment-logo {
  flex-shrink: 0;
  width: 120px;
}

.investment-logo img {
  width: 120px;
}

.investment-info {
  flex: 1;
}

.investment-info h3 {
  font-size: 28px;
  margin-bottom: 10px;
}

/* Thoughts page */
.thought-entry {
  margin-bottom: 60px;
}

.thought-tags {
  margin-top: 10px;
}

.thought-tag {
  display: inline-block;
  background: #f5f5f5;
  color: #666;
  font-family: "Alegreya Sans", "Helvetica Neue", Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  margin-right: 5px;
  margin-bottom: 5px;
}

/* Social links in sidebar */
.social-links li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-links li svg {
  width: 16px;
  height: 16px;
  fill: #666;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: #e1e1e1;
}

.timeline-era {
  margin-bottom: 50px;
}

.timeline-era-title {
  font-family: "Alegreya Sans", "Helvetica Neue", Helvetica, sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
  margin-bottom: 20px;
  position: relative;
}

.timeline-era-title::before {
  content: '';
  position: absolute;
  left: -36px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2590ec;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #2590ec;
}

.timeline-item {
  margin-bottom: 20px;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ccc;
}

.timeline-year {
  font-family: "Alegreya Sans", "Helvetica Neue", Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #2590ec;
  margin-bottom: 3px;
}

.timeline-item h3 {
  font-size: 22px;
  margin-bottom: 5px;
}

.timeline-item p {
  color: #666;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Running */
.run-entry {
  margin-bottom: 60px;
  border-bottom: 1px solid #e1e1e1;
  padding-bottom: 40px;
}

.run-entry:last-child {
  border-bottom: none;
}

.run-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 15px;
}

.run-header h3 {
  font-size: 26px;
  margin-bottom: 0;
}

.run-distance {
  font-family: "Alegreya Sans", "Helvetica Neue", Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #2590ec;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.run-meta {
  color: #999;
  font-size: 14px;
  font-style: italic;
  margin-bottom: 15px;
}

.run-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 15px;
}

.run-media img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.run-photo-placeholder, .run-map-placeholder {
  background: #f5f5f5;
  border: 2px dashed #ddd;
  border-radius: 6px;
  padding: 40px 20px;
  text-align: center;
  color: #bbb;
  font-family: "Alegreya Sans", "Helvetica Neue", Helvetica, sans-serif;
  font-size: 14px;
}

.run-bucket-list {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 4px double #e1e1e1;
}

.run-bucket-list h2 {
  margin-bottom: 25px;
}

.bucket-item {
  display: flex;
  align-items: baseline;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.bucket-item h4 {
  font-size: 18px;
  font-weight: 300;
  text-transform: none;
  letter-spacing: normal;
  margin-bottom: 0;
}

.bucket-item .bucket-location {
  color: #999;
  font-size: 14px;
  font-style: italic;
}

@media (max-width: 680px) {
  .run-media { grid-template-columns: 1fr; }
  .run-header { flex-direction: column; gap: 5px; }
}

/* Responsive */
@media (max-width: 1340px) {
  #page { margin-left: 30px; margin-right: 30px; }
  .wrap { margin-left: 40px; margin-right: 40px; }
}

@media (max-width: 1024px) {
  #page { margin: 15px; }
  .wrap { margin-left: 30px; margin-right: 30px; }
  #primary { float: none; width: 100%; }
  #secondary { float: none; width: 100%; border-left: none; border-top: 1px solid #e1e1e1; padding-left: 0; padding-top: 30px; margin-top: 30px; }
  #content .wrap { display: block; }
  .film-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  #page { border: 0; margin: 0; padding: 30px 0 0; }
  .wrap { margin-left: 20px; margin-right: 20px; }
  .site-title { font-size: 48px; }
  #tagline p { font-size: 22px; }
  .entry-title { font-size: 28px; }
  .book-entry { flex-direction: column; }
  .book-cover { width: 100px; }
  .book-cover img { width: 100px; }
  .investment-entry { flex-direction: column; }
  .film-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
  .main-navigation a { padding: 8px 12px; font-size: 14px; }
}
