/*
Theme Name: Karina Panko Portfolio
Author: Karina Panko
Version: 2.0
Text Domain: karina-panko
*/

@import url('https://fonts.googleapis.com/css2?family=Sofia+Sans+Condensed:wght@700;800&family=Inter:wght@400;500&display=swap');

/* =============================================
   VARIABLES
   ============================================= */
:root {
  --orange:  #FF5729;
  --pink:    #EEA1F4;
  --purple:  #6308F4;
  --lime:    #C3F404;
  --black:   #000000;
  --white:   #FFFFFF;

  --font-display: 'Sofia Sans Condensed', sans-serif;
  --font-body:    'Inter', sans-serif;

  --radius: 16px;
  --max-width: 1200px;
  --header-height: 56px;
  --card-title-height: 72px;
}

/* =============================================
   RESET
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { font-family: var(--font-body); background: var(--white); color: var(--black); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* =============================================
   STICKY HEADER
   ============================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.site-header.is-scrolled {
  border-bottom-color: rgba(0,0,0,0.08);
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Name in header — hidden until scrolled */
.site-header__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
}

.site-header.is-scrolled .site-header__name {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.site-header__nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

.site-header__nav a {
  font-family: var(--font-body);
  font-size: 15px;
  transition: opacity 0.2s;
}
.site-header__nav a:hover { opacity: 0.5; }

/* Burger button */
.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--black);
  transition: all 0.3s;
}

/* =============================================
   MOBILE NAV OVERLAY
   ============================================= */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 300;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 52px;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.mobile-nav__close {
  position: absolute;
  top: 20px; right: 24px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: var(--header-height);
}

/* Big hero name — centered, shrinks on scroll */
.hero-name {
  text-align: center;
  padding: 40px 24px 32px;
  width: 100%;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.hero-name span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(52px, 10vw, 120px);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
  display: block;
}

/* Tagline row below name */
.hero-name::after {
  content: '';
  display: none;
}

.hero-tagline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8px 24px 0;
  width: 100%;
}

.hero-tagline__left {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.4;
  font-weight: 400;
}

.hero-tagline__nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.hero-tagline__nav a {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  transition: opacity 0.2s;
}
.hero-tagline__nav a:hover { opacity: 0.5; }

/* Slideshow */
.hero-slideshow {
  width: 100%;
  max-width: var(--max-width);
  margin: 24px auto 0;
  padding: 0 24px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 16/7;
}

.hero-slideshow__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.hero-slideshow__slide.is-active { opacity: 1; }
.hero-slideshow__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slideshow__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #f0f0f0;
  border-radius: var(--radius);
  color: #aaa;
  font-size: 14px;
}

/* =============================================
   INTRO CARD (pink bio)
   ============================================= */
.intro-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
}

.intro-card {
  background: var(--pink);
  border-radius: var(--radius);
  padding: 32px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.intro-card__text p {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--black);
}

/* =============================================
   LINK STYLE (always with arrow)
   ============================================= */
.kp-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--black);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: opacity 0.2s;
}
.kp-link:hover { opacity: 0.6; }

/* =============================================
   STACKING CARDS SECTION
   ============================================= */
.stacking-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px 96px;
}

.cards-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.no-projects-msg {
  padding: 32px;
  opacity: 0.4;
  font-size: 14px;
}

/* =============================================
   PROJECT CARD
   ============================================= */
.project-card {
  position: sticky;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.3s;
}
.project-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.15); }

.project-card__link {
  display: block;
}

.project-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  min-height: var(--card-title-height);
}

.project-card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 3vw, 28px);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.project-card__tag {
  font-family: var(--font-body);
  font-size: 14px;
  white-space: nowrap;
  margin-left: 16px;
  opacity: 0.85;
}

.project-card__image {
  width: 100%;
  max-height: 520px;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-height: 520px;
}

/* Stacked = image hidden */
.project-card.is-stacked .project-card__image {
  max-height: 0;
}

/* Colors */
.project-card--orange  { background: var(--orange); color: var(--black); }
.project-card--pink    { background: var(--pink);   color: var(--black); }
.project-card--purple  { background: var(--purple); color: var(--white); }
.project-card--lime    { background: var(--lime);   color: var(--black); }
.project-card--black   { background: var(--black);  color: var(--white); }
.project-card--white   { background: var(--white);  color: var(--black); border: 1px solid #eee; }

/* =============================================
   PUBLICATION CARD
   ============================================= */
.pub-card {
  position: sticky;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}

.pub-card__image-wrap {
  max-height: 480px;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.pub-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-height: 480px;
  transition: transform 0.4s ease;
}
.pub-card:hover .pub-card__image-wrap img { transform: scale(1.03); }

.pub-card__bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px;
  min-height: var(--card-title-height);
}

.pub-card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(17px, 2.5vw, 24px);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 4px;
}
.pub-card__subtitle {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.4;
}
.pub-card__meta {
  font-family: var(--font-body);
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
  margin-left: 16px;
  opacity: 0.85;
  line-height: 1.5;
}

/* Stacked = image hidden */
.pub-card.is-stacked .pub-card__image-wrap { max-height: 0; }

