:root {
  --color-bg-main: #faf5ff;
  --color-bg-alt: var(--color-bg-main); 
  --color-bg-accent: #f0e4ff;
  --color-bg-footer: var(--color-bg-accent);
  --color-bg-tile: #ffffff;
  --color-bg-button: #ffffff;

  --color-text-primary: #4f4f4f;
  --color-text-accent: #8a2be2;
  --color-link-hover: #8a2be2;
  --color-border: #d3b8ef;
  --color-accent-warm: #faae2b; 
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
}

/* navbar */

#navbar {
  display: flex;
  justify-content: end;
  align-items: flex-end;
  background-color: var(--color-bg-main);
  padding: 20px 40px;
  font-family: 'Fira Code', monospace;
  z-index: 1000;
  border-bottom: 2px solid var(--color-link-hover);
}

nav a {
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: 1rem;
  position: relative;
}

ul {
  list-style: none;
  display: flex;
  flex-direction: row;
  gap: 30px;
  margin: 0;
  padding: 0;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  left: 0;
  bottom: -4px;
  background-color: var(--color-link-hover);
  transition: width 0.3s ease-in-out;
}

nav a:hover::after {
  width: 100%;
}

/* welcome */

#welcome-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--color-bg-main);
  height: 100vh;
  text-align: center;
  padding: 0 20px;
}

h1 {
  color: var(--color-link-hover);
  font-size: 3.2rem;
  margin-bottom: 12px;
  font-weight: 600;
}

#welcome-section p {
  color: var(--color-text-accent);
  font-size: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

/* projects */

#projects {
  background-color: rgb(241, 235, 255);
  padding: 40px 0px;
}

#projects h2 {
  text-align: center;
  font-size: 36px;
  margin-bottom: 60px;
  color: var(--color-link-hover);
}

.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 48px;
  justify-items: center;
  padding: 0 20px;
}

.project-card {
  width: 260px;
  text-align: center;
}

.project-tile {
  display: block;
  width: 260px;
  height: 260px;
  border: 3px solid var(--color-border);
  border-radius: 13px;
  background-color: var(--color-bg-tile);
  text-decoration: none;
  color: inherit;
  margin-bottom: 12px;
}

.project-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--color-text-primary);
  font-weight: bold;
}

.project-cards p {
  color: var(--color-text-accent);
  font-size: 18px;
  margin: 0;
}

.container {
  padding-bottom: 60px;
}

.project-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

/* contact */

#contact {
  background-color: var(--color-bg-accent);
  padding: 60px 0;
}

.contact-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-text {
  flex: 1;
  max-width: 500px;
}

.contact-text h2 {
  color: var(--color-link-hover);
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.contact-text p {
  color: var(--color-text-accent);
  font-size: 1.2rem;
  margin: 0;
}

.contact-icons {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

.contact-icons a {
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: 1.1rem;
  padding: 12px 20px;
  border: 2px solid var(--color-link-hover);
  border-radius: 8px;
  background-color: var(--color-bg-button);
  transition: all 0.3s ease;
  display: block;
  min-width: 120px;
  text-align: center;
}

.contact-icons a:hover {
  background-color: var(--color-link-hover);
  color: white;
  transform: translateY(-2px);
}

/* footer */

#footer {
  background-color: var(--color-bg-footer);
  padding: 20px 40px;
  font-family: 'Fira Code', monospace;
  text-align: center;
  color: var(--color-text-primary);
  border-top: 2px solid var(--color-link-hover);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--color-text-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  border-bottom: 1px solid var(--color-link-hover);
  color: var(--color-link-hover);
}

/* media query */

@media (max-width: 768px) {
  .contact-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-text {
    text-align: left;
  }

  nav ul {
    flex-direction: column;
    gap: 15px;
  }

  .project-cards {
    grid-template-columns: 1fr;
  }
}
