/**********************************/
/*          CSS Variables         */
/**********************************/

:root {
  /* Colors */

  --Primary-Color: #2c3639;
  --Secondary-Color: #3f4e4f;
  --Accent-Color: #a27b5c;
  --Header-Color: #dcd7c9;
  --Text-Color: #f5ecd5;

  /* Fonts */

  --Font-Header: 'Rubik', sans-serif;
  --Font-Text: 'Poppins', sans-serif;

  /*Font Sizing*/

  /* Spacing */

  --Spacing-0px: 0rem;
  --Spacing-8px: 0.5rem;
  --Spacing-12px: 12px;
  --Spacing-16px: 1rem;
  --Spacing-24px: 1.5rem;
  --Spacing-32px: 2rem;
}

/*************************************/
/*             CSS Reset             */
/*************************************/

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

/* Remove default list styles */
ol,
ul {
  list-style: none;
}

/* Ensure images are responsive and don't exceed their container */
img,
picture,
video,
canvas,
svg {
  max-width: 100%;
  display: block;
}

/* Remove default anchor styles */
a {
  color: inherit;
}

/* Reset buttons to avoid inconsistent styling */
button,
input,
select,
textarea {
  font: inherit;
  border: none;
  background: none;
  appearance: none;
}

/* Ensure form elements don't overflow */
input,
textarea {
  width: 100%;
}

/* Remove default table spacing */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none;
    transition: none;
  }
}

/* Set base font and line height */
html {
  font-size: 100%;
  line-height: 1.15;
  -webkit-text-size-adjust: 100%; /* Prevent iOS font scaling */
  scroll-behavior: smooth;
}

/* Remove default focus outlines for better accessibility control */
:focus {
  outline: none;
}

/* Ensure body takes up at least full viewport height */
body {
  min-height: 100vh;
  background-color: var(--Primary-Color);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/*************************************/
/*            Typography             */
/*************************************/

.text-preset-1 {
  font-family: var(--Font-Header);
  font-size: 28px; /* 32px */
  color: var(--Header-Color);
  font-weight: 500;
}

.text-preset-2 {
  font-family: var(--Font-Text);
  font-size: 16px;
  color: var(--Text-Color);
  font-weight: 400;
  line-height: 1.5;
}

.text-preset-3 {
  font-family: var(--Font-Header);
  font-size: 16px;
  font-weight: 500;
  color: var(--Header-Color);
}

.text-preset-4 {
  font-family: var(--Font-Text);
  font-size: 14px;
  color: var(--Text-Color);
  font-weight: 400;
}

.text-preset-5 {
  font-family: var(--Font-Header);
  font-size: 22px; /* 32px */
  color: var(--Header-Color);
  font-weight: 500;
}

.text-preset-6 {
  font-family: var(--Font-Text);
  font-size: 14px;
  color: var(--Text-Color);
  font-weight: 400;
  letter-spacing: 0.5px;
  line-height: 1.75;
}

/*************************************/
/*          General Styling          */
/*************************************/

.main-container,
.sections-container,
.desktop-container {
  padding: var(--Spacing-24px) var(--Spacing-16px);
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: var(--Spacing-24px);
}

/* Profile Card */
.profile-info-section,
.about-me-section,
.projects-section,
.blog-section {
  background-color: var(--Secondary-Color);
  border-radius: 10px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--Spacing-8px);
  padding: 0;
}

.contact-btn {
  padding: var(--Spacing-8px);
  align-self: flex-end;
  background-color: var(--Accent-Color);
  border-bottom-left-radius: 10px;
  border-top-right-radius: 10px;
  color: var(--Text-Color);
  font-family: var(--Font-Text);
  font-size: 12px;
}

.contact-btn:hover {
  cursor: pointer;
}

.profile-info-container {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  padding: var(--Spacing-16px);
}

.profile-image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 5px solid var(--Accent-Color);
}

.header-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.decoration-container {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--Accent-Color);
  border-radius: 8px;
  padding: var(--Spacing-8px);
}

.contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out;
}

.contact-info-active {
  max-height: 500px; /* Adjust based on content */
  transition: max-height 0.8s ease-in-out;
}

.contact-divider {
  width: 90%;
  height: 3px;
  background-color: var(--Primary-Color);
  border: none;
}

.contact-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: var(--Spacing-16px) var(--Spacing-32px);
  gap: var(--Spacing-24px);
}

.contact-type-container {
  display: flex;
  gap: var(--Spacing-16px);
  align-items: center;
}

.contact-info-type {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--Spacing-8px);
}

