/* Variable font (modern browsers) */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter/Inter-VariableFont_opsz,wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter/Inter-Italic-VariableFont_opsz,wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* Fallback for older browsers - add only the weights you actually use */
@supports not (font-variation-settings: normal) {
  @font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/static/Inter_18pt-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
  }
  
  @font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/static/Inter_18pt-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
  }
}

:root {
  --background-color: #1e1e2e;
  --font-family: 'Inter', system-ui, sans-serif;
  --text-color: #cdd6f4;
  --inverted-text-color: #1e1e2e;
  --mantle-color: #181825;
  --crust-color: #11111b;
  --nav-menu-color: #f2cdcd;
  --nav-link-1-color: #fab387;
  --nav-link-2-color: #a6e3a1;
  --nav-link-3-color: #b4befe;
  --hero-gradient-1: #f5e0dc;
  --hero-gradient-2: #cba6f7;
  --strong-quote-color: #e78284;
  --link-color: #89b4fa;
  --post-card-color: #313244;
  --subtext-color: #bac2de;
  --string-yellow: #f9e2af;
  --primitive-sapphire: #74c7ec;
  --inline-code: #ca9ee6;
  --punct-orange: #fab387;
  --logo-red: #f38ba8;
  --logo-blue: #89b4fa;
  --logo-yellow: #f9e2af;
  --logo-pink: #f5c2e7;
  --logo-lavender: #b4befe;
  --title-font-size: 32px;
  --main-padding: 20px;
  --main-margin: 20px;
  --main-font-size: 18px;
}

.light-mode {
  --background-color: #eff1f5;
  --text-color: #4c4f69;
  --inverted-text-color: #eff1f5;
  --mantle-color: #e6e9ef;
  --crust-color: #dce0e8;
  --nav-menu-color: #dd7878;
  --nav-link-1-color: #fe640b;
  --nav-link-2-color: #40a02b;
  --nav-link-3-color: #7287fd;
  --hero-gradient-1: #dc8a78;
  --hero-gradient-2: #8839ef;
  --strong-quote-color: #d20f39;
  --link-color: #1e66f5;
  --post-card-color: #ccd0da;
  --subtext-color: #5c5f77;
  --string-yellow: #df8e1d;
  --primitive-sapphire: #209fb5;
  --inline-code: #8839ef;
  --punct-orange: #fe640b;
  --logo-red: #d20f39;
  --logo-yellow: #df8e1d;
  --logo-blue: #1e66f5;
  --logo-pink: #ea76cb;
  --logo-lavender: #7287fd;
}

.navigation-header {
  background-color: var(--mantle-color);
  padding: 10px 0;
}

html,
body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: var(--font-family);
  flex: 1;
}

main {
  font-size: var(--main-font-size);
}

h1.page-title {
  color: var(--page-color);
  font-size: 3em;
  font-weight: 600;
  margin-bottom: 45px;
}
a {
  color: var(--link-color);
  text-decoration: none;
}
.page-container {
  margin: 0 auto;
  max-width: 900px;
  padding: 20px;
  overflow-wrap: break-word;
}

.navbar {
  position: fixed; /* Make the navbar sticky */
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--mantle-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0;
  padding: 0 20px;
  z-index: 1000; /* Ensure the navbar is above other content */
}

.nav-menu {
  display: flex;
  align-items: center;
}

.navbar-links ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.navbar-links ul li {
  margin-left: 20px;
}

.navbar-links ul li a {
  color: var(--nav-menu-color);
  text-decoration: none;
  font-weight: semi-bold;
  font-size: 20px;
  position: relative;
  transition: color 0.3s ease-in-out;
}

.navbar-links ul li a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 4px;
  background-color: var(--after-color);
  transition: width 0.3s ease-in-out, left 0.3s ease-in-out;
  transform: translateX(-50%);
}

.navbar-links ul li a:hover::after,
.navbar-links ul li a.active::after {
  width: 20px;
  left: 50%;
}

.nav-link-2 {
  --after-color: var(--nav-link-1-color);
}

.nav-link-3 {
  --after-color: var(--nav-link-2-color);
}

