/* RESET */

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

/* VARIABLES */

:root {
  /* UI COLORS */
  --color-primary: rgba(161, 95, 83, 0.9);
  --color-accent: rgb(140, 80, 70);
  /* BACKGROUND COLORS */
  --color-bg-header: rgba(175, 167, 107);
  --color-bg-filter: rgba(175, 167, 107, 0.5);
  --color-bg-hero: rgba(221, 193, 188, 0.7);
  --color-bg-text: rgba(221, 193, 188, 0.9);
  /* TEXT COLORS */
  --color-text-dark: rgb(70, 55, 50);
  --color-text-light: rgb(255, 255, 255);
  /* BORDER COLOR */
  --border-default: 1px solid black;
  --radius-default: 5px;
}

/* BASE */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Ensure at least viewport height */
  margin: 0;
  padding: 0.5rem;
  gap: 1rem; /* Spacing children (header and hero) */
  font-family:
    "Lucida Sans", "Lucida Sans Regular", "Lucida Grande",
    "Lucida Sans Unicode", Geneva, Verdana, sans-serif; /* Set default font */
  color: var(--color-text-dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-text-dark);
}

a {
  text-decoration: none; /* Never text decoration links */
  color: inherit; /* Always inherit text color links */
}

/* LAYOUT */

main {
  flex: 1; /* Take available space */
  display: flex;
  flex-direction: column;
  gap: 1rem; /* Spacing children */
}

/* HEADER */

header {
  padding: 2rem;
  background-color: var(--color-bg-header);
  border: var(--border-default);
  border-radius: var(--radius-default);
}

header a:hover {
  color: var(--color-accent);
}
.nav-info {
  display: flex;
  justify-content: space-between; /* Spacing items (icon and links) */
  align-items: center; /* Vertically center items (search) */
}

.nav-search {
  display: none; /* Hide search bar */
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

nav a[aria-current="page"] {
  font-weight: bold;
  color: var(--color-primary);
}

/* MAIN */

/*HERO SECTION */

.hero-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 40vh; /* Minimum height 40% of viewport */
  background-image: url(../img/Portfolio-hero-webdesign-beauty.webp);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: var(--border-default);
  border-radius: var(--radius-default);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%; /* Full width hero section */
  padding: 1rem;
  background-color: var(--color-bg-hero);
  color: var(--color-text-light);
}

.hero-content h1 {
  margin: 0; /* Reset default */
  color: var(--color-text-light);
}

/* HERO COMPONENTS */

.hero-cta {
  padding: 0.5rem 1rem;
  background-color: var(--color-primary);
  color: var(--color-text-light);
  border: var(--border-default);
  border-radius: var(--radius-default);
}

.hero-cta:hover {
  background-color: var(--color-accent);
}

/* ABOUT SECTION */

.about-section {
  padding: 1rem;
  border: var(--border-default);
  border-radius: var(--radius-default);
}

.about-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-image img {
  display: block; /* Block element - no inline gap */
  width: 100%; /* Fill container */
  height: auto; /* Keep proportions */
  border: var(--border-default);
  border-radius: var(--radius-default);
}

.about-text {
  display: flex;
  flex-direction: column;
  padding: 0 1rem 1rem 1rem;
  background-color: var(--color-bg-text);
  border: var(--border-default);
  border-radius: var(--radius-default);
}

/* ABOUT COMPONENTS */

.about-cta {
  align-self: flex-end;
  margin-top: 1rem; /* Space above button */
  padding: 0.5rem 2rem;
  background-color: var(--color-primary);
  color: var(--color-text-light);
  border: var(--border-default);
  border-radius: var(--radius-default);
}

.about-cta:hover {
  background-color: var(--color-accent);
}

/* PROJECTS SECTION */

.projects-preview h2,
.projects h2 {
  text-align: center;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center; /* Center each project */
  padding: 1rem;
  gap: 1rem;
  border: var(--border-default);
  border-radius: var(--radius-default);
}

.projects-page {
  display: flex;
  flex-direction: column;
}

