/*--------------------------------------------------------------
  >>> General Variables and Style Options
--------------------------------------------------------------*/
:root {
  --color-primary: #22d3ee;
  --color-background: #0f172a;
  --accent : var(--color-primary);
  /* gray tones */
  --color-surface:  #1e293b;
  
  --color-border:    rgba(255,255,255,0.20);

  --color-border-hover: color-mix(in srgb, var(--color-primary) 75%, transparent);
  
  /* color-mix(in srgb, rgba(34, 211, 238, 0.75), 75%, transparant); */

  --color-gray-700: #374151;
  --color-gray-600: #4b5563; /* text-3 */
  --color-gray-400: #9ca3af; /* text-2 */
  --color-gray-300: #d1d5db;
  --color-text-base: white;

  --font-sans: 'Inter', sans-serif;
  --header-height: 70px;
  --main-content-wrapper-padding: 25px;

  --transition: all 0.4s cubic-bezier(0.23, 1, 0.23, 1);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --color-background: #f6f8fa;
  --color-surface:   #ffffff;

  --color-border:       rgba(0,0,0,0.07);
  --color-border-hover: rgba(0,0,0,0.2);

}

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


body {
  font-family: var(--font-sans);
  background-color: var(--color-background);
  color: var(--color-text-base);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background-attachment: fixed;
  background-image: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><defs><style type="text/css">.st0{fill:none;stroke:%2322d3ee;stroke-width:0.5;stroke-opacity:.05;}</style></defs><g><line class="st0" x1="0" y1="0" x2="100" y2="100"/><line class="st0" x1="0" y1="100" x2="100" y2="0"/><line class="st0" x1="50" y1="0" x2="50" y2="100"/><line class="st0" x1="0" y1="50" x2="100" y2="50"/><circle class="st0" cx="10" cy="10" r="1"/><circle class="st0" cx="90" cy="90" r="1"/><circle class="st0" cx="10" cy="90" r="1"/><circle class="st0" cx="90" cy="10" r="1"/><circle class="st0" cx="50" cy="50" r="1"/></g></svg>');
  background-size: 100px 100px;
  --mouse-x: 50%;
  --mouse-y: 50%;

  &::-webkit-scrollbar {
    display: none;                /* Chrome, Safari, Opera */
  }

}

     
body::before {
  content: '';
  position: fixed; 
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  
  background: radial-gradient(
      circle 250px at var(--mouse-x) var(--mouse-y), 
      rgba(34, 211, 238, 0.2), 
      rgba(34, 211, 238, 0.05) 60%,
      transparent 100% 
  );

  opacity: .5; 
  transition: background 0.1s linear; 
}

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

  i {
    width: 1.25rem; 
    height: 1.25rem;
  }
}

.container {
  max-width: 1280px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;

  @media (min-width: 640px) {
    padding-left: 24px;
    padding-right: 24px;
  }

  @media (min-width: 1024px) {
    padding-left: 32px;
    padding-right: 32px;
  }
}


#main-content-wrapper {
  padding: var(--main-content-wrapper-padding);
  flex : 1;
}


/*--------------------------------------------------------------
  >>> Navigation Bar / Header 
--------------------------------------------------------------*/

header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background-color: #0f172aba;
  backdrop-filter: blur(20px) ;
  border-bottom: 1px solid rgba(6, 182, 212, 0.2);
  display: flex;
  align-items: center;
  padding: 0 5%;
}

.nav-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
  justify-self: end;
  height: 30px;
}

.nav-content {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
}

.nav-logo {
  justify-self: start;
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  text-decoration: none;
  letter-spacing: -0.05em;
}

.nav-logo-primary {
  color: var(--color-primary);
}

.nav-link-group {
  display: flex;
  gap: 24px;
  justify-self: center;
  
  a {
    color: var(--color-gray-300);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 5px 0;
    
    &::after {
      content: '';
      position: absolute;
      bottom: -2px;
      left: 0;
      width: 0;
      height: 2px;
      background: var(--color-primary);
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    &:hover, &.active{
      color: var(--color-primary);

      &::after{
        width: 100%;
      }
    }
  }
}

.theme-btn {
  width: 30px; 
  height: 100%; 
  border-radius: 8px;
  border: 1px solid var(--color-border); 
  background: var(--color-surface);
  display: flex; 
  align-items: center; 
  justify-content: center;
  color: var(--color-gray-400); 
  transition: color 0.25s, border-color 0.25s, background 0.25s, transform 0.25s;

  &:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    transform: rotate(18deg) scale(1.08);
    cursor: pointer; 
  }

  &:active {
    transform: rotate(18deg) scale(0.94);
  }
}

.lang-control {
  position: relative; 

  &.open {
    .lang-dropdown { 
      border-top-right-radius: 0px;
      border-top: transparent;
      opacity: 1; 
      transform: none; 
      pointer-events: all; 
    }

    .lang-trigger {
      border-bottom-right-radius: 0px;
      border-bottom-left-radius: 0px;
      border-bottom: transparent;
      border-color: var(--color-primary); 
     color: var(--color-text-base); 

      .caret {
        transform: rotate(180deg); 
        color: var(--color-text-base); 
      }
    }
  }
}

