/* ============================= */
/* GOOGLE FONT IMPORT            */
/* ============================= */
@import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap");

/* ============================= */
/* GLOBAL RESET & BASE STYLES    */
/* ============================= */
:root {
  /* Brand — Primary (#d54d1e) */
  --color-primary-50: oklch(94% 0.045 37.7);
  --color-primary-100: oklch(88% 0.07 37.7);
  --color-primary-200: oklch(80% 0.11 37.7);
  --color-primary-300: oklch(70% 0.15 37.7);
  --color-primary-400: oklch(65% 0.17 37.7);
  --color-primary-500: oklch(59.9% 0.18 37.7); /* base = #d54d1e */
  --color-primary-600: oklch(50% 0.17 37.7);
  --color-primary-700: oklch(40% 0.13 37.7);
  --color-primary-800: oklch(33% 0.1 37.7);
  --color-primary-900: oklch(27% 0.08 37.7);

  /* hover and active state */
  --color-primary-hover: oklch(70% 0.17 37.7);
  --color-primary-active: oklch(50% 0.17 37.7);

  /* Neutrals */
  --color-bg: oklch(96.36% 0.01792 197.198);
  --color-surface: oklch(98% 0.02 197);
  --color-border: oklch(85% 0.02 197);
  --color-text: oklch(25% 0.02 197);

  /* Feedback */
  --color-success: oklch(70% 0.12 150);
  --color-error: oklch(60% 0.14 25);
  --color-warning: oklch(80% 0.14 85);

  /* Text */
  --color-text-inverse: oklch(98% 0.02 197);
  --color-text-muted: oklch(80% 0.02 197);

  /* Buttons */
  --color-button-bg: var(--color-primary-500);
  --color-button-text: var(--color-text-inverse);
  --color-button-hover: var(--color-primary-hover);

  /* Borders & Dividers */
  --color-border-translucent: oklch(55% 0.02 197 / 0.25);
  --color-divider: oklch(90% 0.02 197 / 0.2);

  --color-focus-ring: oklch(70% 0.17 37.7);
}

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

body {
  font-family: "Quicksand", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  font-family: inherit;
  color: inherit;
}

/* ============================= */
/* REUSABLE UTILITY CLASSES      */
/* ============================= */
.box-shadow {
  border-radius: 2rem;
  padding: 0.4rem 1rem;
  box-shadow: inset 0 10px 20px 20px var(--color-divider);
}

.margin-top-mg {
  margin-top: 450px;
}

/* ============================= */
/* NAVIGATION                    */
/* ============================= */

.nav-links {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;

  background: var(--color-bg);
  min-height: 4rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  color: var(--color-primary-900);
}

.nav-link {
  font-weight: 500;
  letter-spacing: 1px;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  padding: 0.25rem 1.5rem;
  border-radius: 10rem;
  transition: all 0.3s ease-in-out;
}

.nav-link:hover,
.nav-link.active {
  border-bottom: 3px solid var(--color-primary-500);
}

/* ============================= */
/* HERO / MAIN SECTIONS          */
/* ============================= */
main {
  margin-top: 6rem;
}

.hero-section {
  background: var(--color-primary-500);
  height: 20rem;
  max-width: 95%;
  margin: 2rem auto;
  border-radius: 1rem;

  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 3px 3px 3px 3px var(--color-primary-200);
}

.hero-section-title {
  color: var(--color-primary-50);
  font-weight: 700;
  font-size: 3.5rem;
  text-shadow: 4px 4px rgba(0, 0, 0, 0.5);
}

.main-section {
  padding: 0.5rem 1rem;
}

/* ============================= */
/* PROFILE CONTAINER LAYOUT      */
/* ============================= */

.profile__container {
  padding-top: 2rem;
  max-width: 30rem;
  margin: 0 auto;
  background: var(--color-surface);
}

/* ============================= */
/* PROFILE AVATAR SECTION        */
/* ============================= */
.profile-avatar__container {
  position: relative;
  z-index: 1;
  background: var(--color-primary-500);
  width: 9.375rem;
  height: 9.375rem;
  margin: 0 auto -70px;
  border-radius: 100%;
  border: 5px solid var(--color-primary-500);
  overflow: hidden;
  box-shadow: 0 2px 4px var(--color-border-translucent);
}

.profile-user__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================= */
/* PROFILE USER DETAILS          */
/* ============================= */
.profile-user__details {
  position: relative;
  background: var(--color-primary-500);
  color: var(--color-text-inverse);
  padding: 6rem 1rem 1rem;
  border-radius: 4px 4px 0 0;
}

.profile-user__title-container {
  display: flex;
  justify-content: space-between;
}

.current-time {
  font-weight: 500;
  font-size: 0.75rem;
  padding-top: 10px;
}

/* ============================= */
/* BIO SECTION                   */
/* ============================= */

.more-text {
  display: none;
}

.button-more {
  border-bottom: 1px solid var(--color-text-inverse);
  border-radius: 2rem;
  font-size: 0.625rem;
  padding: 0.2rem 0.6rem;
  background: transparent;
  font-style: italic;
  color: var(--color-text-inverse);
  font-weight: 700;
  transition: all 0.2s ease;
  cursor: pointer;
}

