@import url('https://fonts.googleapis.com/css2?family=Mulish:wght@200;300;400;500;600;700;800;900&family=Questrial&family=Rajdhani:wght@500;700&display=swap');

@font-face {
  font-family: "Sulphur Point";
  src: url("https://janalumi.github.io/fonts/SulphurPoint-Regular.ttf") format("truetype");
/*  font-weight: normal;
  font-style: normal; */
  font-display: swap;
}

@font-face {
  font-family: "Montserrat Alts";
  src: url("https://janalumi.github.io/fonts/MontserratAlternates-Regular.ttf") format("truetype");
/*  font-weight: normal;
  font-style: normal; */
  font-display: swap;
}

:root {
  --header-h: 150px;
  --footer-h: 60px;
}

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

html {
  overflow-x: hidden;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  z-index: 0;
}

body {
  font-family: "Mulish", Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  background: #71ACBC;
  background: linear-gradient(182deg,rgba(113, 172, 188, 1) 14%, rgba(146, 196, 60, 1) 59%, rgba(251, 200, 119, 1) 100%);
  color: #eee;
  margin: 10px 0 0 0;
  padding: var(--header-h) 1rem var(--footer-h) 1rem;
  overflow-x: visible;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  text-align: center;
  padding-top: 0.5rem;
  margin-bottom: 2rem;
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
  background: rgba(255, 255, 255, 0.2); /* glossy look */
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-h);
  text-align: center;
  margin-top: 2rem;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  background: rgba(255, 255, 255, 0.2); /* glossy look */
  backdrop-filter: blur(12px);
  z-index: 1000;
}

.connect-socials {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  margin: auto;
  padding: 10px;
  gap: 15px;
}

#description {
  font-family: "Mulish", Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
/*  padding: 1rem; */
}
/*
.app-header {
  display: flex;
  margin: auto;
  align-items: center;
  justify-content: center;
  gap: 0.5rem; */
/*  font-size: 2rem; */ /* Adjust as needed */
/*  line-height: 1.2;
  max-width: 100%;
} */

header h1 {
  font-family: "Montserrat Alts", Tahoma, Geneva, Verdana, sans-serif;
  margin: -10px 0 0 0;
  color: #d9d9d9;
}

header p {
  margin: 0.2rem 0;
  color: #448c8c;
}

h1 {
  font-family: "Montserrat Alts", Tahoma, Geneva, Verdana, sans-serif;
  margin-bottom: 1.4rem;
}

h2 {
  font-family: "Sulphur Point", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 2rem;
  margin-top: 1.2rem;
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

h3 {
  font-family: "Sulphur Point", Tahoma, Geneva, Verdana, sans-serif;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1.2rem;
}

main {
  overflow-x: hidden;
  width: 100%;
}

.project-list {
  display: grid;
 /* grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); */
  grid-template-columns: repeat(3, minmax(280px, 1fr)); /* each card fixed width */
  gap: 1rem;
/*  padding-inline: 0; */
  max-width: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 0;
}

.project-card {
  text-align: center;
  background: white;
  padding: 0.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
  margin-top: 10px;
}

.project-card p {
  color: #888;
  font-size: 1.2em;
  letter-spacing: 1.6px;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card img {
  max-width: 100%;
  border-radius: 6px;
}

.project-card h3 {
  font-weight: 800;
  font-size: 1.5em;
  margin-top: 0.5rem;
  color: #666;
  letter-spacing: 1.8px;
}

.project-card a {
  display: inline-block;
  color: #007acc;
  text-decoration: none;
}

.project-card a:hover {
  text-decoration: underline;
}

/* debugging
body, .project-list, .project-card {
  outline: 1px solid rgba(255,0,0,0.3);
}

.project-card::before {
  content: "";
  display: block;
  height: 0;
  border: 1px dashed limegreen;
  margin-bottom: 8px;
} */

@media (min-width: 1025px) and (orientation: landscape) {
  body {
    max-width: 1100px;
    margin: auto;
  }
}

/* Mobile portrait (1 column) */
@media (max-width: 480px) and (orientation: portrait) {
  .project-list {
    grid-template-columns: repeat(1, minmax(280px, 1fr));
  }
}

/* Mobile landscape (2 columns) */
@media (max-width: 768px) and (orientation: landscape) {  
  .project-list {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }
}

/* Tablet portrait (2 columns) */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
  
  body {
    max-width: 900px;
    margin: auto;
  }
  
  .project-list {
     margin: auto 0;
     grid-template-columns: repeat(2, minmax(280px, 1fr));
     gap: 2rem 0;
     width: 100%;
  }

  .project-card {
     width: 100%;
     max-width: 100%;
  }
}

/* Mobile Portrait: always 1 column */
@media (max-width: 768px) and (orientation: portrait) {
  html, body {
    margin: 0;
    max-width: 100%;
  }
  
  body {
     width: auto;
     var(--header-h) 0.2rem var(--footer-h) 0.2rem;
  }

  .project-list {
     margin: auto 0;
     grid-template-columns: repeat(1, minmax(280px, 1fr));
     gap: 2rem 0;
     width: 100%;
  }

  .project-card {
     width: 100%;
     max-width: 100%;
  }

  header p {
     font-size: clamp(0.7rem, 4vw, 2.2rem);
     white-space: nowrap;
     overflow-x: hidden;
     text-overflow: ellipsis;
     max-width: 100%;
  }
}
