html, body {
  margin: 0;
  padding: 0;
  line-height: 1.4;
}

body {
  background: linear-gradient(
    135deg,
    #f9f6f1 0%,
    #ede7e1 40%,
    #dcd3c9 100%
  );
}

.header {
  margin: 0;
  padding: 0;
  background-color: #b0a695; /* taupe */
}

.nav {
  margin: 0;
  padding: 1rem;
  display: flex;
  justify-content: space-evenly;
}

ul {
  margin: 0;
  padding: 0.75rem;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
}

/* Font Classes */
.ubuntu-light { font-family: "Ubuntu", sans-serif; font-weight: 300; }
.ubuntu-regular { font-family: "Ubuntu", sans-serif; font-weight: 400; }
.ubuntu-medium { font-family: "Ubuntu", sans-serif; font-weight: 500; }
.ubuntu-bold { font-family: "Ubuntu", sans-serif; font-weight: 700; }
.ubuntu-light-italic { font-family: "Ubuntu", sans-serif; font-weight: 300; font-style: italic; }
.ubuntu-regular-italic { font-family: "Ubuntu", sans-serif; font-weight: 400; font-style: italic; }
.ubuntu-medium-italic { font-family: "Ubuntu", sans-serif; font-weight: 500; font-style: italic; }
.ubuntu-bold-italic { font-family: "Ubuntu", sans-serif; font-weight: 700; font-style: italic; }

h1, h2, h3, p, a, li {
  font-family: "Ubuntu", sans-serif;
}

body, header {
  margin: 0;
  padding: 0;
}

.container {
  padding-left: 2rem;
  padding-right: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Colours */
.taupe { color: #a89f91; }
.bg-taupe { background-color: #a89f91; }
.ivory-white { color: #f9f6f1; }
.cbrown { color: #5c504b; }
.sand { color: #ede7e1; }
.bg-sand { background-color: #ede7e1; }
.mwalnut { color: #7b6e63; }

/* Main Styles */
a { color: #000; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.justify-space-around { justify-content: space-around; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.list-none { list-style: none; }

#skills ul {
  flex-wrap: wrap; /* ✨ allows items to move to next line */
}

#contact {
  padding: 2rem 0;
}


/* GRID — ✨ CHANGED to prevent layout breaking */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); /* ✨ CHANGED: wider min to prevent squashing */
  gap: 5rem;
  align-items: start;
}

/* Spacing */
.pd-2 { padding: 2rem; }
.pd-5 { padding: 5rem; }
.gap-2 { gap: 2rem; }

/* Buttons */
.btn {
  background-color: #b0a695;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 5px;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: background-color 0.2s ease;
  text-decoration: none;
  white-space: nowrap; /* ✨ ADDED: prevents button text wrapping */
}

.btn:hover {
  background-color: #998c7f;
}

/* Borders */
.border-top {
  border-top: 1px solid #7b6e63;
}

/* Cards */

/* CARDS — ✨ FIXED: restore original full-width behaviour */
.card {
  background-color: #f7f3ee;
  border: 1px solid rgba(0,0,0,0.05);
  border-top: 2px solid #b0a695;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  transition: transform 0.2s ease;

  width: 100%;          /* ✨ ADDED: card fills grid column */
  max-width: none;      /* ✨ CHANGED: removes forced narrow width */
  margin: 0;            /* ✨ CHANGED: prevents centering issues */
}

/* PROJECT CARD — ✨ NEW: only this card gets a max-width */
.project-card {
  max-width: 600px;     /* ✨ ADDED */
  margin: 0 auto;       /* ✨ ADDED */
}

/* BUTTON — ✨ FIXED: prevent wrapping */
.btn {
  white-space: nowrap;  /* ✨ ADDED */
}


.card h3 {
  color: #5c504b;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.card:hover {
  transform: translateY(-3px);
}

.card--head {
  border-bottom: 2px solid rgba(168, 159, 145, 1);
  padding-bottom: 0.75rem;
  padding: 1rem 0;
}

.card--content {
  padding: 1rem 0;
}

/* Media Queries (Responsive) */
@media (max-width: 700px) {
  .container {
    padding-left: 1rem; /* ✨ ADDED */
    padding-right: 1rem; /* ✨ ADDED */
  }
}


@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .card,
  .project-card {
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
  }

  .btn {
    white-space: normal;      /* allow wrapping on small screens */
    display: inline-block;
    text-align: center;
  }
}
