/* ═══════════════════════════════════════
   Kat Plewa — Portfolio
   Clean, minimal art portfolio
   ═══════════════════════════════════════ */

/* ─── Reset & Base ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --white: #ffffff;
  --border: #d8d8d8;
  --font-heading: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: 0.25s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-weight: 300;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--text);
  color: var(--bg);
}


/* ─── Section Shared ─── */
.section {
  padding: 120px 60px;
}

.section__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 40px;
  text-transform: uppercase;
}

.section__title--center {
  text-align: center;
}


/* ─── Sticky Instagram ─── */
.social-stick {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 999;
  transition: transform var(--transition-fast);
}

.social-stick svg {
  stroke: url(#igGradient);
}

.social-stick svg circle[fill] {
  fill: url(#igGradient);
}

.social-stick:hover {
  transform: scale(1.15);
}


/* ─── Navigation ─── */
.nav {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1000;
  padding: 30px;
}

.nav__burger {
  position: relative;
  z-index: 1001;
  width: 36px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0;
}

.nav__burger span {
  display: block;
  height: 1.5px;
  background: var(--text);
  transition: var(--transition);
  transform-origin: right center;
}

.nav__burger span:nth-child(1) { width: 36px; }
.nav__burger span:nth-child(2) { width: 24px; }
.nav__burger span:nth-child(3) { width: 30px; }

.nav__burger.active span {
  background: var(--white);
}
.nav__burger.active span:nth-child(1) {
  transform: rotate(-45deg);
  width: 36px;
}
.nav__burger.active span:nth-child(2) {
  opacity: 0;
  width: 0;
}
.nav__burger.active span:nth-child(3) {
  transform: rotate(45deg);
  width: 36px;
}

.nav__overlay {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  background: rgba(26, 26, 26, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: right 0.6s cubic-bezier(0.77, 0, 0.175, 1);
  backdrop-filter: blur(20px);
}

.nav__overlay.open {
  right: 0;
}

.nav__links {
  list-style: none;
  text-align: center;
}

.nav__links li {
  overflow: hidden;
}

.nav__links a {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 0;
  transition: var(--transition);
  transform: translateY(100%);
  opacity: 0;
}

.nav__overlay.open .nav__links a {
  transform: translateY(0);
  opacity: 1;
}

.nav__links li:nth-child(1) a { transition-delay: 0.15s; }
.nav__links li:nth-child(2) a { transition-delay: 0.25s; }
.nav__links li:nth-child(3) a { transition-delay: 0.30s; }
.nav__links li:nth-child(4) a { transition-delay: 0.35s; }
.nav__links li:nth-child(5) a { transition-delay: 0.45s; }

.nav__links a:hover {
  opacity: 0.5;
}


/* ─── 1. Home ─── */
.home {
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  padding: 0 10%;
}

.home__header {
  height: 15vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0;
}

.home__name {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 0;
}

.home__painting-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.home__painting {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.home__scroll-indicator {
  padding-bottom: 32px;
  display: flex;
  justify-content: center;
}

.home__scroll-mouse {
  width: 22px;
  height: 36px;
  border: 1.5px solid var(--text-muted);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
  opacity: 0.5;
}

.home__scroll-dot {
  width: 3px;
  height: 8px;
  background: var(--text-muted);
  border-radius: 2px;
  animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50% { opacity: 0.2; transform: translateY(12px); }
}


/* ─── 2. Work ─── */
.work__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
}

.work__item {
  cursor: pointer;
}

.work__img-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 10px solid #c8c4bf;
}

.work__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.work__item:hover .work__img-wrap img {
  transform: scale(1.04);
}

.work__caption {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 400;
  margin-top: 12px;
  letter-spacing: 0.02em;
}

.work__caption span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 0.08em;
}


/* ─── Archive grid override ─── */
.archive__grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1100px;
}

.archive__item .work__img-wrap {
  border-width: 6px;
}

.archive__item .work__caption {
  font-size: 0.85rem;
  margin-top: 8px;
}

.archive__item .work__caption span {
  font-size: 0.65rem;
}
.cv__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}

.cv__portrait img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
}

.cv__block {
  margin-bottom: 40px;
}

.cv__block:last-child {
  margin-bottom: 0;
}

.cv__heading {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.cv__block p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  max-width: 520px;
}

.cv__block p:last-child {
  margin-bottom: 0;
}

.cv__list {
  list-style: none;
}

.cv__list li {
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.cv__list li:last-child {
  border-bottom: none;
}

.cv__year {
  display: inline-block;
  min-width: 48px;
  font-weight: 500;
  color: var(--text);
  font-size: 0.85rem;
}

.cv__list li em {
  font-style: italic;
  color: var(--text-muted);
  opacity: 0.7;
}


/* ─── 4. Contact ─── */
.contact {
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.contact__inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  width: 100%;
}

.contact__intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 60px;
  line-height: 1.9;
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
}

.contact__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: opacity var(--transition-fast);
}

.contact__link:hover {
  opacity: 0.6;
}

.contact__label {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact__link span:last-child {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}


/* ─── Footer ─── */
.footer {
  padding: 40px 60px;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}


/* ─── Lightbox ─── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  backdrop-filter: blur(30px);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox__content {
  max-width: 85vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
}

.lightbox.active .lightbox__img {
  opacity: 1;
  transform: scale(1);
}

.lightbox__close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-fast);
  font-weight: 200;
}

.lightbox__close:hover { opacity: 0.5; }

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  padding: 20px;
  transition: opacity var(--transition-fast);
  font-weight: 200;
}

.lightbox__prev { left: 20px; }
.lightbox__next { right: 20px; }
.lightbox__prev:hover,
.lightbox__next:hover { opacity: 0.5; }

.lightbox__counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
}


/* ─── Scroll Reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .section { padding: 80px 40px; }
  .work__grid { gap: 36px; }
  .archive__grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .cv__inner { gap: 50px; }
}

@media (max-width: 768px) {
  .section { padding: 60px 24px; }
  .home {
    padding: 0 5%;
    justify-content: center;
    align-items: center;
  }
  .home__header { height: auto; padding-top: 20px; padding-bottom: 12px; }
  .home__painting-wrap { flex: none; width: 100%; max-height: 55vh; }
  .home__painting { max-height: 55vh; }
  .home__scroll-indicator { padding-top: 20px; padding-bottom: 20px; }
  .cv__inner { grid-template-columns: 1fr; gap: 40px; }
  .cv__portrait img { max-height: 350px; }
  .work__grid { grid-template-columns: 1fr; gap: 32px; max-width: 500px; }
  .archive__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 100%; }
  .work__img-wrap { border-width: 6px; }
  .nav { padding: 20px; }
  .lightbox__prev { left: 5px; font-size: 2rem; }
  .lightbox__next { right: 5px; font-size: 2rem; }
  .footer { padding: 30px 24px; }
  .social-stick { bottom: 20px; left: 20px; }
  .social-stick svg { width: 40px; height: 40px; }
}

@media (max-width: 480px) {
  .home__name { letter-spacing: 0.06em; }
  .contact__link span:last-child { font-size: 1.2rem; }
  .work__img-wrap { border-width: 5px; }
  .archive__grid { gap: 8px; }
  .archive__item .work__img-wrap { border-width: 4px; }
  .social-stick svg { width: 32px; height: 32px; }
}
