/* Slides below the hero: Portfolio, Work With Me, Contact. Tokens come from hero.css. */

:root {
  --line: rgba(255, 255, 255, .12);
  --panel: #0b0b0b;
}

/* ---------- Shared pieces ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .06em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}

.btn:hover { transform: translateY(-1px); }

.btn--ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .4);
}

.btn--ghost:hover { background: var(--white); color: var(--oxblood); border-color: var(--white); }

.btn--solid {
  color: var(--white);
  background: #8a1626;
  border: 1px solid #8a1626;
}

.btn--solid:hover { background: var(--white); color: var(--oxblood); border-color: var(--white); }

.btn--small { padding: 9px 18px; font-size: 13px; }
.btn--large { padding: 18px 44px; font-size: 17px; letter-spacing: .1em; }

/* The nav rule in hero.css dims and underlines plain links; the CV button opts out. */
.nav__links { align-items: center; }
.nav__links a.btn { opacity: 1; padding: 9px 18px; }
.nav__links a.btn::after { display: none; }

.link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--white);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--oxblood-text);
  text-underline-offset: 5px;
  transition: color .3s var(--ease);
}

.link:hover { color: var(--oxblood-text); }

:focus-visible { outline: 2px solid var(--oxblood-text); outline-offset: 3px; }

.eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--oxblood-text);
}

.slide {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding: clamp(72px, 9vw, 120px) var(--pad);
  background: var(--black);
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.slide__inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.slide__head { max-width: 720px; }

.slide__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.slide__lede {
  margin: 20px 0 0;
  max-width: 58ch;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.6;
  color: var(--white-soft);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.reveal.is-in { opacity: 1; transform: none; }

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

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: clamp(32px, 4vw, 52px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats li {
  display: grid;
  gap: 4px;
  padding: 20px 20px 20px 0;
}

.stats li + li { padding-left: 20px; border-left: 1px solid var(--line); }

.stats strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
}

.stats span { font-size: 14px; line-height: 1.4; color: var(--white-soft); }

.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2vw, 26px);
  margin-top: clamp(28px, 3.4vw, 44px);
}

.tile {
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .4s var(--ease), transform .4s var(--ease), opacity .7s var(--ease);
}

.tile:hover { border-color: rgba(176, 48, 63, .75); }

.tile__visual {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(220px, 23vw, 300px);
  padding: 26px 26px 0;
  overflow: hidden;
  background: radial-gradient(ellipse 70% 90% at 50% 100%, rgba(109, 15, 28, .5), rgba(109, 15, 28, 0) 100%), #0f0f0f;
  border-bottom: 1px solid var(--line);
}

.tile__text { display: grid; gap: 8px; padding: 22px 24px 24px; }

.tile__name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.1;
}

.tile__line { font-size: 15px; line-height: 1.5; color: var(--white-soft); }

.tile__more {
  margin-top: 6px;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--oxblood-text);
}

.tile__more::after {
  content: "→";
  display: inline-block;
  margin-left: 8px;
  transition: transform .3s var(--ease);
}

.tile:hover .tile__more::after { transform: translateX(5px); }

.tile__tag {
  position: absolute;
  right: 14px;
  top: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--oxblood);
  background: var(--white);
}

/* Phone mockups: each one shows a crop of the email board and scrolls it on hover. */
.tile__visual--phones {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(12px, 2vw, 24px);
}

.phone {
  position: relative;
  flex: 0 0 auto;
  width: clamp(92px, 10vw, 128px);
  aspect-ratio: 9 / 19;
  margin-top: 22px;
  border: 5px solid #1d1d1d;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 24px 40px -18px rgba(0, 0, 0, .9);
}

.phone--mid { margin-top: 0; }

.phone img {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--w);
  max-width: none;
  transform: translate(var(--x), -1.4%);
  transition: transform 7s linear;
}

.tile:hover .phone img,
.tile:focus-visible .phone img { transform: translate(var(--x), var(--y1)); }

/* Browser frame */
.browser {
  align-self: end;
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, .16);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  background: #151515;
  box-shadow: 0 -10px 40px -18px rgba(0, 0, 0, .9);
}

.browser__bar {
  display: flex;
  gap: 6px;
  padding: 9px 12px;
  background: #1b1b1b;
}

.browser__bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
}

.browser img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
  transition: transform .8s var(--ease);
  transform-origin: top center;
}

.tile:hover .browser img { transform: scale(1.03); }

/* Journey map */
.tile__visual--journey { padding-bottom: 26px; }

.journey {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  width: 100%;
}

.journey::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 11px;
  height: 1px;
  background: linear-gradient(90deg, var(--oxblood-text), rgba(255, 255, 255, .5));
}

.journey__step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding-top: 34px;
  text-align: center;
}

.journey__step::before {
  content: "";
  position: absolute;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0f0f0f;
  border: 1px solid var(--oxblood-text);
  box-shadow: inset 0 0 0 5px #0f0f0f, inset 0 0 0 12px var(--oxblood-text);
  transition: transform .4s var(--ease);
}

.tile:hover .journey__step::before { transform: scale(1.15); }
.tile:hover .journey__step:nth-child(2)::before { transition-delay: .08s; }
.tile:hover .journey__step:nth-child(3)::before { transition-delay: .16s; }
.tile:hover .journey__step:nth-child(4)::before { transition-delay: .24s; }
.tile:hover .journey__step:nth-child(5)::before { transition-delay: .32s; }

.journey__step b { font-weight: 400; font-size: 14px; line-height: 1.2; }
.journey__step i { font-style: normal; font-size: 12px; line-height: 1.3; color: var(--white-soft); }

.slide__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 24px;
  margin-top: clamp(36px, 4vw, 56px);
}

.slide__cta p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(24px, 2.4vw, 32px);
}

