/* Senan Architects — shared styles */

:root {
  --text: #1a1a1a;
  --muted: #9a9a9a;
  --light: #b5b5b5;
  --line: #d9d9d9;
  --ph: #ececec;
  --ph-text: #a8a8a8;
  --page-width: 980px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Lato", Helvetica, Arial, sans-serif;
  font-weight: 300;
  color: var(--text);
  background: #fff;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

img { display: block; max-width: 100%; }

.wrap {
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 1012px) {
  .wrap { padding: 0; }
}

/* ---------- Header ---------- */

.site-header {
  padding-top: 82px;
  padding-bottom: 88px;
}

.site-header .wrap {
  display: flex;
  align-items: baseline;
  gap: 47px;
  flex-wrap: wrap;
}

.logo {
  font-size: 21px;
  letter-spacing: 0.01em;
  font-weight: 300;
  white-space: nowrap;
}
.logo .l1 { color: var(--muted); }
.logo .l2 { color: var(--text); }

.nav {
  display: flex;
  gap: 54px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--light);
  font-size: 15px;
  transition: color .2s;
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); font-weight: 400; }

@media (max-width: 720px) {
  .site-header { padding-top: 32px; padding-bottom: 36px; }
  .site-header .wrap { flex-direction: column; gap: 14px; }
  .nav { gap: 22px; }
  .nav a { font-size: 14px; }
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 52px 0 60px;
}

.site-footer .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.copyright {
  font-size: 10px;
  font-weight: 400;
  width: 470px;
  max-width: 100%;
}

.social { display: flex; gap: 8px; }
.social a { color: #9a9a9a; transition: color .2s; }
.social a:hover { color: var(--text); }
.social svg { width: 22px; height: 22px; display: block; }

/* ---------- Image placeholders ---------- */

.ph {
  background: var(--ph);
  color: var(--ph-text);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  letter-spacing: .04em;
  padding: 10px;
  width: 100%;
  height: 100%;
}

/* ---------- Home slideshow ---------- */

.slideshow {
  position: relative;
  aspect-ratio: 980 / 660;
  overflow: hidden;
  background: var(--ph);
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .9s ease;
}
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }

.slide-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 22px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.45));
  opacity: 0;
  transition: opacity .3s;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.slideshow:hover .slide-caption,
.slideshow:focus-within .slide-caption { opacity: 1; }
.slide-caption .t { font-size: 17px; font-weight: 400; }
.slide-caption .s { font-size: 13px; }
.slide-caption .count { font-size: 13px; }

.ss-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 64px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity .3s;
  z-index: 2;
}
.ss-btn svg { width: 22px; height: 40px; filter: drop-shadow(0 0 3px rgba(0,0,0,.4)); }
.ss-prev { left: 8px; }
.ss-next { right: 8px; }
.slideshow:hover .ss-btn,
.ss-btn:focus-visible { opacity: 1; }

@media (hover: none) {
  .slide-caption, .ss-btn { opacity: 1; }
}

/* ---------- Projects grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px 12px;
}

@media (max-width: 860px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .grid { grid-template-columns: repeat(2, 1fr); } }

.tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 236 / 195;
  padding: 0;
  border: 0;
  background: var(--ph);
  cursor: zoom-in;
  overflow: hidden;
  font: inherit;
  color: inherit;
}
.tile img { width: 100%; height: 100%; object-fit: cover; }

.tile-info {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.88);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 12px;
  opacity: 0;
  transition: opacity .25s;
}
.tile:hover .tile-info,
.tile:focus-visible .tile-info { opacity: 1; }
.tile-info .t { font-size: 16px; font-weight: 400; }
.tile-info .s { font-size: 13px; color: #666; }
.tile-info .n { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.97);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 60px 70px 30px;
}
.lightbox.open { display: flex; }

.lb-media {
  width: min(1000px, 100%);
  aspect-ratio: 3 / 2;
  max-height: calc(100vh - 170px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-media .ph { font-size: 16px; }

.lb-caption {
  margin-top: 16px;
  text-align: center;
}
.lb-caption .t { font-size: 18px; font-weight: 400; }
.lb-caption .s { font-size: 14px; color: #666; }
.lb-caption .n { font-size: 13px; color: var(--muted); }

.lb-btn {
  position: absolute;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #555;
  padding: 10px;
}
.lb-btn:hover { color: #000; }
.lb-btn svg { display: block; }
.lb-close { top: 16px; right: 18px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

@media (max-width: 620px) {
  .lightbox { padding: 60px 16px 20px; }
  .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; }
}

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 662px) minmax(0, 1fr);
  gap: 25px;
  align-items: start;
}

.about-text p {
  margin: 0;
  text-align: justify;
  font-size: 15px;
  line-height: 1.47;
}

.portrait { aspect-ratio: 294 / 369; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }

.pubs { margin-top: 30px; }
.pub-year { margin-top: 22px; }
.pub-year:first-child { margin-top: 0; }
.pub-year h3 { font-size: 15px; font-weight: 300; margin: 0; }
.pub-year a { display: block; transition: color .2s; }
.pub-year a:hover { color: var(--muted); }
.pub-year a bdi, .pub-year a .title { color: #8a8a8a; }
.pub-year a:hover bdi { color: var(--text); }
.pub-year .plain { display: block; }

@media (max-width: 900px) {
  .about { grid-template-columns: minmax(0, 1fr); }
  .portrait { max-width: 294px; grid-row: 1; }
  .about-text p { text-align: start; }
}

/* ---------- Contact ---------- */

.contact {
  max-width: 363px;
  font-size: 15px;
}
.contact p { margin: 0; }
.contact .intro { margin-top: 22px; }

.form { margin-top: 22px; display: flex; flex-direction: column; gap: 5px; }

.form input,
.form textarea {
  width: 100%;
  border: 1px solid #e3e3e3;
  padding: 7px 6px;
  font: inherit;
  font-weight: 300;
  color: var(--text);
  background: #fff;
  border-radius: 0;
  outline: none;
}
.form input:focus,
.form textarea:focus { border-color: #9a9a9a; }
.form ::placeholder { color: #666; opacity: 1; }
.form textarea { height: 130px; resize: vertical; }

.form .row-end { display: flex; justify-content: flex-end; margin-top: 4px; }

.form button {
  background: #cfcfcf;
  color: #fff;
  border: 0;
  padding: 6px 6px;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: background .2s;
}
.form button:hover { background: #999; }
.form button:disabled { opacity: .6; cursor: default; }

.form-status { font-size: 14px; min-height: 1.4em; }
.form-status.ok { color: #3a7d44; }
.form-status.err { color: #b3261e; }

.hp { position: absolute; left: -9999px; }
