/* -------------------------------------------------------
   IMPORT GOOGLE FONTS
------------------------------------------------------- */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap");

body {
  font-family: "Inter", system-ui, sans-serif;
}

/* -------------------------------------------------------
   RESET & ROOT VARIABLES
------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --uniform-gap: 1.5rem;
  --max-width: 800px;

  --bg-main: #0c0c0c;
  --bg-card: #1a1a1a;
  --bg-hover: #252525;

  --border: #333;
  --border-hover: #444;

  --text-main: white;
  --text-dim: #e0e0e0;
  --text-excerpt: #a0a0a0;
  --text-date: #c0c0c0;
  --text-placeholder: #888;

  --text-hover: #f0f0f0;
  --text-hover-dim: #b8b8b8;
  --text-hover-date: #e0e0e0;

  --text-footer: silver;
}

/* -------------------------------------------------------
   GLOBAL ELEMENTS
------------------------------------------------------- */
html,
body {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 400;
  min-height: 100vh;
  background: var(--bg-main);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

/* -------------------------------------------------------
   HEADER
------------------------------------------------------- */
header.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem var(--uniform-gap) 1.5rem;
  gap: 1.8rem;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.logo-circle {
  display: block;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  transition: transform 0.22s ease;
}

.logo-circle:hover {
  transform: scale(1.15);
}

.circle {
  width: 100%;
  height: 100%;
  background: #ff6200;
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(255, 98, 0, 0.45);
}

.search-wrapper {
  width: 100%;
}

#searchInput {
  font-family: "Inter", system-ui, sans-serif !important;
  width: 100%;
  max-width: 100%;
  padding: 0.9rem 1.2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: inherit;
  font-size: 1rem;
  outline: none;
}

#searchInput::placeholder {
  color: var(--text-placeholder);
}

#searchInput:focus {
  border-color: #555;
  background: var(--bg-hover);
}

/* -------------------------------------------------------
   CARDS
------------------------------------------------------- */
.card-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0 var(--uniform-gap);
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

.card {
  display: flex;
  align-items: center;
  padding: 0.875rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.card .content {
  flex: 1;
  min-width: 0;
  padding-right: 1rem;
  border-right: 1px solid var(--border);
  margin-right: 0.75rem;
}

.card .title {
  font-weight: 550;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.card .excerpt {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-excerpt);
}

.card .date {
  flex-shrink: 0;
  width: 100px;
  text-align: center;
  color: var(--text-date);
  font-size: 0.8rem;
}

/* Hover states */
.card:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

.card:hover .title {
  color: var(--text-hover);
}
.card:hover .excerpt {
  color: var(--text-hover-dim);
}
.card:hover .date {
  color: var(--text-hover-date);
}

/* -------------------------------------------------------
   NO RESULTS MESSAGE
------------------------------------------------------- */
#no-results {
  text-align: center;
  padding: 6rem 2rem;
  font-size: 1.7rem;
  font-weight: 500;
  color: #888;
}

/* -------------------------------------------------------
   BLOG POSTS
------------------------------------------------------- */
.blog-post {
  padding: 0 var(--uniform-gap);
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.7;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
}

.blog-post h1 {
  font-size: 2rem;
  margin: 2rem 0 1rem;
  line-height: 1.2;
}

.blog-post time {
  display: block;
  color: var(--text-placeholder);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.blog-post p {
  margin-bottom: 1em;
}
.blog-post h2 {
  font-size: 1.5rem;
  margin: 2em 0 0.75em;
}
.blog-post h3 {
  font-size: 1.25rem;
  margin: 1.5em 0 0.5em;
}
.blog-post ul,
.blog-post ol {
  margin: 1em 0;
  padding-left: 1.5em;
}
.blog-post li {
  margin-bottom: 0.5em;
}
.blog-post blockquote {
  margin: 1.5em 0;
  padding-left: 1.2em;
  border-left: 3px solid #555;
  color: #aaa;
  font-style: italic;
}
.blog-post pre {
  background: var(--bg-card);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5em 0;
  font-size: 0.9rem;
}
.blog-post code {
  background: var(--bg-hover);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9rem;
}
.blog-post hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

/* -------------------------------------------------------
   404 PAGE
------------------------------------------------------- */
.not-found {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem var(--uniform-gap);
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  text-align: center;
  color: #e0e0e0;
}

.home-circle {
  display: block;
  width: 140px;
  height: 140px;
  cursor: pointer;
  transition: transform 0.25s ease;
}
.home-circle:hover {
  transform: scale(1.1);
}

.not-found h1 {
  font-size: 6rem;
  font-weight: 600;
  margin: 0;
  color: #ff6200;
  text-shadow: 0 4px 20px rgba(255, 98, 0, 0.3);
}

.not-found p {
  font-size: 1.4rem;
  color: #aaa;
}

.footer-tg {
  color: #ff6200;
  text-decoration: none;
  font-weight: 500;
}
.footer-tg:hover {
  text-decoration: underline;
}

/* -------------------------------------------------------
   FOOTER
------------------------------------------------------- */
footer {
  margin-top: auto;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-footer);
}

/* -------------------------------------------------------
   RESPONSIVE
------------------------------------------------------- */
@media (max-width: 500px) {
  .card {
    flex-direction: column;
    text-align: center;
  }
  .card .content {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 0.75rem;
    margin-right: 0;
    margin-bottom: 0.5rem;
  }
  .card .date {
    width: auto;
    padding-top: 0.5rem;
  }
  .home-circle {
    width: 110px;
    height: 110px;
  }
  .not-found h1 {
    font-size: 4.5rem;
  }
  .not-found p {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  header.site-header {
    padding: 1.5rem var(--uniform-gap) 1.2rem;
    gap: 1.4rem;
  }
  .logo-circle {
    width: 56px;
    height: 56px;
  }
}
