/*
  JOB PORTFOLIO PAGE
  ------------------
  Personal portfolio built on top of the main site design system
  (css/style.css). This file adds only the page-specific layout:
  the name logo, alternating project rows, thumbnail grid, contact block,
  the cookie ribbon and the privacy-friendly video modal.
*/

.pf-skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 2000;
  padding: 0.75rem 1.25rem;
  background: var(--orange);
  color: var(--purple-dark);
  font-weight: 700;
  border-radius: 0 0 8px 8px;
  visibility: hidden;
  transition: top 0.2s ease, visibility 0.2s ease;
}

.pf-skip-link:focus {
  top: 0;
  visibility: visible;
  outline: none;
}

#projekti,
#vec-projektov,
#kontakt {
  scroll-margin-top: 90px;
}

/* ===== HEADER / NAME LOGO ===== */
.pf-header {
  padding: 0.55rem 0;
  background: var(--purple-dark);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.pf-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color var(--transition);
}

.pf-logo-first {
  color: var(--orange);
  font-weight: 800;
}

.pf-logo-last {
  font-weight: 400;
}

.pf-logo:hover,
.pf-logo:focus-visible {
  color: var(--orange);
  outline: none;
}

/* ===== FEATURED PROJECTS ===== */
.pf-projects {
  padding: 6.5rem 0 5rem;
  background: var(--white);
}

.pf-projects-head {
  margin-bottom: 2.5rem;
  text-align: center;
}

.pf-projects-head .section-title {
  margin-bottom: 0;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-light) 60%, #ffd166 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pf-case {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 4rem;
  align-items: center;
  padding: 3.5rem 0;
  border-bottom: 1px solid rgba(35, 10, 65, 0.08);
}

.pf-case:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.pf-case--reverse .pf-case-media {
  order: 2;
}

.pf-case--reverse .pf-case-copy {
  order: 1;
}

.pf-case-media {
  min-width: 0;
}

.pf-video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: var(--purple-dark);
  box-shadow: 0 20px 50px rgba(35, 10, 65, 0.18);
}

.pf-video-shell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.pf-video-facade {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  background: none;
  border: 0;
  color: var(--white);
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.pf-video-facade::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 7, 51, 0.85) 0%, rgba(26, 7, 51, 0.12) 55%, transparent 100%);
  pointer-events: none;
}

.pf-video-facade img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.6s ease;
}

.pf-video-facade:hover img,
.pf-video-facade:focus-visible img {
  transform: scale(1.025);
  filter: saturate(1.06);
}

.pf-video-facade:focus-visible,
.pf-project-card:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.pf-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  background: var(--orange);
  border-radius: 50%;
  color: var(--purple-dark);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  transition: transform var(--transition), background var(--transition);
}

.pf-play svg {
  width: 28px;
  height: 28px;
  margin-left: 3px;
}

.pf-video-facade:hover .pf-play,
.pf-video-facade:focus-visible .pf-play {
  background: var(--orange-light);
  transform: translate(-50%, -50%) scale(1.08);
}

.pf-source-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  padding: 0.35rem 0.7rem;
  background: rgba(26, 7, 51, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50px;
  color: var(--white);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.pf-source-badge--local {
  background: rgba(246, 163, 0, 0.94);
  border-color: rgba(246, 163, 0, 0.5);
  color: var(--purple-dark);
}

.pf-video-hint {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 3;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color var(--transition);
}

.pf-video-facade:hover .pf-video-hint {
  color: var(--white);
}

.pf-video-shell--vertical {
  width: min(100%, 360px);
  margin: 0 auto;
  aspect-ratio: 9 / 16;
}

.pf-local-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: cover;
}

