/* Algemene instellingen */
html {
  box-sizing: border-box;
  font-size: 20px; /* 1rem = 20px */
}

*,
*::before,
*::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

/* --- hamburger icon --- */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: #f0f0f0;
  font-size: 1.5rem;
  cursor: pointer;
}

/* --- body --- */
body {
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #1a1a1a;
  color: #f0f0f0;
  line-height: 1.6;

  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto 1fr auto;

  grid-template-areas:
    "header header"
    "links rechts"
    "footer footer";
}

/* --- Algemene stijlen --- */
a {
  color: #4db6ac;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #d83933;
}

h1,
h2,
h3 {
  color: #f0f0f0;
}

h3 {
  margin-top: 1rem;
}

header {
  grid-area: header;
  background-color: #252525;
  padding: 0.5rem 2rem;
  border-bottom: 0.1rem solid #d83933;

  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: auto;
  margin: 0 auto;
}

nav h1 a {
  color: #f0f0f0;
  font-size: 1.75rem;
  font-weight: bold;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1rem;
}

nav ul li a {
  color: #aaaaaa;
  padding: 0.25rem 0.5rem;
}

nav ul li a:hover {
  color: #4db6ac;
  background-color: #3a3a3a;
  border-radius: 0.25rem;
}

.active-link {
  color: #4db6ac;
  font-weight: bold;
}

article ul {
  margin-top: 1rem;
}

/* --- main --- */
main {
  grid-area: links;
  padding: 2rem;
  background-color: #202020;
  border-left: 0.25rem solid #4db6ac;
  box-shadow: 0 0 0.75rem rgba(0, 0, 0, 0.5);
  border-radius: 0.2rem;
  margin: 2rem 0;

  display: grid;
  align-items: center;
}

#introductie {
  margin: auto;
  gap: 2rem;
}

#introductie h2 strong {
  color: #d83933;
}

/* --- aside --- */
aside {
  grid-area: rechts;
  margin: 3rem auto;
  display: grid;
  align-items: center;
  padding: 0 2rem;
  text-align: center;
  gap: 0;
}

#profil-foto img {
  border-radius: 95%;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.3);
}

#profil-foto-media {
  display: none;
}

#slogan {
  padding: 1rem 1rem 1rem 1.5rem;
  border-right: 0.25rem solid #d83933;
  background-color: #202020;
  border-radius: 0.2rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.5);

  font-style: italic;
  color: #f0f0f0;
  line-height: 1.6;
  text-align: left;
}

#slogan cite {
  display: block;
  text-align: right;
}

#skills {
  padding: 1rem 1rem 1rem 1.5rem;
  border-right: 0.25rem solid #d83933;
  background-color: #202020;
  border-radius: 0.2rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.5);

  color: #f0f0f0;
  line-height: 1.6;
  text-align: left;
}

/* --- Knop stijlen --- */
.buttons {
  margin-top: 1.5rem;
  align-items: center;
}

.button {
  padding: 0.75rem 1.5rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 0.05rem;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  margin-right: 1rem;
}

.primary {
  background-color: #d83933;
  color: #f0f0f0;
  border: 0.1rem solid #d83933;
}

.primary:hover {
  background-color: #b92e2a;
  text-decoration: none;
}

.button:active {
  transform: scale(0.98);
}

.secondary {
  color: #4db6ac;
  border: 0.1rem solid #4db6ac;
}

.secondary:hover {
  background-color: #4db6ac;
  color: #1a1a1a;
  text-decoration: none;
}

.social-icons {
  margin-top: 1rem;
  text-align: left;
}

.social-icons a {
  text-decoration: none;
  margin: 0 0.5rem;
  font-size: 1.5rem;
  color: #333;
  transition: color 0.3s;
}

.social-icons a:hover {
  color: #4db6ac;
}

/* projects */
.projects {
  display: grid;
  grid-column: 1 / 3;
  align-self: start;
  counter-reset: project-num;
}

.projects article {
  position: relative;
  overflow: hidden;
  padding: 0 7.5rem 0 2rem;
  margin-right: 20%;

  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1rem;
  min-height: 10rem;
  margin-top: 2rem;
  align-items: center;

  justify-items: start;

  counter-increment: project-num;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.5);
  background-color: #202020;
  border-left: 0.25rem solid #d83933;
}

