/* ============================================================
   AXYZ Design & CNC — portfolio.css
   Extends style.css — link BOTH stylesheets in portfolio.html
   ============================================================ */

/* === PORTFOLIO HERO === */
#portfolio-hero {
  min-height: 55vh;
  background: var(--grad-bg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 110px 72px 80px;
}

/* Subtle grid background (matches main site) */
.portfolio-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(62,207,191,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62,207,191,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Large faint word behind heading */
.portfolio-hero-bg-text {
  position: absolute;
  bottom: -20px;
  left: 60px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(8rem, 18vw, 22rem);
  line-height: 1;
  color: rgba(255,255,255,0.025);
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  letter-spacing: 0.02em;
}

.portfolio-hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.portfolio-hero-content .label {
  margin-bottom: 20px;
}

.portfolio-hero-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4rem, 7vw, 8rem);
  line-height: 0.92;
  letter-spacing: 0.03em;
  margin-bottom: 32px;
}

.portfolio-hero-statement {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--off-white);
  opacity: 0.82;
  max-width: 640px;
  border-left: 2px solid var(--accent);
  padding-left: 24px;
}

/* === PROJECT COUNT BAR === */
.project-count-bar {
  background: rgba(0,0,0,0.3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-count-bar span {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-count-bar strong {
  color: var(--accent);
  font-weight: 500;
}

/* === PROJECT SECTION ===
   Each project is a full-width section.
   Alternates: image-left / image-right via .project--reverse
   ============================================================ */
.project {
  width: 100%;
  min-height: 80vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

/* Reverse layout — image on right, text on left */
.project--reverse {
  direction: rtl;
}
.project--reverse > * {
  direction: ltr;
}

/* Alternating background tones to break up the page */
.project:nth-child(odd)  { background: var(--navy); }
.project:nth-child(even) { background: var(--navy-mid); }

/* --- IMAGE PANE --- */
.project-image {
  position: relative;
  overflow: hidden;
  min-height: 600px;
  background: #0a1520;
  transition: transform 0.5s cubic-bezier(.23,1,.32,1);
}

/* The actual image */
.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(.23,1,.32,1);
  filter: brightness(0.85);
}
.project:hover .project-image img {
  transform: scale(1.04);
  filter: brightness(0.95);
}

/* Placeholder shown when no image is provided */
.project-image-placeholder {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 30px,
      rgba(62,207,191,0.03) 30px,
      rgba(62,207,191,0.03) 31px
    ),
    var(--navy-mid);
}

.project-image-placeholder svg {
  opacity: 0.15;
  width: 80px;
  height: 80px;
}

.project-image-placeholder span {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.5;
}

/* Accent line that slides in on hover */
.project-image::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.5s cubic-bezier(.23,1,.32,1);
}
.project:hover .project-image::after {
  transform: scaleY(1);
}

/* Accent line on right for reversed projects */
.project--reverse .project-image::after {
  left: auto;
  right: 0;
}

/* --- CONTENT PANE --- */
.project-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 72px;
  position: relative;
}

/* Project number — large faint background */
.project-bg-num {
  position: absolute;
  top: 20px; right: 40px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 8rem;
  color: rgba(255,255,255,0.03);
  line-height: 1;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

.project-label {
  margin-bottom: 16px;
}

.project-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.4rem, 3.5vw, 4rem);
  line-height: 1;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.project-subtitle {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}

.project-desc {
  font-size: 0.96rem;
  line-height: 1.8;
  color: var(--off-white);
  opacity: 0.8;
  margin-bottom: 36px;
  max-width: 480px;
}

/* Tags / specs list */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}

.project-tag {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--off-white);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 5px 12px;
  transition: border-color 0.2s, color 0.2s;
}
.project:hover .project-tag {
  border-color: rgba(62,207,191,0.3);
  color: var(--off-white);
}

/* Specs grid — optional key/value pairs */
.project-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  margin-bottom: 40px;
  max-width: 420px;
}

.project-spec {
  background: rgba(255,255,255,0.02);
  border-radius: 6px;
  padding: 14px 18px;
}

