/* Renata Carrillo Watanabe — portfolio landing
   Design language taken from her Canva deck: dark charcoal panels,
   massive tight grotesque headlines, pill nav, light cover. */

:root {
  --bg: #211f1e;
  --ink: #edebe8;
  --ink-dim: rgba(237, 235, 232, 0.72);
  --paper: #f2f1ef;
  --black: #191817;
  --display: "Archivo", "Helvetica Neue", Helvetica, sans-serif;
  --body: "Hanken Grotesk", "Helvetica Neue", Helvetica, sans-serif;
  --pad: clamp(1.25rem, 5vw, 5.5rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, 0.4vw + 0.9rem, 1.15rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

::selection { background: var(--ink); color: var(--black); }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(33, 31, 30, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(237, 235, 232, 0.08);
}

.nav nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.9rem var(--pad);
}

.nav-brand {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.95rem;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-dim);
  padding: 0.4rem 0.85rem;
  border-radius: 2px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--ink); }

.nav-links a.active {
  background: var(--paper);
  color: var(--black);
}

/* ---------- Cover ---------- */

.cover {
  background: var(--paper);
  color: var(--black);
  min-height: min(93vh, 62rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(1.25rem, 3.5vh, 2.5rem) var(--pad) clamp(1.5rem, 4vh, 3rem);
}

/* Cover wordmark — replica of the Canva deck: seven stacked copies of the
   word at identical x, offset only vertically, grays fading out from the
   central black copy; three circles rising off the final "io".
   On load the echoes expand OUT from behind the black word. */

.wordmark {
  position: relative;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.055em;
  font-size: clamp(4rem, 25.5vw, 28rem);
  line-height: 1;
  height: 1.72em;
  user-select: none;
  margin-top: 0;
}

.wordmark .w {
  position: absolute;
  left: 0;
  top: 0.44em;
  white-space: nowrap;
  transform: translateY(var(--d, 0em));
}

.wordmark .main {
  color: var(--black);
  z-index: 2;
}

.wordmark .e { z-index: 1; }

.u1 { --d: -0.145em; color: #8f8d8b; }
.u2 { --d: -0.29em;  color: #a9a7a5; }
.u3 { --d: -0.435em; color: #c0bebc; }
.d1 { --d: 0.145em;  color: #8f8d8b; }
.d2 { --d: 0.29em;   color: #a9a7a5; }
.d3 { --d: 0.435em;  color: #c0bebc; }

@keyframes word-spread {
  from { transform: translateY(0); }
  to   { transform: translateY(var(--d)); }
}

.wordmark .e {
  animation: word-spread 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--t, 0.35s);
}

.u1, .d1 { --t: 0.35s; }
.u2, .d2 { --t: 0.43s; }
.u3, .d3 { --t: 0.51s; }

/* circles over the "io" — black anchor, grays expand upward from it */
.dot {
  position: absolute;
  width: 0.16em;
  height: 0.16em;
  border-radius: 50%;
  left: 79.3%;
  top: calc(0.31em + var(--dy, 0em));
  z-index: 3;
}

.dot-b { --dy: 0.29em;  background: var(--black); z-index: 5; }
.dot-m { --dy: 0.145em; background: #8f8d8b; z-index: 4; }
.dot-t { --dy: 0em;     background: #a9a7a5; z-index: 3; }

@keyframes dot-rise {
  from { transform: translateY(calc(0.29em - var(--dy))); }
  to   { transform: translateY(0); }
}

.dot-m, .dot-t {
  animation: dot-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.dot-m { animation-delay: 0.43s; }
.dot-t { animation-delay: 0.51s; }

@media (prefers-reduced-motion: reduce) {
  .wordmark .e, .dot-m, .dot-t { animation: none; }
}

.cover-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: clamp(2rem, 6vh, 4rem);
}

.cover-tag {
  font-weight: 600;
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  margin-bottom: 0.35rem;
}

.cover-name {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  margin-bottom: 0.5rem;
}

.cover-link {
  font-weight: 700;
  text-underline-offset: 3px;
}

.cover-contact {
  list-style: none;
  text-align: right;
  font-weight: 500;
  font-size: 0.95rem;
  display: grid;
  gap: 0.3rem;
}

.cover-contact a { text-decoration: none; }
.cover-contact a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Panels ---------- */

.panel {
  padding: clamp(4rem, 10vh, 7.5rem) var(--pad);
  border-bottom: 1px solid rgba(237, 235, 232, 0.07);
}

.giant {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.95;
  font-size: clamp(3rem, 9.5vw, 8.5rem);
  color: var(--ink);
  margin-bottom: clamp(1.5rem, 4vh, 3rem);
}

.sub {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  margin-bottom: 0.75rem;
}

.lede {
  color: var(--ink-dim);
  max-width: 46rem;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
}

.lede.wide { max-width: 62rem; margin-bottom: clamp(2rem, 5vh, 3.5rem); }

.inline-link {
  color: var(--ink);
  font-weight: 700;
  text-underline-offset: 3px;
}

/* two-column split */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.split.tight { margin-top: clamp(2rem, 5vh, 3.5rem); }

.split-copy {
  display: grid;
  gap: 1.1rem;
  color: var(--ink-dim);
  max-width: 38rem;
  align-self: center;
}

.split-copy .loc {
  color: var(--ink);
  font-weight: 700;
}

.fact { color: var(--ink-dim); }

/* ---------- Education ---------- */

.photo-strip {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: clamp(0.75rem, 2vw, 2rem);
  margin-bottom: clamp(2.5rem, 6vh, 4rem);
}

.photo-strip img {
  width: 100%;
  height: clamp(11rem, 30vw, 21rem);
  object-fit: cover;
}

.headline-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.focus { margin-bottom: clamp(1.5rem, 4vh, 3rem); }

.focus-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-dim);
  margin-bottom: 0.4rem;
}

.focus p { font-weight: 600; font-size: clamp(1rem, 1.5vw, 1.25rem); }

/* ---------- Skills ---------- */

.skills {
  list-style: none;
  display: grid;
  gap: clamp(1.5rem, 3vh, 2.25rem);
  align-self: center;
}

.skills h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.skills h3::before {
  content: "• ";
  color: var(--ink-dim);
}

.skills p { color: var(--ink-dim); }

#skills .lede { margin-top: clamp(1.5rem, 4vh, 2.5rem); }

/* ---------- Experience ---------- */

.jobs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
}

.job h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  margin-bottom: 0.6rem;
}

.job-role { font-weight: 700; }

.job-meta {
  color: var(--ink-dim);
  margin-bottom: 0.75rem;
}

.job p:not(.job-role):not(.job-meta) { color: var(--ink-dim); }

.job img {
  margin-top: 1.25rem;
  width: 100%;
  height: clamp(10rem, 16vw, 13rem);
  object-fit: cover;
}

/* ---------- Portfolio ---------- */

#portfolio .headline-row { align-items: center; }
#portfolio .lede { margin-bottom: clamp(1.5rem, 4vh, 3rem); }

.projects {
  display: grid;
  gap: clamp(3rem, 8vh, 5.5rem);
  margin-top: clamp(1rem, 3vh, 2rem);
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}

.project:nth-child(even) figure { order: 2; }

.project figure img { width: 100%; }

.project-num {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(237, 235, 232, 0.35);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  margin-bottom: 0.9rem;
}

.project-copy h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1.05;
  margin-bottom: 0.6rem;
}

.project-tags {
  font-weight: 700;
  margin-bottom: 1rem;
}

.project-copy p:not(.project-tags) {
  color: var(--ink-dim);
  margin-bottom: 0.9rem;
}

.project-copy strong { color: var(--ink); }

.more {
  margin-top: clamp(2.5rem, 6vh, 4rem);
  color: var(--ink-dim);
  max-width: 46rem;
}

/* ---------- Embedded project documents ---------- */

.doc-viewer {
  position: relative;
  aspect-ratio: var(--ar, 16 / 9);
  max-height: min(78vh, 44rem);
  background: #171615;
  border: 1px solid rgba(237, 235, 232, 0.14);
  overflow: hidden;
}

.doc-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  scroll-snap-type: y proximity;
  display: grid;
  gap: 6px;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(237, 235, 232, 0.35) transparent;
  overscroll-behavior: contain;
}

.doc-scroll img {
  width: 100%;
  scroll-snap-align: start;
}

.doc-chip {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  background: rgba(23, 22, 21, 0.85);
  color: var(--ink);
  border: 1px solid rgba(237, 235, 232, 0.25);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  pointer-events: none;
}

/* ---------- Scroll reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition:
      opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .reveal.in {
    opacity: 1;
    transform: none;
  }
}

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

.footer { border-bottom: none; padding-bottom: clamp(3rem, 8vh, 5rem); }

.thanks {
  font-size: clamp(3.4rem, 12vw, 11rem);
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
}

.contact-list {
  list-style: none;
  display: grid;
  gap: 0.6rem;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  font-weight: 600;
}

.contact-list a {
  text-decoration: none;
  border-bottom: 1px solid rgba(237, 235, 232, 0.35);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}

.contact-list a:hover { border-color: var(--ink); }

.colophon {
  margin-top: clamp(2.5rem, 6vh, 4rem);
  color: var(--ink-dim);
  font-size: 0.9rem;
}

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  .nav nav { gap: 0.75rem; padding: 0.75rem var(--pad); }
  .nav-brand { display: none; }
  .nav-links { margin-left: 0; width: 100%; }

  .cover { min-height: 88svh; }
  .wordmark { font-size: 24vw; }

  .cover-foot { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .cover-contact { text-align: left; }

  .split { grid-template-columns: 1fr; }

  .photo-strip { grid-template-columns: 1fr; }
  .photo-strip img { height: clamp(11rem, 45vw, 16rem); }

  .jobs { grid-template-columns: 1fr; gap: 2.75rem; }

  .project { grid-template-columns: 1fr; }
  .project:nth-child(even) figure { order: 0; }
}