.nav-link-4 {
  --after-color: var(--nav-link-3-color);
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.navbar-toggle span {
  background-color: var(--nav-menu-color);
  height: 3px;
  margin: 4px 0;
  width: 25px;
}

main {
  flex: 1;
  padding: var(--main-padding);
  margin: var(--main-margin);
}

footer {
  background-color: var(--mantle-color);
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.footer-section {
  flex: 1;
  margin: 10px;
  min-width: 200px;
}

.footer-section h3 {
  margin-bottom: 10px;
}

.footer-section ul {
  list-style-type: none;
  padding: 0;
}

.social-media {
  list-style-type: none;
  padding: 0;
  display: flex;
}

.social-media li {
  margin: 0 10px 0 0;
}

/* Hero section */
.hero-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100vh;
}
.hero-text,
.hero-logo {
  width: 50%;
}
.hero-logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-text p.hero-hello {
  background: linear-gradient(
    to right,
    var(--hero-gradient-1),
    var(--hero-gradient-2)
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 50px;
  font-weight: bold;
  margin-top: 30px;
  margin-bottom: 30px;
}
.hero-text p.hero-welcome {
  font-size: 20px;
  font-weight: bold;
  color: var(--text-color);
}

.hero-logo img {
  height: 400px;
  width: auto;
  transition: transform 0.5s ease-in-out;
}

/* Responsive styles */
@media (max-width: 768px) {
  .navbar-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background-color: var(--mantle-color);
    display: none;
    flex-direction: column;
    width: 100%;
    z-index: 1000;
  }

  .navbar-links ul {
    flex-direction: column;
    width: 100%;
  }

  .navbar-links ul li {
    margin: 10px 0;
    text-align: center;
  }

  .navbar-toggle {
    display: flex;
  }

  .navbar-links.active {
    display: flex;
  }
  footer {
    flex-direction: column;
    align-items: center;
  }

  .footer-section {
    margin: 10px 0;
    text-align: center;
  }

  .social-media {
    justify-content: center;
  }

  .hero-container {
    flex-direction: column;
    height: auto;
  }
  .hero-text,
  .hero-logo {
    width: 100%;
    text-align: left;
  }

  .hero-text p.hero-hello {
    font-size: 30px;
  }

  .dropdown-active {
    margin-top: 135px;
  }
}

blockquote {
  background-color: var(--mantle-color);
  border-left: 10px solid var(--crust-color);
  margin: 1.5em 10px;
  padding: 0.5em 10px;
  color: var(--nav-link-1-color);
}

blockquote p {
  margin: 0;
}

blockquote strong {
  color: var(--strong-quote-color);
}

#search-icon,
#theme-icon {
  font-size: 20px;
  color: var(--nav-menu-color);
  cursor: pointer;
  margin-right: 20px;
  position: relative; /* Needed for the ::after element */
}

#search-icon::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 4px;
  background-color: var(--link-color);
  transition: width 0.3s ease-in-out, left 0.3s ease-in-out;
  transform: translateX(-50%);
}

#search-icon:hover::after {
  width: 20px;
  left: 50%;
}

pre {
  overflow-x: scroll;
  /* Style the scrollbar for WebKit browsers (Chrome, Safari) */
  -webkit-overflow-scrolling: touch; /* Optional: smooth scrolling on iOS */
}

pre::-webkit-scrollbar {
  width: 12px; /* Width of the scrollbar */
  height: 12px; /* Height of the scrollbar */
}

pre::-webkit-scrollbar-thumb {
  background-color: var(--link-color); /* Color of the scrollbar thumb */
  border-radius: 6px; /* Roundness of the scrollbar thumb */
  border: 3px solid var(--background-color); /* Padding around the scrollbar thumb */
}

pre::-webkit-scrollbar-track {
  background-color: var(--mantle-color); /* Color of the scrollbar track */
  border-radius: 6px; /* Roundness of the scrollbar track */
}

/* Style the scrollbar for Firefox */
pre {
  scrollbar-width: thin; /* Width of the scrollbar */
  scrollbar-color: var(--link-color) var(--mantle-color); /* Color of the scrollbar thumb and track */
}

#canvas-container {
  width: 100%;
  height: 70vh;
}

/* Logo animations */
/* Base styles for animation */
.navbar-brand svg {
  transition: transform 0.3s ease;
}

/* Whole logo hover effect */
.navbar-brand:hover svg,
.contact-logo:hover svg {
  transform: scale(1.05);
}

/* Star twinkling animation */
@keyframes twinkle-multicolor {
  0% {
    fill: var(--logo-yellow);
    filter: brightness(1);
  }
  33% {
    fill: var(--logo-blue);
    filter: brightness(1.2);
  }
  66% {
    fill: var(--logo-pink);
    filter: brightness(1.3);
  }
  100% {
    fill: var(--logo-yellow);
    filter: brightness(1);
  }
}