/* Bar colors */
.pub-card--orange .pub-card__bar  { background: var(--orange); color: var(--black); }
.pub-card--pink   .pub-card__bar  { background: var(--pink);   color: var(--black); }
.pub-card--purple .pub-card__bar  { background: var(--purple); color: var(--white); }
.pub-card--lime   .pub-card__bar  { background: var(--lime);   color: var(--black); }
.pub-card--black  .pub-card__bar  { background: var(--black);  color: var(--white); }

/* =============================================
   PAGE TITLE BAR
   ============================================= */
.page-title-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px 32px;
}
.page-title-bar h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 7vw, 80px);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* =============================================
   SINGLE PROJECT PAGE
   ============================================= */
.project-single {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px 96px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  margin-bottom: 32px;
  transition: opacity 0.2s;
}
.back-link:hover { opacity: 0.5; }

.project-single__hero {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  margin-bottom: 16px;
}
.project-single__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-single__meta-block {
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.project-single__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 6vw, 72px);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
}
.project-single__tags {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.8;
  text-align: right;
  white-space: nowrap;
}

.project-single__description {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  max-width: 720px;
  margin-bottom: 48px;
}
.project-single__description p { margin-bottom: 16px; }

/* Gallery */
.project-gallery { display: grid; gap: 12px; }
.project-gallery--1col { grid-template-columns: 1fr; }
.project-gallery--2col { grid-template-columns: 1fr 1fr; }
.project-gallery--3col { grid-template-columns: 1fr 1fr 1fr; }
.project-gallery__item { border-radius: var(--radius); overflow: hidden; }
.project-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Additional images (free field) */
.project-images { display: grid; gap: 12px; margin-top: 16px; }
.project-images img { width: 100%; border-radius: var(--radius); object-fit: cover; }

/* =============================================
   INFO PAGE
   ============================================= */
.page-info {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px 96px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.page-info__text h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 60px);
  text-transform: uppercase;
  margin-bottom: 32px;
  line-height: 1;
}
.page-info__text p { font-size: 16px; line-height: 1.7; margin-bottom: 16px; }
.page-info__image { border-radius: var(--radius); overflow: hidden; }
.page-info__image img { width: 100%; object-fit: cover; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px 32px;
}
.site-footer__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(52px, 10vw, 120px);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.95;
  margin-bottom: 48px;
}
.site-footer__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-top: 1px solid rgba(0,0,0,0.1);
  padding-top: 16px;
}
.site-footer__contact { font-size: 14px; line-height: 1.9; }
.site-footer__contact a { border-bottom: 1px solid currentColor; }
.site-footer__contact a:hover { opacity: 0.5; }
.site-footer__social { display: flex; gap: 16px; font-size: 13px; margin-top: 4px; }
.site-footer__legal { font-size: 12px; text-align: right; line-height: 1.8; opacity: 0.5; }

/* =============================================
   GENERIC PAGE
   ============================================= */
.generic-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px 96px;
}
.generic-page h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 60px);
  text-transform: uppercase;
  margin-bottom: 32px;
}
.generic-page .content { font-size: 16px; line-height: 1.7; max-width: 720px; }
.generic-page .content p { margin-bottom: 16px; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  :root { --card-title-height: 60px; }

  .site-header__nav { display: none; }
  .nav-toggle { display: flex; }

  .hero-tagline__nav { display: none; }

  .hero-slideshow { aspect-ratio: 4/3; padding: 0 16px; }

  .page-info { grid-template-columns: 1fr; }

  .project-single__meta-block { flex-direction: column; }
  .project-single__tags { text-align: left; }

  .project-gallery--2col,
  .project-gallery--3col { grid-template-columns: 1fr; }

  .site-footer__bottom { flex-direction: column; align-items: flex-start; gap: 16px; }
  .site-footer__legal { text-align: left; }

  .intro-card { padding: 24px 20px; }
}

@media (max-width: 480px) {
  .hero-name span { font-size: 13vw; }
  .stacking-section,
  .intro-section { padding-left: 16px; padding-right: 16px; }
}

/* =============================================
   SINGLE PROJECT — description inside color block
   ============================================= */

.project-single__meta-block {
  border-radius: var(--radius);
  padding: 28px 32px 32px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.project-single__meta-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.project-single__description {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  max-width: 680px;
  margin-bottom: 0;
}

.project-single__description p {
  margin-bottom: 12px;
}

.project-single__description p:last-child {
  margin-bottom: 0;
}

/* Text color helpers */
.text-white,
.text-white .project-single__title,
.text-white .project-single__tags,
.text-white .project-single__description,
.text-white .project-single__description p {
  color: var(--white);
}

.text-black,
.text-black .project-single__title,
.text-black .project-single__tags,
.text-black .project-single__description,
.text-black .project-single__description p {
  color: var(--black);
}

@media (max-width: 768px) {
  .project-single__meta-top {
    flex-direction: column;
  }
  .project-single__tags {
    text-align: left;
  }
  .project-single__meta-block {
    padding: 24px 20px;
  }
}

/* Remove underline from kp-link and back-link */
.kp-link {
  border-bottom: none;
}
.back-link {
  border-bottom: none;
}

/* Fix tags position — push to right */
.project-single__meta-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.project-single__tags {
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.8;
}