.lang-trigger {
  display: flex; 
  align-items: center; 
  gap: 10px;
  padding: 6px 9px; 
  border-radius: 8px;
  border: 1px solid var(--color-border); 
  background: var(--color-surface);
  color: var(--color-gray-400); 
  font-size: 0.78rem; 
  transition: color 0.25s, border-color 0.25s, transform 0.2s;

  .flag { 
    font-size: 1.05rem; 
    line-height: 1; 
  }

  .caret { 
    font-size: .75rem; 
    color: var(--color-gray-600); 
    transition: transform 0.25s ease; 
  }

  &:hover {
    color: var(--color-text-base); 
    border-color: var(--color-border-hover); 
    transform: translateY(-1px); 
  }
}

.lang-dropdown {
  position: absolute; 
  right: 0;
  background: var(--color-surface); 
  border: 1px solid var(--color-border-hover);
  border-radius: 10px; 
  padding: 0.3rem; 
  min-width: 128px;
  box-shadow: 0 8px 32px rgba(34, 211, 238, 0.07); 
  opacity: 0;
  transform: translateY(-5px) scale(0.97); 
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.25s var(--ease); 
  z-index: 200;
}


.lang-option {
  display: flex; 
  align-items: center; 
  gap: 8px;
  width: 100%;
  padding: 0.45rem 0.6rem; 
  border-radius: 7px;
  font-size: 0.8rem; 
  color: var(--color-gray-400); 
  transition: color 0.2s, background 0.2s;

  &.active {
    color: var(--color-primary);

    .check {
      opacity: 1;
    }
  }

  .check {
    color: var(--color-primary); 
    font-size: 0.7rem; 
    margin-left: auto; 
    opacity: 0; 
    transition: opacity 0.2s;
  }

  &.flag {
    color: var(--color-primary);
  }

  &:hover {
    color: var(--color-text-base); 
    background: var(--color-border);
  }
}

/*--------------------------------------------------------------
  >>> Footer / Copyright
--------------------------------------------------------------*/
.footer {
  width: 100%;
  background-color: var(--color-background);
  border-top: 1px solid rgba(6, 182, 212, 0.2);
  color: var(--color-gray-400);
  padding: 15px 0;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  
  @media (min-width: 768px) {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-indicator {
  width: 8px;
  height: 8px;
  background-color: var(--color-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);}
  50% { opacity: 0.4; box-shadow: 0 0 2px rgba(6, 182, 212, 0.2);}
  100% { opacity: 1; box-shadow: 0 0 8px rgba(6, 182, 212, 0.6);}
}

.footer-logo {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.05em;

  span {
    color: var(--color-primary)
  }
}

.footer-subtitle {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.6;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
}

.footer-link {
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-gray-400);
  text-decoration: none;
  font-size: 14px;

  i {
    transition: all 0.2s ease;
  }

  &:hover {
    i {
      transform: translateY(-2px);
    }
    color: var(--color-primary);
  }
}

.footer-legal {
  font-size: 11px;
  opacity: 0.4;
  text-align: center;

  @media (min-width: 768px) {
    text-align: right;
  }
}


/*--------------------------------------------------------------
  >>> Generic Button Style
--------------------------------------------------------------*/


/* Generic button style */
.btn {
  padding: 9px 16px;
  border-radius: 10px;

  /*  In case we want to add an an icon next to the text */
  display: inline-flex; 
  align-items: center; 
  gap: 10px;

  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-base);

  transition: all 0.25s var(--ease);
  cursor: pointer;

  &:hover {
    color: var(--color-text-base);
    /* in the base, --accent is color-primary */
    border: 1px solid var(--accent);
    background: color-mix(in srgb, var(--accent) 17%, transparent);

    transform: translateY(-2px);
  }
}

/*--------------------------------------------------------------
  >>> Small-screen layout
--------------------------------------------------------------*/
@media (max-width: 767px) {
  :root {
    --header-height: 64px;
    --main-content-wrapper-padding: 16px;
  }

  body {
    overflow-x: hidden;
  }

  header {
    padding: 0 12px;
  }

  .container,
  #main-content-wrapper {
    padding-left: 16px;
    padding-right: 16px;
  }

  #main-content-wrapper {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .nav-content {
    display: flex;
    flex-direction: row;
    padding: 3px;
    justify-content: space-between;
    align-items: center;
  }

  .nav-logo {
    font-size: 1.15rem;
    white-space: nowrap;
  }

  .nav-link-group {
    gap: 12px;
    justify-self: end;
  }

  .nav-link-group a {
    font-size: 0.82rem;
  }

  .nav-actions {
    gap: 8px;
  }

  .lang-trigger {
    gap: 5px;
    padding: 6px 7px;
  }

  .footer-content {
    padding-left: 16px;
    padding-right: 16px;
    gap: 16px;
    text-align: center;
  }

  .footer-logo-wrapper {
    justify-content: center;
  }

  .footer-links {
    gap: 18px;
  }

  .btn {
    justify-content: center;
    min-height: 44px;
  }
}

@media (max-width: 380px) {

  .nav-logo {
    font-size: 1rem;
  }

  .nav-link-group {
    gap: 8px;
  }

  .nav-link-group a {
    font-size: 0.75rem;
  }

  .lang-code {
    display: none;
  }
}