/* Portfolio home — built from the Figma "main(home)" frame (1920px).
   Tokens, fonts, header and scaling match skyn-site/styles.css and cmugpt-site/styles.css. */

:root {
  --black: #000;
  --black-60: #666;
  --surface: #f4f4f4;
  --label-size: 16px; /* same small-label size as the case studies */
  --bg: #fbfbfc;

  --font-sans: "Inter", system-ui, sans-serif;
  --font-serif: "Hedvig Letters Serif", Georgia, serif;

  --side: 70px;       /* frame edge to content */
  --card-gap: 64px;   /* 991 - 927 */
}

*, *::before, *::after { box-sizing: border-box; }

body {
  zoom: var(--fit, 1);
  margin: 0;
  background: var(--bg);
  color: var(--black);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

p, h1, h2 { margin: 0; font-weight: 400; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* Header (same as the case studies) */
.site-header {
  max-width: 1920px;
  margin: 0 auto;
  padding: 40px var(--side) 0;
  display: flex;
  justify-content: flex-end;
}
.site-nav { display: flex; gap: 40px; font-size: 18px; }
.site-nav a:hover { color: var(--black-60); }

.home {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 var(--side) 157px;
}

/* Intro */
.intro { margin-top: 200px; padding-left: 3px; }
.intro__title {
  max-width: 1000px;
  font-family: var(--font-serif);
  font-size: 44px;
  line-height: 60px;
  letter-spacing: -0.01em;
}
.intro__now, .intro__past { font-size: 18px; line-height: 28px; }
.intro__now { margin-top: 13px; }
.intro__past { color: var(--black-60); }

/* Project grid */
.work {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--card-gap);
  row-gap: 65px;
  margin-top: 170px;
  scroll-margin-top: 40px;
}
.project { display: flex; flex-direction: column; }
.project__media {
  position: relative;
  aspect-ratio: 1377 / 946; /* skyn cover's own ratio, so it shows uncropped */
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: transform .4s cubic-bezier(.2, .7, .2, 1), box-shadow .4s ease;
}
.project:hover .project__media,
.project:focus-visible .project__media {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px -12px rgba(0, 0, 0, .18), 0 4px 10px -6px rgba(0, 0, 0, .08);
}
.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.project__media--skyn { background: #fefefe; }
.project:hover .project__media img { transform: scale(1.02); }
.project__title {
  margin-top: 25px;
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 35px;
}
.project__desc {
  margin-top: 5px;
  color: var(--black-60);
  font-size: 18px;
  line-height: 1.3;
}
.project__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.project__tags li {
  padding: 6px 12px; /* same chip padding as the case-study IA legend */
  background: var(--surface);
  border-radius: 999px;
  color: #8c8c8c;
  font-size: var(--label-size);
  line-height: 1.3;
}
.project:hover .project__title { color: var(--black-60); }
.project:focus-visible { outline: 2px solid var(--black); outline-offset: 8px; border-radius: 20px; }

@media (prefers-reduced-motion: reduce) {
  .project__media img, .project__media { transition: none; }
  .project:hover .project__media img { transform: none; }
  .project:hover .project__media, .project:focus-visible .project__media { transform: none; }
}

@media (max-width: 1023px) {
  :root { --side: 40px; }
  .intro { margin-top: 120px; padding-left: 0; }
  .intro__title { font-size: 36px; line-height: 50px; }
  .work { margin-top: 112px; column-gap: 32px; }
  .project__title { font-size: 24px; line-height: 31px; }
}

@media (max-width: 760px) {
  :root { --side: 16px; }
  .site-header { padding-top: 24px; }
  .site-nav { gap: 24px; font-size: 16px; }
  .home { padding-bottom: 96px; }
  .intro { margin-top: 72px; }
  .intro__title { font-size: 28px; line-height: 39px; }
  .intro__now { margin-top: 16px; }
  .intro__now, .intro__past { font-size: 15px; line-height: 24px; }
  .work { grid-template-columns: 1fr; row-gap: 48px; margin-top: 72px; }
  .project__media { border-radius: 12px; }
  .project__title { margin-top: 16px; font-size: 22px; line-height: 28px; }
  .project__desc { font-size: 15px; }
  .project__tags { margin-top: 12px; gap: 8px; }
  .project__tags li { padding: 5px 10px; font-size: 14px; }
  .intro__title, .intro__now, .intro__past, .project__desc { text-wrap: balance; }
}

/* Hover video sits on the cover and fades in once it is actually playing */
.project__hover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s ease, transform .4s ease; pointer-events: none; }
.project.is-playing .project__hover { opacity: 1; }
.project:hover .project__hover { transform: scale(1.02); }
