
/* ===== Base Styles ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --accent-color: #c064f5;
  --accent-light: #f6f5ff;
  --accent-hover: #ee72d1;
}

html {
  height: 100%; /* ensure HTML fills the viewport */
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
  background-color: white;
  color: black;
  padding: 1rem;
  line-height: 1.6;
  font-size: 1.4em; /* reasonable base font size */
  margin: 5px 5px 5px 5px;
}
 
header {
  /* min-height: 60px; */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: #f5f5f5;
}

main {
  flex-grow: 1;
  padding-bottom: 72px;
  padding-top: 72px;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  height: 100px;
}

.sticky {
  position: fixed;
  top: 0;
}



/* Accent text and links */
a {
  color: black;
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ===== Utility Grid Container ===== */
.grid {
  display: grid;
  gap: 1rem;
}

/* ===== Main Page: Profile Grid ===== */
.profile-grid {
  grid-template-columns: repeat(2, 1fr);
  margin: 5px 5px 5px 5px;
}



.profile-item {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid var(--accent-light);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.profile-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-item:hover img {
  transform: scale(1.05);
  filter: brightness(1.1) saturate(1.1);
  box-shadow: 0 0 10px rgba(0, 119, 204, 0.3);
  cursor: pointer;
}

/* ===== Profile Page: Header Grid ===== */
.profile-header {
  margin-top: 2rem;
  grid-template-columns: repeat(4, 1fr);
}


/* Profile Image Styling */
.profile-image {
  width: 95%;
  max-width: 95%;
  text-align: center;
  padding: 1rem 0;
}

/* profile image on profile page */
.profile-image img {
  width: 100%;
  min-width: 100px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--accent-color);
  display: flex;
  margin: 0 auto;
}
.profile-image-thumbnail img {
  max-width: 64px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--accent-color);
  display: block;
  margin: 0 auto;
}

/* Profile Info (spans 3 columns on desktop) */
.profile-info {
  grid-column: span 1;
}

/* Profile Header Items */
.profile-header-item {
  background-color: var(--accent-light);
  border-left: 4px solid var(--accent-color);
  padding: 1rem;
  border-radius: 0.5rem;
}

/* ===== Profile Page: Post Grid ===== */
.post-grid {
  margin-top: 2rem;
  grid-template-columns: repeat(1, 1fr);
}


.post-item {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid var(--accent-light);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.post-item img {
  border: 1px black;
  width: 75%;
  border-radius: 1rem;
  /* grid-column: span 1; */
  /* display: flex; */
  justify-content: center;
  height: auto;
  /* object-fit: cover; */
  display: block;
}

.post-item:hover img {
  transform: scale(1.05);
  filter: brightness(1.1) saturate(1.1);
  box-shadow: 0 0 10px rgba(0, 119, 204, 0.3);
  cursor: pointer;
}

form {
  padding-top: 25px;
}

/* ===== Button Row Styling ===== */
.button-row {
  display: flex;
  justify-content: stretch;
  gap: 1rem;
  margin: 1rem 0;
}

.button-row button,
.button-row .button-like,
.button-row input[type="submit"],
.button-row input[type="button"],
.button-row input[type="password"],
.button-row input[type="file"] {
  flex: 1;
  display: block;
}

/* Button-like links and form buttons */
button,
a.button-like,
input[type="submit"],
input[type="button"],
input[type="password"],
input[type="file"] {
  text-align: center;
  width: 100%;
  padding: 0.6rem 1rem;
  background-color: var(--accent-color);
  color: black;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 2.5rem;
  transition: background-color 0.3s ease, color 0.3s ease;
  text-decoration: none;
  max-width: 400px;
}


button:hover,
button:focus,
input[type="submit"]:hover,
input[type="submit"]:focus,
input[type="button"]:hover,
input[type="button"]:focus,
input[type="file"] {
  background-color: #bbb;
  border-color: #bbb;
  color: #000;
  outline: none;
}

input[type="text"],
input[type="password"],
input[type="url"],
textarea {
  max-width: 100%;
  flex: 1;
  text-align: left;
  margin: 0.5rem;
  padding: 0.6rem 1rem;
  background-color: var(--accent-light);
  color: black;
  border: none;
  border-radius: 0.5rem;
  font-size: 1.5rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}


/* ===== Footer Styling ===== */
.footer {
  margin-top: 0.5rem;
  padding: 0.4rem 0.4rem;
  background-color: #f5f5f5;
  border-top: 1px solid #ddd;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
  gap: 1rem;
  text-align: center;
}

.footer a {
  color: black;
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--accent-color);
}


/* tablet size */
@media (min-width: 600px) {

  .profile-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
}


/* desktop size */
@media (min-width: 900px) {

  body {
    font-size: 1.8em;
    padding-top: 72px;
    /* margin: 100px 100px 125px 125px; */
  }
  .profile-info {
    grid-column: span 3;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
  }

  .profile-image {
    grid-column: span 1;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .profile-image img {
    width: 80%;
    max-width: 200px;
    min-width: 100px;
  }

  .profile-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .post-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* stack the buttons on smaller screens */
@media (max-width: 500px) {
  .button-row {
    flex-direction: column;
  }
}
