/* ============================================================
   Custom styles — YT is learning here.
   Loaded after beautifuljekyll.css (site-css), so overrides win.
   ============================================================ */

/* ---------- Large-screen container widths (kept from before) ---------- */
@media (min-width: 1400px) {
  .container, .container-md { max-width: 1200px; }
}
@media (min-width: 1920px) {
  .container, .container-md { max-width: 1600px; }
}
@media (min-width: 2560px) {
  .container, .container-md { max-width: 1920px; }
}

/* ---------- Typography ---------- */
:root {
  --header-font: 'Playfair Display', 'Lora', serif;
  --accent: #5B4B8A;
  --accent-light: #7A6BB5;
  --accent-soft: rgba(91, 75, 138, 0.08);
  --card-bg: #FFFFFF;
  --card-border: #EEEEEE;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.10);
}

body {
  font-family: var(--body-font);
  line-height: 1.75;
  animation: fadeIn 0.6s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

h1, h2, h3, h4, h5, h6,
.navbar-brand, .site-title, .post-title, .post-subtitle {
  font-family: var(--header-font);
  letter-spacing: -0.01em;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; margin-top: 2.2rem; }
p  { margin-bottom: 1.4rem; }

/* ---------- Links ---------- */
a { transition: color 0.25s ease; }
a:hover { color: var(--hover-col); }

/* ---------- Navbar ---------- */
.navbar-custom {
  background-color: var(--navbar-col);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.navbar-custom .navbar-brand {
  font-family: var(--header-font);
  font-weight: 700;
  font-size: 1.2rem;
}
.navbar-custom .navbar-nav .nav-link {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.3s ease, color 0.25s ease;
}
.navbar-custom .navbar-nav .nav-link:hover,
.navbar-custom .navbar-nav .nav-link:focus {
  color: var(--link-col);
  background-size: 100% 1px;
}
/* Avatar ring */
.navbar-custom .avatar-container .avatar-img-border {
  border: 2px solid var(--link-col);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ---------- Page header (intro) ---------- */
.intro-header .page-heading h1,
.intro-header .post-heading h1 {
  font-family: var(--header-font);
  letter-spacing: -0.01em;
}
.intro-header .page-heading .page-subheading,
.intro-header .post-heading .post-subheading {
  color: var(--text-muted, #777777);
  font-style: italic;
}

/* ---------- Post preview cards ---------- */
.posts-list { list-style: none; padding-left: 0; }
.post-preview {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.post-preview:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.post-preview .post-title {
  font-family: var(--header-font);
  font-size: 1.4rem;
  color: var(--text-col);
}
.post-preview .post-subtitle {
  font-family: var(--header-font);
  font-size: 1.05rem;
  color: var(--text-muted, #777777);
}
.post-preview .post-meta {
  font-size: 0.85rem;
  color: var(--text-soft, #999999);
}
.post-preview .post-entry {
  color: var(--text-muted, #555555);
  font-size: 0.95rem;
}
.post-preview a {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.3s ease, color 0.25s ease;
}
.post-preview a:hover {
  color: var(--link-col);
  background-size: 100% 1px;
}
.post-preview .post-image img { border-radius: 10px; }

/* ---------- Blockquotes ---------- */
blockquote {
  border-left: 4px solid var(--link-col);
  background: var(--accent-soft);
  padding: 1rem 1.4rem;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-col);
}

/* ---------- Hero (home + 404) ---------- */
.hero {
  text-align: center;
  padding: 3.5rem 1.5rem 3rem;
  background: linear-gradient(135deg, #5B4B8A 0%, #7A6BB5 100%);
  border-radius: 18px;
  color: #FFFFFF;
  margin: 1rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15), transparent 40%);
  pointer-events: none;
}
.hero-title {
  font-family: var(--header-font);
  font-size: 2.4rem;
  font-weight: 700;
  color: #FFFFFF;
  position: relative;
  z-index: 1;
}
.hero-sub {
  font-size: 1.1rem;
  opacity: 0.92;
  margin-top: 0.8rem;
  position: relative;
  z-index: 1;
}
.hero-btns {
  margin-top: 1.6rem;
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.btn {
  display: inline-block;
  padding: 0.6rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: #FFFFFF;
  color: #5B4B8A;
}
.btn-primary:hover {
  background: #F0EDF8;
  color: #5B4B8A;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #FFFFFF;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* ---------- Full-width content ---------- */
/* The header and main content now span the full container width on all pages
   (layouts use a plain .col instead of col-xl-8/col-lg-10), so the hero and
   post-preview items are as broad as the header without needing break-outs. */

/* ---------- About page ---------- */
.about-card {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}
.about-card ul { margin-bottom: 0; }
.about-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--link-col);
  flex-shrink: 0;
}
@media (max-width: 576px) {
  .about-card { flex-direction: column; text-align: center; }
}

/* ---------- Sub-site section titles ---------- */
.section-title {
  font-family: var(--header-font);
  font-size: 1.5rem;
  margin: 2.4rem 0 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--navbar-border-col);
}
.tag {
  font-family: var(--body-font);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  background: var(--link-col);
  color: #FFFFFF;
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  text-transform: uppercase;
}
.chip {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--link-col);
  font-weight: 500;
}

/* ---------- Footer ---------- */
footer, .beautiful-jekyll-footer {
  background-color: var(--footer-col);
  border-top: 1px solid var(--navbar-border-col);
  padding-top: 1.5rem;
}
.beautiful-jekyll-footer .copyright { margin-bottom: 0.4rem; }
.beautiful-jekyll-footer .theme-by { color: var(--text-soft, #999999); }

/* ---------- Dark mode ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --page-col: #1E1E24;
    --text-col: #E8E8E8;
    --link-col: #9B8FC9;
    --hover-col: #B4A9D6;
    --navbar-col: #1E1E24;
    --navbar-text-col: #E8E8E8;
    --navbar-border-col: #33333C;
    --footer-col: #1E1E24;
    --footer-text-col: #BDBDBD;
    --footer-link-col: #9B8FC9;
    --footer-hover-col: #B4A9D6;
    --card-bg: #26262E;
    --card-border: #33333C;
    --accent-soft: rgba(122, 107, 181, 0.14);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.5);
  }
  body {
    background-color: var(--page-col);
    color: var(--text-col);
  }
  .post-preview, .about-card {
    background: var(--card-bg);
    border-color: var(--card-border);
  }
  .post-preview .post-entry { color: #BDBDBD; }
  .post-preview .post-meta { color: #8A8A93; }
  .chip { color: var(--link-col); }
  .intro-header .page-heading h1,
  .intro-header .post-heading h1 { color: var(--text-col); }
}
