/* portfolio-new.css */

:root {
  --text-primary: #3d4142;
  --text-secondary: #8a8e91;
  --text-tertiary: #bbc1c3;
  --underline: #adb2b4;
  --underline-active: #bec3c7;
  --background-light: #FCFDFD;
  --background: #F7F8F8;
  --intensity: 3.4; /* cat animation strength — tune this to match cat-test */
}

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

body.pn-page {
  background: var(--background-light);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  scrollbar-gutter: stable;
}


.pn-article-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary) !important;
  letter-spacing: -0.28px;
  line-height: 22px;
  margin: 0 0 40px;
}


.pn-container {
  margin: 0 auto;
  width: 550px;
  padding: 88px 0 100px;
}

@media (max-width: 598px) {
  .pn-container {
    width: 100%;
    padding: 48px 24px 80px;
  }
}

/* ── Bio ──────────────────────────────────────────────── */
.pn-bio {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.322px;
  line-height: 18px;
  margin-bottom: 100px;
}

.pn-bio p {
  margin-bottom: 18px;
}

.pn-bio p:last-child {
  margin-bottom: 0;
}

.pn-bio .name {
  font-family: 'Gochi Hand', cursive;
  color: var(--text-secondary);
  font-size: 19px;
  font-weight: bold;
  font-style: normal;
}

.pn-bio .muted {
  color: var(--text-secondary);
}

.pn-bio a {
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--underline);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  transition: all 300ms;
}

.pn-bio a:hover {
  text-decoration-color: var(--underline-active);
  color: var(--text-primary);
  text-decoration-style: solid;


}

/* ── Works header ─────────────────────────────────────── */
.pn-works-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.322px;
  margin-bottom: 2rem;
}

.pn-works-label {
  color: var(--text-secondary);
}

.pn-view-toggle {
  color: var(--text-secondary);
}

.pn-toggle {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--underline);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 300ms;
}

.pn-toggle:hover {
  color: var(--text-primary);
  text-decoration-color: var(--underline);

}

.pn-toggle.pn-active {
  color: var(--text-primary);
  text-decoration-color: var(--underline);
}

/* ── Shared ───────────────────────────────────────────── */
.pn-view {
  opacity: 1;
  transition: opacity 0.15s ease-in;
}

.pn-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* ── Date helpers ─────────────────────────────────────── */
.pn-date-start {
  color: var(--text-tertiary);
}

.pn-coming-soon {
  font-family: 'Gochi Hand', cursive;
  font-size: 16px;
  color: var(--text-tertiary);
  letter-spacing: -0.048px;
  line-height: 18px;
  font-weight: normal;
}

/* ── Compact view ─────────────────────────────────────── */
.pn-compact-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 20px;
  row-gap: 0;
}

a.pn-compact-title,
a.pn-item-title {
  text-decoration: none;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  color: var(--text-primary);
  transition: text-decoration-color 0.3s;
}

a.pn-compact-title:hover,
a.pn-item-title:hover {
  text-decoration: underline;
  text-decoration-color: var(--underline-active);
  color: var(--text-primary);
  text-decoration-style: solid;
  text-decoration-thickness: 2px;
}

.pn-compact-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.28px;
  line-height: 22px;
  align-self: center;
}

.pn-compact-date {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.322px;
  line-height: 22px;
  text-align: right;
  align-self: center;
  white-space: nowrap;
}

/* Spacer rows between groups */
.pn-compact-spacer {
  grid-column: 1 / -1;
  height: 22px;
}

/* ── Thumbnail view ───────────────────────────────────── */
a.pn-thumb-item {
  display: block;
  text-decoration: none;
  color: inherit;
}

.pn-thumb-item {
  margin-bottom: 28px;
}

.pn-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.322px;
  margin-bottom: 10px;
  height: 22px;
}

.pn-item-title {
  color: var(--text-primary);
  letter-spacing: -0.28px;
  text-decoration: none;
}

.pn-item-date {
  color: var(--text-secondary);
  text-align: right;
  white-space: nowrap;
}

/* Frames container */
.pn-frames-row {
  display: flex;
  gap: 26px;
  justify-content: center;
  align-items: center;
  background: var(--background);
  border-radius: 6px;
  padding: 28px 24px 28px;
  min-height: 160px;
  overflow: hidden;
}

/* ── iPhone frame ─────────────────────────────────────── */
/* PNG dimensions: 473×932 */
.pn-frame.pn-frame-iphone {
  position: relative;
  flex-shrink: 0;
  width: 108px;
  aspect-ratio: 393 / 852;
}

.pn-frame.pn-frame-iphone .pn-frame-screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 6%;
  background: #000;
}

