:root {
  --bg: #05062a;
  --fg: rgba(255, 255, 255, 1);
  --fg-muted: rgba(255, 255, 255, 0.25);
  --fg-muted2: rgba(255, 255, 255, 0.20);
  --fg-subtle: rgba(255, 255, 255, 0.55);
  --line: rgba(255, 255, 255, 0.12);
  --pad: 24px;
  --gap-xs: 8px;
  --gap-sm: 16px;
  --gap-md: 24px;
  --gap-lg: 32px;
  --gap-xl: 42px;
  --fs-xs: 10px;
  --fs-sm: 14px;
  --fs-rg: 16px;
  --fs-md: 17px;
  --fs-lg: 19px;
  --fs-xl: 22px;
  --fs-xxl: 24px;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-bold: 700;
  --fw-xbold: 800;
  --fw-heavy: 900;
  --font-family: "Roboto", sans-serif;
  letter-spacing: 0.02em;
}   

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-family);
  font-optical-sizing: auto;
  font-size: var(--fs-rg);
  font-weight: var(--fw-regular);
  font-style: normal;
  font-variation-settings:
    "wdth" 100;
}  
a {
  color: var(--fg);
  text-decoration: none;
}
a:hover {
  text-decoration: none; 
  transition: color .5s ease-in-out;
}

html,
body {
  height: 100%;
}
.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: var(--pad);
 /*  border-bottom: 1px solid var(--line); */
  background: var(--bg);
  z-index: 1000;
}
.header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--gap-md);
}


.site-title {
  font-size: var(--fs-lg);
  letter-spacing: 0.8px;
  font-weight: var(--fw-xbold);
  text-transform: capitalize;
}
.header-top.header-row {
  margin-bottom: 20px;
}
.header-links {
  display: flex;
  gap: var(--gap-lg);
  font-size: var(--fs-md);
  color: var(--fg);
}
.header-top__right .header-link { 
  font-size: var(--fs-md);
}
.header-lang .header-link.is-active,
body.post-type-archive-work .header-link.see-all,
body.page-template-page-about .header-link.about,
body.home .header-link.see-all,
body.front-page .header-link.see-all {
	padding-bottom: 2px;
	border-bottom: 1px solid var(--fg);
}

.filters a {
  font-family: "Montserrat", sans-serif;
  font-size: var(--fs-xl);
  font-weight: var(--fw-heavy);
  color: var(--fg-subtle);
  font-optical-sizing: auto;
  font-style: normal;
  transition: color 0.2s ease, opacity 0.2s ease;
  opacity: 0.6;
}

.filters a.is-active,
body.is-seeing-all .filters a {
  color: var(--fg);
  opacity: 0.8;
}

body.is-seeing-all .header-link.see-all,
.header-link.see-all.is-active,
.header-link.about.is-active {
  border-bottom: 1px solid var(--fg);
}
.filters.header-row{
  display: block;
}
.filters a.is-active,
.filters a:hover,
.filters a.is-hover-highlight{
  color: var(--fg);
  opacity: 1;
}
.filters a::before{
  display: inline;
  content: ' / ';
  margin: 0 5px 0 7px;
}

.filters a:first-child::before{
  display: none;
}
.works-title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--fg);
  display: none;
}


.page {
  margin-top: 115px;
}

.works-app {
  display: grid;
 /*  grid-template-columns: 30% 70%;   */ 
	grid-template-columns: 50% 50%;  
  height: calc(100vh - 115px);
    margin-top: 115px;
}

.works-col {
  padding: var(--pad);
  overflow-y: auto;
  overflow-x: hidden;
}
.works-col::-webkit-scrollbar {
  width: 8px;
}
.works-col::-webkit-scrollbar-track {
  background: var(--bg);
}
.works-col::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}
.works-col::-webkit-scrollbar-thumb:hover {
  background: var(--fg-muted);
}
.works-left {
/*   border-right: 1px solid var(--line); */
}
.works-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.works-list li {
  margin: 0 0 7px 0;
}
.works-list a {
  transition: opacity 0.3s ease;
}
/* Opacidad mejorada para mejor legibilidad */
.works-list li:nth-child(1) a {
  opacity: 1;
}
.works-list li:nth-child(2) a {
  opacity: 0.95;
}
.works-list li:nth-child(3) a {
  opacity: 0.9; 
}
.works-list li:nth-child(4) a {
  opacity: 0.85; 
}
.works-list li:nth-child(n+5) a {
  opacity: 0.8;
}