/* PROJECTS COMPONENTS */

.project-card,
.projects-page-card {
  border: var(--border-default);
  border-radius: var(--radius-default);
  overflow: hidden;
}

.project-card {
  background-color: var(--color-primary);
  color: var(--color-text-light);
}

.project-card img,
.projects-page-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1; /* Square */
  object-fit: cover;
}

.project-card h3 {
  margin: 0;
  color: var(--color-text-light);
}
.project-card a {
  display: block; /* Fill entire text area */
  padding: 1rem; /* Spacing link */
  text-align: center;
}

.project-card a:hover {
  background-color: var(--color-accent);
}

.projects-page-card {
  background-color: var(--color-bg-text);
}

.projects-page-card h3 {
  text-align: center;
}

.projects-page-card p {
  padding: 0 1rem;
}

/* FILTERS */

.filters {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--color-bg-filter);
  border: var(--border-default);
  border-radius: var(--radius-default);
}

.filters h2 {
  margin-bottom: 0;
  font-size: 1.3rem; /* Smaller size h2 */
}

.filters ul {
  display: flex;
  padding: 0;
  gap: 1rem;
  list-style: none;
}

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

/* FORM */

.contact-section h3 {
  text-align: center;
}
.contact-form {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 1rem;
  background-color: var(--color-bg-filter);
  border: var(--border-default);
  border-radius: var(--radius-default);
}

.contact-info,
.project-info,
.contact-message {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border: var(--border-default);
  border-radius: var(--radius-default);
}

.project-info p {
  margin-top: 0; /* Same space as contact.info */
}

.project-radio,
.contact-consent {
  display: flex; /* Align lable and radio / checkbox */
  align-items: center; /* Align label and checkbox */
}

.contact-consent {
  gap: 0.3rem; /* Same gap as radio */
}

.consent-text {
  font-size: 0.7rem;
}

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

/* FORM COMPONENTS */

.contact-form button {
  max-width: 100px;
  padding: 0.5rem;
  background-color: var(--color-primary);
  color: var(--color-text-light);
  border: var(--border-default);
  border-radius: var(--radius-default);
}

.contact-form button:hover {
  background-color: var(--color-accent);
}

/* FOOTER */

footer {
  display: flex;
  justify-content: center;
  padding: 2rem;
  background-color: var(--color-bg-header);
  border: var(--border-default);
  border-radius: var(--radius-default);
}

.footer-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem; /* Spacing info */
}

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

/* MEDIA QUERIES */

@media (max-width: 400px) {
  .nav-links {
    gap: 1rem; /* Less spacing */
    font-size: 0.8rem; /* Small text */
  }
  .consent-text {
    font-size: 0.6rem;
  }
}

@media (min-width: 768px) {
  .lucide-chess-queen {
    width: 45px;
    height: 45px;
  }
  .nav-search {
    display: block; /* Show search bar */
  }
  .nav-search form {
    display: flex;
    align-items: center; /* Align label and input */
    gap: 0.5rem;
  }
  .about-container {
    flex-direction: row;
  }
  .about-image img {
    height: 100%;
    object-fit: cover; /* Keep proportions */
  }
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .filters ul {
    gap: 2rem;
  }
  .contact-section {
    width: 75%;
    margin: 0 auto; /* Center section */
    margin-bottom: 1rem;
  }
  .footer-info {
    flex-direction: row;
    justify-content: space-evenly;
    width: 100%;
  }
}

@media (min-width: 1024px) {
  .lucide-chess-queen {
    width: 55px;
    height: 55px;
  }
  .about-text {
    padding: 3rem;
  }
  .projects-page {
    flex-direction: row;
    gap: 1rem;
  }
  .filters {
    align-items: start;
    padding-top: 0.2rem; /* Align h2 with projects h2 */
    padding-left: 1rem;
  }
  .filters ul {
    flex-direction: column;
    width: max-content; /* Fit text in container */
    padding-right: 1rem;
    gap: 1rem; /* Less spacing */
  }
  .contact-section {
    width: 50%;
  }
}