.project-spec-key {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.project-spec-val {
  font-size: 0.88rem;
  color: var(--white);
  font-weight: 400;
}

/* CTA link */
.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  transition: gap 0.2s;
}
.project-cta:hover { gap: 16px; }
.project-cta .arrow { font-size: 1rem; }

/* ============================================================
   PORTFOLIO DECORATIVE SYSTEM — per-section positioning
   Shared base classes (.section-deco-logo etc.) in style.css
   ============================================================ */
.phero-deco-logo {
  top: 100px;      /* ← vertical position from top */
  right: -300px;   /* ← negative = partially off-frame; less negative = more visible (~57%) */
  transform: rotate(-15deg); /* ← tilt angle */
}
.phero-deco-orbit {
  bottom: -140px;  /* ← corner depth */
  left: -140px;    /* ← corner depth */
  animation: corner-spin 42s linear infinite reverse; /* ← 'reverse' flips spin direction */
}
.proj1-deco-orbit {
  top: -140px;     /* ← corner depth */
  right: -140px;   /* ← corner depth */
  animation: corner-spin 35s linear infinite; /* ← change 35s to adjust speed */
}
.proj2-deco-orbit {
  top: -140px;     /* ← corner depth */
  left: -140px;    /* ← corner depth */
  animation: corner-spin 45s linear infinite reverse; /* ← 'reverse' flips spin direction */
}
.proj3-deco-orbit {
  top: -140px;     /* ← corner depth */
  right: -140px;   /* ← corner depth */
  animation: corner-spin 38s linear infinite; /* ← change 38s to adjust speed */
}
.pgrid-deco-logo {
  bottom: 80px;    /* ← vertical position from bottom */
  left: -320px;    /* ← negative = peeks from left edge (~54% visible) */
  transform: scaleX(-1) rotate(8deg); /* ← mirrored horizontally + tilted */
}

/* === CTA BANNER (bottom of page) === */
.portfolio-cta-banner {
  background: var(--grad-bg);
  border-top: 1px solid var(--border);
  padding: 100px 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  position: relative;
  overflow: hidden;
}

.portfolio-cta-banner h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 4vw, 4.5rem);
  line-height: 1;
  letter-spacing: 0.03em;
  max-width: 480px;
}

.portfolio-cta-banner p {
  font-size: 0.94rem;
  line-height: 1.8;
  color: var(--off-white);
  opacity: 0.75;
  max-width: 380px;
  margin-bottom: 36px;
}

.cta-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  #portfolio-hero { padding: 60px 32px 64px; }
  .project-count-bar { padding: 14px 32px; }
  .project { grid-template-columns: 1fr; min-height: 0; }
  .project--reverse { direction: ltr; }
  .project-image { min-height: 300px; }
  .project-content { padding: 56px 32px; }
  .portfolio-cta-banner { flex-direction: column; align-items: flex-start; padding: 72px 32px; }
}

@media (max-width: 640px) {
  #portfolio-hero { padding: 40px 20px 40px; min-height: 40vh; }
  .portfolio-hero-statement { font-size: 0.92rem; }
  .project-count-bar { padding: 12px 20px; }
  .project-image { min-height: 240px; }
  .project-content { padding: 40px 20px; }
  .project-title { font-size: clamp(2rem, 8vw, 3rem); }
  .project-specs { grid-template-columns: 1fr; }
  .portfolio-cta-banner { padding: 56px 20px; }
  .portfolio-hero-bg-text { display: none; }
}


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

.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
}

.carousel-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.88);
  transition: filter 0.4s ease, transform 0.6s cubic-bezier(.23,1,.32,1);
}

.carousel:hover .carousel-slide.active img {
  filter: brightness(1);
  transform: scale(1.03);
}

.carousel-slide.active img {
  cursor: zoom-in;
}

/* Placeholder slide */
.carousel-placeholder { background: var(--navy-mid); }
.carousel-placeholder .project-image-placeholder {
  position: absolute;
  inset: 0;
}