.projects article figure {
  grid-column: 1 / 2;
  width: 5rem;
  height: 5rem;
  overflow: hidden;
}
.projects article figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.projects article h2,
.projects article p {
  grid-column: 2 / 3;
}

.projects article:nth-child(odd) {
  grid-template-columns: 1fr 5rem;
  margin-left: 20%;
  margin-right: unset;
  padding: 0 2rem 0 7.5rem;

  justify-items: end;
  border-left: unset;
  border-right: 0.25rem solid #4db6ac;
}

.projects article:nth-child(odd) figure {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
}
.projects article:nth-child(odd) h2,
.projects article:nth-child(odd) p {
  grid-column: 1 / 2;
  text-align: right;
}

.projects article::before {
  content: counter(project-num);
  position: absolute;
  font-size: 10rem;
  color: rgba(255, 255, 255, 0.05);
  top: 50%;
  left: 0;
  transform: translate(0, -50%);
  z-index: 0;
}

.projects article:nth-child(even)::before {
  transform: translate(0, -50%);
  left: unset;
  right: 0;
}

.projects h2:hover {
  color: #d83933;
}

/* contactformulier */

label {
  color: #4db6ac;
  margin-top: 2rem;
  font-weight: bold;
  text-transform: uppercase;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.6rem;
  background-color: #1a1a1a;
  border: 0.1rem solid #3a3a3a;
  color: #f0f0f0;
  border-radius: 0.2rem;
  box-shadow: inset 0 0.05rem 0.15rem rgba(0, 0, 0, 0.5);
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

textarea {
  resize: vertical;
  min-height: 7.5rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: #d83933;
  box-shadow: 0 0 0.25rem #d83933;
}

/* ---portfolio fots --- */
#portfolio-fotos figure {
  margin: 0;
  margin-bottom: 1rem;
}

#portfolio-fotos figure:last-child {
  margin-bottom: 0;
}

#portfolio-fotos figure img {
  width: 100%;
  height: auto;
  display: block;
}

/* --- footer --- */
footer {
  grid-area: footer;
  background-color: #252525;
  color: #aaaaaa;
  text-align: center;
  padding: 0.75rem;
  border-top: 0.05rem dashed #4db6ac;
}

/* --- media --- */
@media screen and (max-width: 900px) {
  header {
    padding: 0.5rem 1rem;
  }

  nav {
    flex-wrap: wrap;
  }

  .hamburger {
    display: block;
    padding: 0.5rem;
  }

  /* --- nav --- */
  nav ul {
    display: none;
    width: 100%;
    flex-direction: column;
    text-align: center;
    background-color: #252525;
    padding: 1rem 0;
    margin-top: 1rem;
    border-top: 1px solid #444;
  }

  nav ul.active {
    display: flex;
  }

  nav ul li {
    width: 100%;
    margin: 0;
  }

  nav ul li a {
    display: block;
    padding: 0.75rem;
    border-bottom: 1px solid #333;
  }

  /* --- rest --- */
  html {
    font-size: 16px;
  }

  body {
    grid-template-columns: 1fr;
    grid-template-areas: "header" "links" "rechts" "footer";
  }

  main {
    border-left: none;
    border-top: 0.25rem solid #4db6ac;
    margin-left: 1rem;
    margin-right: 1rem;
  }

  aside {
    margin: 1rem 1rem;
  }

  #skills {
    border-right: none;
    border-top: 0.25rem solid #d83933;
    margin-bottom: 2rem;
  }

  #slogan {
    display: none;
  }

  .projects {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0 1rem;
  }

  .projects article,
  .projects article:nth-child(odd) {
    display: flex;
    flex-direction: column;
    margin: 2rem 0;
    padding: 2rem 1rem;
    border: none;
    border-top: 0.25rem solid #d83933;
  }

  .projects article figure,
  .projects article:nth-child(odd) figure {
    display: none;
  }

  .projects article:nth-child(odd) {
    border-top: 0.25rem solid #4db6ac;
  }

  #profil-foto-media {
    display: block;
    text-align: center;
  }

  #profil-foto {
    display: none;
  }
}