/* Moon glow animation */
@keyframes glow {
  0% {
    filter: drop-shadow(0 0 0px var(--logo-yellow));
  }
  50% {
    filter: drop-shadow(0 0 3px var(--logo-yellow));
  }
  100% {
    filter: drop-shadow(0 0 0px var(--logo-yellow));
  }
}

/* Antenna animation */

@keyframes antenna-color-change {
  0% {
    fill: var(--logo-red);
  }
  45% {
    fill: var(--logo-red);
  }
  50% {
    fill: var(--nav-link-2-color);
  } /* Green */
  95% {
    fill: var(--nav-link-2-color);
  }
  100% {
    fill: var(--logo-red);
  }
}

/* Apply animations on hover */
.navbar-brand:hover .star-1,
.contact-logo:hover .star-1 {
  animation: twinkle-multicolor 3s infinite;
  animation-delay: 0.1s;
}
.navbar-brand:hover .star-2,
.contact-logo:hover .star-2 {
  animation: twinkle-multicolor 3s infinite;
  animation-delay: 0.8s;
}
.navbar-brand:hover .star-3,
.contact-logo:hover .star-3 {
  animation: twinkle-multicolor 3s infinite;
  animation-delay: 1.5s;
}
.navbar-brand:hover .star-4,
.contact-logo:hover .star-4 {
  animation: twinkle-multicolor 3s infinite;
  animation-delay: 0.3s;
}
.navbar-brand:hover .star-,
.contact-logo:hover .star-5 {
  animation: twinkle-multicolor 3s infinite;
  animation-delay: 1.2s;
}
.navbar-brand:hover .star-,
.contact-logo:hover .star-6 {
  animation: twinkle-multicolor 3s infinite;
  animation-delay: 2.1s;
}

.navbar-brand:hover .moon,
.contact-logo:hover .moon {
  animation: glow 3s infinite;
}

.navbar-brand:hover .antena-ball,
.contact-logo:hover .antena-ball {
  animation: antenna-color-change 2s infinite, glow 2s infinite;
}

.contact-logo {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.contact-logo svg {
  width: 200px;
  height: 200px;
}

.social-icon {
  width: 16px;
  height: 16px;
  margin-right: 0.5rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
}

.contact-link a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 6px;
}


.social-icon {
  width: 20px;
  height: 20px;
}

/* Update contact page icon styles */
.contact-link .social-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.2s ease;
}

.contact-link a:hover .social-icon {
  transform: scale(1.1);
}

.search-icon {
  width: 22px;
  height: 22px;
  transition: transform 0.2s ease;
}

/* Add hover effect */
.search-icon:hover {
  transform: scale(1.1);
  cursor: pointer;
}

#theme-toggle {
  cursor: pointer;
  position: relative;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  margin-right: 20px;
}

.theme-icon {
  position: absolute;
  width: 20px;
  height: 20px;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  color: var(--nav-menu-color);
  fill: var(--nav-menu-color);
  transition: opacity 0.3s;
}

/* Active icon state */
.theme-icon.active-icon {
  opacity: 1;
  transform: scale(1);
}

/* Hover animations */
/* Sun rotation and pulsate */
#theme-toggle:hover #light-mode-icon.active-icon {
  animation: sun-hover 1.5s infinite alternate;
}

/* Moon pulsate only */
#theme-toggle:hover #dark-mode-icon.active-icon {
  animation: moon-hover 1s infinite alternate;
}

/* Sun animation: rotate and pulsate */
@keyframes sun-hover {
  0% { 
    transform: scale(1) rotate(0deg); 
  }
  100% { 
    transform: scale(1.1) rotate(30deg); 
  }
}

/* Moon animation: simple pulsate */
@keyframes moon-hover {
  0% { 
    transform: scale(1); 
  }
  100% { 
    transform: scale(1.1);
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

th, td {
  border: 1px solid currentColor; /* Border color matches text color */
  padding: 0.75rem;
  text-align: left;
}

th {
  background-color: var(--background-color); /* Adjust for your theme */
  font-weight: bold;
}

tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.05); /* Light shading for even rows */
}

tr:nth-child(odd) {
  background-color: transparent; /* No shading for odd rows */
}