* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
  background: transparent;
}

footer {
  display: flex;
  flex-direction: column;
  bottom: 0;
  width: 100%;
  text-align: center;
  padding: 1rem;
}

body {
  position: relative;
  background: #3d1091;
  background: linear-gradient(125deg, rgba(61, 16, 145, 1) 0%, rgba(255, 255, 255, 1) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  position: relative;
  width: 100%;
  padding: 1rem;
  gap: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  z-index: 1000;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
  width: 100%;

  nav {
    position: absolute;
    top: 1.5;
    left: 50%;
    width: calc(100% - 2rem);
    transform: translate(-50%, -100%);
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
    border: black 0.2rem solid;
    padding: 0.75rem 1.5rem;

    @media(max-width: 768px)  {
      flex-direction: column;
      gap: 0.75rem;
    }

    @media(max-width: 480px)  {
      width: calc(100% - 1rem);
    }

    a {
      color: #111;
      text-decoration: none;
      font-weight: 900;
      font-size: 0.95rem;
      letter-spacing: 0.015em;
      transition: color 0.25s ease;
      padding: 0.25rem 0.5rem;
      border-radius: 4px;

      &:hover,
      &:focus {
        color: #3d1091;
        text-decoration: none;
        text-decoration: underline;
      }
    }
  }

  &:hover,
  &:focus-within {
    nav {
      opacity: 1;
      pointer-events: auto;
      transform: translate(-50%, 0);
    }
  }
}

h1 {
  text-align: center;
  text-decoration: none;
  color: #3d1091;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.sub-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
} 

mark {
  color: #3d1091;
  font-style: oblique;
  background: transparent;
}

.glass-card {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 1.25rem;
  border: 0.25rem solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 0px 0px rgba(255, 255, 255, 0);
  padding: clamp(0.5rem, 2vw, 1rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid rgba(61, 16, 145, 0.2);
  border-radius: 1rem;
  overflow: hidden;

  caption {
    caption-side: top;
    font-style: italic;
    margin-bottom: 0.5rem;
    color: #3d1091;
    font-weight: 600;
  }

  thead {
    tr:first-child {
      th:first-child {
        border-top-left-radius: 1rem;
      }
      th:last-child {
        border-top-right-radius: 1rem;
      }
    }
  }

  tbody {
    tr:last-child {
      td:first-child {
        border-bottom-left-radius: 1rem;
      }
      td:last-child {
        border-bottom-right-radius: 1rem;
      }
    }
  }

  th,
  td {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(61, 16, 145, 0.2);
    text-align: left;
    vertical-align: top;
    
    @media(max-width: 480px) {
      padding: 0.5rem;
      font-size: 0.9rem;
    }
  }
  th {
    background: rgba(61, 16, 145, 0.05);
    font-weight: 700;
  }
  tr {
    &:nth-child(even) {
      background: rgba(255, 255, 255, 0.3);
    }
  }
  thead {
    th {
      background: rgba(61, 16, 145, 0.1);
      color: #3d1091;
    }
  }
}

.sub-flex {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1.5rem;
  width: 100%;
}

article {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  border-radius: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;

  &:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(61, 16, 145, 0.2);
  }
}

figure {
  margin-bottom: 1rem;
  text-align: center;
}

img {
  width: 100%;
  max-width: 180px;
  height: auto;
  border-radius: 50%;
  border: 3px solid rgba(61, 16, 145, 0.2);
}

a {
  color: #3d1091;
  text-decoration: none;
  &:hover {
    text-decoration: underline;
  }
}

.sub-row {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-items: center;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;

  @media(max-width: 768px) {
    flex-direction: column;
    text-align: center;
  }
}

form {
  width: 100%;
  padding: 1.5rem;
  text-wrap: balance;

  @media(max-width: 480px) {
    padding: 0rem;
    margin: 0rem auto;
  }

  fieldset {
    border: none;
    margin: 0 0 1.5rem;
    padding: 0;

    legend {
      font-weight: 600;
      font-size: 1rem;
      margin-bottom: 0.75rem;
      color: #111;

      h2 {
        font-weight: 700;
      }

      mark {
        background: transparent;
        color: #d32f2f;
      }
    }

    .form-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
      gap: 1rem;

      @media(max-width: 568px) {
        display: flex;
        flex-direction: column;
      }

      .form-field {
        display: flex;
        flex-direction: column;
      }

      label {
        font-weight: 500;
        margin-bottom: 0.25rem;
        mark {
          background: transparent;
          color: #d32f2f;
        }
      }

      input {
        padding: 0.25rem 0.5rem;
        border: 1.5px solid #ccc;
        border-radius: 6px;
        font-size: 0.9rem;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;

        &:focus {
          border-color: #3d1091;
          outline: none;
          box-shadow: 0 0 0 2px rgba(0, 119, 255, 0.15);
        }
      }

      .form-actions {
        grid-column: 1 / -1;
        display: flex;
        justify-content: center;

        button {
          padding: 0.6rem 1.5rem;
          background: #3d1091;
          color: #fff;
          border: none;
          border-radius: 6px;
          font-size: 1rem;
          font-weight: 600;
          cursor: pointer;
          transition: background 0.2s ease, transform 0.1s ease;

          &:hover {
            background: #3d1091;
          }

          &:active {
            transform: scale(0.98);
          }
        }
      }
    }

    meter,
    progress {
      display: block;
      width: 100%;
      height: 0.75rem;
      margin-top: 0.5rem;
      border-radius: 6px;
    }

    meter::-webkit-meter-bar,
    progress::-webkit-progress-bar {
      background: #eee;
      border-radius: 6px;
    }

    meter::-webkit-meter-optimum-value,
    progress::-webkit-progress-value {
      background: #3d1091;
      border-radius: 6px;
    }
  }
}


.flex-row {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-items: center;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  
  @media(max-width: 768px) {
    top: -4rem;
    flex-direction: column;
    margin-top: 5rem;
  }
}

details {
  margin-bottom: 1rem;
  
  summary {
    font-weight: 700;
    cursor: pointer;
    color: #3d1091;
  }
  
  p {
    margin: 0.5rem;
    padding: 0 0.5rem;
  }
}

iframe {
  max-width: 100%;
  height: auto;
  aspect-ratio: 3/2;

  @media(max-width: 768px) {
    aspect-ratio: 3/6;
  }
}

address {
  font-style: normal;
  line-height: 1.5;
  @media(max-width: 768px) {
    text-align: center;
  }
}

.hidden {
  display: none;
}

.personal-links {
  margin-top: 0.5rem;
}

.button-up {
  position: fixed;
  width: 2rem;
  bottom: 1rem;
  right: 1rem;
  stroke: #3d1091;
  z-index: 10000;
  border-color: rgba(61, 16, 255, 0.8);
}