/*===============
  global styles
===============*/

* {
  padding: 0;
  margin: 0;
  border: 0;
  outline: 0;
  background-color: inherit;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  box-shadow: none;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.5;
  color: var(--clr-fg);
  background-color: var(--clr-bg);
}

.light {
  --clr-bg: #fff;
  --clr-bg-alt: #fff;
  --clr-fg: #555;
  --clr-fg-alt: #222;
  --clr-primary: #88c9d8;
  --shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
}

.dark {
  --clr-bg: #23283e;
  --clr-bg-alt: #2a2f4c;
  --clr-fg: #bdbddd;
  --clr-fg-alt: #cdcdff;
  --clr-primary: #90a0d9;
  --shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px,
    rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
}

::-moz-selection {
  background: var(--clr-primary);
  color: var(--clr-bg);
}

::-webkit-selection,
::selection {
  background: var(--clr-primary);
  color: var(--clr-bg);
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  color: var(--clr-fg-alt);
  text-align: center;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5em;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5em;
  font-weight: 500;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.3rem;
}

ul {
  list-style-type: none;
}

a {
  text-decoration: none;
}

button {
  cursor: pointer;
}

@media (max-width: 900px) {
  h1 {
    font-size: 2.6rem;
  }
}

/*===================
  buttons and links
===================*/

.link {
  color: var(--clr-primary);
  padding: 0 0 0.3em 0;
  position: relative;
}

.link:hover {
  color: var(--clr-primary);
}

.link::before {
  content: "";
  display: inline;
  width: 0%;
  height: 0.2em;
  position: absolute;
  bottom: 0;
  background-color: var(--clr-primary);
  transition: width 0.2s ease-in;
}

.link:hover::before,
.link:focus::before {
  width: 100%;
}

.link--nav {
  color: var(--clr-fg);
  text-transform: lowercase;
  font-weight: 500;
}

.link--icon {
  color: var(--clr-fg);
  font-size: 1.2rem;
}

.btn {
  display: block;
  padding: 0.8em 1.4em;
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: lowercase;
  transition: transform 0.2s ease-in-out;
}

.btn--pill {
  background-color: var(--clr-primary);
  color: #fff;
  border-radius: 50px;
  padding: 0.8em 2em;
  font-weight: 500;
  display: inline-block;
  text-transform: lowercase;
  border: none;
}

.btn--pill:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn--plain {
  text-transform: initial;
  background-color: var(--clr-bg-alt);
  box-shadow: rgba(0, 0, 0, 0.15) 0px 3px 3px 0px;
  border: 0;
}

.btn--plain:hover {
  transform: translateY(-4px);
}

.btn--icon {
  padding: 0;
  font-size: 1.2rem;
}

.btn--icon:hover,
.btn--icon:focus {
  color: var(--clr-primary);
}

.btn--icon:active {
  transform: translateY(-5px);
}

/*========
  layout
========*/

.center {
  display: flex;
  align-items: center;
}

.header {
  height: 8em;
  max-width: 1100px;
  width: 95%;
  margin: 0 auto;
  justify-content: space-between;
}

main {
  max-width: 1100px;
  width: 95%;
  margin: 0 auto;
}

.section {
  margin-top: 5em;
}

.section__title {
  text-align: center;
  margin-bottom: 1em;
  text-transform: uppercase;
}

.nav__list {
  margin-right: 1.5em;
  display: flex;
}

.nav__list-item {
  margin-left: 1.5em;
}

.nav__hamburger {
  display: none;
  width: 1em;
}

.about {
  flex-direction: column;
  margin-top: 2em;
  text-align: center;
}

.logo-container {
  margin-bottom: 2em;
}

.main-logo {
  height: 8em; /* Adjust based on logo needs */
  width: auto;
}

.hero-image-container {
  width: 100%;
  margin: 2em 0;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  max-height: 400px;
}

.about__desc {
  font-size: 1.1rem;
  max-width: 800px;
  margin: 1.5em auto;
  line-height: 1.6;
  color: #666;
}

.about__contact {
  margin-top: 2em;
}

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2em;
  margin-top: 4em;
}

.split-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.split-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  /* aspect-ratio: 16/9; Optional, helps consistency */
}

.image-stack {
  display: flex;
  flex-direction: column;
  gap: 1em; /* Adjust spacing between stacked images */
  width: 100%;
}

.projects__grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 2em;
}

.project {
  padding: 2em;
  text-align: center;
  background-color: #eee; /* Light grey background for cards */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  box-shadow: none;
}

.accent-line {
  width: 50px;
  height: 4px;
  background-color: var(--clr-primary);
  margin-top: 1em;
}

.uppercase {
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .split-grid {
    grid-template-columns: 1fr;
  }
  
  .projects__grid {
    grid-template-columns: 1fr;
  }
}

.contact {
  flex-direction: column;
}

.footer {
  padding: 3em 0;
  margin-top: 4em;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer .center {
    justify-content: center;
    margin-bottom: 1em;
}

.footer-icon {
    margin: 0 0.5em;
    font-size: 1.5rem;
}

.footer__link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--clr-fg);
}

.scroll-container {
  display: none;
  position: fixed;
  bottom: 1em;
  right: 2em;
  background-color: transparent;
  font-size: 1.8rem;
  transition: transform 0.2s ease-in-out;
}

@media (max-width: 600px) {
  .header {
    height: 6em;
  }

  .section {
    margin-top: 4em;
  }

  .nav__list {
    flex-direction: column;
    padding: 4em 0;
    position: absolute;
    right: 0;
    left: 0;
    top: 5em;
    background-color: var(--clr-bg);
    width: 0;
    overflow: hidden;
    transition: width 0.2s ease-in-out;
    z-index: 100;
  }

  .display-nav-list {
    width: 100%;
  }

  .nav__list-item {
    margin: 0.5em 0;
  }

  .nav__hamburger {
    display: flex;
    margin-left: 0.8em;
  }

  .about {
    align-items: flex-start;
    margin-top: 2em;
  }

  .footer {
    padding: 2em;
    margin-top: 3em;
  }

  .scroll-container {
    display: none;
  }
}