:root {
  --white: #ffffff;
  --almost-white: #f5f5f5;
  --gray: #cccccc;
  --dark-gray: #1e1e1e;
  --darker-gray: #121212;
  --black: #0a0a0a;
  --accent-orange: #ff8301;
  --shadow: rgba(0, 0, 0, 0.1);
}

::selection {
  background: var(--accent-orange);
  color: var(--white);
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--almost-white);
  color: #111;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.darkmode {
  background-color: var(--black);
  color: var(--almost-white);
}

/* main page */

nav.menu {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 220px;
  background-color: var(--white);
  padding: 20px 40px;
  transform: translateX(-100%);
  transition: all 0.3s ease;
  overflow-y: auto;
  cursor: default;
  z-index: 20;
}

body.darkmode nav.menu {
  background-color: var(--dark-gray);
  color: var(--almost-white);
}

nav.menu button {
  position: sticky;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  background-color: unset;
  margin: -20px -40px;
  color: var(--accent-orange);
  border: none;
  font-size: 26px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateX(-40px) translateY(-20px);
  transition: 0.3s ease;
  cursor: pointer;
}

nav.menu button:hover {
  color: var(--black);
}

nav.menu p {
  font-size: 12px;
  font-weight: bold;
  line-height: 1.75;
}

nav.menu p.developer,
nav.menu p.developer a {
  color: transparent;
  text-decoration: none;
  pointer-events: none;
}

body.darkmode nav.menu button:hover {
  color: var(--almost-white);
}

body.menu-visible nav.menu {
  transform: translateX(0);
  box-shadow: 0 2px 10px var(--almost-white);
}

body.darkmode.menu-visible nav.menu {
  transform: translateX(0);
  box-shadow: 0 2px 10px var(--dark-gray);
}

nav.menu h3 {
  margin-bottom: 30px;
}

nav.menu ul {
  margin-bottom: 30px;
  padding: 0;
  list-style: none;
}

nav.menu ul li {
  margin: 15px 0;
  font-weight: bold;
}

nav.menu ul li a {
  color: inherit;
  text-decoration: none;
  transition: 0.3s ease;
}

nav.menu ul li a:hover {
  color: var(--accent-orange);
}

header {
  background: linear-gradient(180deg, #f15b0b, #f15b0b, var(--accent-orange));
  color: var(--almost-white);
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 2px 10px var(--shadow);
  cursor: default;
}

body.darkmode header {
  color: var(--black);
}

header h1 {
  max-width: max-content;
  margin-inline: auto;
  padding: 12px 18px;
  line-height: 1.5;
  text-transform: uppercase;
  border-top: 6px solid var(--almost-white);
  border-bottom: 6px solid var(--almost-white);
  border-radius: 12px;
  transition: 0.3s ease;
}

body.darkmode header h1 {
  border-top: 6px solid var(--black);
  border-bottom: 6px solid var(--black);
  transition: 0.3s ease;
}

header p {
  max-width: max-content;
  margin-inline: auto;
  padding: 10px 14px;
  background: var(--almost-white);
  color: var(--darker-gray);
  border-radius: 7px;
  font-weight: bold;
  font-size: 14px;
  transition: 0.3s ease;
}

body.darkmode header p {
  background: var(--black);
  color: var(--almost-white);
  transition: 0.3s ease;
}

.cv-header-arrow {
  position: absolute;
  height: 120px;
  top: -10px;
  transform: translateX(-312px);
  filter: invert(1) contrast(0.94);
  user-select: none;
  pointer-events: none;
}

body.darkmode .cv-header-arrow {
  filter: contrast(0.94);
}

/* other page */

.privacy-container {
  max-width: 900px;
  margin: 60px auto;
  padding: 0 20px 60px 20px;
  line-height: 1.8;
}

.privacy-container p a {
  color: inherit;
}

.privacy-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--accent-orange);
}

body.darkmode .privacy-title {
  color: var(--accent-orange);
}

.privacy-intro {
  text-align: center;
  font-size: 1.05rem;
  margin-bottom: 40px;
  padding: 20px;
  background: var(--almost-white);
  border-radius: 10px;
  font-weight: 600;
}

body.darkmode .privacy-intro {
  background: var(--darker-gray);
  color: var(--almost-white);
}

.privacy-section {
  margin-bottom: 35px;
}

.privacy-section h2 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--accent-orange);
}

body.darkmode .privacy-section h2 {
  color: var(--accent-orange);
}

.privacy-section p {
  margin: 0;
  text-align: justify;
}

.privacy-lastupdate {
  text-align: center;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 2px solid var(--gray);
  font-size: 0.95rem;
}

body.darkmode .privacy-lastupdate {
  border-top-color: var(--dark-gray);
}