/* ── Prev / Next buttons ── */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(11,22,36,0.7);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--white);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
  opacity: 0;
}
.carousel:hover .carousel-btn { opacity: 1; }
@media (max-width: 1024px) {
  .carousel-btn { opacity: 0.7; }
}
.carousel-btn:hover {
  background: rgba(62,207,191,0.2);
  border-color: var(--accent);
}
.carousel-btn--prev { left: 16px; }
.carousel-btn--next { right: 16px; }

/* ── Dot indicators ── */
.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.carousel-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}
.carousel-dot:hover { background: rgba(255,255,255,0.7); }

/* ── Slide counter ── */
.carousel-counter {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.5);
  z-index: 10;
  background: rgba(11,22,36,0.5);
  padding: 4px 10px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}


/* ============================================================
   LIGHTBOX
   ============================================================ */

#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7,14,24,0.96);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

#lightbox.open {
  display: flex;
}

#lightbox-img-wrap {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  transition: transform 0.35s cubic-bezier(.23,1,.32,1);
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

#lightbox-img.zoomed {
  transform: scale(2);
  cursor: zoom-out;
}

/* Close button */
#lightbox-close {
  position: fixed;
  top: 24px;
  right: 28px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  z-index: 1001;
  transition: background 0.2s;
}
#lightbox-close:hover { background: rgba(62,207,191,0.2); border-color: var(--accent); }

/* Prev / Next in lightbox */
#lightbox-prev,
#lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--white);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 1001;
  transition: background 0.2s, border-color 0.2s;
}
#lightbox-prev:hover,
#lightbox-next:hover {
  background: rgba(62,207,191,0.15);
  border-color: var(--accent);
}
#lightbox-prev { left: 20px; }
#lightbox-next { right: 20px; }

/* Counter */
#lightbox-counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.4);
  z-index: 1001;
}

/* ── Mobile adjustments ── */
@media (max-width: 640px) {
  .carousel-btn { width: 36px; height: 36px; font-size: 0.9rem; opacity: 1; }
  #lightbox-prev { left: 8px; }
  #lightbox-next { right: 8px; }
  #lightbox-img.zoomed { transform: scale(1.6); }
}


/* ============================================================
   FEATURED SLIDESHOW — full-width 16:9 above projects
   ============================================================ */

.featured-slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--grad-bg);
  border-bottom: 1px solid var(--border);
  margin-top: 124px;
}

/* Background grid */
.fs-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(62,207,191,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62,207,191,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* Orbit rings */
.fs-orbits {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.fs-orbit {
  position: absolute;
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.fs-orbit:nth-child(1) {
  width: 300px; height: 300px;
  border: 1px solid rgba(62,207,191,0.1);
  animation: spin 30s linear infinite;
}
.fs-orbit:nth-child(2) {
  width: 500px; height: 500px;
  border: 1px solid rgba(62,207,191,0.06);
  animation: spin 45s linear infinite reverse;
}
.fs-orbit:nth-child(3) {
  width: 700px; height: 700px;
  border: 1px solid rgba(62,207,191,0.04);
  animation: spin 60s linear infinite;
}

/* Track — fills the slideshow container */
.fs-track {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Individual slides */
.fs-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.fs-slide.active {
  opacity: 1;
  pointer-events: auto;
}

/* Image — contain keeps full image visible, no cropping */
.fs-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: brightness(0.95);
  transition: filter 0.8s ease;
  position: relative;
  z-index: 2;
}

.fs-slide.active img {
  filter: brightness(1);
}

/* Prev / Next buttons */
.fs-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(11,22,36,0.6);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
  opacity: 0;
}
.featured-slideshow:hover .fs-btn { opacity: 1; }
@media (max-width: 1024px) {
  .fs-btn { opacity: 0.7; }
}
.fs-btn:hover {
  background: rgba(62,207,191,0.2);
  border-color: var(--accent);
}
.fs-btn--prev { left: 24px; }
.fs-btn--next { right: 24px; }

/* Dot indicators */
.fs-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.fs-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.fs-dot.active {
  background: var(--accent);
  transform: scale(1.35);
}
.fs-dot:hover { background: rgba(255,255,255,0.7); }

/* Counter */
.fs-counter {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.5);
  z-index: 10;
  background: rgba(11,22,36,0.5);
  padding: 5px 12px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* Mobile */
@media (max-width: 640px) {
  .featured-slideshow { margin-top: 100px !important; }
  .fs-btn { width: 40px; height: 40px; font-size: 1rem; opacity: 0.8; }
  #portfolio-hero { padding: 24px 20px 40px; min-height: 30vh; }
}

/* ============================================================
   PROJECT GRID
   ============================================================ */

.project-grid-section {
  background: var(--navy);
  border-top: 1px solid var(--border);
  padding: 80px 72px;
  position: relative;
  overflow: hidden;
}

.project-grid-header {
  margin-bottom: 52px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

.grid-card {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: block;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur-sm));
  backdrop-filter: blur(var(--glass-blur-sm));
  border-radius: 12px;
}

.grid-card-img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.grid-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.7);
  transition: transform 0.6s cubic-bezier(.23,1,.32,1),
              filter 0.4s ease;
}

