/*
Theme Name: DADIDREUCOL Minimal
Theme URI: https://www.dadidreucol.com/
Author: DADIDREUCOL
Description: Tema minimo para portfolio y archivo de proyectos por anos, con galerias navegables.
Version: 0.1.22
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: dadidreucol-minimal
*/

:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #111111;
  --muted: #777777;
  --soft: #f6f6f6;
  --line: #eeeeee;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

body.viewer-open {
  overflow: hidden;
}

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

button {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 22px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.site-name {
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 16px;
  min-width: 0;
  text-align: right;
}

.site-link,
.site-contact,
.site-contact-email {
  font-size: 12px;
  letter-spacing: 0;
  text-transform: lowercase;
}

.site-contact-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  text-align: right;
}

.site-link,
.site-contact {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.site-link:hover,
.site-link:focus-visible,
.site-contact:hover,
.site-contact:focus-visible {
  color: var(--ink);
}

.site-contact-email {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.site-main {
  min-height: calc(100vh - 64px);
}

.archive {
  padding: clamp(54px, 8vw, 116px) clamp(18px, 4vw, 56px);
}

.year-block {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  width: 100%;
  margin-bottom: clamp(58px, 8vw, 112px);
}

.year-title {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  align-items: start;
  gap: clamp(28px, 5vw, 84px);
}

.project-card {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card:hover img,
.project-card:focus-visible img {
  opacity: 0.68;
}

.no-projects {
  max-width: 460px;
  color: var(--muted);
  font-size: 12px;
}

.project-viewer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
  gap: clamp(22px, 3vw, 48px);
  align-items: start;
  overflow-y: auto;
  padding: clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.985);
}

.project-viewer.is-open {
  display: grid;
}

.viewer-images {
  display: grid;
  gap: clamp(34px, 6vw, 88px);
  min-width: 0;
  padding-top: clamp(54px, 8vw, 96px);
}

.viewer-image-frame {
  justify-self: end;
  display: flex;
  justify-content: flex-end;
  width: 100%;
  max-width: 100%;
}

.viewer-image {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - clamp(36px, 8vw, 112px));
  height: auto;
  object-fit: contain;
}

.viewer-info {
  position: sticky;
  top: clamp(18px, 4vw, 56px);
  align-self: start;
  padding-top: clamp(54px, 8vw, 96px);
  color: var(--muted);
  font-size: 12px;
}

.viewer-info h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
}

.viewer-info p,
.viewer-info .viewer-description {
  margin: 0 0 8px;
}

.viewer-description > :first-child {
  margin-top: 0;
}

.viewer-description > :last-child {
  margin-bottom: 0;
}

.viewer-close {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.viewer-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  font-size: 22px;
  line-height: 1;
}

.viewer-close:hover,
.viewer-close:focus-visible {
  color: var(--ink);
}

.single-project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: clamp(22px, 3vw, 48px);
  align-items: start;
  padding: clamp(54px, 8vw, 116px) clamp(18px, 4vw, 56px);
}

.single-project-images {
  display: grid;
  gap: clamp(28px, 5vw, 70px);
}

.single-project-image-frame {
  justify-self: end;
  display: flex;
  justify-content: flex-end;
  width: 100%;
  max-width: 100%;
}

.single-project-images img {
  width: auto;
  max-width: 100%;
  height: auto;
}

.single-project-info {
  position: sticky;
  top: 96px;
  color: var(--muted);
  font-size: 12px;
}

.single-project-info h1 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
}

.page-content {
  max-width: 760px;
  padding: clamp(54px, 8vw, 116px) clamp(18px, 4vw, 56px);
}

.page-body {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.75;
}

.page-body > :first-child {
  margin-top: 0;
}

.page-body > :last-child {
  margin-bottom: 0;
}

.page-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 840px) {
  .year-block,
  .project-viewer,
  .single-project {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 38px 28px;
  }

  .project-viewer {
    gap: 28px;
    padding-top: 64px;
  }

  .viewer-image-frame,
  .single-project-image-frame {
    justify-content: center;
  }

  .viewer-image {
    max-height: calc(100vh - 112px);
  }

  .viewer-images {
    padding-top: 0;
  }

  .viewer-info {
    position: static;
    order: -1;
    padding-top: 0;
  }

  .single-project-info {
    position: static;
  }
}
