:root{
  --bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;

  --sq1: #2563eb; /* blue */
  --sq2: #16a34a; /* green */
  --sq3: #f59e0b; /* amber */
  --sq4: #ef4444; /* red */

  --radius: 0px;
  --shadow: 0 10px 25px rgba(0,0,0,.08);
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a{ color: inherit; text-decoration: none; }

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

.header{
  padding: 24px 20px 0 20px;
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
}

.brand{
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.brand h1{
  font-size: 22px;
  margin: 0;
  letter-spacing: .2px;
}
.brand p{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.main{
  flex: 1;
  display: grid;
  place-items: center;
  padding: 28px 20px 36px 20px;
}

.grid{
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tile{
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 16px 18px;.tile.profile {
  background-color: var(--sq1); /* fallback */
  background-image: url("assets/images/profile.webp");
  background-size: cover;
  background-position: center;
}
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .12s ease, box-shadow .12s ease;
}
.tile:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0,0,0,.12);
}
.tile h2{
  margin: 0;
  font-size: 18px;
  letter-spacing: .2px;
}
.tile p{
  margin: 8px 0 0 0;
  font-size: 14px;
  opacity: .92;
}

.tile .arrow{
  margin-top: 14px;
  font-size: 14px;
  opacity: .9;
}


.tile.profile {
  background-color: var(--sq1); color: white;/* fallback */
  background-image: url("../images/wave.webp");
  background-size: cover;
  background-position: center;
}

.tile.research {
  background-color: var(--sq2); color: white; /* fallback */
  background-image: url("../images/puymirol.webp");
  background-size: cover;
  background-position: center;
}


.tile.teaching {
  background-color: var(--sq3); color: white; /* fallback */
  background-image: url("../images/forest.webp");
  background-size: cover;
  background-position: center;
}

.tile.personal {
  background-color: var(--sq4); color: white; /* fallback */
  background-image: url("../images/glow.webp");
  background-size: cover;
  background-position: center;
}

.footer{
  padding: 0 20px 22px 20px;
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer a{
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.content{
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  padding: 30px 20px 60px 20px;
}
.nav{
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 14px;
}
.nav a{
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.content h1{
  margin: 0 0 10px 0;
  font-size: 28px;
}
.content h2{
  margin-top: 26px;
  font-size: 18px;
}
.content p, .content li{
  line-height: 1.6;
}
.small{
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 640px){
  .grid{
    grid-template-columns: 1fr;
  }
  .tile{
    min-height: 130px;
  }
}

a {
  color: #1d4ed8;                 /* calm academic blue */
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: #1e40af;                 /* slightly darker on hover */
}


/* --- Personal page grid --- */

.grid-personal{
  width: min(860px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tile-img{
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  background: #e5e7eb; /* fallback */
  display: block;
}

/* Real squares */
.tile-square{
  aspect-ratio: 1 / 1;
}

/* Thin panoramas */
.tile-pano{
  grid-column: 1 / -1;
  aspect-ratio: 16 / 5; /* adjust thinner/thicker here */
}

/* Background image inside */
.tile-img::before{
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--bgimg);
  background-size: cover;
  background-position: center;
  filter: none;
  transform: scale(1.02);
}

/* Overlay text */
.tile-img .label{
  position: absolute;
  inset: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: white;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 60%);
}

.tile-img h2{
  margin: 0;
  font-size: 18px;
}
.tile-img p{
  margin: 6px 0 0 0;
  font-size: 14px;
  opacity: .95;
}

.tile-img:hover{
  transform: translateY(-2px);
  transition: transform .12s ease;
}

@media (max-width: 640px){
  .grid-personal{
    grid-template-columns: 1fr;
  }
  .tile-pano{
    aspect-ratio: 16 / 7;
  }
}


