/* --- Base & Typography --- */

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  background-color: #ffffff;
  color: #333;
}

/* --- Layouts --- */

#home-content {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  text-align: center;
}

.page {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem 2rem;
  text-align: left;
}

.page__title {
  font-family: "Italiana", serif;
  font-size: 3rem;
  margin-bottom: 2rem;
  color: #2d2d2d;
}

.page__content p {
  margin-bottom: 1.5rem;
}

.page__content a {
  /* color: #007bff; */
  text-decoration: none;
  /* border-bottom: 1px dotted #007bff; */
}

.page__content a:hover {
  color: #0056b3;
  border-bottom-style: solid;
}

/* --- Components --- */

/* Homepage heading */
.heading {
  max-width: 90%;
}

.heading__logo {
  font-family: "Italiana", sans-serif;
  font-size: clamp(4rem, 20vw, 9rem);
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
  color: #2d2d2d;
}

.heading__tagline {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: clamp(1rem, 4vw, 1rem);
  margin-top: 1rem;
  color: #555;
}

/* Navigation */
.nav {
  position: fixed;
  top: 3rem;
  right: 3rem;
  z-index: 100;
}

.nav__toggle {
  display: none;
}

.nav__hamburger {
  width: 24px;
  height: 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nav__hamburger-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #333;
  border-radius: 3px;
  transition: all 0.3s ease-in-out;
}

.nav__toggle:checked~.nav__hamburger .nav__hamburger-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav__toggle:checked~.nav__hamburger .nav__hamburger-bar:nth-child(2) {
  opacity: 0;
}

.nav__toggle:checked~.nav__hamburger .nav__hamburger-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav__panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 200px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
}

.nav__toggle:checked~.nav__panel {
  display: block;
}

.nav__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav__link {
  display: block;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  color: #333;
  font-size: 1rem;
  transition: background-color 0.2s ease;
  border: none;
}

.nav__link:hover {
  background-color: #f5f5f5;
}

/* Blog post feed */
.post-list {
  list-style: none;
  padding: 0;
}

.post-list__item {
  margin-bottom: 3.5rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid #e9ecef;
}

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

.post__title {
  font-family: "Italiana", serif;
  font-size: 2.5rem;
  margin-top: 0;
  margin-bottom: 1rem;
}

.post__title a {
  color: #2d2d2d;
  text-decoration: none;
  border: none;
}

/* .post__title a:hover {
  text-decoration: underline;
} */

.post__excerpt {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #555;
  margin-top: 0;
  margin-bottom: 1rem;
}

.post__meta {
  color: #828282;
  font-size: 0.9rem;
  margin-top: 1.5rem;
}

.post__back-link {
  display: inline-block;
  margin-top: 3rem;
  color: #007bff;
  text-decoration: none;
  border: none;
}

.post__back-link:hover {
  text-decoration: underline;
}

/* Social links */
.social-links__link {
  font-size: 1.8rem;
  color: #333;
  margin-right: 1.5rem;
  text-decoration: none;
  border-bottom: none;
  transition: color 0.2s ease-in-out;
}

.social-links__link:last-child {
  margin-right: 0;
}

.social-links__link:hover {
  color: #007bff;
}

.heading__tagline .social-links a {
  font-size: 1.2rem;
  margin-right: 0.5rem;
  color: #555;
}

/* Banner */
.banner {
  display: flex;
  align-items: flex-start;
  padding: 1rem 0.7rem;
  margin: 2rem 0;
  border-radius: 8px;
  border-left: 5px solid;
  font-size: 0.95rem;
  line-height: 1.6;
}

.banner__icon {
  font-size: 1.4rem;
  margin-right: 1.2rem;
  padding-top: 0.2rem;
}

.banner__content {
  flex: 1;
  font-style: italic;
}

.banner__content p:last-child {
  margin-bottom: 0;
}

.banner--info {
  background-color: #e7f3fe;
  border-color: #2196f3;
  color: #0d47a1;
}

.banner--info .banner__icon {
  color: #2196f3;
}

.banner--warning {
  background-color: #fff8e1;
  border-color: #ffc107;
  color: #856404;
}

.banner--warning .banner__icon {
  color: #ffc107;
}

.banner--danger {
  background-color: #fbe9e7;
  border-color: #f44336;
  color: #b71c1c;
}

.banner--danger .banner__icon {
  color: #f44336;
}

/* Spotify widget */
.music-widget-wrapper {
  margin: 2.5rem 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
}

/* --- Code Block Styling --- */
.page__content pre,
.page__content code {
  font-family: "Menlo", "Consolas", "Monaco", monospace;
  font-size: 0.9rem;
}

.page__content pre {
  background-color: #282828;
  /* Gruvbox background */
  padding: 1.2rem;
  border-radius: 8px;
  overflow-x: auto;
  line-height: 1.5;
  position: relative;
}

:not(pre)>code {
  background-color: #3c3836;
  color: #ebdbb2;
  padding: 0.2em 0.4em;
  margin: 0;
  font-size: 85%;
  border-radius: 6px;
}

.copy-code-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #44475a;
  color: #f8f8f2;
  border: 1px solid #6272a4;
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.page__content pre:hover .copy-code-button {
  opacity: 1;
}

/* CV button */
.cv-button__container {
  text-align: center;
  margin: 4rem 0 2rem 0;
}

.cv-button {
  display: inline-block;
  background-color: #2d2d2d;
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  font-weight: bold;
  font-size: 1.1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
}

.cv-button:hover {
  transform: translateY(-3px);
  /* box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); */
}

.cv-button .fa-file-pdf {
  margin-right: 0.75rem;
}

/* --- Responsiveness --- */

@media (max-width: 768px) {
  .page {
    padding: 6rem 1.5rem 3rem 1.5rem;
  }

  .page__title {
    font-size: 2.5rem;
  }

  .post__title {
    font-size: 2rem;
  }

  .nav {
    top: 1.5rem;
    right: 1.5rem;
  }

  .heading__logo {
    font-size: clamp(3rem, 18vw, 4.5rem);
  }

  .heading__tagline {
    font-size: 0.9rem;
    flex-direction: column;
  }
}
