@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Libre+Baskerville:ital,wght@0,400..700;1,400..700&display=swap');

/* Basic reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

h1, h2, h3 {
  font-family: "Libre Baskerville", Georgia, serif;
}

h1 {
  font-size: 3em;
  font-style: italic;
  text-align: center;
  color: #f2efe8;
  opacity: 0.9;
}

h2 {
  font-size: 1em;
  text-align: center;
  color: #f2efe8;
  opacity: 0.8;
}

body {
  font-family: "Barlow", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #1a102d;
  color: white;
  position: relative;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("images/hamza_tile.png");
  background-repeat: repeat;
  background-size: 300px 300px; /* or e.g. 200px 200px if you want scaling */
  opacity: 0.075;
  pointer-events: none;
  z-index: -1;
}

.title-container {
  padding: 1.5rem;
  margin: 0 auto;
}

.page-content {
  max-width: 75ch;
  margin: 2rem auto;
  padding: 1.5rem 1.5rem;
  line-height: 1.6;
}

.page-content p {
  margin-bottom: 1rem;
}

.page-content a, a:visited, a:hover, a:focus, a:active {
  color: #ff83d4;
  text-decoration: underline;
}

.page-image {
  float: left;
  max-width: 180px;
  margin: 0.5rem 1.5rem 1rem 0;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.publications h1 {
  font-size: 1.3em;
  font-style: italic;
  text-align: left;
  color: #a66cff;
  margin-bottom: 1rem;
}

@media (max-width: 600px) {
  .page-image {
    float: none;
    display: block;
    margin: 1rem auto;
    max-width: 70%;
  }
}

/* Grid container */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Tile link */
.tile {
  position: relative;
  aspect-ratio: 1 / 1;
  background-color: #e9e9e9;
  background-size: cover;
  background-position: center;
  text-decoration: none;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* Overlay for title */
.tile-overlay {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55),
    rgba(0, 0, 0, 0)
  );
  display: flex;
  align-items: flex-end;
}

.tile-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* Home navigation icon and link */
.home-link {
  display: inline-block;
  margin-bottom: 0.5rem;
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  color: #f2efe8;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.home-link:hover {
  opacity: 1;
}

.home-icon {
  width: 1.4rem;
  height: 1.4rem;
}

/* Mobile tweaks */
@media (max-width: 500px) {
  .grid-container {
    gap: 0.75rem;
    padding: 1rem;
  }

  .tile-title {
    font-size: 0.9rem;
  }
}