/* Hide gradient opacity when a specific filter is selected */
.works-app.is-filtered .works-list li:nth-child(1) a,
.works-app.is-filtered .works-list li:nth-child(2) a,
.works-app.is-filtered .works-list li:nth-child(3) a,
.works-app.is-filtered .works-list li:nth-child(4) a {
  opacity: 0.35;
}
 
.works-list a:hover {
  opacity: 1 !important;
}
.works-list a:focus {
  opacity: 1 !important;
}
.works-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-md);
  background: var(--bg);
/*   border: 1px solid var(--line);
  padding: var(--gap-md); */
}
.works-grid.is-grid-2x2 {
  /* grid-template-columns: 1fr 1fr; */
  grid-template-columns: 1fr ;
  grid-auto-flow: row;
}
.works-grid.is-hidden {
  display: none;
}
.works-grid.is-list {
  display: flex;
  flex-direction: column;
}

/* Opacidad para imágenes en grilla 2x2 */
.works-grid.is-grid-2x2 .work-thumb {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.works-grid.is-grid-2x2 .work-thumb:hover {
  opacity: 1;
}
.work-thumb {
  width: 100%;
  /* aspect-ratio: 1 / 1; */
  aspect-ratio: 16 / 9;
  display: block;
  overflow: hidden;
}
body.is-seeing-all .work-thumb{
  aspect-ratio: 3 / 1;
}
.work-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.work-hero {
  margin: 0 0 16px 0;
  border: 1px solid var(--line);
}
.work-hero img {
  width: 100%;
  height: auto;
  display: block;
}
.work-detail {
  display: block;
}

.works-grid-footer {
  padding: var(--gap-md);
  text-align: center;
  border-top: 1px solid var(--line);
}

.btn-see-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: var(--fs-rg);
  font-weight: var(--fw-regular);
  color: var(--fg-muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: all 0.3s ease;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.btn-see-more:hover {
  color: var(--fg);
  border-color: var(--fg);
  background-color: var(--bg-hover, rgba(0, 0, 0, 0.02));
}

.btn-see-more:focus {
  outline: none;
  color: var(--fg);
  border-color: var(--fg);
}

.header-top__right .header-link.is-active,
.header-top__right .header-link[aria-current="page"] {
  border-bottom: 1px solid var(--fg);
}
.header-lang .header-link.is-muted {
  border-bottom: 1px solid transparent;
}

.filters a.is-hover-highlight,
.works-list a.is-hover-highlight {
  color: var(--fg) !important;
  opacity: 1 !important;
}

.work-thumb.is-hover-highlight {
  opacity: 1 !important;
}

.work-thumb.is-hover-highlight img {
  transform: scale(1.01);
}

/* Text-mode terms: writing/talks => 50/50 */
body.term-writing .works-app,
body.term-talks .works-app,
body.term-escritura .works-app,
body.term-charlas .works-app {
	grid-template-columns: 50% 50%;
}

.works-list a {
  font-size: var(--fs-rg);
  font-weight: var(--fw-regular);
  line-height: 1.25;
  color: var(--fg-subtle);
}

.works-list a:hover,
.works-list a.is-active {
  color: var(--fg);
  /* text-decoration: underline; */
}

/* solo Writing y Talks excerpt 

body.term-writing .works-list a,
body.term-talks .works-list a {
  color: var(--subtle);
}
body.term-writing .works-list a:hover,
body.term-writing .works-list a.is-active,
body.term-talks .works-list a:hover,
body.term-talks .works-list a.is-active  { 
  color: var(--fg); 
} */

body.term-escritura .works-app .work-thumb,
body.term-charlas .works-app .work-thumb,
body.term-writing .works-app .work-thumb,
body.term-talks .works-app .work-thumb {
    width: 100%;
    aspect-ratio: 3 / 1;
}

/* Hover effects: sync work-thumb, filters, and list items */
.works-grid .work-thumb:hover,
.works-list a:hover {
    opacity: 1 !important;
}

.work-thumb.is-hidden {
    display: none !important;
}

/* Highlight corresponding filter when hovering work item */
.works-grid .work-thumb:hover ~ .work-type-filter,
.works-list a:hover ~ .work-type-filter {
    opacity: 1 !important;
    color: var(--fg) !important;
}
.work-excerpt {
  font-size: var(--fs-sm);
  margin: 5px 0 15px;
    line-height: 1.5;
    color: var(--fg-subtle);
    font-style: italic;
    opacity: .8;
}

/* fin */

.works-app.is-detail-open  .works-list a {
  color: var(--fg-muted2);
 
} 
.works-app.is-detail-open  .works-list a:hover {
  color: var(--fg-muted);

}
.works-app.is-detail-open  .works-list a.is-active  {
  color: var(--fg); 
}

 
 
.work-detail__content {
  font-size: var(--fs-rg);
  line-height: 1.25;
  color: var(--fg);
}

.work-loading,
.work-error {
  padding: 18px;
  color: var(--fg-muted);
  border: 1px solid var(--line);
}

.work-error pre {
  white-space: pre-wrap;
  color: var(--fg-muted2);
}



.about-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 24px;
}

.about-photo{
  width:100%;
  height:auto;
  display:block;
}

.about-toggle__btn{
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 0;
  background:transparent;
  border:0;
  color:var(--fg-subtle);
  cursor:pointer;
  text-align:left; 
  font-size: var(--fs-md);
  /* opacity:.75; */
}

.about-toggle__btn:hover{ 
  color:var(--fg-subtle);
  /* opacity:1;  */
}

.about-toggle__content{
  padding: 6px 0 18px;
  color:var(--fg);
  font-size: var(--fs-rg); 
  line-height:1.5;
}
 /* Detail open: optionally keep left visible 
.works-app.is-detail-open .works-right{
 
}*/
.wp-block-embed-vimeo .wp-block-embed__wrapper,
.wp-block-embed-youtube .wp-block-embed__wrapper {
	    position: relative;
	    padding-top: 56.25%;
	    height: 0;
	    overflow: hidden;
}
.wp-block-embed-vimeo .wp-block-embed__wrapper iframe,
.wp-block-embed-youtube .wp-block-embed__wrapper iframe {
	    position: absolute;
	    top: 0;
	    left: 0;
	    width: 100%;
	    height: 100%;
}
@media (max-width: 900px) {
  :root {
    --bg: #05062a; 
    --pad: 15px;
    --gap-xs: 8px;
    --gap-sm: 16px;
    --gap-md: 13px;
    --gap-lg: 33px;
    --gap-xl: 41px;
    --fs-xs: 10px;
    --fs-sm: 10x;
    --fs-rg: 12px;
    --fs-md: 11px;
    --fs-lg: 12px;
    --fs-xl: 12px;
    --fs-xxl: 20px;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-bold: 700;
    --fw-xbold: 800;
    --fw-heavy: 900;
    --font-family: "Roboto", sans-serif;
    letter-spacing: 0.02em;
}
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: var(--pad);
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    z-index: 1000;
  }
  .filters {
    gap: var(--gap-sm);
    overflow-x: auto;
  }
  .filters a {
    font-size: var(--fs-xl);
    white-space: nowrap;
  }
  .works-app {
    grid-template-columns: 1fr;
        height: auto;
    margin-top: 85px;
  }
  .works-left {
    border-right: none;
    border-bottom: 1px solid var(--line);
            border-right: none;
        border-bottom: 1px solid var(--line);
        height: 136px;
  }
  .works-grid.is-grid-2x2 {
    grid-template-columns: 1fr;
  }
  
  .filters {
    gap: var(--gap-sm);
    overflow-x: auto;
  }
  .filters a {
    font-size: var(--fs-xl);
    white-space: nowrap;
  }
  .works-app {
    grid-template-columns: 1fr;
  }
  .works-left {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .works-grid.is-grid-2x2 {
    grid-template-columns: 1fr;
  }
  .works-app, body .works-app,
  body.term-writing .works-app, body.term-talks .works-app, body.term-escritura .works-app, body.term-charlas .works-app {
    grid-template-columns: auto;
  }
}