.email-icon {
  height: 24px;
  width: 28px;
}

.location-icon {
  height: 24px;
  width: 24px;
}

.socials-container {
  display: flex;
  padding: var(--Spacing-16px) var(--Spacing-32px);
  gap: var(--Spacing-8px);
}

.visually-hidden {
  display: none;
}

/* navigation */
.navigation {
  background-color: var(--Secondary-Color);
  border-radius: 10px;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: var(--Spacing-8px);
  gap: var(--Spacing-8px);
}

.nav-button {
  padding: var(--Spacing-12px) var(--Spacing-24px);
  background-color: var(--Primary-Color);
  border-radius: 10px;
}

.nav-button:hover {
  cursor: pointer;
}

.active {
  background-color: var(--Accent-Color);
}

/* About Me Section */
.about-me-section,
.projects-section,
.blog-section {
  padding: var(--Spacing-32px) var(--Spacing-24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--Spacing-16px);
}

.divider {
  width: 100%;
  height: 3px;
  background-color: var(--Primary-Color);
  border: none;
}

.about-text-container {
  display: flex;
  flex-direction: column;
  gap: var(--Spacing-16px);
}

/* Projects Section */

.project-image {
  border-radius: 20px;
}

.project-title {
  justify-self: center;
}

.project-description {
  display: flex;
  flex-direction: column;
  gap: var(--Spacing-16px);
  justify-content: center;
  align-items: center;
  margin: var(--Spacing-32px) 0;
}

.project-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.stack-icon {
  height: 25px;
  width: 25px;
}

.hidden {
  display: none;
}

/* Blog Section */

.building {
  display: flex;
  align-items: center;
  margin-top: var(--Spacing-32px);
  font-family: var(--Font-Header);
  font-size: 28px;
  color: var(--Header-Color);
}

/*  Footer */

.footer-section {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--Accent-Color);
  padding: var(--Spacing-24px);
}

/*************************************/
/*           Media Queries           */
/*************************************/
@media (max-width: 321px) {
  .main-container {
    padding: var(--Spacing-24px) 0 !important;
  }

  .sections-container {
    padding: 0 !important;
  }
}

@media (max-width: 376px) {
  .sections-container {
    padding: 0 !important;
  }
}

@media (max-width: 500px) {
  .desktop-container {
    padding: 0 !important;
  }
}

@media (min-width: 768px) {
  .profile-info-section {
    padding-top: var(--Spacing-32px);
    justify-content: center;
  }

  .desktop-container {
    padding: 0;
  }

  .contact-btn {
    display: none;
  }

  .profile-image {
    width: 150px;
    height: 150px;
  }

  .header-info {
    margin-top: var(--Spacing-24px);
    gap: var(--Spacing-16px);
  }

  .contact-info {
    max-height: 500px; /* Adjust based on content */
  }
}

@media (min-width: 1024px) {
  .sections-container {
    flex-direction: row;
    justify-content: space-between; /* Space out sections */
    align-items: flex-start; /* Align items to the top */
    min-height: 100vh; /* Ensure container takes full viewport height */
  }

  .profile-info-section {
    position: sticky; /* Make the profile section stick */
    top: var(--Spacing-24px); /* Stick to the top with some spacing */
    min-width: 30%; /* Set a fixed width for the profile section */
    max-width: 350px; /* Optional: cap the maximum width */
    height: auto; /* Allow height to adjust based on content */
    flex-shrink: 0; /* Prevent the profile section from shrinking */
  }

  .desktop-container {
    flex-grow: 1; /* Allow the right side to take remaining space */
    width: 65%; /* Adjust width to fit beside profile section */

    padding-top: 0;
  }

  /* Ensure the body allows scrolling */
  body {
    overflow-y: auto; /* Enable vertical scrolling */
  }

  .profile-info-container {
    flex-direction: column;
    align-items: center;
  }

  .profile-image {
    width: 200px;
    height: 200px;
  }

  .about-me-section,
  .projects-section,
  .blog-section {
    padding: 48px 64px;
    gap: var(--Spacing-32px);
  }

  .project-title {
    margin-top: var(--Spacing-24px);
  }

  .project-stack {
    margin: var(--Spacing-12px) 0;
  }

  .text-preset-1 {
    font-size: 36px;
  }

  .text-preset-2 {
    font-size: 20px;
  }

  .text-preset-5 {
    font-size: 32px;
  }

  .text-preset-3 {
    font-size: 24px;
  }

  .text-preset-6 {
    font-size: 17px;
  }
}

@media (min-width: 1440px) {
  .project-image {
    max-width: 780px;
  }
}
