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

:root {
  --bg: #e4dcc8;
  --text: #494645;
  --container: #fcf5e4;
  --accent: black;
  --highlight: #519d5c;
}

body {
  font-family: "Cascadia Code", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: background-color 0.5s ease, color 0.5s ease;
  font-size: clamp(1.4rem, 2vw, 1rem);
  font-weight: 350;
}

.main-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  flex: 1;
  padding: 1.5rem;
  background: var(--container);
  margin: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.8s ease-out;
}

.content-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem;
}

h1 {
  font-size: clamp(2rem, 3vw, 0.8rem) !important;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

em {
  color: var(--highlight);
}

[class*="fa-"] {
  color: var(--text);
  margin-right: 0.5rem;
}

.contact-container,
.project-container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.5rem 0;
}

.contact-container a,
.project-container a {
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: transform 0.3s ease, color 0.3s ease;
}

.contact-container a:hover,
.project-container a:hover {
  color: var(--highlight);
}

footer {
  background: var(--container);
  color: var(--text);
  text-align: center;
  padding: 0.5rem;
  font-size: clamp(0.7rem, 1.2vw, 0.8rem);
  border-top: 1px solid var(--accent);
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .main-content {
    grid-template-columns: 1fr;
    margin: 0.5rem;
    padding: 0.5rem;
  }

  .content-section {
    padding: 0.5rem;
    border-bottom: 1px solid var(--accent);
  }

  .content-section:last-child {
    border-bottom: none;
  }

  p {
    font-size: clamp(0.65rem, 1vw, 0.75rem);
  }

  [class*="fa-"] {
    font-size: clamp(0.7rem, 1.3vw, 0.8rem);
  }

  .contact-container a,
  .project-container a {
    font-size: clamp(0.65rem, 1vw, 0.75rem);
  }

  .mode-toggle {
    top: 0.5rem;
    right: 0.5rem;
  }

  footer {
    padding: 1rem;
  }
}