.button-more:hover {
  box-shadow: inset 0 10px 20px 20px var(--color-divider);
}

/* ============================= */
/* SOCIAL LINKS SECTION          */
/* ============================= */

.profile-user__socials {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;

  font-size: 0.625rem;
}

.profile-user__social .animated-border-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: 2rem;
  overflow: hidden;
  background-color: var(--color-primary-900);
  color: var(--color-text-inverse);
  transition: transform 0.2s ease;
}

.profile-user__social .animated-border-box:hover {
  transform: translateY(-2px);
}

/* Link content */
.profile-user__social .animated-border-box a {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}

/* Glow animation */
.animated-border-box:before,
.animated-border-box-glow:before {
  content: "";
  z-index: -2;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 99999px;
  height: 99999px;
  transform: translate(-50%, -50%) rotate(0deg);
  background-image: conic-gradient(
    transparent,
    var(--color-primary-500),
    transparent 25%
  );
  animation: rotate 1.5s linear infinite;
}

.animated-border-box:after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 5px;
  top: 5px;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  background: var(--color-primary-800);
  border-radius: 10px;
}

@keyframes rotate {
  100% {
    transform: translate(-50%, -50%) rotate(1turn);
  }
}

.profile-user__social .animated-border-box-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  filter: blur(15px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Pause by default */
.profile-user__social .animated-border-box::before,
.profile-user__social .animated-border-box-glow::before {
  animation-play-state: paused;
  opacity: 0;
}

/* Activate glow */
.profile-user__social .animated-border-box:hover::before,
.profile-user__social
  .animated-border-box:hover
  .animated-border-box-glow::before {
  animation-play-state: running;
  opacity: 1;
}

.profile-user__social .animated-border-box:hover .animated-border-box-glow {
  opacity: 1;
}

/* ============================= */
/* HOBBIES & DISLIKES SECTION    */
/* ============================= */
.user-hobbies-dislikes-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 1rem 0 0 1rem;
}

.profile-user__others {
  padding: 1rem 0;
}

.profile-user__others-title {
  font-size: 1.3rem;
  padding-bottom: 0.5rem;
}

.profile-user__others-list {
  list-style: disc;
  list-style-position: inside;
}

/* ============================= */
/* FOOTER                        */
/* ============================= */
.footer {
  background: var(--color-primary-400);
  color: var(--color-primary-50);
  padding: 1rem;
  margin-top: 2rem;
  text-align: center;
}

/* ============================= */
/* ACCESSIBILITY / VISIBILITY    */
/* ============================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none;
}

/* ============================= */
/* RESPONSIVE DESIGN             */
/* ============================= */
@media (min-width: 48rem) {
  .profile__container {
    background: var(--color-primary-500);
    justify-content: start;
    align-items: center;
    max-width: 60rem;

    margin: 0 auto;
    border-radius: 5px;
    box-shadow: 4px 4px 1px 1px var(--color-border-translucent);
  }

  .profile-avatar__container {
    width: 26rem;
    height: 26rem;

    border-color: var(--color-focus-ring);

    margin-bottom: 2rem;
  }

  .profile-user__details {
    margin-top: 0;
    padding: 3rem 3rem 0.5rem;
    border-radius: unset;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .profile-user__socials {
    margin: 2rem 0;
  }
}

@media (min-width: 64rem) {
  body {
    background-color: var(--color-bg);
  }

  .main-section {
    padding: 0.5rem 2rem;
  }

  .profile__container {
    display: grid;
    grid-template-columns: 60fr 40fr;
    margin: 3rem auto;
    background: var(--color-primary-100);
    padding: unset;
    border-radius: 5px;
    overflow: hidden;
  }

  .profile-avatar__container {
    order: 2;
    width: 100%;
    height: 30rem;
    border: unset;
    padding: unset;
    border-radius: unset;
    margin-bottom: unset;
  }

  .profile-user__details {
    max-height: 30rem;
    height: 100%;
    overflow-y: auto;
    scrollbar-gutter: stable;

    scrollbar-width: thin;
    scrollbar-color: var(--color-primary-300) transparent;
  }

  .profile-user__details::-webkit-scrollbar {
    width: 0.5rem;
  }

  .profile-user__details::-webkit-scrollbar-thumb {
    background-color: var(--color-primary-300);
    border-radius: 1rem;
  }

  .profile-user__socials {
    margin: 1rem 0 0;
  }
}

/* ============================= */
/* ACCESSIBLE FOCUS STYLES       */
/* ============================= */
a,
button {
  outline: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, outline 0.2s ease;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 4px;
  border-radius: 10px;
  box-shadow: 0 0 0 4px var(--color-focus-ring);
  transform: scale(1.05);
}

.button-more:focus-visible {
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  border-color: var(--color-primary-50);
}

.profile-user__social .animated-border-box a:focus-visible {
  position: relative;
  z-index: 3;
}

a:hover,
button:hover {
  transform: scale(1.05);
}
