/* ============================================================
   DOUBLE PEREZ
   ============================================================ */

:root {
  --bg:    #0D0D0D;
  --fg:    #E8E8E8;
  --muted: #606060;
  --rule:  #1E1E1E;
  --hi:    #111111;

  --font:  'Helvetica Neue', Helvetica, Arial, sans-serif;
  --sz:    0.625rem;   /* 10px — base */
  --sz-md: 0.75rem;   /* 12px — titles */

  --px:    32px;
  --hh:    40px;

  --ease:    0.1s ease;
  --ease-bg: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* ============================================================ RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--sz);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================ HEADER */
.site-header {
  height: var(--hh);
  padding: 0 var(--px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-name {
  font-size: var(--sz);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--muted);
  user-select: none;
}
a.site-name { transition: opacity var(--ease); }
a.site-name:hover { opacity: 0.6; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  font-size: var(--sz);
  letter-spacing: 0.02em;
  color: var(--muted);
  transition: color var(--ease);
  user-select: none;
}
.nav-link:hover, .nav-link.active { color: var(--fg); }

.header-rule {
  height: 1px;
  background: var(--rule);
}

/* ============================================================ SHARED */
.page-main { flex: 1; }

/* ============================================================ LANDING */
.landing {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  height: calc(100vh - var(--hh) - 1px);
  max-height: calc(100vh - var(--hh) - 1px);
  overflow: hidden;
}

/* left col: info pinned to bottom */
.landing-left {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--px);
  border-right: 1px solid var(--rule);
}

.landing-bottom {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.landing-role {
  font-size: var(--sz-md);
  color: var(--fg);
  line-height: 1.4;
}

.landing-loc {
  font-size: var(--sz-md);
  color: var(--muted);
  line-height: 1.4;
}

/* right col: image flush, no extra space */
.landing-photo {
  overflow: hidden;
  position: relative;
  line-height: 0;
}

.landing-photo img {
  height: calc(100vh - var(--hh) - 1px);
  width: auto;
  display: block;
}

.cursor-tip {
  position: fixed;
  pointer-events: none;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--sz);
  letter-spacing: 0.02em;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 200;
}

.landing-photo:hover .cursor-tip {
  opacity: 1;
}

.photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: var(--sz);
  letter-spacing: 0.04em;
}

/* ============================================================ WORK TABLE
   Grid: PROJECT(1fr) | CATEGORY(200px) | YEAR(56px) | +(16px)
   Header row + data rows share the same template exactly.
*/
.work-head,
.work-row {
  display: grid;
  grid-template-columns: 1fr 200px 56px 16px;
  align-items: center;
  padding: 9px var(--px);
  border-bottom: 1px solid var(--rule);
}

.work-head {
  padding-top: 28px;
  padding-bottom: 9px;
}

.work-head span {
  font-size: var(--sz);
  color: var(--muted);
  letter-spacing: 0.04em;
  opacity: 0.4;
  line-height: 1;
}
.work-head span:nth-child(3) { text-align: right; }

.work-row {
  cursor: pointer;
  transition: background var(--ease);
  user-select: none;
}
.work-row:hover { background: var(--hi); }
.work-row.open  { background: var(--hi); }

.row-plus {
  width: 7px;
  height: 7px;
  position: relative;
  justify-self: end;
  transition: transform 0.2s ease;
  font-size: 0;
}
.row-plus::before,
.row-plus::after {
  content: '';
  position: absolute;
  background: var(--muted);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: background var(--ease);
}
.row-plus::before { width: 7px; height: 1px; }
.row-plus::after  { width: 1px; height: 7px; }
.work-row:hover .row-plus::before,
.work-row:hover .row-plus::after { background: var(--fg); }
.work-row.open  .row-plus { transform: rotate(45deg); }
.work-row.open  .row-plus::before,
.work-row.open  .row-plus::after { background: var(--fg); }

.project-title {
  font-size: var(--sz-md);
  color: var(--fg);
  letter-spacing: -0.01em;
}

.project-cat {
  font-size: var(--sz-md);
  color: var(--muted);
}

