/* ======================
   BASE
====================== */

html, body {
  margin: 0;
  padding: 0;
  font-family: "Times New Roman", serif;
}

body.portfolio-page {
  background: url("../images/texture.jpg") repeat;
  color: #222;
}

.portfolio-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}

/* ======================
   HEADER
====================== */

.logo-name {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: #000000;
  text-decoration: none;
}

.invert-text {
  color: white;
  mix-blend-mode: difference;
}

.portfolio-intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem;
  font-size: 1.15rem;
}

.portfolio-intro a {
  margin-left: 0.5rem;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

/* ======================
   PROJECT LIST
====================== */

#portfolio-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ======================
   PROJECT BLOCK
====================== */

.project {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: center;
}

.project:nth-child(even) {
  direction: rtl;
}

.project:nth-child(even) > * {
  direction: ltr;
}

/* ======================
   TEXT
====================== */

.project-text h2 {
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
}

.project-meta {
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.project-description {
  margin-top: 1rem;
  line-height: 1.6;
  margin-bottom: 0.6rem;
  font-family: "Georgia";
}

/* ======================
   IMAGE CAROUSEL
====================== */

.project-images {
  position: relative;
  overflow: hidden;
  height: 560px;
}

.image-track {
  display: flex;
  height: 100%;
  transition: transform 0.35s ease;
}

.image-track img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  flex-shrink: 0;
}

/* ======================
   ARROWS
====================== */

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.7);
  border: none;
  font-size: 2rem;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
}

.carousel-arrow.left {
  left: 0.5rem;
}

.carousel-arrow.right {
  right: 0.5rem;
}

/* ======================
   NAV
====================== */

.nav-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 5rem;
}

.nav-links a {
  text-decoration: none;
  color: #444;
  border-bottom: 1px solid #444;
}

/* ======================
   MOBILE
====================== */

@media (max-width: 768px) {
  .project {
    grid-template-columns: 1fr;
  }

  .project-images {
    height: 260px;
  }
}
