/* =========================================
   I Wonder - Hugo CSS
   Ported from Jekyll SCSS
   ========================================= */

/* --- Variables (CSS custom properties) --- */
:root {
  --base-font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --heading-font-family: 'Playfair Display', Georgia, serif;
  --base-font-size: 16px;
  --base-font-weight: 400;
  --base-line-height: 1.6;
  --spacing-unit: 30px;
  --text-color: #2b2b2b;
  --background-color: #ffffff;
  --brand-color: #2a7ae2;
  --grey-color: #6c757d;
  --grey-color-light: #f8f9fa;
  --grey-color-dark: #343a40;
  --card-bg: #ffffff;
  --card-border: rgba(0,0,0,0.05);
}

[data-bs-theme="dark"] {
  --text-color: #e9ecef;
  --background-color: #121212;
  --brand-color: #4da3ff;
  --grey-color: #adb5bd;
  --grey-color-light: #212529;
  --grey-color-dark: #f8f9fa;
  --card-bg: #1e1e1e;
  --card-border: rgba(255,255,255,0.05);
}

body {
  font-family: var(--base-font-family);
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: var(--base-line-height);
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
  font-family: var(--heading-font-family) !important;
}

/* =========================================
   Links
   ========================================= */
#overrides a {
  color: var(--text-color);
  text-decoration: none;
}

#overrides a .username {
  color: var(--grey-color);
}

#overrides a .hlink {
  color: var(--grey-color);
}

#overrides a:visited {
  color: var(--text-color);
}

#overrides a:hover {
  color: var(--brand-color);
}

#overrides a .social-media-list:hover {
  text-decoration: none;
}

#overrides a .social-media-list:hover .username {
  text-decoration: none;
}

/* =========================================
   Blockquotes
   ========================================= */
blockquote {
  color: var(--grey-color);
  font-size: 1.125rem;
  letter-spacing: -1px;
  font-style: italic;
}

blockquote > :last-child {
  margin-bottom: 0;
}

/* =========================================
   Header / Navbar
   ========================================= */
.navbar {
  font-family: var(--base-font-family);
  background-color: var(--background-color) !important;
  border-bottom: 1px solid var(--card-border);
}

.navbar .navbar-brand {
  font-size: 1.8rem;
  padding-right: 1cm;
  padding-left: 1cm;
}

.navbar .form-control {
  width: 100%;
  border-radius: 1rem;
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
  border-top: 1px solid #e8e8e8;
  padding: 10px 0px;
  font-family: var(--base-font-family);
}

.site-footer .footer-heading {
  font-size: 1.125rem;
  margin-bottom: 15px;
  color: var(--grey-color);
  padding-top: 8px;
}

@media only screen and (min-width: 1000px) {
  .site-footer .container {
    padding: 10px 3em;
  }
}

@media only screen and (max-width: 400px) {
  .site-footer .nav-link {
    display: none;
  }
}

.nav .nav-link {
  color: var(--grey-color) !important;
}

.nav .nav-link:hover {
  color: white !important;
}

.username:hover {
  color: white;
  transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
}

.svg-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  fill: var(--grey-color);
  margin-right: 5px;
  padding-left: 0;
  margin-left: -1.5cm;
  vertical-align: text-top;
}

/* =========================================
   Home Page - Cards (Masonry Grid)
   ========================================= */
.home .card, .page .card {
  padding: 0;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 15px rgba(0,0,0,0.03);
  transition: all 0.3s ease-in-out;
}

.home .card:hover, .page .card:hover {
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transform: translateY(-5px);
}

.home .card .timeago, .page .card .timeago {
  font-family: var(--base-font-family);
  font-size: 13px;
  color: var(--grey-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.home .card .card-category, .page .card .card-category {
  font-family: var(--base-font-family);
  font-size: 13px;
  color: var(--brand-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.home .card .card-title, .page .card .card-title {
  font-family: var(--heading-font-family);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-color);
  margin-top: 8px;
  line-height: 1.3;
}

.home .card-header, .page .card-header {
  background-color: transparent;
  border-bottom: none;
  margin-bottom: 0;
  padding: 1.5rem 1.5rem 0.5rem 1.5rem;
}

.home .card-img, .page .card-img {
  width: 100%;
  height: auto;
  border-radius: 0;
}

.home .card-body, .page .card-body {
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.home .card-text, .page .card-text {
  color: var(--grey-color);
  font-size: 0.95rem;
}

#overrides .page a {
  color: blue;
  text-decoration: none;
}

/* =========================================
   Single Post
   ========================================= */
.post .container {
  padding-inline: 10vw;
}

.post .card {
  padding: 0;
  border: none;
  background-color: transparent;
}

.post .card .card-meta {
  font-family: var(--base-font-family);
  font-size: .95em;
  color: var(--grey-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post .card .card-title {
  font-family: var(--heading-font-family);
  font-weight: 700;
  font-size: 3rem;
  color: var(--text-color);
  line-height: 1.2;
}

.post .card-header {
  background-color: transparent;
  border-bottom: none;
  margin-bottom: 2rem;
  padding: 0;
  text-align: center;
}

.post .card-img {
  max-width: 800px;
  margin: auto;
}

.post .content {
  text-align: justify;
}

.post .content img {
  max-width: 100%;
  height: auto;
  margin: 10px auto;
  display: block;
}

@media (min-width: 768px) {
  .post .content img {
    max-width: 500px;
  }
}

.navbar-brand, .nav-link, .hlink {
  color: var(--text-color) !important;
}

.post blockquote {
  text-align: center;
  font-size: 1.5em;
}

/* =========================================
   TOC
   ========================================= */
@media only screen and (max-width: 500px) {
  .toc {
    float: right;
    max-width: 1in;
    position: static;
    padding-inline: 20px;
    padding-block: 10px;
    outline: 1px solid lightgray;
    font-size: 90%;
    align-items: center;
    margin-bottom: 30px;
    margin-left: 2%;
  }
}

@media only screen and (max-width: 1300px) and (min-width: 500px) {
  .toc {
    float: right;
    max-width: 1.8in;
    position: static;
    padding-inline: 20px;
    padding-block: 10px;
    outline: 1px solid lightgray;
    font-size: 90%;
    align-items: center;
    margin-bottom: 30px;
    margin-left: 2%;
  }
}

@media only screen and (min-width: 1300px) {
  .toc {
    left: 11.5in;
    float: right;
    position: fixed;
    top: 90px;
    padding-inline: 20px;
    padding-block: 15px;
    outline: 1px solid lightgray;
    max-width: 2in;
    font-size: 85%;
  }
}

/* =========================================
   Hugo highlight overrides
   ========================================= */
.highlight pre {
  padding: 1em;
  border-radius: 4px;
  overflow-x: auto;
}