/* ---------- Work With Me ---------- */

.work { background: linear-gradient(180deg, #000 0%, #14060a 55%, #000 100%); }

.doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: clamp(32px, 4vw, 52px);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

.door { padding: clamp(26px, 3.4vw, 46px); background: rgba(0, 0, 0, .45); }
.door + .door { border-left: 1px solid var(--line); }

.door__kind {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--oxblood-text);
}

.door__title {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1;
}

.door ul { margin: 0; padding: 0; list-style: none; }

.door li {
  position: relative;
  padding: 12px 0 12px 22px;
  font-size: 17px;
  line-height: 1.4;
  border-top: 1px solid var(--line);
}

.door li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 9px;
  height: 1px;
  background: var(--oxblood-text);
}

.why {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  margin-top: clamp(32px, 4vw, 52px);
}

.why__label {
  margin: 4px 0 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 13px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--oxblood-text);
}

.why__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.4vw, 36px);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  line-height: 1.55;
  color: var(--white-soft);
}

.why__list strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.15;
  color: var(--white);
}

.call-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: clamp(32px, 4vw, 52px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.call-steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 0;
  font-size: 17px;
}

.call-steps li + li { padding-left: 34px; }

.call-steps li + li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--oxblood-text);
}

.call-steps span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--oxblood-text);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1;
}

.work__cta {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-top: clamp(36px, 4vw, 56px);
  text-align: center;
}

.work__micro { margin: 0; font-size: 15px; color: var(--white-soft); }
.work__cv { display: flex; gap: 26px; margin: 10px 0 0; font-size: 15px; }

/* ---------- Contact ---------- */

.contact { text-align: center; }
.contact .slide__inner { display: grid; justify-items: center; }
.contact .slide__lede { margin-top: 16px; }

.contact__email {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 18px;
  margin: clamp(36px, 5vw, 64px) 0 0;
}

.contact__email a {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 6.4vw, 84px);
  line-height: 1.05;
  overflow-wrap: anywhere;
  background: linear-gradient(var(--oxblood-text), var(--oxblood-text)) left bottom / 0 2px no-repeat;
  transition: background-size .5s var(--ease);
}

.contact__email a:hover { background-size: 100% 2px; }

.copy {
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--white-soft);
  cursor: pointer;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}

.copy:hover, .copy.is-done { color: var(--white); border-color: var(--oxblood-text); }

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: clamp(32px, 4vw, 48px) 0 0;
}

.contact__call { margin: 26px 0 0; font-size: 15px; }

.contact__foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, .45);
}

/* ---------- Dialogs ---------- */

.viewer {
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  padding: 0;
  color: var(--white);
  background: #080808;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 20px;
  overflow: hidden;
}

.viewer[open] { display: grid; grid-template-rows: auto 1fr auto; }
.viewer::backdrop { background: rgba(0, 0, 0, .82); }

.viewer__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.viewer__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 30px;
  line-height: 1.1;
}

.viewer__note {
  margin: 8px 0 0;
  max-width: 70ch;
  font-size: 15px;
  line-height: 1.55;
  color: var(--white-soft);
}

.viewer__tools { display: flex; align-items: center; gap: 12px; }

.viewer__close {
  flex: 0 0 auto;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px;
  background: none;
  font: inherit;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--white);
  cursor: pointer;
}

.viewer__close:hover { border-color: var(--oxblood-text); }

.viewer__body {
  display: grid;
  gap: 18px;
  padding: 20px 24px;
  overflow-y: auto;
  min-height: 0;
}

.viewer__body figure { margin: 0; }

.viewer__body img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.viewer__body figcaption { margin-top: 8px; font-size: 14px; color: var(--white-soft); }

.viewer__foot {
  margin: 0;
  padding: 14px 24px 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, .55);
  border-top: 1px solid var(--line);
}

.viewer--cv { height: calc(100vh - 48px); height: calc(100dvh - 48px); }
.viewer--cv[open] { grid-template-rows: auto 1fr; }
.viewer--cv .viewer__head { align-items: center; }
.viewer__body--cv { padding: 0; gap: 0; grid-template-rows: 1fr auto; }

.viewer__body--cv iframe {
  width: 100%;
  height: 100%;
  min-height: 300px;
  border: 0;
  background: #fff;
}

.viewer__fallback { margin: 0; padding: 12px 24px; font-size: 14px; color: var(--white-soft); }

/* ---------- Smaller screens ---------- */

@media (max-width: 900px) {
  .why { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 820px) {
  .nav__links li:not(.nav__cv) { display: none; }

  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats li { padding: 16px 14px 16px 0; }
  .stats li:nth-child(3) { padding-left: 0; border-left: 0; }
  .stats li:nth-child(n + 3) { border-top: 1px solid var(--line); }

  .tiles { grid-template-columns: 1fr; }
  .tile__visual { height: 230px; padding: 20px 18px 0; }
  .tile__visual--journey { padding-bottom: 20px; }
  .phone { width: 96px; }

  .journey { gap: 4px; }
  .journey__step b { font-size: 12px; }
  .journey__step i { display: none; }

  .doors { grid-template-columns: 1fr; }
  .door + .door { border-left: 0; border-top: 1px solid var(--line); }

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

  .call-steps { grid-template-columns: 1fr; }
  .call-steps li { padding: 14px 0; }
  .call-steps li + li { padding-left: 0; border-top: 1px solid var(--line); }
  .call-steps li + li::before { display: none; }

  .viewer__head { padding: 18px 16px 14px; }
  .viewer__body { padding: 16px; }
  .viewer__body--cv { padding: 0; }
  .viewer__foot { padding: 12px 16px 16px; }
  .viewer__title { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .phone img, .browser img { transition: none; }
}
