/* ===========================
   HOME PAGE
=========================== */

body:not(.dark-mode) section {
  position: relative;
  box-shadow:
    0 1px 0 rgba(44,40,37,0.07),
    0 4px 12px rgba(44,40,37,0.07),
    0 12px 32px rgba(44,40,37,0.11);
}

.highlight-box {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.03),
    rgba(0,0,0,0.01)
  );
}

.highlight-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  width: 100%;
  padding: 2rem;
  border-radius: var(--radius);
  background:
    linear-gradient(
      145deg,
      rgba(244,238,228,0.46),
      rgba(232,224,211,0.36)
    );
  border: 1px solid rgba(255,255,255,0.24);
  box-shadow:
    0 6px 16px rgba(44,40,37,0.12),
    0 18px 42px rgba(44,40,37,0.16),
    inset 0 1px 0 rgba(255,255,255,0.34);
}

.text-section {
  flex: 1 1 260px;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: rgba(244,238,228,0.34);
  border: 1px solid rgba(255,255,255,0.20);
}

.image-section {
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-section img {
  max-width: 320px;
}

/* ===========================
   PROJECTS PAGE
=========================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.project-entry {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 14px;
  padding: 1.2rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  transition:
    transform .28s cubic-bezier(.2,.8,.2,1),
    box-shadow .28s cubic-bezier(.2,.8,.2,1),
    border-color .24s ease,
    background-color .24s ease,
    filter .24s ease;
}

.project-entry:hover {
  transform: translateY(-4px) scale(1.015);
  filter: saturate(1.04);
  box-shadow: 0 16px 38px rgba(0,0,0,.28);
}

.project-entry:active {
  transform: scale(.94);
}

.project-entry img {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  object-fit: cover;
}

.project-date {
  font-size: .9rem;
  color: var(--text-muted);
}

.project-info {
  width: 100%;
}

.project-tags {
  margin: 0.75rem 0 0.25rem;
}

.project-tags .chip {
  font-size: .78rem;
  padding: 4px 10px;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0.75rem;
}

.project-links .preview-button,
.project-links .action-button {
  font-size: .82rem;
  padding: 8px 12px;
}

body:not(.dark-mode) .projects-grid .project-entry {
  background:
    linear-gradient(
      145deg,
      rgba(250,246,239,0.95),
      rgba(240,233,222,0.90)
    );
  border: 1px solid rgba(255,255,255,0.70);
  box-shadow:
    0 4px 10px rgba(44,40,37,0.10),
    0 10px 24px rgba(44,40,37,0.10),
    inset 0 1px 0 rgba(255,255,255,0.70);
}

body:not(.dark-mode) .projects-grid .project-entry:hover {
  box-shadow:
    0 8px 18px rgba(44,40,37,0.12),
    0 16px 34px rgba(44,40,37,0.14),
    inset 0 1px 0 rgba(255,255,255,0.78);
}

/* ===========================
   CONTACT PAGE
=========================== */

.contact-grid {
  max-width: 900px;
  margin: 30px auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.contact-section {
  max-width: 250px;
  padding: 20px;
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow:
    0 2px 6px rgba(44,40,37,.07),
    0 6px 16px rgba(44,40,37,.10);
  transition:
    transform .28s cubic-bezier(.2,.8,.2,1),
    box-shadow .28s cubic-bezier(.2,.8,.2,1),
    border-color .24s ease,
    background-color .24s ease,
    filter .24s ease;
}

.contact-section:hover {
  transform: translateY(-4px);
  filter: saturate(1.04);
  box-shadow:
    0 4px 10px rgba(44,40,37,.09),
    0 12px 28px rgba(44,40,37,.13);
}

.contact-section p {
  margin: 0;
  font-weight: 500;
}

/* ===========================
   ABOUT PAGE
=========================== */

.hero {
  background:
    linear-gradient(
      145deg,
      rgba(244,238,228,0.46),
      rgba(232,224,211,0.38)
    );
  border: 1px solid rgba(255,255,255,0.24);
}

body.dark-mode .hero {
  background:
    linear-gradient(
      145deg,
      rgba(32,54,71,0.50),
      rgba(23,37,50,0.42)
    );
  border-color: rgba(187,216,233,0.08);
}

body.dark-mode .text-section {
  background: rgba(23,37,50,0.34);
  border-color: rgba(187,216,233,0.07);
}

body.dark-mode .highlight-container {
  background:
    linear-gradient(
      145deg,
      rgba(32,54,71,0.48),
      rgba(23,37,50,0.38)
    );
  border-color: rgba(187,216,233,0.08);
  box-shadow:
    0 8px 20px rgba(0,0,0,0.24),
    0 24px 56px rgba(0,0,0,0.30),
    inset 0 1px 0 rgba(187,216,233,0.025);
}

.about-box {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: center;
}

.about-box img {
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0,0,0,.5);
}

/* ===========================
   PAGE RESPONSIVE RULES
=========================== */

@media (max-width: 768px) {
  .project-entry {
    flex-direction: column;
    align-items: center;
  }

  .highlight-container {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
  }

  .highlight-container .image-section {
    flex: 0 0 36%;
  }

  .highlight-container .text-section {
    flex: 1 1 auto;
    min-width: 0;
  }

  .image-section img {
    width: 100%;
    max-width: 210px;
  }

  .project-entry img {
    width: 100%;
    max-width: 400px;
  }

  .project-info {
    width: 100%;
    text-align: center;
  }

  .about-box {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-box img {
    max-width: 300px;
    margin: 0 auto;
  }


  /* ===========================
   LIGHT MODE HOME REFINEMENT
=========================== */

body:not(.dark-mode) .highlight-box {
  background:
    linear-gradient(
      to bottom,
      rgba(44,40,37,0.045),
      rgba(255,255,255,0.10)
    );

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.20),
    inset 0 -1px 0 rgba(44,40,37,0.05);
}

body:not(.dark-mode) .highlight-container {
  background:
    linear-gradient(
      145deg,
      rgba(248,242,232,0.54),
      rgba(231,222,209,0.46)
    );

  border: 1px solid rgba(255,255,255,0.32);

  box-shadow:
    0 5px 14px rgba(44,40,37,0.12),
    0 18px 42px rgba(44,40,37,0.18),
    inset 0 1px 0 rgba(255,255,255,0.42);

}

body:not(.dark-mode) .hero {
  background:
    linear-gradient(
      145deg,
      rgba(248,242,232,0.48),
      rgba(231,222,209,0.38)
    );
}
}

@media (max-width: 560px) {
  .highlight-container {
    flex-direction: column;
    text-align: center;
  }

  .highlight-container .image-section {
    flex: 0 0 auto;
  }

  .image-section img {
    max-width: 180px;
  }
}
