/* ── Reset ─────────────────────────────────────────────────────────── */
body, h1, h2, h3, h4, h5, h6, p, blockquote, pre, hr, dl, dd, ol, ul, figure {
  margin: 0; padding: 0;
}

/* ── Basic styling ────────────────────────────────────────────────── */
body {
  font: 400 16px/1.5 'Roboto', BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
        "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  color: #000;
  background-color: #fdfdfd;
  -webkit-text-size-adjust: 100%;
  font-feature-settings: "kern" 1;
  font-kerning: normal;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

/* Homepage background */
body.homepage {
  background-image: url('/assets/images/output.webp');
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
}

/* ── Vertical rhythm ──────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6, p, blockquote, pre, ul, ol, dl, figure {
  margin-bottom: 15px;
}

main { display: block; }

/* ── Images ───────────────────────────────────────────────────────── */
img {
  max-width: 100%;
  vertical-align: middle;
}

.page-content img {
  padding-left: 30px;
  padding-bottom: 10px;
}
figure > img { display: block; }
figcaption { font-size: 14px; }

/* ── Lists ────────────────────────────────────────────────────────── */
ul, ol { margin-left: 30px; }
li > ul, li > ol { margin-bottom: 0; }

/* ── Headings ─────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { font-weight: 400; }

/* ── Links ────────────────────────────────────────────────────────── */
a, a:visited, a:hover, a:focus { color: inherit; text-decoration: underline; }
.social-media-list a:hover { text-decoration: none; }

/* ── Blockquotes ──────────────────────────────────────────────────── */
blockquote {
  color: #000;
  border-left: 4px solid #e8e8e8;
  padding-left: 15px;
  font-size: 18px;
  letter-spacing: -1px;
  font-style: italic;
}
blockquote > :last-child { margin-bottom: 0; }

/* ── Code ─────────────────────────────────────────────────────────── */
pre, code {
  font-size: 15px;
  border: 1px solid #e8e8e8;
  border-radius: 3px;
  background-color: #eef;
}
code { padding: 1px 5px; }
pre { padding: 8px 12px; overflow-x: auto; }
pre > code { border: 0; padding: 0; }

/* ── Wrapper ──────────────────────────────────────────────────────── */
.wrapper {
  max-width: calc(800px - 60px);
  margin: 0 auto;
  padding: 0 30px;
}
.wrapper::after, .footer-col-wrapper::after {
  content: ""; display: table; clear: both;
}
@media screen and (max-width: 800px) {
  .wrapper {
    max-width: calc(800px - 30px);
    padding: 0 15px;
  }
}

/* ── Tables ───────────────────────────────────────────────────────── */
table {
  margin-bottom: 30px; width: 100%; text-align: left; color: #000;
  border-collapse: collapse; border: 1px solid #e8e8e8;
}
table tr:nth-child(even) { background-color: #f7f7f7; }
table th, table td { padding: 10px 15px; }
table th { background-color: #f0f0f0; border: 1px solid #dedede; border-bottom-color: #c9c9c9; }
table td { border: 1px solid #e8e8e8; }

/* ── Site header ──────────────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid #000;
  min-height: 55.95px;
  position: relative;
}
.site-title {
  font-size: 26px; font-weight: 300; line-height: 54px;
  letter-spacing: -1px; margin-bottom: 0; float: left; text-decoration: none;
}
.site-title, .site-title:visited { color: #000; }

/* ── Navigation ───────────────────────────────────────────────────── */
.site-nav { float: right; line-height: 54px; }
.site-nav .nav-trigger { display: none; }
.site-nav .menu-icon { display: none; }
.site-nav .page-link {
  color: #000; line-height: 1.5; text-decoration: none; font-size: 18px;
}
.site-nav .page-link:not(:last-child) { margin-right: 20px; }
.site-nav .page-link[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media screen and (max-width: 600px) {
  .site-nav {
    position: absolute; top: 9px; right: 15px;
    background-color: #fdfdfd; border: 1px solid #e8e8e8;
    border-radius: 5px; text-align: right;
  }
  .site-nav label[for="nav-trigger"] {
    display: block; float: right; width: 36px; height: 36px; z-index: 2; cursor: pointer;
  }
  .site-nav .menu-icon {
    display: block; float: right; width: 36px; height: 26px;
    line-height: 0; padding-top: 10px; text-align: center;
  }
  .site-nav .menu-icon > svg { fill: #000; }
  .site-nav input ~ .trigger { clear: both; display: none; }
  .site-nav input:checked ~ .trigger { display: block; padding-bottom: 5px; }
  .site-nav .page-link { display: block; padding: 5px 10px; margin-left: 20px; }
  .site-nav .page-link:not(:last-child) { margin-right: 0; }
}

/* ── Site footer ──────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid #000; padding: 10px 0; }
.contact-list, ul.social-media-list { list-style: none; margin-left: 0; padding: 0; }
ul.social-media-list li { display: inline-block; margin: 0; }
.social-media-list li:not(:last-child) { margin-right: 18px; }
.footer-col-wrapper { font-size: 15px; color: #000; margin-left: 0; }
.footer-col { float: left; }
.footer-col-1 { float: left; margin-top: 10px; }
.footer-col-2 { float: right; margin-top: 10px; }

@media screen and (max-width: 600px) {
  .footer-col { float: none; width: calc(100% - 15px); }
}

/* ── Page content ─────────────────────────────────────────────────── */
.page-content { padding: 30px 0; flex: 1; text-align: justify; }

/* ── Homepage layout ──────────────────────────────────────────────── */
.home {
  background-color: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.home-intro {
  display: block;
}

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

.home-spotlight {
  margin-top: 32px;
  margin-bottom: 44px;
}

.spotlight-card {
  display: block;
  padding: 24px 26px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 14px;
  background-color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}

.spotlight-card:hover,
.spotlight-card:focus {
  background-color: rgba(255, 255, 255, 0.94);
}

.spotlight-label {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5a5a5a;
}

.spotlight-title {
  margin-bottom: 8px;
  font-size: 30px;
  line-height: 1.15;
}

.spotlight-meta {
  margin-bottom: 12px;
  font-size: 14px;
  color: #5a5a5a;
}

.spotlight-summary {
  margin-bottom: 14px;
}

.spotlight-link {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-profile {
  float: right;
  margin-left: 20px;
  margin-bottom: 10px;
  width: 150px;
  padding-left: 0;
  padding-bottom: 0;
  border-radius: 6px;
}

.contact-email, .contact-meta {
  color: #000;
}

.contact-meta {
  line-height: 1.2;
}

/* ── Talks page ───────────────────────────────────────────────────── */
.talk-item {
  clear: both;
}

.talk-preview {
  width: 30%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: none;
  float: right;
  margin-left: 20px;
  margin-bottom: 20px;
}

.download-link {
  color: #5a5a5a;
}

/* ── Blog page ────────────────────────────────────────────────────── */
.blog-list {
  list-style: none;
  margin-left: 0;
}

.blog-entry {
  margin-bottom: 24px;
  padding: 24px;
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  background-color: #fafafa;
}

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

.blog-entry-date {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 14px;
  color: #5a5a5a;
}

.blog-entry-title {
  margin-bottom: 12px;
}

.blog-entry-image {
  width: 30%;
  max-width: 280px;
  height: auto;
  float: right;
  margin-left: 20px;
  margin-bottom: 20px;
  padding-left: 0;
  padding-bottom: 0;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  background-color: #fff;
}

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

/* ── 404 page ─────────────────────────────────────────────────────── */
.error-page {
  margin: 10px auto;
  max-width: 600px;
  text-align: center;
}

.error-code {
  margin: 30px 0;
  font-size: 4em;
  line-height: 1;
  letter-spacing: -1px;
}

/* ── Posts / Pages ────────────────────────────────────────────────── */
.post-header { margin-bottom: 30px; }
.post-title {
  font-size: 42px; letter-spacing: -1px; line-height: 1;
}
@media screen and (max-width: 800px) { .post-title { font-size: 36px; } }

.post-content { margin-bottom: 30px; }
.post-content h2 { font-size: 32px; }
@media screen and (max-width: 800px) { .post-content h2 { font-size: 28px; } }
.post-content h3 { font-size: 26px; }
@media screen and (max-width: 800px) { .post-content h3 { font-size: 22px; } }
.post-content h4 { font-size: 20px; }
@media screen and (max-width: 800px) { .post-content h4 { font-size: 18px; } }

@media screen and (max-width: 600px) {
  body.homepage {
    background-attachment: scroll;
  }

  .page-content {
    text-align: left;
  }

  .home {
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0;
  }

  .home-intro {
    display: block;
  }

  .talk-preview {
    width: 100%;
    max-width: 420px;
    float: none;
    display: block;
    margin: 0 auto 12px auto;
  }

  .blog-entry-image {
    width: 100%;
    max-width: 420px;
    float: none;
    display: block;
    margin: 0 auto 12px auto;
  }

  .spotlight-card,
  .blog-entry {
    padding: 18px;
  }

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