* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-white: #fff;
  --color-offwhite: #f6faf2;
  --color-brown: #37631e;
}

a {
  text-decoration-color: var(--color-brown);
  color: var(--color-brown);
}

body {
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;
}

aside {
  display: flex; 
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background:var(--color-white);
  width: 25%;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
}

nav {
  width: 100%;
}

nav svg {
  display: block;
  margin: 50px auto 40px auto;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  flex-direction: column;
  margin-top: 30px;
  gap: 22px;
}

nav ul li {
  font-size: 1.2rem;
  font-weight: 600;
  position: relative;
  width: 100%;
  text-align: center;
}

nav ul li a {
  text-decoration: none;
  color: var(--color-brown);
  font-family: "PT Serif";
  font-weight: 400;
  font-size: 22px;
}

nav ul li a.active {
  text-decoration: underline;
}

nav ul li a.active::after {
  content: "";
  display: block; 
  position: absolute;
  bottom: calc(50% - 10px);
  right: -1px;
  width: 20px;
  height: 20px;
  background-color: var(--color-offwhite);
  clip-path: polygon(0% 50%, 0% 50%, 100% 0%, 100% 100%);
}

nav ul li a:hover {
  text-decoration: underline;
}

.contact-info {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 20px;
  font-family: "PT Serif";
  font-weight: 400;
  font-size: 14px;
  line-height: 1.42857143;
  color: var(--color-brown);
  margin-bottom: 50px;
}

.contact-info p {
  text-align: center;
}

main {
  margin-left: 25%;
  background-color: var(--color-offwhite);
  min-height: 100vh;
  height: 100%;
}

main h1 {
  font-family: "PT Serif";
  font-weight: 400;
  font-size: 52px;
  color: var(--color-brown);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-brown);
  margin-bottom: 40px;
}

main h2 {
  font-family: "PT Serif";
  font-weight: 400;
  font-size: 24px;
  color: var(--color-brown);
  margin-bottom: 20px;

}

main h3 {
  font-family: "PT Serif";
  font-weight: 400;
  font-size: 24px;
  color: var(--color-brown);
  margin-bottom: 10px;
}

main p {
  font-weight: 400;
  font-size: 14px;
  color: var(--color-brown);
  margin-bottom: 20px;
  font-family: "Open Sans";
}

#carousel {
  padding: 50px 150px;
}

#carousel .carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 300px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.493), transparent);
  z-index: 9;
}

#carousel h1 {
  font-family: "PT Serif";
  font-weight: 400;
  font-size: 52px;
  color: var(--color-white);
  margin-bottom: 20px;
  z-index: 10;
  display: block;
  position: relative;
  border-bottom: 1px solid var(--color-white);
}

.required-note {
  font-size: 14px;
  color: var(--color-brown);
  margin-bottom: 10px;
}

.inner-image {
  width: 100%;
  height:250px;
  object-fit: cover;
  margin: 20px 0;
}

.container {
  padding: 50px 160px;
}

/* Contact page */
.contact-section {
  display: flex;
  align-items: start;
  flex-direction: column;
  gap: 60px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 50%;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(115,54,35,0.2);
  background: var(--color-white);
  color: var(--color-brown);
  font-family: "Open Sans";
  font-size: 14px;
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.btn-contact {
  align-self: flex-start;
  background: #86c440;
  color: var(--color-white);
  border: none; 
  padding: 10px 18px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.contact-details {
  display: flex;
  width: 100%;
  gap: 150px;
}

.contact-col .contact-label {
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-top: 10px;
}

.contact-col .contact-line {
  margin-bottom: 10px;
}

.contact-email {
  color: #86c440;
  text-decoration: none;
}

@media (max-width: 1024px) {
  .contact-section {
    grid-template-columns: 1fr;
  }
  .contact-details {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .contact-details {
    grid-template-columns: 1fr;
  }
}

.portfolio-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 30px;
}

.portfolio-image-container p {
  font-size: 14px;
  color: var(--color-brown);
  font-family: "Open Sans";
  font-weight: 400;
  margin-top: 10px;
}

.portfolio-image {
  min-width: 28%;
  height: 250px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}


.portfolio-image:hover {
  opacity: 0.8;
}

#carousel {
  width: 100%;
  height: 100vh;
  position: relative;
}

.carousel-container .item {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.carousel-container .item.active {
  opacity: 1;
}

.carousel-prev, .carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1000;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--color-white);
  font-size: 24px;
  font-weight: bold;
  transition: background 0.3s ease;
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.486);
  backdrop-filter: blur(1px);
  border: 2px solid rgba(255, 255, 255, 0.877);
}

.carousel-prev i, .carousel-next i {
  font-size: 16px;
}

.carousel-prev {
  left: 80px;
}

.carousel-next {
  right: 80px;
}

/* Carousel dots */
.carousel-dots {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 1000;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--color-white);
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.carousel-dot.active {
  background: var(--color-white);
}


/* Mobile slide-down menu */
.mobile-menu, .mobile-navigation {
  display: none;
}


@media (max-width: 1024px) {
  nav a svg {
    width: 85%;
  }

  nav ul {
    margin-top: 0;
  }

  .portfolio-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 1024px) {
  .container {
    padding: 40px 80px;
  }

  main h1 {
    font-size: 44px;
  }

  /* Contact */
  .contact-section {
    gap: 40px;
  }

  .contact-form {
    width: 70%;
  }

  .contact-details {
    gap: 40px;
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  aside {
    display: absolute; 
    z-index: 1000;
    background:var(--color-white);
    width: 100%;
    height: 60px;
    position: fixed;
    left: 0;
    top: 0;
  }

  main {
    margin-left: 0;
    margin-top: 60px;
    min-height: calc(100vh - 60px);
  }

  #carousel {
    height: calc(100vh - 60px);
  }

  nav {
    width: 100%;
    height: 60px;
    position: relative;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
  }

  nav button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--color-brown);
  }

  .carousel-prev {
    left: 20px;
  }

  .carousel-next {
    right: 20px;
  }

  nav a {
    display: inline-block;
  }

  nav ul {
    display: none;
  }

  .contact-info {
    display: none;
  }

  nav a svg {
    width: 150px;
    margin: 0;
  }

  .mobile-navigation {
    display: block;
  }

  .portfolio-container {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
  }

  .mobile-menu {
    display: block;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
    width: 100%;
    background: var(--color-white);
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 1001;
    border-top: 1px solid rgba(115, 54, 35, 0.15);
    box-shadow: 0 10px 14px rgba(0, 0, 0, 0.1);
  }

  .mobile-menu.open {
    max-height: 260px;
  }

  .mobile-menu a {
    display: block;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--color-brown);
    font-family: "PT Serif";
    font-size: 18px;
    text-align: center;
  }

  /* Page content spacing on mobile */
  .container {
    padding: 24px 16px;
  }

  main h1 {
    font-size: 36px;
    margin-bottom: 24px;
    padding-bottom: 12px;
  }

  /* Demo project carousel spacing on mobile */
  #carousel {
    padding: 20px 16px;
  }
  #carousel .carousel-overlay {
    height: 200px;
  }
  .carousel-dots {
    bottom: 16px;
  }

  /* Contact layout on mobile */
  .contact-section {
    gap: 24px;
  }
  .contact-form {
    width: 100%;
  }
  .contact-details {
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  main h1 {
    font-size: 30px;
  }
  .inner-image {
    height: 200px;
  }
}


