*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #ffffff;
  color: #18181b;
  font-family: "Inter", sans-serif;
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
    animation: pageFade 0.5s ease;
}


@keyframes pageFade {

    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* typography */

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 4rem);
}

h2 {
  font-size: 1.6rem;
}

h3 {
  font-size: 1.1rem;
}

p {
  color: #52525b;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: #2563eb;
}

/* main layout container part */

.container {
  width: min(760px, calc(100% - 3rem));
  margin-inline: auto;
}

/* navbar stylings */

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 3rem 0;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

nav {
  display: flex;
  gap: 2rem;
}

nav a {
  color: #52525b;
  transition: 0.2s;
}

nav a:hover {
  color: #111827;
}

/* hero section */

.hero {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 5rem 0 7rem;
}

.hero-avatar {
  flex-shrink: 0;
}

.hero-avatar img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ececec;
}

.hero-content {
  flex: 1;
}

.hero-content h1 {
  margin-bottom: 1.2rem;
}

.hero-content p {
  max-width: 600px;
  font-size: 1.1rem;
}

/* general section stylings */

section {
  margin-bottom: 6rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  margin-bottom: 2rem;
}

.section-header a {
  color: #2563eb;
}

.section-header a:hover {
  text-decoration: underline;
}

/* post page */

#posts-list {
  display: flex;
  flex-direction: column;
}

.post {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid #ececec;
}

.post:last-child {
  border-bottom: none;
}

.post-info {
  flex: 1;
}

.post-date {
  color: #a1a1aa;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.post-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.post-description {
  color: #71717a;
}

/* quote part */

.quote {
  border-left: 3px solid #e4e4e7;
  padding-left: 1.5rem;
}

blockquote {
  font-size: 1.3rem;
  color: #3f3f46;
  font-style: italic;
}
/* topics section */
.topics-section {
  margin-top: 5rem;
}

#topics-list {
  display: flex;

  flex-wrap: wrap;

  gap: 0.8rem;
}

.topic {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.topic small {
  color: var(--secondary-text);
}

/* footing stylings */

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3rem 0;
  border-top: 1px solid #ececec;
  color: #71717a;
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a:hover {
  color: #111827;
}

/* =========================
   SELECTION
========================= */

::selection {
  background: #dbeafe;
}

/* =========================
   SCROLLBAR
========================= */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-thumb {
  background: #d4d4d8;
  border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1aa;
}

/* responsive stuff */

@media (max-width: 700px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  nav {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .hero {
    padding: 3rem 0 5rem;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .post {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* page header */

.page-header {
  padding: 4rem 0 3rem;
}

.page-header h1 {
  margin-bottom: 1rem;
}

.page-header p {
  max-width: 620px;
}

/* search bar stylings */

.search-section {
  margin-bottom: 3rem;
}

#search {
  width: 100%;

  padding: 1rem 1.2rem;

  border: 1px solid #e5e7eb;
  border-radius: 10px;

  background: white;

  font-size: 1rem;
  font-family: inherit;

  outline: none;

  transition: 0.2s;
}

#search:focus {
  border-color: #2563eb;
}

/* tags */

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;

  margin-top: 0.8rem;
}

.tag {
  padding: 0.25rem 0.6rem;

  background: #f4f4f5;

  border-radius: 999px;

  font-size: 0.82rem;

  color: #52525b;
}

/* ===========================================================
   BLOG POST
=========================================================== */

.blog-post {
  max-width: 760px;
  margin: 4rem auto;
}

.back-link {
  display: inline-block;
  margin-bottom: 3rem;
  color: #666;
  font-size: 0.95rem;
}

.back-link:hover {
  color: black;
}

.post-header {
  margin-bottom: 4rem;
}

.post-header h1 {
  font-size: clamp(2.8rem, 5vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.post-meta {
  color: #888;
  font-size: 0.95rem;
}

/* posts styling */

.post-content {
  font-size: 16px;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
  margin-top: 2em;
  margin-bottom: 10px;
}

.post-content h1 {
  font-size: 2.2rem;
}

.post-content h2 {
  font-size: 1.8rem;
}

.post-content h3 {
  font-size: 1.4rem;
}

.post-content p {
  color: #444;
}

.post-content strong {
  color: black;
}

.post-content a {
  color: #2563eb;
}

.post-content a:hover {
  text-decoration: underline;
}

.post-content img {
  width: 100%;
  border-radius: 10px;
  margin: 2rem 0;
}

.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
}

.post-content hr {
  margin: 3rem 0;
  border: none;
  border-top: 1px solid #e5e5e5;
}

.post-content blockquote {
  border-left: 4px solid #ddd;
  padding-left: 1.5rem;
  color: #666;
  font-style: italic;
}

.post-content code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9em;
  background: #f4f4f4;
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
}

.post-content pre {
  overflow-x: auto;
  padding: 1.25rem;
  background: #111827;
  color: white;
  border-radius: 10px;
}

.post-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
}

.post-content th,
.post-content td {
  border-bottom: 1px solid #eee;
  padding: 0.75rem;
  text-align: left;
}

.no-results {
  text-align: center;
  color: #777;
  padding: 4rem 0;
}

/* about page */
.about-page {
  max-width: 850px;
  margin: 5rem auto;
}

.about-page section {
  margin-bottom: 5rem;
}

.about-hero {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.about-avatar img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
}

.interest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 10px 0;
}

.interest-list li {
  padding: 5px 5px;
  border: 1px solid #ddd;
  border-radius: 15px;
  cursor: pointer;
}

.interest-list li:hover{
    padding: 5px 5px;
    border: 1px solid #2563eb;
    color: #2563eb;
  }

.social-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

pre.shiki {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-radius: 14px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.7;
}

pre.shiki code {
  font-family: "IBM Plex Mono", monospace;
}