.project-year {
  font-size: var(--sz-md);
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ============================================================ DRAWERS */
.project-drawer {
  display: none;
  border-bottom: 1px solid var(--rule);
}

/* simple drawers: grid — desc left, link right on same baseline */
.project-drawer.drawer-simple.open {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 48px;
  padding: 9px var(--px) 12px;
  animation: up 0.12s ease forwards;
}

.drawer-desc {
  font-size: var(--sz-md);
  color: var(--muted);
  line-height: 1.65;
}

.drawer-role {
  display: block;
  margin-top: 6px;
  font-size: var(--sz);
  color: var(--muted);
  opacity: 0.4;
}

.drawer-link {
  font-size: var(--sz);
  color: var(--fg);
  white-space: nowrap;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: border-color var(--ease);
}
.drawer-link:hover { border-bottom-color: var(--fg); }

.drawer-link--muted {
  color: var(--muted);
  border-bottom-color: transparent;
  cursor: default;
}
.drawer-link--muted:hover { border-bottom-color: transparent; }

/* compound drawers */
.project-drawer.drawer-compound.open {
  display: block;
  animation: up 0.12s ease forwards;
}

.drawer-intro {
  font-size: var(--sz-md);
  color: var(--muted);
  line-height: 1.65;
  padding: 9px var(--px) 10px;
  border-bottom: 1px solid var(--rule);
}

/* sub-rows */
.sub-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 48px;
  padding: 9px var(--px);
  border-bottom: 1px solid var(--rule);
}
.sub-row:last-child { border-bottom: none; }

.sub-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sub-title {
  font-size: var(--sz-md);
  color: var(--fg);
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.sub-desc {
  font-size: var(--sz-md);
  color: var(--muted);
  line-height: 1.5;
}

.sub-link {
  font-size: var(--sz);
  color: var(--fg);
  white-space: nowrap;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: border-color var(--ease);
}
.sub-link:hover { border-bottom-color: var(--fg); }

.sub-link--muted {
  color: var(--muted);
  border-bottom-color: transparent;
  cursor: default;
}
.sub-link--muted:hover { border-bottom-color: transparent; }

.sub-status {
  font-size: var(--sz);
  color: var(--muted);
  opacity: 0.4;
  margin-left: 6px;
}

/* ============================================================ ABOUT / CONTACT */
.page-main--about,
.page-main--contact {
  flex: 1;
}

.info-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: baseline;
  padding: 14px var(--px);
  border-bottom: 1px solid var(--rule);
}

.info-row--first {
  border-top: 1px solid var(--rule);
}

.info-row--full {
  grid-template-columns: 1fr;
}

.info-label {
  font-size: var(--sz);
  color: var(--muted);
  letter-spacing: 0.04em;
  opacity: 0.4;
}

.info-value {
  font-size: var(--sz-md);
  color: var(--fg);
  line-height: 1.65;
}

.info-value--muted {
  color: var(--muted);
}

.contact-val {
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.contact-link {
  font-size: var(--sz-md);
  color: var(--fg);
  white-space: nowrap;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: border-color var(--ease);
  flex-shrink: 0;
}
.contact-link:hover { border-bottom-color: var(--fg); }

/* ============================================================ FOOTER */
.site-footer {
  padding: 9px var(--px);
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  color: var(--muted);
  font-size: var(--sz);
}

/* ============================================================ ANIMATION */
@keyframes up {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================ RESPONSIVE */
@media (max-width: 860px) {
  :root { --px: 16px; }

  .landing { grid-template-columns: 1fr; }
  .landing-left {
    border-right: none;
    padding: var(--px);
    justify-content: flex-end;
  }
  .landing-photo { display: none; }

  .work-head,
  .work-row { grid-template-columns: 1fr 48px 16px; }
  .project-cat { display: none; }
  .work-head span:nth-child(2) { display: none; }

  .sub-row { grid-template-columns: 1fr auto; gap: 16px; }

  .info-row { grid-template-columns: 96px 1fr; }
}

@media (max-width: 480px) {
  .info-row { grid-template-columns: 1fr; gap: 2px; padding: 10px var(--px); }
  .contact-val { flex-direction: column; gap: 8px; }
}
