
:root {
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
 
    --bg: #121310;
    --panel: #1a1b15;
    --ink: #ECE8DE;
    --ink-dim: #9C9A90;
    --green: #8EBF56;
    --magenta: #BF569C;
    --violet: #8E56BF;
    --olive: #3B4036;
    --rule: #2c2d24;
 
    --font: "Helvetica Neue", Helvetica, Arial, "Akzidenz Grotesk", sans-serif;
  }
  html { scroll-padding-top: env(safe-area-inset-top, 0px); scroll-behavior: smooth; }
  * { box-sizing: border-box; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }
 
  a { color: inherit; text-decoration: none; }
 
  /* ---------- layout shells ---------- */
  .wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 6vw;
  }
  section { position: relative; }
  .rule {
    border: none;
    border-top: 1px solid var(--rule);
    margin: 0;
  }
 
  /* ---------- nav bar ---------- */
  .navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 6vw;
    padding-top: calc(18px + env(safe-area-inset-top, 0px));
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    font-size: 0.85rem;
  }
  .navbar .brand { font-weight: 800; letter-spacing: -0.01em; }
  .navbar .links { display: flex; gap: 22px; color: var(--ink-dim); }
  .navbar .links a:hover { color: var(--ink); }
  .navbar .drop {
    color: var(--ink-dim);
    border: 1px solid var(--rule);
    padding: 5px 12px;
    font-size: 0.8rem;
    white-space: nowrap;
  }
  .navbar .drop:hover { color: var(--ink); border-color: var(--ink-dim); }
  @media (max-width: 720px) { .navbar .links { display: none; } }
 
  /* ---------- surname presentation block ---------- */
  .name-block {
    margin-top: 64px;
    background: var(--green);
    overflow: hidden;
    padding-top: 22vh;
    position: relative;
  }
  .name-type {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0 4vw;
    transform: translateY(14%);
  }
  .name-type span {
    font-weight: 900;
    color: var(--bg);
    font-size: clamp(3.2rem, 16vw, 13rem);
    line-height: 0.78;
    letter-spacing: -0.01em;
  }
  .name-sub {
    background: var(--bg);
    padding: 28px 6vw 56px;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .name-sub a {
    display: inline-block;
    width: fit-content;
    font-weight: 800;
    letter-spacing: -0.01em;
    font-size: clamp(1.3rem, 4vw, 2.1rem);
    line-height: 1.1;
    transition: opacity 0.15s ease;
  }
  .name-sub a:hover { opacity: 0.72; }
  .name-sub a:nth-child(1) { color: var(--green); }
  .name-sub a:nth-child(2) { color: var(--magenta); }
  .name-sub a:nth-child(3) { color: var(--violet); }
  .name-sub .hero-meta {
    margin-top: 20px;
    max-width: 34ch;
    color: var(--ink-dim);
    font-size: 1rem;
    line-height: 1.5;
  }
 
  /* one orchestrated entrance, on load only */
  .name-type span, .name-sub a, .name-sub .hero-meta {
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.7s cubic-bezier(.2,.7,.3,1) forwards;
  }
  .name-type span:nth-child(1) { animation-delay: .04s; }
  .name-type span:nth-child(2) { animation-delay: .08s; }
  .name-type span:nth-child(3) { animation-delay: .12s; }
  .name-type span:nth-child(4) { animation-delay: .16s; }
  .name-type span:nth-child(5) { animation-delay: .20s; }
  .name-type span:nth-child(6) { animation-delay: .24s; }
  .name-sub a:nth-child(1) { animation-delay: .34s; }
  .name-sub a:nth-child(2) { animation-delay: .40s; }
  .name-sub a:nth-child(3) { animation-delay: .46s; }
  .name-sub .hero-meta { animation-delay: .56s; }
  @keyframes rise { to { opacity: 1; transform: translateY(0); } }
  @media (prefers-reduced-motion: reduce) {
    .name-type span, .name-sub a, .name-sub .hero-meta { animation: none; opacity: 1; transform: none; }
  }
  @media (max-width: 720px) {
    .name-type { flex-wrap: wrap; row-gap: 6px; justify-content: center; }
    .name-type span { font-size: 16vw; }
  }
 
  /* ---------- proyectos carousel ---------- */
  .proyectos { padding-bottom: 96px; }
  .proy-head {
    padding: 88px 0 28px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
  }
  .proy-arrows { display: flex; gap: 10px; }
  .arrow {
    width: 40px; height: 40px;
    border: 1px solid var(--rule);
    background: transparent;
    color: var(--ink);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    font-family: var(--font);
  }
  .arrow:hover { border-color: var(--ink-dim); color: var(--green); }
  .proy-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .proy-track::-webkit-scrollbar { display: none; }
  .proy-card {
    flex: 0 0 min(76vw, 420px);
    scroll-snap-align: start;
  }
  .proy-card .ph { --ar: 4/3; }
 
  /* ---------- section heads ---------- */
  .section-head {
    padding: 88px 0 36px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
  }
  .section-title {
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: clamp(2.1rem, 6vw, 3.6rem);
    margin: 0;
  }
  .section-count {
    color: var(--ink-dim);
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  #foto .section-title { color: var(--green); }
  #video .section-title { color: var(--magenta); }
  #web .section-title { color: var(--violet); }
 
  /* ---------- placeholder media block ---------- */
  .ph {
    position: relative;
    width: 100%;
    aspect-ratio: var(--ar, 4/5);
    background: var(--panel);
    border: 1px dashed #4a4c3e;
    overflow: hidden;
  }
  .ph svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
  .ph-label {
    position: absolute;
    left: 14px;
    bottom: 14px;
    right: 14px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
  }
  .ph-label .cat {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--ink-dim);
  }
  .ph-add {
    width: 30px; height: 30px;
    border: 1px solid var(--ink-dim);
    display: flex; align-items: center; justify-content: center;
    flex: none;
    background: var(--bg);
  }
  .ph-add svg { position: static; width: 12px; height: 12px; }
  .ph-add line { stroke: var(--ink); stroke-width: 1.4; }
 
  .item-caption {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.95rem;
  }
  .item-caption .t { font-weight: 700; }
  .item-caption .m { color: var(--ink-dim); }
 
  /* ---------- foto grid ---------- */
  .grid-foto {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 28px 20px;
    padding-bottom: 96px;
  }
  .grid-foto .item:nth-child(1) { grid-column: span 4; }
  .grid-foto .item:nth-child(2) { grid-column: span 2; }
  .grid-foto .item:nth-child(2) .ph { --ar: 3/4; }
  .grid-foto .item:nth-child(3) { grid-column: span 2; }
  .grid-foto .item:nth-child(3) .ph { --ar: 1/1; }
  .grid-foto .item:nth-child(4) { grid-column: span 4; }
  .grid-foto .item:nth-child(4) .ph { --ar: 16/9; }
 
  /* ---------- video grid ---------- */
  .grid-video {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding-bottom: 96px;
  }
  .grid-video .ph { --ar: 16/9; }
 
  /* ---------- web grid ---------- */
  .grid-web {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding-bottom: 96px;
  }
  .grid-web .ph { --ar: 4/3; }
 
  /* ---------- about ---------- */
  .about {
    padding: 96px 0;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 56px;
    align-items: start;
  }
  .about .ph { --ar: 4/5; }
  .about-copy p {
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    line-height: 1.55;
    max-width: 46ch;
    color: var(--ink);
  }
  .about-copy p + p { margin-top: 20px; color: var(--ink-dim); font-size: 1rem; }
  .about-facts {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 20px 32px;
    max-width: 46ch;
  }
  .about-facts div { border-top: 1px solid var(--rule); padding-top: 10px; }
  .about-facts .k { font-size: 0.78rem; color: var(--ink-dim); letter-spacing: 0.02em; }
  .about-facts .v { font-size: 1rem; font-weight: 700; margin-top: 4px; }
 
  /* ---------- contact ---------- */
  .contact {
    padding: 96px 0 64px;
  }
  .contact-title {
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 0.92;
    font-size: clamp(2.6rem, 9vw, 6.4rem);
    margin: 0 0 40px;
  }
  .contact-email {
    display: inline-block;
    font-weight: 800;
    font-size: clamp(1.4rem, 4.5vw, 2.2rem);
    border-bottom: 2px solid var(--green);
    padding-bottom: 4px;
  }
  .contact-email:hover { border-color: var(--magenta); }
  .contact-list {
    margin-top: 48px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    padding: 0;
    list-style: none;
  }
  .contact-list a { color: var(--ink-dim); font-size: 0.98rem; }
  .contact-list a:hover { color: var(--ink); }
 
  footer {
    padding: 28px 0 calc(28px + env(safe-area-inset-bottom, 0px));
    display: flex;
    justify-content: space-between;
    color: var(--ink-dim);
    font-size: 0.82rem;
    flex-wrap: wrap;
    gap: 8px;
  }
 
  @media (max-width: 860px) {
    .grid-foto { grid-template-columns: repeat(2, 1fr); }
    .grid-foto .item:nth-child(1),
    .grid-foto .item:nth-child(2),
    .grid-foto .item:nth-child(3),
    .grid-foto .item:nth-child(4) { grid-column: span 2; }
    .grid-video, .grid-web { grid-template-columns: 1fr 1fr; }
    .about { grid-template-columns: 1fr; }
    .mark, .year { font-size: 0.8rem; }
  }
  @media (max-width: 560px) {
    .grid-video, .grid-web { grid-template-columns: 1fr; }
    .wrap { padding: 0 6vw; }
  }