/* Portfolio Page Styles
   Modern grid layout with hover overlays
*/

/* Portfolio allows vertical scrolling */
html, body {
  overflow-y: auto;
  overflow-x: hidden;
}

/* ===== PAGE HEADING ===== */

.portfolio-heading {
  margin-bottom: 80px;
  opacity: 0;
  animation: fadeUp 0.8s ease-out 0.2s forwards;
}

.portfolio-heading h1 {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(48px, 10vw, 120px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 20px;
}

.portfolio-heading p {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.5;
  color: var(--ink-dim);
  max-width: 680px;
}

/* ===== PORTFOLIO GRID ===== */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 40px;
  margin-bottom: 100px;
  opacity: 0;
  animation: fadeUp 0.8s ease-out 0.4s forwards;
}

/* ===== PORTFOLIO CARD ===== */

.portfolio-card {
  position: relative;
  display: block;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.portfolio-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(216, 255, 90, 0.08);
}

/* Portfolio Image */
.portfolio-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card:hover .portfolio-image {
  transform: scale(1.05);
}

/* Portfolio Overlay */
.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(14, 15, 13, 0) 0%,
    rgba(14, 15, 13, 0.7) 60%,
    rgba(14, 15, 13, 0.95) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

/* Light theme overlay */
[data-theme="light"] .portfolio-overlay {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.7) 60%,
    rgba(255, 255, 255, 0.95) 100%
  );
}

.portfolio-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 12px;
}

.portfolio-description {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-dim);
  margin-bottom: 16px;
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}

.portfolio-link .arrow {
  transition: transform 0.3s ease;
  display: inline-block;
}

.portfolio-card:hover .portfolio-link .arrow {
  transform: translateX(4px);
}

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

@media (max-width: 720px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .portfolio-heading {
    margin-bottom: 60px;
  }

  /* On mobile, always show overlay with reduced opacity */
  .portfolio-overlay {
    opacity: 0.95;
    padding: 24px;
  }

  .portfolio-card:hover {
    transform: none;
  }

  .portfolio-image {
    aspect-ratio: 4 / 3;
  }

  .portfolio-title {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .portfolio-description {
    font-size: 13px;
    margin-bottom: 14px;
  }

  .portfolio-link {
    font-size: 11px;
  }
}

/* ===== TABLET RESPONSIVE ===== */

@media (min-width: 721px) and (max-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}
