/* =========================================================
   Katherine Rado — Portfolio
   Redesigned to match Figma: editorial, black/white, type-led
   ========================================================= */

/* --- @font-face: Argesta family -------------------------- */

@font-face {
  font-family: "Argesta Display";
  src: url("../fonts/ArgestaDisplay-Regular.woff") format("woff"),
       url("../fonts/ArgestaDisplay-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Argesta Display";
  src: url("../fonts/ArgestaDisplay-RegularItalic.woff") format("woff"),
       url("../fonts/ArgestaDisplay-RegularItalic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Argesta Headline";
  src: url("../fonts/ArgestaHeadline-Regular.woff") format("woff"),
       url("../fonts/ArgestaHeadline-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Argesta Headline";
  src: url("../fonts/ArgestaHeadline-RegularItalic.woff") format("woff"),
       url("../fonts/ArgestaHeadline-RegularItalic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Argesta";
  src: url("../fonts/ArgestaText-Regular.woff") format("woff"),
       url("../fonts/ArgestaText-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Argesta";
  src: url("../fonts/ArgestaText-RegularItalic.woff") format("woff"),
       url("../fonts/ArgestaText-RegularItalic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Argesta";
  src: url("../fonts/ArgestaText-Bold.woff") format("woff"),
       url("../fonts/ArgestaText-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Argesta Hairline";
  src: url("../fonts/ArgestaHairline-Regular.woff") format("woff"),
       url("../fonts/ArgestaHairline-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Argesta Hairline";
  src: url("../fonts/ArgestaHairline-RegularItalic.woff") format("woff"),
       url("../fonts/ArgestaHairline-RegularItalic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* --- @font-face: RM Neue family -------------------------- */

@font-face {
  font-family: "RM Neue";
  src: url("../fonts/RMNeue-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "RM Neue";
  src: url("../fonts/RMNeue-LightItalic.woff2") format("woff2");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "RM Neue";
  src: url("../fonts/RMNeue-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "RM Neue";
  src: url("../fonts/RMNeue-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "RM Neue";
  src: url("../fonts/RMNeue-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "RM Neue";
  src: url("../fonts/RMNeue-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* --- Reset ------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, picture, video { display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }

/* --- Design tokens --------------------------------------- */

:root {
  --color-white: #ffffff;
  --color-black: #000000;

  --font-display:  "Argesta Display",  Georgia, serif;
  --font-headline: "Argesta Headline", Georgia, serif;
  --font-body:     "Argesta",          Georgia, serif;
  --font-ui:       "RM Neue",          Helvetica, Arial, sans-serif;

  --content-width: 840px;
  --page-padding:  clamp(24px, 5vw, 220px);
}

/* --- Base ------------------------------------------------ */

body {
  font-family: var(--font-ui);
  font-weight: 300;
  color: var(--color-black);
  background: var(--color-white);
  font-size: 16px;
  line-height: 1.5;
}

/* --- Site nav -------------------------------------------- */

.site-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 40px var(--page-padding) 0;
  animation: nav-slide-down 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.85s both;
}

.site-nav a {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--color-black);
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
}

.site-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-black);
}

/* --- Hero animations ------------------------------------- */

@keyframes name-slide-up {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes role-slide-left {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes role-slide-right {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes photo-fade-down {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-18px);
  }
  to {
    opacity: 0.6;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes nav-slide-down {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes social-slide-up {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* --- Hero ------------------------------------------------ */

.hero {
  background: var(--color-white);
  position: relative;
  padding: 0 var(--page-padding);
  min-height: 730px;
  display: flex;
  flex-direction: column;
}

.hero-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  width: 100%;
  position: relative;
  flex: 1;
}

/* Role labels — positioned at top-left and bottom-right */
.hero-role-left,
.hero-role-right {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 16px;
  color: var(--color-black);
  position: absolute;
  z-index: 2;
}

.hero-role-left {
  left: 0;
  top: 312px;
  animation: role-slide-left 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s both;
}

.hero-role-right {
  right: 0;
  top: 430px;
  text-align: right;
  animation: role-slide-right 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s both;
}

/* Photo — grayscale, overlaps name */
.hero-photo-wrap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 120px;
  width: 300px;
  height: 408px;
  opacity: 0.6;
  z-index: 1;
  overflow: hidden;
  border-radius: 0;
  animation: photo-fade-down 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.85s both;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(100%);
  mix-blend-mode: luminosity;
}

/* Name — large display text, overlaps photo */
.hero-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(52px, 7.5vw, 96px);
  line-height: 1.33;
  text-align: center;
  white-space: nowrap;
  color: var(--color-black);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 310px;
  z-index: 2;
  width: 100%;
  animation: name-slide-up 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0s both;
}

/* Social icons */
.hero-social {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  align-items: center;
  z-index: 2;
  animation: social-slide-up 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.85s both;
}

.hero-social a {
  color: var(--color-black);
  display: flex;
  align-items: center;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.hero-social a:hover {
  opacity: 1;
}

/* --- Projects -------------------------------------------- */

.projects {
  background: var(--color-black);
  padding: 0 var(--page-padding) 80px;
}

.projects-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding-top: 40px;
}

.project-row {
  display: block;
  color: var(--color-white);
  padding: 24px 0;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transition: opacity 0.2s;
}

.project-row:last-child {
  border-bottom: none;
}

.project-row:hover {
  opacity: 0.65;
}

.project-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 16px;
  line-height: 24px;
  gap: 24px;
}

.project-desc {
  flex: 1;
}

.project-year {
  text-align: right;
  white-space: nowrap;
}

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

.footer-nav {
  background: var(--color-white);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  height: 102px;
  padding: 0 var(--page-padding);
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.footer-nav a {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--color-black);
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
}

.footer-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-black);
}

/* --- Info page load animations --------------------------- */

@keyframes info-fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.info-anim-1 {
  animation: info-fade-up 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.0s both;
}

.info-anim-2 {
  animation: info-fade-up 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s both;
}

.info-anim-3 {
  animation: info-fade-up 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.55s both;
}

/* --- Info page ------------------------------------------- */

.info-header {
  padding: 60px var(--page-padding) 24px;
}

.info-header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

/* Left column: name + title */
.info-header-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  line-height: 1;
  color: var(--color-black);
}

.info-title {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 16px;
  color: var(--color-black);
  margin: 0;
}

/* Right column: icons + email */
.info-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.info-social {
  display: flex;
  gap: 16px;
  align-items: center;
}

.info-social a {
  color: var(--color-black);
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
}

.info-social a:hover {
  opacity: 0.6;
}

.info-email {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 16px;
  color: var(--color-black);
  cursor: pointer;
  position: relative;
  display: inline-block;
}

.info-email-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-black);
  color: var(--color-white);
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 5px 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.info-email:hover .info-email-tooltip {
  opacity: 1;
}

.info-email-tooltip.is-copied {
  opacity: 1;
}

/* Resume content */

.info-main {
  padding: 0 var(--page-padding) 80px;
}

.info-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* Each section (Overview, Experience) */
.resume-section {
  margin-bottom: 0;
}

.resume-section-label {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 16px;
  color: var(--color-black);
  padding: 24px 0 4px;
  border-bottom: 1px solid var(--color-black);
  margin-bottom: 0;
}

/* Two-column row: left (title/meta) + right (body) */
.resume-row {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.resume-row:last-child {
  border-bottom: none;
}

/* Overview row sits a bit closer to its rule */
.resume-section:first-child .resume-row {
  padding-top: 8px;
}

.resume-left {
  width: 194px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.resume-job-title {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 16px;
  color: var(--color-black);
}

.resume-company,
.resume-dates {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 16px;
  color: var(--color-black);
}

.resume-body {
  flex: 1;
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 16px;
  color: var(--color-black);
  line-height: 1.6;
}

.resume-body p {
  margin: 0 0 6px;
}

.resume-body p:last-child {
  margin-bottom: 0;
}

/* --- Project page ---------------------------------------- */

/* Nav on project pages: no hero delay, just a quick drop */
.project-page .site-nav {
  animation: nav-slide-down 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s both;
}

/* White header: title + subtitle */
.project-header {
  background: var(--color-white);
  padding: 40px var(--page-padding) 0;
  text-align: center;
}

.project-header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.project-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(48px, 7.5vw, 96px);
  line-height: 1;
  color: var(--color-black);
  margin-bottom: 16px;
  animation: info-fade-up 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.15s both;
}

.project-subtitle {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 16px;
  color: var(--color-black);
  max-width: 327px;
  margin: 0 auto;
  animation: info-fade-up 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s both;
}

/* Hero screenshot band — background splits white (top) / black (bottom)
   so the image appears to straddle the section boundary */
.project-hero-band {
  background: linear-gradient(
    to bottom,
    var(--color-white) 50%,
    var(--color-black) 50%
  );
  padding: 48px var(--page-padding) 0;
}

.project-hero-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.project-hero-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

/* Black gallery section */
.project-gallery {
  background: var(--color-black);
  padding: 32px var(--page-padding) 80px;
}

.project-gallery-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}


.project-gallery-intro {
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-white);
  text-align: center;
  max-width: 567px;
  margin-bottom: -8px; /* gap is 40px; -8px brings spacing below copy to 32px */
}

.project-gallery-img {
  width: 100%;
  max-width: var(--content-width);
  height: auto;
  display: block;
  border-radius: 6px;
}

.project-gallery-img--flat {
  border-radius: 0;
}

/* Dark footer nav variant (used on project pages) */
.footer-nav--dark {
  background: var(--color-black);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-nav--dark a {
  color: var(--color-white);
}

.footer-nav--dark a.active::after {
  background: var(--color-white);
}

/* --- Responsive ------------------------------------------ */

/* Instant-jump for users who prefer reduced motion —
   collapses duration/delay so animations snap to their
   fill-mode endpoint without breaking layout transforms */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay:    0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Tablet / large phone (≤ 900px) ---------------------- */

@media (max-width: 900px) {
  .hero {
    min-height: 600px;
  }

  .hero-role-left {
    top: 240px;
  }

  .hero-role-right {
    top: 340px;
  }

  .hero-photo-wrap {
    top: 80px;
    width: 220px;
    height: 300px;
  }

  .hero-name {
    top: 240px;
    white-space: normal;
    text-align: center;
  }
}

/* --- Small tablet / large phone (≤ 600px) ---------------- */

@media (max-width: 600px) {
  .hero {
    min-height: 500px;
  }

  /* Role labels: stack centered below the name instead of left/right.
     Use left:0/right:0 (full-width) + text-align:center so centering
     doesn't rely on transform, which the animation would override. */
  .hero-role-left,
  .hero-role-right {
    left: 0;
    right: 0;
    text-align: center;
    white-space: nowrap;
    transform: none;
    /* Swap the slide-from-sides animation for a simple fade-up */
    animation: info-fade-up 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s both;
  }

  .hero-role-left {
    top: 249px; /* ~16px below name bottom (180px top + 53px line) */
  }

  .hero-role-right {
    top: 273px; /* one line-height (24px) below role-left */
  }

  .hero-photo-wrap {
    top: 60px;
    width: 180px;
    height: 240px;
  }

  .hero-name {
    top: 180px;
    font-size: 40px;
  }

  .project-name {
    font-size: 24px;
  }

  /* Info page header: stack name/title above social icons + email */
  .info-header-inner {
    flex-direction: column;
    gap: 16px;
  }

  .info-header-right {
    align-items: flex-start;
  }

  /* Resume rows: stack role/company/dates above the body copy */
  .resume-row {
    flex-direction: column;
    gap: 8px;
  }

  .resume-left {
    width: auto;
  }
}

/* --- Phone (≤ 430px) ------------------------------------- */
/* Catches iPhone SE, 12 mini, 12/13/14 and similar handsets */

@media (max-width: 430px) {
  .hero {
    min-height: 440px;
  }

  .hero-photo-wrap {
    top: 50px;
    width: 150px;
    height: 200px;
  }

  /* At 32px the name wraps to two lines on ~375px screens;
     role labels sit below the wrapped name bottom (~240px) */
  .hero-name {
    top: 155px;
    font-size: 32px;
  }

  .hero-role-left {
    top: 258px;
  }

  .hero-role-right {
    top: 282px;
  }
}
