/*
Theme Name: Arte Portfolio
Theme URI: https://github.com/arte-portfolio
Author: Arte Portfolio
Description: Un tema WordPress minimal per portfolio artistico con horizontal scrolling.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: arte-portfolio
Tags: portfolio, minimal, horizontal-scroll, art, photography
*/

/* =====================================================
   RESET & BASE
===================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #0a0a0a;
  --color-text: #ffffff;
  --color-accent: #000000;
  --font-primary: 'Inter', sans-serif;
  --font-secondary: 'Inter', sans-serif;
  --overlay-color: rgba(0,0,0,0.35);
  --btn-color: #000000;
  --btn-text-color: #ffffff;
  --title-color: #ffffff;
  --subtitle-color: rgba(255,255,255,0.75);
  --thumb-width: 480px;
  --thumb-height: 640px;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* =====================================================
   SITE HEADER
===================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  mix-blend-mode: difference;
}

.site-branding .site-title {
  font-family: var(--font-primary);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}

.site-branding .site-title a {
  color: inherit;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 40px;
}

.main-navigation ul li a {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  transition: opacity 0.3s ease;
}

.main-navigation ul li a:hover {
  opacity: 0.5;
}

/* =====================================================
   HORIZONTAL SCROLL — HOMEPAGE
===================================================== */
.portfolio-scroll-wrapper {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.portfolio-track {
  display: flex;
  align-items: center;
  height: 100vh;
  padding: 0 80px;
  gap: 28px;
  will-change: transform;
  transition: transform 0.08s linear;
  cursor: grab;
}

.portfolio-track:active {
  cursor: grabbing;
}

/* =====================================================
   PORTFOLIO ITEM CARD
===================================================== */
.portfolio-item {
  flex: 0 0 var(--thumb-width);
  height: var(--thumb-height);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.portfolio-item__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: block;
}

/* Overlay */
.portfolio-item__overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay-color);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.portfolio-item:hover .portfolio-item__overlay {
  opacity: 1;
}

.portfolio-item:hover .portfolio-item__image {
  transform: scale(1.04);
}

/* Info block — bottom left */
.portfolio-item__info {
  position: absolute;
  bottom: 32px;
  left: 32px;
  right: 32px;
  z-index: 10;
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.portfolio-item:hover .portfolio-item__info {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-item__title {
  font-family: var(--font-primary);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--title-color);
  line-height: 1.2;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.portfolio-item__subtitle {
  font-family: var(--font-secondary);
  font-size: 0.8rem;
  color: var(--subtitle-color);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.portfolio-item__btn {
  display: inline-block;
  background: var(--btn-color);
  color: var(--btn-text-color);
  font-family: var(--font-primary);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.portfolio-item__btn:hover {
  opacity: 0.8;
  color: var(--btn-text-color);
}

/* =====================================================
   SCROLL HINT
===================================================== */
.scroll-hint {
  position: fixed;
  bottom: 36px;
  right: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  z-index: 100;
  animation: fadeHint 1s ease 2s both;
}

.scroll-hint__line {
  width: 40px;
  height: 1px;
  background: rgba(255,255,255,0.3);
}

@keyframes fadeHint {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* =====================================================
   COUNTER
===================================================== */
.portfolio-counter {
  position: fixed;
  bottom: 36px;
  left: 48px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
  z-index: 100;
}

/* =====================================================
   SINGLE PORTFOLIO PAGE
===================================================== */
.single-portfolio {
  min-height: 100vh;
  background: var(--color-bg);
}

.single-portfolio .site-main {
  padding-top: 120px;
  padding-bottom: 80px;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 80px;
  padding-right: 80px;
}

.portfolio-single__header {
  margin-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 40px;
}

.portfolio-single__category {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}

.portfolio-single__title {
  font-family: var(--font-primary);
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.portfolio-single__subtitle {
  font-family: var(--font-secondary);
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.04em;
}

.portfolio-single__layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 80px;
  align-items: start;
}

.portfolio-single__gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.portfolio-single__gallery img {
  width: 100%;
  height: auto;
  border-radius: 2px;
}

.portfolio-single__gallery img:first-child {
  grid-column: 1 / -1;
}

.portfolio-single__meta {
  position: sticky;
  top: 120px;
}

.portfolio-single__description {
  font-size: 1rem;
  line-height: 1.85;
  color: rgba(255,255,255,0.7);
  margin-bottom: 40px;
}

.portfolio-single__details {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 32px;
}

.portfolio-single__detail-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 0.82rem;
}

.portfolio-single__detail-label {
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portfolio-single__detail-value {
  color: rgba(255,255,255,0.75);
}

.portfolio-back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 60px;
  transition: color 0.3s ease;
}

.portfolio-back-link:hover {
  color: #fff;
}

.portfolio-back-link::before {
  content: '←';
  font-size: 1rem;
}

/* =====================================================
   SITE FOOTER
===================================================== */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 0 48px 20px;
  pointer-events: none;
}

.site-footer .footer-copy {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.06em;
  display: none; /* Hidden on homepage scroll */
}

.single-portfolio .site-footer,
.page .site-footer {
  position: relative;
  padding: 40px 80px;
  background: transparent;
  pointer-events: all;
}

.single-portfolio .site-footer .footer-copy,
.page .site-footer .footer-copy {
  display: block;
}

/* =====================================================
   PROGRESS BAR
===================================================== */
.scroll-progress {
  position: fixed;
  bottom: 0;
  left: 0;
  height: 2px;
  background: rgba(255,255,255,0.6);
  z-index: 999;
  width: 0%;
  transition: width 0.1s linear;
}

/* =====================================================
   ARCHIVE / CATEGORY PAGE
===================================================== */
.portfolio-archive {
  padding-top: 120px;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 80px;
  padding-right: 80px;
  padding-bottom: 80px;
}

.archive-header {
  margin-bottom: 60px;
}

.archive-header h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 768px) {
  .site-header {
    padding: 20px 24px;
  }

  .portfolio-track {
    padding: 0 24px;
    gap: 16px;
  }

  :root {
    --thumb-width: 280px;
    --thumb-height: 420px;
  }

  .single-portfolio .site-main {
    padding-left: 24px;
    padding-right: 24px;
  }

  .portfolio-single__layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .portfolio-single__meta {
    position: static;
  }
}

/* =====================================================
   LOADING SCREEN
===================================================== */
.loading-screen {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-screen__dot {
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  animation: pulse 1.2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50%       { opacity: 1; transform: scale(1.2); }
}
