/*
Theme Name: Andrei Saioc
Theme URI: https://andreisaioc.com/
Author: Andrei Saioc
Description: Personal blog theme for andreisaioc.com, built on Bootstrap 5.
Version: 1.0.0
Requires PHP: 8.0
Text Domain: andreisaioc
*/

:root {
  --as-ink: #14161c;
  --as-body: #2b2f38;
  --as-muted: #6b7280;
  --as-line: #e7e8ec;
  --as-soft: #f6f7f9;
  --as-accent: #2f5bea;
  --as-accent-dark: #1f43c0;
  --as-accent-soft: #eef2fe;
  --as-radius: 14px;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-link-color: var(--as-accent);
  --bs-link-hover-color: var(--as-accent-dark);
}

body {
  color: var(--as-body);
  background: #fff;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { color: var(--as-ink); font-weight: 700; letter-spacing: -0.015em; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* Header */
.as-header { border-bottom: 1px solid var(--as-line); background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(10px); }
.as-header .navbar-brand { font-weight: 800; color: var(--as-ink); display: flex; align-items: center; gap: .6rem; }
.as-header .navbar-brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.as-header .nav-link { color: var(--as-body); font-weight: 500; }
.as-header .nav-link:hover, .as-header .current-menu-item > .nav-link { color: var(--as-accent); }
.btn-accent { background: var(--as-accent); color: #fff; border: 0; font-weight: 600; border-radius: 999px; padding: .55rem 1.2rem; }
.btn-accent:hover { background: var(--as-accent-dark); color: #fff; text-decoration: none; }
.btn-ghost { border: 1px solid var(--as-line); border-radius: 999px; padding: .55rem 1.2rem; font-weight: 600; color: var(--as-ink); background: #fff; }
.btn-ghost:hover { border-color: var(--as-accent); color: var(--as-accent); text-decoration: none; }

/* Home hero */
.as-hero { padding: 5rem 0 4rem; background: radial-gradient(1200px 400px at 80% -10%, var(--as-accent-soft), transparent 70%); }
.as-hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); line-height: 1.1; font-weight: 800; }
.as-hero .lead { font-size: 1.2rem; color: var(--as-muted); max-width: 38rem; }
.as-hero-photo { width: 100%; max-width: 360px; aspect-ratio: 1; object-fit: cover; border-radius: 28px; box-shadow: 0 30px 60px -20px rgba(20,22,28,.35); transform: rotate(2deg); }
.as-kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--as-accent); }
.as-stat { border-left: 3px solid var(--as-accent); padding-left: .9rem; }
.as-stat strong { display: block; font-size: 1.5rem; color: var(--as-ink); }
.as-stat span { color: var(--as-muted); font-size: .9rem; }

.as-section { padding: 4rem 0; }
.as-section-soft { background: var(--as-soft); }
.as-section-title { display: flex; justify-content: space-between; align-items: end; margin-bottom: 1.75rem; gap: 1rem; }
.as-section-title h2 { margin: 0; font-size: 1.75rem; }