.pn-frame.pn-frame-iphone .pn-frame-screen img,
.pn-frame.pn-frame-iphone .pn-frame-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pn-frame-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
  transform: scale(1.203);
}

/* Scale iphone frames by total frame count */
.pn-frames-row:has(.pn-frame:nth-child(1):last-child) .pn-frame.pn-frame-iphone {
  width: 160px;
}

.pn-frames-row:has(.pn-frame:nth-child(2):last-child) .pn-frame.pn-frame-iphone {
  width: 126px;
}

.pn-frames-row:has(.pn-frame:nth-child(3):last-child) .pn-frame.pn-frame-iphone {
  width: 108px;
}

.pn-frames-row:has(.pn-frame:nth-child(4):last-child) .pn-frame.pn-frame-iphone {
  width: 88px;
}

/* ── Desktop frame ────────────────────────────────────── */
.pn-frame.pn-frame-desktop {
  flex-shrink: 0;
  width: 280px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.10);
}

.pn-frame.pn-frame-desktop .pn-frame-screen {
  aspect-ratio: 16 / 10;
  background: #111;
}

.pn-frame.pn-frame-desktop .pn-frame-screen img,
.pn-frame.pn-frame-desktop .pn-frame-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Scale desktop frames by total frame count */
.pn-frames-row:has(.pn-frame:nth-child(1):last-child) .pn-frame.pn-frame-desktop {
  width: 340px;
}

.pn-frames-row:has(.pn-frame:nth-child(2):last-child) .pn-frame.pn-frame-desktop {
  width: 240px;
}

/* ── Article / Project page ───────────────────────────── */
.pn-article-nav {
  margin-bottom: 40px;
}

.pn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: -0.322px;
  transition: color 0.2s;
}


.pn-back:hover {
  color: var(--text-primary);
}



.pn-article {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.322px;
  line-height: 18px;
}

.pn-article p {
  margin-bottom: 12px;
}

.pn-article h1,
.pn-article h2 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.28px;
  line-height: 22px;
  margin: 28px 0 8px;
}

.pn-article h2 {
  color: var(--text-secondary);
}

.pn-article a {
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--underline);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

.pn-article ul {
  padding-left: 1.25rem;
  margin-bottom: 12px;
}

.pn-article li {
  padding-bottom: 2px;
}

.pn-article figure {
  margin: 24px 0 28px;
}

.pn-article figcaption {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
  text-align: center;
  letter-spacing: -0.2px;
}

.pn-article img,
.pn-article video {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.image-inline {
  width: 100%;
  height: auto;
  display: block;
}

.image-inline.border {
  border-radius: 6px;
}

.padded {
  padding: 1rem;
  background-color: var(--background);
  border-radius: 6px;
}

.padded.x2 {
  padding: 2rem 4rem;
  background-color: var(--background);
  border-radius: 6px;
}

.pn-article iframe {
  width: 100%;
  border-radius: 6px;
  background-color: var(--background);
}

.pn-article .brackets {
  font-family: 'Bradley Hand', 'Bradley Hand ITC', cursive;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 2rem 0;
  display: block;
}

/* ── Mobile ───────────────────────────────────────────── */
@media (max-width: 598px) {
  .pn-frames-row {
    gap: 16px;
    padding: 20px 16px 20px;
  }

  /* iPhone: switch to percentage widths so frames fill the row */
  .pn-frames-row:has(.pn-frame:nth-child(1):last-child) .pn-frame.pn-frame-iphone {
    width: 52%;
  }

  .pn-frames-row:has(.pn-frame:nth-child(2):last-child) .pn-frame.pn-frame-iphone {
    width: 36%;
  }

  .pn-frames-row:has(.pn-frame:nth-child(3):last-child) .pn-frame.pn-frame-iphone {
    width: 26%;
  }

  .pn-frames-row:has(.pn-frame:nth-child(4):last-child) .pn-frame.pn-frame-iphone {
    width: 20%;
  }

  /* Desktop: fill width */
  .pn-frames-row:has(.pn-frame:nth-child(1):last-child) .pn-frame.pn-frame-desktop {
    width: 88%;
  }

  .pn-frames-row:has(.pn-frame:nth-child(2):last-child) .pn-frame.pn-frame-desktop {
    width: 44%;
  }
}

/* ── Footer ───────────────────────────────────────────── */
.pn-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 100px;
}

.pn-footer-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.322px;
  line-height: 18px;
}

.pn-heart {
  display: inline;
  width: 23px;
  height: 18px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.pn-footer-cat {
  flex-shrink: 0;
  overflow: visible;
}

/* Cat animations live in cat-animation.css — linked separately in portfolio/index.njk */