/* Overlay — hidden by default */
.grid-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(11,22,36,0.95) 0%,
    rgba(11,22,36,0.6) 50%,
    rgba(11,22,36,0.1) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

/* Hover state */
.grid-card:hover .grid-card-img img {
  transform: scale(1.06);
  filter: brightness(0.5);
}

.grid-card:hover .grid-card-overlay {
  opacity: 1;
  transform: translateY(0);
}

.grid-card-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
  line-height: 1.1;
  margin-bottom: 8px;
  color: var(--white);
}

.grid-card-desc {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--off-white);
  opacity: 0.85;
  margin-bottom: 12px;
}

.grid-card-tag {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(62,207,191,0.3);
  padding: 4px 10px;
  display: inline-block;
  width: fit-content;
}

/* Coming-soon state — no image, no link, muted overlay always visible */
.grid-card--soon {
  cursor: default;
}
.grid-card--soon .grid-card-overlay {
  opacity: 1;
  transform: none;
  background: linear-gradient(
    to top,
    rgba(11,22,36,0.92) 0%,
    rgba(11,22,36,0.5) 100%
  );
  justify-content: center;
  align-items: center;
  text-align: center;
}
.grid-card--soon .grid-card-title {
  opacity: 0.3;
  font-size: 1rem;
  letter-spacing: 0.3em;
}
.grid-card--soon .grid-card-tag {
  opacity: 0.25;
}

/* Placeholder pattern when no image */
.grid-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    rgba(62,207,191,0.03) 20px,
    rgba(62,207,191,0.03) 21px
  );
  z-index: 0;
}

/* Teal L-bracket corner accent — animates in on hover */
.grid-card::after {
  content: '';
  position: absolute;
  top: 14px;         /* ← distance from top edge */
  left: 14px;        /* ← distance from left edge */
  width: 18px;       /* ← bracket arm length */
  height: 18px;      /* ← bracket arm length */
  border-top: 2px solid var(--accent);  /* ← accent colour + stroke weight */
  border-left: 2px solid var(--accent);
  opacity: 0;
  transform: translate(-6px, -6px); /* ← entry offset from corner */
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(.23,1,.32,1); /* ← reveal speed */
  pointer-events: none;
  z-index: 10;
}
.grid-card:hover::after {
  opacity: 1;
  transform: translate(0, 0);
}

/* Responsive */
@media (max-width: 1024px) {
  .project-grid-section { padding: 64px 32px; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .project-grid-section { padding: 48px 20px; }
  .project-grid { grid-template-columns: repeat(2, 1fr); gap: 1px; }
  .grid-card-overlay { opacity: 1; transform: none; }
}

/* === MOBILE SPACING FIX === */
@media (max-width: 640px) {
  .featured-slideshow {
    margin-top: 0 !important;
  }
  body.portfolio-page {
    padding-top: 124px;
  }
  #portfolio-hero {
    padding: 24px 20px 40px;
    min-height: 30vh;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .featured-slideshow { margin-top: 76px !important; }
  #portfolio-hero { padding: 20px 32px 40px; min-height: 25vh; }
}