/* Cards */
.as-card { border: 1px solid var(--as-line); border-radius: var(--as-radius); overflow: hidden; background: #fff; height: 100%; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.as-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px rgba(20,22,28,.35); }
.as-card-img { aspect-ratio: 16/9; overflow: hidden; background: var(--as-soft); display: block; }
.as-card-img img { width: 100%; height: 100%; object-fit: cover; }
.as-card-body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; flex: 1; }
.as-card-title { font-size: 1.1rem; line-height: 1.35; margin: .4rem 0 .5rem; }
.as-card-title a { color: var(--as-ink); }
.as-card-excerpt { color: var(--as-muted); font-size: .95rem; margin-bottom: .9rem; }
.as-card-meta { margin-top: auto; font-size: .83rem; color: var(--as-muted); }
.as-cat { display: inline-block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--as-accent); }
.as-card-featured .as-card-title { font-size: 1.5rem; }
.as-topic { border: 1px solid var(--as-line); border-radius: var(--as-radius); padding: 1.25rem; display: block; background: #fff; color: var(--as-ink); height: 100%; }
.as-topic:hover { border-color: var(--as-accent); text-decoration: none; }
.as-topic strong { display: block; font-size: 1.05rem; }
.as-topic span { color: var(--as-muted); font-size: .9rem; }

/* Blog page */
.as-page-head { padding: 3.5rem 0 2rem; border-bottom: 1px solid var(--as-line); background: var(--as-soft); }
.as-page-head h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; }
.as-page-head p { color: var(--as-muted); max-width: 40rem; }
.as-filter a { display: inline-block; border: 1px solid var(--as-line); border-radius: 999px; padding: .35rem .9rem; margin: 0 .35rem .5rem 0; font-size: .9rem; color: var(--as-body); background: #fff; }
.as-filter a.active, .as-filter a:hover { border-color: var(--as-accent); color: var(--as-accent); text-decoration: none; }
.pagination .page-numbers { display: inline-block; min-width: 2.4rem; text-align: center; padding: .45rem .75rem; margin: 0 .2rem; border: 1px solid var(--as-line); border-radius: 10px; color: var(--as-body); }
.pagination .page-numbers.current { background: var(--as-accent); color: #fff; border-color: var(--as-accent); }

/* Single */
.as-single-head { padding: 3rem 0 2rem; }
.as-single-head h1 { font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.15; font-weight: 800; }
.as-byline { display: flex; align-items: center; gap: .75rem; color: var(--as-muted); font-size: .93rem; }
.as-byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.as-byline strong { color: var(--as-ink); }
.as-featured { border-radius: 18px; overflow: hidden; margin-bottom: 2.5rem; aspect-ratio: 2/1; background: var(--as-soft); }
.as-featured img { width: 100%; height: 100%; object-fit: cover; }
.as-breadcrumb { font-size: .85rem; color: var(--as-muted); margin-bottom: 1rem; }
.as-breadcrumb a { color: var(--as-muted); }

.as-content { font-size: 1.1rem; line-height: 1.75; max-width: 46rem; }
.as-content > * + * { margin-top: 1.15rem; }
.as-content p { margin-bottom: 0; }
.as-content h2 { font-size: 1.7rem; margin-top: 2.6rem; scroll-margin-top: 90px; }
.as-content h3 { font-size: 1.3rem; margin-top: 2rem; scroll-margin-top: 90px; }
.as-content ul, .as-content ol { padding-left: 1.3rem; }
.as-content li + li { margin-top: .35rem; }
.as-content a { text-decoration: underline; text-decoration-color: rgba(47,91,234,.35); text-underline-offset: 3px; }
.as-content a:hover { text-decoration-color: var(--as-accent); }
.as-content blockquote { border-left: 4px solid var(--as-accent); padding: .25rem 0 .25rem 1.1rem; color: var(--as-ink); font-style: italic; }
.as-content figure { margin: 2rem 0; }
.as-content figure img { border-radius: 12px; border: 1px solid var(--as-line); width: 100%; max-height: 460px; object-fit: cover; background: var(--as-soft); }
.as-content figure.as-shot img { object-fit: contain; max-height: 420px; }
.as-content figcaption { font-size: .85rem; color: var(--as-muted); margin-top: .5rem; text-align: center; }
.as-content table { width: 100%; font-size: .95rem; border-collapse: collapse; }
.as-content .table-wrap { overflow-x: auto; border: 1px solid var(--as-line); border-radius: 12px; }
.as-content table th { background: var(--as-soft); color: var(--as-ink); font-weight: 600; }
.as-content table th, .as-content table td { padding: .7rem .85rem; border-bottom: 1px solid var(--as-line); vertical-align: top; }
.as-content table tr:last-child td { border-bottom: 0; }
.as-content .table { margin: 0; }
.as-content code { background: var(--as-soft); padding: .1rem .35rem; border-radius: 6px; font-size: .92em; color: #b42357; }

.tldr { background: var(--as-accent-soft); border: 1px solid #d6e0fd; border-radius: var(--as-radius); padding: 1.25rem 1.4rem; }
.tldr .tldr-label { font-weight: 800; color: var(--as-accent); text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; margin-bottom: .5rem !important; }
.tldr ul { margin-bottom: 0; }

.as-toc { position: sticky; top: 96px; font-size: .92rem; }
.as-toc-title { font-weight: 700; color: var(--as-ink); text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; margin-bottom: .75rem; }
.as-toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--as-line); }
.as-toc li a { display: block; padding: .3rem 0 .3rem .9rem; color: var(--as-muted); margin-left: -2px; border-left: 2px solid transparent; line-height: 1.35; }
.as-toc li a:hover, .as-toc li a.active { color: var(--as-accent); border-left-color: var(--as-accent); text-decoration: none; }
.as-toc-mobile summary { font-weight: 600; cursor: pointer; }
.as-toc-mobile { border: 1px solid var(--as-line); border-radius: 12px; padding: .9rem 1.1rem; margin-bottom: 2rem; }
.as-toc-mobile ol { margin: .75rem 0 0; padding-left: 1.1rem; }

.as-author-box { border: 1px solid var(--as-line); border-radius: 18px; padding: 1.5rem; display: flex; gap: 1.25rem; align-items: flex-start; background: var(--as-soft); }
.as-author-box img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.as-author-box h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.as-author-box p { color: var(--as-body); margin-bottom: .5rem; font-size: .98rem; }
.as-tags a { display: inline-block; background: var(--as-soft); border-radius: 999px; padding: .25rem .75rem; font-size: .85rem; margin: 0 .3rem .4rem 0; color: var(--as-body); }
.as-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--as-accent); width: 0; z-index: 1080; }

/* About */
.as-about-photo { width: 100%; border-radius: 24px; aspect-ratio: 1; object-fit: cover; }

/* Footer */
.as-footer { background: #0f1117; color: #a9adb8; padding: 3.5rem 0 2rem; margin-top: 4rem; }
.as-footer a { color: #d7d9df; }
.as-footer h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; }
.as-footer ul { list-style: none; padding: 0; margin: 0; }
.as-footer li { margin-bottom: .5rem; font-size: .95rem; }
.as-footer .as-foot-bottom { border-top: 1px solid #23262f; margin-top: 2.5rem; padding-top: 1.5rem; font-size: .85rem; }

@media (max-width: 991.98px) {
  .as-hero { padding: 3rem 0; text-align: left; }
  .as-hero-photo { max-width: 240px; margin-bottom: 1.5rem; transform: none; }
  .as-content { font-size: 1.05rem; }
}