.pf-vertical-label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 3;
  padding: 0.3rem 0.55rem;
  background: rgba(26, 7, 51, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.pf-case-copy {
  min-width: 0;
}

.pf-case-tag {
  display: inline-flex;
  padding: 0.35rem 0.8rem;
  background: rgba(246, 163, 0, 0.1);
  border: 1px solid rgba(246, 163, 0, 0.35);
  border-radius: 50px;
  color: #946100;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
}

.pf-case h2 {
  margin: 0.9rem 0 1.1rem;
  color: var(--purple-dark);
  font-size: clamp(1.65rem, 2.9vw, 2.15rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.pf-case-goal {
  margin-bottom: 1.1rem;
  color: var(--text-dark);
  font-size: 1.05rem;
  line-height: 1.7;
}

.pf-case-goal strong {
  color: var(--purple-dark);
}

.pf-case-body p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.75;
}

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

/* ===== MORE WORK GRID ===== */
.pf-grid-section {
  padding: 5rem 0;
  background: var(--gray-light);
}

.pf-grid-section .section-title {
  margin-bottom: 2.25rem;
}

.pf-project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.pf-project-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: var(--purple-dark);
  box-shadow: 0 4px 20px rgba(35, 10, 65, 0.08);
  transition: transform var(--transition), box-shadow var(--transition);
}

.pf-project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(35, 10, 65, 0.16);
}

.pf-project-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--purple-dark);
}

.pf-project-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 7, 51, 0.5), transparent 62%);
  pointer-events: none;
}

.pf-project-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.pf-project-card:hover .pf-project-media img,
.pf-project-card:focus-visible .pf-project-media img {
  transform: scale(1.04);
}

.pf-project-duration {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  padding: 0.25rem 0.5rem;
  background: rgba(26, 7, 51, 0.82);
  border-radius: 4px;
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
}

.pf-project-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.pf-project-play::before {
  content: '';
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  background: var(--orange);
  border-radius: 50%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.pf-project-play svg {
  position: absolute;
  width: 22px;
  height: 22px;
  margin-left: 3px;
  color: var(--purple-dark);
}

.pf-project-card:hover .pf-project-play,
.pf-project-card:focus-visible .pf-project-play {
  opacity: 1;
}

@media (max-width: 768px), (hover: none) {
  .pf-project-play {
    opacity: 1;
  }

  .pf-project-play::before {
    width: 48px;
    height: 48px;
  }

  .pf-project-play svg {
    width: 18px;
    height: 18px;
  }
}

/* ===== CONTACT ===== */
.pf-contact {
  position: relative;
  overflow: hidden;
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple) 100%);
  color: var(--white);
  text-align: center;
}

.pf-contact::before {
  content: '';
  position: absolute;
  top: -180px;
  right: -100px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 163, 0, 0.14), transparent 66%);
  pointer-events: none;
}

.pf-contact .container {
  position: relative;
  z-index: 1;
}

.pf-contact-title {
  margin-bottom: 1.75rem;
  color: var(--orange);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.pf-contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
}

.pf-contact-links a {
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 500;
  transition: color var(--transition);
}

.pf-contact-links a:hover,
.pf-contact-links a:focus-visible {
  color: var(--orange-light);
  outline: none;
}

/* Keep the footer content clear of the fixed cookie ribbon while it is visible. */
body.pf-ribbon-visible .pf-page-footer {
  padding-bottom: 5.5rem;
}

