* {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*:not(body):not(.glass-cursor):not(a):not(button):not(input):not(textarea):not(select):not(label) {
  opacity: 0;
  animation: fadeIn 0.8s ease-in-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 50px 80px;
  color: black;
  flex-wrap: wrap;
}

.navbar-title {
  font-size: 1.9rem;
  font-weight: bold;
}

.nav-links {
  display: flex;
  gap: 16px;
}

.nav-links a {
  padding: 10px;
  text-decoration: none;
  color: black;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  background-color: black;
  color: white;
  transform: translateY(-3px);
}

.title {
  padding-top: 175px;
  max-width: 70%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 3rem;
  font-weight: bold;
}

.scribble-title {
  width: 100%;
  text-align: center;
  text-indent: 1.5em;
  transition: font-size 0.3s ease;
}

.scribble-title:hover {
  font-size: 6.1rem; 
}

.scribble {
  position: relative;
  display: inline-block;
  z-index: 1;
  color: white;
}

.scribble::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-20%, -50%);
  width: 275%;
  height: 275%;
  background: url('scribble.png') no-repeat center;
  background-size: contain;
  z-index: -1;
}

.button-container {
  align-self: flex-end;
  margin-top: 20px;
  text-align: right;
  width: 100%;
  max-width: 300px;
}

.button-label {
  display: block;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0;
  line-height: 1.4;
}

.action-button {
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  background-color: white;
  color: black;
  border: 2px solid black;
  border-radius: 4px;
  margin-top: 0;
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.action-button:hover {
  background-color: black;
  color: white;
  transform: translateY(-3px);
}

.glass-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.15),
    0 0 20px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.05s linear;
  opacity: 0.95;
  animation: none;
  z-index: 9999;
}

@media (max-width: 768px) {
  .glass-cursor {
    display: none;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 14px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .nav-links {
    flex-direction: column;
    width: 100%;
  }
  .nav-links a {
    font-size: 1.2rem;
    padding: 5px 0;
  }
  .navbar-title {
    font-size: 1.6rem;
  }
  .title {
    padding-top: 140px;
    max-width: 95%;
    font-size: 1.2rem;
  }
  .button-container {
    padding-top: 75px;
    max-width: 100%;
    align-self: flex-start;
    text-align: center;
  }
  .button-label {
    font-size: 0.8rem;
    text-align: center;
  }
  .action-button {
    font-size: 0.9rem;
    padding: 8px 16px;
  }
}

#loading-screen {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background-color: black;
  color: white;
  font-size: 3rem;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  flex-direction: column;
}

#loading-screen p {
  display: none;
  margin: 0;
}

#loading-screen p.visible {
  display: block;
}

body > *:not(#loading-screen) {
  visibility: hidden;
}

body.loaded > *:not(#loading-screen) {
  visibility: visible;
}

body.loaded #loading-screen {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.footer {
    margin-top: 50px;
  background-color: black;
  color: white;
  padding: 20px 80px;
  font-size: 1rem;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  user-select: none;
}

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

.footer-left {
  flex: 1 1 300px;
}

.footer-right {
  display: flex;
  gap: 20px;
  flex: 1 1 300px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.footer-right a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  cursor: pointer;
}

.footer-right a:hover {
  color: #ddd;
}

@media (max-width: 768px) {
  .footer {
    padding: 20px 20px;
    font-size: 0.9rem;
  }
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-left, .footer-right {
    flex: unset;
    justify-content: center;
  }
  .footer-right {
    gap: 15px;
    margin-top: 10px;
  }
}

.projects-page {
  max-width: 1200px;
  margin: 50px auto 100px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.projects-title {
  font-size: 2.8rem;
  font-weight: bold;
  margin-bottom: 40px;
  color: black;
  text-align: center;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  width: 100%;
}

.project-card {
  background-color: white;
  border: 2px solid black;
  border-radius: 12px;
  padding: 20px;
  box-sizing: border-box;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.project-image {
  width: 100%;
  height: 160px;
  border-radius: 8px;
  margin-bottom: 15px;
  background-color: #ddd;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.placeholder {
  background-image: linear-gradient(
    90deg,
    #e0e0e0 25%,
    #f0f0f0 37%,
    #e0e0e0 63%
  );
  animation: placeholderShimmer 1.5s infinite linear;
  background-size: 400% 100%;
}

@keyframes placeholderShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.project-description {
  font-size: 1rem;
  color: #555;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .projects-title {
    font-size: 2rem;
    margin-bottom: 30px;
  }

  .project-card {
    padding: 15px;
  }

  .project-image {
    height: 140px;
  }

  .project-description {
    font-size: 0.9rem;
  }
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main, .title, .about-page, .projects-page, .contact-page {
  flex: 1 0 auto;
}

.footer {
  flex-shrink: 0;
  background-color: black;
  color: white;
  padding: 20px 80px;
  font-size: 1rem;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  user-select: none;
}

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

.footer-left {
  flex: 1 1 300px;
}

.footer-right {
  display: flex;
  gap: 20px;
  flex: 1 1 300px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.footer-right a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  cursor: pointer;
}

.footer-right a:hover {
  color: #ddd;
}

@media (max-width: 768px) {
  .footer {
    padding: 20px 20px;
    font-size: 0.9rem;
  }
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-left, .footer-right {
    flex: unset;
    justify-content: center;
  }
  .footer-right {
    gap: 15px;
    margin-top: 10px;
  }
}