.back-button {
  position: fixed;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background-color: var(--accent-orange);
  color: var(--white);
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 16px;
  box-shadow: 0 2px 5px var(--shadow);
  z-index: 15;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.back-button.show {
  opacity: 1;
  visibility: visible;
}

.back-button:hover {
  background-color: #f15b0b;
  transform: translateX(-3px);
}

.back-button span:first-child {
  font-size: 20px;
}

@media (max-width: 900px) {
  .pre-footer {
    flex-direction: column;
    padding: 40px 8%;
  }

  .pf-left {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid var(--gray);
    padding-right: 0;
    padding-bottom: 60px;
  }

  body.darkmode .pf-left {
    border-right: none;
    border-bottom: 2px solid var(--dark-gray);
  }

  .pf-right {
    flex-direction: column;
    gap: 30px;
  }
}

footer {
  background: linear-gradient(180deg, var(--accent-orange), #f15b0b, #f15b0b);
  color: var(--almost-white);
  margin-top: 30px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 -2px 10px var(--shadow);
  cursor: default;
}

body.darkmode footer {
  color: var(--black);
}

footer h1 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1.6rem;
}

footer p {
  max-width: max-content;
  margin: auto;
  padding: 10px 14px;
  background: var(--almost-white);
  color: var(--darker-gray);
  border-radius: 7px;
  line-height: 1.5;
  font-weight: bold;
  font-size: 14px;
  transition: 0.3s ease;
}

footer p span {
  display: inline-block;
}

body.darkmode footer p {
  background: var(--black);
  color: var(--almost-white);
}

footer a {
  color: inherit;
  text-decoration: none;
  transition: 0.3s ease;
}

footer a:hover {
  color: var(--accent-orange);
}

.cv-footer-tick {
  position: absolute;
  height: 132px;
  transform: translateX(-356px) translateY(-50px);
  filter: invert(1) contrast(1.1);
  user-select: none;
  pointer-events: none;
}

body.darkmode .cv-footer-tick {
  filter: contrast(1.1);
}

.fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.fab button {
  width: 40px;
  height: 40px;
  background-color: var(--accent-orange);
  color: var(--almost-white);
  border: none;
  padding: 12px;
  border-radius: 50%;
  font-size: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 2px 5px var(--shadow);
  transition: all 0.3s ease;
}

.fab button:hover {
  background-color: #f15b0b;
}

.fab #goToTopBtn {
  opacity: 0;
  pointer-events: none;
}

.fab #playSoundBtn {
  position: fixed;
  bottom: 20px;
  left: 20px;
}

.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 30;
  justify-content: center;
  align-items: center;
  cursor: default;
}

body.darkmode .popup-overlay {
  background-color: rgba(0, 0, 0, 0.8);
}

@keyframes popin {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.popup {
  background: var(--almost-white);
  color: var(--darker-gray);
  padding: 24px;
  border-radius: 12px;
  max-width: 400px;
  width: 75%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  animation: popin 0.2s ease;
}

body.darkmode .popup {
  background: var(--darker-gray);
  color: var(--almost-white);
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
}

.popup h3 {
  margin-top: 0;
  font-size: 1.5rem;
  color: var(--accent-orange);
}

.popup p {
  margin: 16px 0;
  line-height: 1.6;
}

.popup button {
  background-color: var(--accent-orange);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease;
}

.popup button:hover {
  background-color: #f15b0b;
}

.sidebar-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--accent-orange);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: opacity 0.3s ease;
}

.sidebar-link:hover {
  opacity: 0.7;
}

/* blog index page */

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-top: 40px;
}

@media (min-width: 680px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 35px;
  }
}

.blog-card {
  background: var(--almost-white);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: default;
}

body.darkmode .blog-card {
  background: var(--darker-gray);
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

body.darkmode .blog-card:hover {
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.08);
}

.blog-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  gap: 10px;
}

.blog-card time {
  font-size: 0.85rem;
  color: var(--dark-gray);
  font-weight: 600;
}

body.darkmode .blog-card time {
  color: var(--almost-white);
  opacity: 0.7;
}

.blog-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-orange);
  color: var(--white);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.blog-card h2 {
  font-size: 1.3rem;
  margin: 0 0 12px 0;
  line-height: 1.4;
}

.blog-card h2 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-card h2 a:hover {
  color: var(--accent-orange);
}

.blog-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 15px 0;
  opacity: 0.9;
}

.blog-read-more {
  display: inline-block;
  color: var(--accent-orange);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: opacity 0.3s ease;
}

.blog-read-more:hover {
  opacity: 0.7;
}

/* blog post page */

.blog-post {
  max-width: 800px;
}

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.blog-post-meta time {
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.8;
}

.blog-post-footer {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 2px solid var(--gray);
  text-align: center;
}

body.darkmode .blog-post-footer {
  border-top-color: var(--dark-gray);
}

.blog-post-footer .sidebar-link {
  font-size: 1rem;
}

.blog-post .privacy-section a {
  color: var(--accent-orange);
  text-decoration: none;
  font-weight: 700;
  transition: opacity 0.3s ease;
}

.blog-post .privacy-section a:hover {
  opacity: 0.7;
}