/* ===== COOKIE RIBBON ===== */
.pf-cookie-ribbon {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 900;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: min(560px, calc(100% - 2rem));
  padding: 0.7rem 0.8rem 0.7rem 0.9rem;
  background: rgba(26, 7, 51, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-left: 3px solid var(--orange);
  border-radius: 10px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  line-height: 1.5;
  animation: pf-ribbon-in 0.35s ease both;
}

.pf-cookie-ribbon[hidden] {
  display: none;
}

.pf-cookie-ribbon p {
  margin: 0;
}

.pf-cookie-ribbon a {
  color: var(--orange-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pf-cookie-ribbon a:hover {
  color: var(--white);
}

.pf-cookie-close {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: var(--white);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.pf-cookie-close:hover,
.pf-cookie-close:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.45);
  outline: none;
}

.pf-cookie-close svg {
  width: 12px;
  height: 12px;
}

@keyframes pf-ribbon-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== VIDEO MODAL ===== */
.pf-modal {
  width: min(960px, calc(100% - 2rem));
  max-width: 960px;
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  overflow: auto;
  background: var(--purple-dark);
  border: 0;
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  color: var(--white);
}

.pf-modal::backdrop {
  background: rgba(10, 3, 20, 0.84);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.pf-modal-inner {
  padding: 1rem 1rem 1.25rem;
}

.pf-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.1rem 0.1rem 0.85rem;
}

.pf-modal-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.pf-modal-close {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: var(--white);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.pf-modal-close:hover,
.pf-modal-close:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  outline: none;
}

.pf-modal-close svg {
  width: 20px;
  height: 20px;
}

.pf-modal-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  border-radius: 10px;
}

.pf-modal-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.pf-modal-note {
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.74rem;
  text-align: center;
}

body.pf-modal-open {
  overflow: hidden;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .pf-case {
    gap: 2.75rem;
  }
}

@media (max-width: 968px) {
  .pf-projects {
    padding: 6rem 0 4rem;
  }

  .pf-case,
  .pf-case--reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.75rem 0;
  }

  .pf-case--reverse .pf-case-media {
    order: 1;
  }

  .pf-case--reverse .pf-case-copy {
    order: 2;
  }

  .pf-case-copy {
    max-width: 720px;
  }

  .pf-video-shell--vertical {
    width: min(100%, 320px);
  }

  .pf-project-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pf-grid-section {
    padding: 4rem 0;
  }
}

@media (max-width: 768px) {
  .pf-header {
    padding: 0.5rem 0;
  }

  .pf-logo {
    font-size: 1.05rem;
    gap: 0.3rem;
  }

  /* The nav has only one action, so keep it visible instead of hiding it
     behind a hamburger button. */
  .pf-header .nav-links {
    position: static;
    top: auto;
    right: auto;
    width: auto;
    height: auto;
    padding: 0;
    gap: 0;
    flex-direction: row;
    background: transparent;
    box-shadow: none;
    transition: none;
  }

  .pf-projects {
    padding: 5.5rem 0 3.5rem;
  }

  .pf-projects-head {
    margin-bottom: 1.75rem;
  }

  .pf-case h2 {
    font-size: 1.65rem;
  }

  .pf-case-goal {
    font-size: 1rem;
  }

  .pf-case-body p {
    font-size: 0.93rem;
  }

  .pf-project-grid {
    grid-template-columns: 1fr;
  }

  .pf-grid-section .section-title {
    margin-bottom: 1.75rem;
  }

  .pf-contact {
    padding: 4rem 0;
  }

  body.pf-ribbon-visible .pf-page-footer {
    padding-bottom: 6rem;
  }

  .pf-contact-links {
    flex-direction: column;
    gap: 0.75rem;
  }

  .pf-contact-links a {
    font-size: 1rem;
  }

  .pf-cookie-ribbon {
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
    width: auto;
    padding: 0.65rem 0.7rem;
    font-size: 0.7rem;
  }

  .pf-modal {
    width: calc(100% - 1rem);
  }

  .pf-modal-inner {
    padding: 0.75rem 0.75rem 1rem;
  }

  .pf-modal-header {
    padding-bottom: 0.65rem;
  }

  .pf-modal-title {
    font-size: 0.9rem;
  }

  .pf-modal-frame {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 480px) {
  .pf-logo {
    font-size: 0.98rem;
  }

  .pf-header .nav-cta {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
  }

  .pf-play {
    width: 62px;
    height: 62px;
  }

  .pf-play svg {
    width: 24px;
    height: 24px;
  }

  .pf-video-hint {
    left: 0.9rem;
    bottom: 0.9rem;
    font-size: 0.78rem;
  }

  .pf-source-badge {
    top: 0.7rem;
    right: 0.7rem;
    font-size: 0.68rem;
  }

  .pf-vertical-label {
    top: 0.7rem;
    left: 0.7rem;
  }

  .pf-case h2 {
    font-size: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pf-cookie-ribbon {
    animation: none;
  }

  .pf-video-facade img,
  .pf-project-media img,
  .pf-project-card,
  .pf-play {
    transition: none !important;
  }
}
