/* reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  min-height: 100vh;
  font-family: 'Teachers', sans-serif;
  color: #fbf2dd; /* warm cream — pops against the blue/orange mesh */
  background-color: #14193a; /* navy fallback while the mesh paints */
  overflow-x: hidden;
}

/* ===== mesh gradient background ===== */
/* a few soft blobs floating around behind everything */
.mesh-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #1f2a55 0%, #0f1430 100%);
}

.blob {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.75;
  mix-blend-mode: screen;
  will-change: transform;
}

/* warm + cool blobs drifting at different speeds */
.blob-1 {
  background: #ff8a3d; /* orange */
  top: -15%;
  left: -10%;
  animation: drift1 28s ease-in-out infinite alternate;
}
.blob-2 {
  background: #4a7fd6; /* blue */
  top: 10%;
  right: -15%;
  animation: drift2 34s ease-in-out infinite alternate;
}
.blob-3 {
  background: #ff6a1f; /* burnt orange */
  bottom: -20%;
  left: 20%;
  animation: drift3 30s ease-in-out infinite alternate;
}
.blob-4 {
  background: #2a4ea8; /* deep blue */
  bottom: 0%;
  right: 5%;
  animation: drift4 38s ease-in-out infinite alternate;
}
.blob-5 {
  background: #ffa66b; /* peach */
  top: 35%;
  left: 35%;
  width: 45vmax;
  height: 45vmax;
  animation: drift5 26s ease-in-out infinite alternate;
}

@keyframes drift1 {
  0%   { transform: translate(0, 0)        scale(1); }
  50%  { transform: translate(20vw, 15vh)  scale(1.15); }
  100% { transform: translate(40vw, 5vh)   scale(0.95); }
}
@keyframes drift2 {
  0%   { transform: translate(0, 0)         scale(1); }
  50%  { transform: translate(-25vw, 20vh)  scale(1.1); }
  100% { transform: translate(-10vw, 40vh)  scale(0.9); }
}
@keyframes drift3 {
  0%   { transform: translate(0, 0)         scale(1); }
  50%  { transform: translate(30vw, -20vh)  scale(1.2); }
  100% { transform: translate(-10vw, -10vh) scale(1); }
}
@keyframes drift4 {
  0%   { transform: translate(0, 0)          scale(1); }
  50%  { transform: translate(-20vw, -25vh)  scale(0.95); }
  100% { transform: translate(-40vw, -5vh)   scale(1.15); }
}
@keyframes drift5 {
  0%   { transform: translate(0, 0)          scale(1); }
  50%  { transform: translate(15vw, -15vh)   scale(1.1); }
  100% { transform: translate(-15vw, 20vh)   scale(0.9); }
}

/* ===== layout ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 40px 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero {
  text-align: center;
  margin-bottom: 48px;
}

h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

h2 {
  font-size: 20px;
  font-weight: 400;
  opacity: 0.92;
}

/* ===== project cards ===== */
.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: auto;
  padding: 24px 0 48px;
}

.project-card {
  background: #fbf2dd; /* warm cream — sits nicely on the mesh */
  border-radius: 18px;
  padding: 18px;
  text-decoration: none;
  color: #2a2a44; /* dark slate text inside the card */
  display: flex;
  flex-direction: column;
  aspect-ratio: 5 / 4; /* slightly wider than tall */
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-4px);
  /* light blue-gray glow */
  box-shadow:
    0 0 0 1px rgba(176, 196, 222, 0.35),
    0 12px 40px rgba(176, 196, 222, 0.55),
    0 4px 16px rgba(176, 196, 222, 0.35);
}

.card-img {
  flex: 1;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
  background: #e3dcc8; /* soft fallback if the image hasn't loaded */
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.25;
}

h4 {
  font-size: 14px;
  font-weight: 400;
  opacity: 0.7;
}

/* ===== footer ===== */
.footer {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.footer-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 14px;
  color: #fbf2dd;
}

.icon-link {
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.icon-link:hover {
  opacity: 0.75;
  transform: translateY(-1px);
}


/* full-page wipe overlay */
.wipe-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: linear-gradient(135deg, #14193a 0%, #2a4ea8 50%, #ff8a3d 100%);
  transform: translateY(100%);
  opacity: 1;
  transition: transform 0.75s cubic-bezier(0.77, 0, 0.18, 1);
}

.wipe-overlay.wiping {
  transform: translateY(0);
}

.wipe-overlay.fading {
  opacity: 0;
  transition: opacity 1s ease;
}

/*  responsive  */
/* tablets — keep the grid but tighter */
@media (max-width: 900px) {
  .projects {
    grid-template-columns: repeat(2, 1fr);
  }
  .container {
    padding: 48px 28px 32px;
  }
}

/* phones — stack the cards in a column */
@media (max-width: 480px) {
  .projects {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 16px 0 32px;
  }
  .project-card {
    aspect-ratio: 5 / 4;
    max-width: 360px;
    margin: 0 auto;
    width: 100%;
  }
  .container {
    padding: 36px 20px 28px;
  }
  h1 { font-size: 22px; }
  h2 { font-size: 18px; }
  .footer-line { font-size: 12px; }
  .signature { max-width: 160px; }
}

/* respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  .wipe-overlay { transition: none; }
}