/* ==========================================================================
   MIHAL GUREVICH — PORTFOLIO DESIGN SYSTEM & STYLESHEET
   "IT'S NICE THAT / RESET MAGAZINE" BOLD EDITORIAL COLOR BLOCK ENGINE
   Rich Typographic Color Play & Slate Grey Injections
   ========================================================================== */

:root {
  --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-editorial: 'Syne', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* REFERENCE COLOR BLOCKS */
  --c-blue: #1c3bf0;       /* Electric Klein Blue */
  --c-green: #2efc71;      /* Neon Lime Green */
  --c-yellow: #dcf525;     /* Acid Yellow */
  --c-red: #ff2a4b;        /* Hot Red */
  --c-pink: #ffb4d6;       /* Soft Light Pink */
  --c-violet: #6622cc;     /* Deep Violet */
  --c-slate: #dce0e8;      /* Light Slate Canvas */
  --c-black: #080a14;      /* Deep Midnight Black */
  --c-text-grey: #a4adcf;  /* Cool Slate Grey Text for Color Blocks */
  --c-text-muted-grey: #8088a3;

  --bg-main: var(--c-slate);
  --text-main: var(--c-black);
}

/* Base Resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: none !important; /* STRICT ABSOLUTE ZERO BORDERS RULE! */
  border-radius: 0 !important; /* STRICT 100% SHARP RECTANGULAR SHAPES RULE! */
  outline: none !important;
}

html, body {
  scroll-behavior: smooth;
  font-family: var(--font-primary);
  background-color: #0b1326; /* RICH DEEP DARK NAVY BLUE */
  color: #f0f4f8;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body::before {
  display: none !important;
}

/* TOP BAR (DEEP NAVY BLUE) */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.2rem 4rem;
  background-color: #0b1326;
  color: #f0f4f8;
  position: relative;
  z-index: 100;
  max-width: 1360px;
  margin: 0 auto;
}

.brand-title .brand-text {
  font-family: var(--font-mono) !important;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  color: #facc15 !important; /* BRIGHT YELLOW MONOSPACE FONT */
  text-transform: uppercase;
  text-decoration: none;
}

.main-nav-links {
  display: flex;
  gap: 2.2rem;
}

.divider-link {
  font-family: var(--font-mono) !important;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  color: #facc15 !important; /* BRIGHT YELLOW MONOSPACE FONT */
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.15s, color 0.15s;
}

.divider-link:hover {
  opacity: 0.85;
  color: #ffe066 !important;
}

/* CENTERED DETAILS & NAV LINKS DIRECTLY BELOW SHOWREEL VIDEO */
.showreel-centered-links {
  width: 100%;
  max-width: 1200px;
  margin: 1.8rem auto 0.5rem auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.8rem;
}

.showreel-centered-links .divider-link {
  font-family: var(--font-mono) !important;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  color: #facc15 !important; /* BRIGHT YELLOW MONOSPACE FONT */
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.15s, color 0.15s;
}

.showreel-centered-links .divider-link:hover {
  opacity: 0.85;
  color: #ffe066 !important;
}

.showreel-centered-links .nav-slash {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: #facc15 !important;
  opacity: 0.6;
}

/* HERO SHOWREEL SECTION (DEEP NAVY BLUE CANVAS) */
.hero-stage {
  width: 100%;
  background-color: #0b1326;
  padding: 1rem 4rem 3rem;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.showreel-wrapper {
  width: 100%;
  max-width: 1200px; /* RESTORED PREVIOUS SHOWREEL SIZE */
  margin: 0 auto;
  box-shadow: none !important;
  border: none !important;
  outline: none !important;
}

.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #060b17;
  margin: 0 auto;
  overflow: hidden;
}

.main-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --------------------------------------------------------------------------
   2-COLUMN GRID (EXACTLY 2 WORKS PER ROW + TOP SHOWREEL)
   -------------------------------------------------------------------------- */
.portfolio-grid-section {
  padding: 3rem 4rem 8rem;
  background-color: #0b1326; /* RICH DEEP DARK NAVY BLUE */
  color: #ffffff;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.projects-grid {
  column-count: 2; /* 2 INDEPENDENT MASONRY COLUMNS */
  column-gap: 3.5rem; /* HORIZONTAL GAP BETWEEN COLUMNS */
  width: 100%;
  max-width: 1150px; /* MATCHED & PERFECTLY CENTERED UNDER SHOWREEL */
  margin: 0 auto !important;
}

.project-item.hybrid-card {
  break-inside: avoid !important; /* PREVENT CARD SPLITTING ACROSS MASONRY COLUMNS */
  display: inline-block;
  width: 100%;
  margin-bottom: 1.8rem !important; /* TIGHT, CLOSE & UNIFORM VERTICAL GAP UNDER EACH PROJECT */
  cursor: pointer;
  background-color: transparent;
  border: none !important;
  transition: transform 0.15s;
  text-align: center;
}

.project-item.hybrid-card:hover {
  transform: translateY(-4px);
}

/* SLIGHTLY DIFFERENT STARTING HEIGHT AT THE TOP FOR THE TWO COLUMNS */
.projects-grid .project-item:nth-child(2) {
  margin-top: 3.2rem !important; /* RIGHT COLUMN STARTS SLIGHTLY LOWER/STAGGERED AT TOP */
}

/* MEDIA CONTAINER (DYNAMIC FULL ASPECT RATIO — VERTICAL & HORIZONTAL) */
.media-container {
  position: relative;
  width: 100%;
  margin: 0 auto !important;
  min-height: 220px;
  background-color: #060b17;
  overflow: hidden;
  isolation: isolate;
  z-index: 20;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 4px !important;
}

/* SYMMETRICALLY BALANCED VERTICAL POSTERS (EQUAL COLUMN WIDTHS) */
.media-container.vertical-media {
  width: 100%;
  aspect-ratio: 9 / 16 !important;
  margin: 0 auto !important;
}

.project-item.vertical-card {
  width: 100%;
  margin: 0 auto !important;
}

.media-container img, .media-container video, .thumb-img, .hover-video-loop, .video-still-hover {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: contain !important; /* ZERO CROPPING! 100% OF THE VIDEO/POSTER IS FULLY VISIBLE! */
  background-color: #000000;
  pointer-events: none !important; /* PREVENTS NATIVE MEDIA DRAGGING, ENABLES SMOOTH CARD DRAGGING */
  user-select: none !important;
  -webkit-user-drag: none !important;
}

.quick-edit-tile-btn, .inline-add-plus-btn {
  pointer-events: auto !important; /* BUTTONS REMAIN FULLY CLICKABLE */
}

/* MAIN PAGE CARD CAPTION BLOCK (TITLE + ONE SENTENCE DESCRIPTION) */
.card-caption-block {
  margin-top: 10px;
  text-align: center;
  width: 100%;
}

.card-title-heading {
  font-family: var(--font-mono) !important;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.35;
  color: #facc15 !important; /* BRIGHT YELLOW MONOSPACE FONT */
  margin: 0 0 3px 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card-subtitle-desc {
  font-family: var(--font-mono) !important;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.4;
  color: #facc15 !important; /* BRIGHT YELLOW MONOSPACE FONT */
  opacity: 0.85;
  margin: 0 0 6px 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* 100% EMPTY PLACEHOLDER BOX (ZERO TEXT!) */
.asset-placeholder-box {
  width: 100%;
  height: 100%;
  background-color: #080808;
  border: 1px dashed rgba(255, 255, 255, 0.3) !important;
  display: block;
}

.quick-edit-tile-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 30;
  background: rgba(0, 0, 0, 0.82);
  color: #ffffff;
  padding: 0.35rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: 3px !important;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background-color 0.12s;
  pointer-events: auto;
}

.media-container:hover .quick-edit-tile-btn {
  opacity: 1;
}

.quick-edit-tile-btn:hover {
  background-color: #ff2a4b;
  color: #ffffff;
}

/* ADD NEW WORK SQUARE TILE IN GRID */
.add-square-card {
  aspect-ratio: 16 / 9;
  width: 100%;
  background-color: #111111;
  border: 1px dashed rgba(255, 255, 255, 0.25) !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  padding: 1rem;
  text-align: center;
  transition: background-color 0.15s, border-color 0.15s;
}

.add-square-card:hover {
  background-color: #1a1a1a;
  border-color: #ff2a4b !important;
}

.add-square-icon {
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
  color: #ff2a4b;
}

.add-square-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.add-square-sub {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #888888;
  margin-top: 0.2rem;
}

.card-reorder-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.reorder-btn {
  background: rgba(255, 255, 255, 0.2);
  color: currentColor;
  padding: 0.1rem 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 2px;
  transition: background-color 0.12s, color 0.12s;
}

.reorder-btn:hover {
  background-color: #ffffff;
  color: var(--c-black);
}

.card-direct-btn {
  background: rgba(255, 255, 255, 0.25);
  color: currentColor;
  padding: 0.1rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 2px;
  transition: background-color 0.12s, color 0.12s;
}

.card-direct-btn:hover {
  background-color: #ffffff;
  color: var(--c-black);
}

/* 100% PURE CLEAN MEDIA GRID ON HOMEPAGE — DESCRIPTIONS SHOWN ONLY ON CLICK IN MODAL */
.poster-type-layout {
  display: none !important;
}

/* CARD 1: HOT RED BLOCK — YELLOW TITLE, WHITE ROLES, COOL GREY DESC */
.project-item:nth-child(6n+1) .poster-type-layout {
  background-color: var(--c-red) !important;
}
.project-item:nth-child(6n+1) .poster-title {
  color: var(--c-yellow) !important;
  font-weight: 800;
}
.project-item:nth-child(6n+1) .poster-role {
  color: #ffffff !important;
}
.project-item:nth-child(6n+1) .poster-desc {
  color: #e2e5eb !important; /* GREY PLAY */
}
.project-item:nth-child(6n+1) .poster-meta-strip {
  color: #c4cbd9 !important; /* SLATE GREY METADATA */
}
.project-item:nth-child(6n+1) .poster-highlight-tag {
  color: var(--c-black) !important;
  background-color: var(--c-yellow);
  padding: 0.1rem 0.4rem;
  display: inline-block;
}

/* CARD 2: NEON LIME BLOCK — RED TITLE, BLACK ROLES, DARK GREY DESC */
.project-item:nth-child(6n+2) .poster-type-layout {
  background-color: var(--c-green) !important;
}
.project-item:nth-child(6n+2) .poster-title {
  color: #d8001d !important;
  font-weight: 800;
}
.project-item:nth-child(6n+2) .poster-role {
  color: var(--c-black) !important;
}
.project-item:nth-child(6n+2) .poster-desc {
  color: #2b3329 !important; /* CHARCOAL GREY PLAY */
}
.project-item:nth-child(6n+2) .poster-meta-strip {
  color: #1e261d !important;
}
.project-item:nth-child(6n+2) .poster-highlight-tag {
  color: #ffffff !important;
  background-color: #d8001d;
  padding: 0.1rem 0.4rem;
  display: inline-block;
}

/* CARD 3: ELECTRIC BLUE BLOCK — BOLD WHITE TITLE, COOL SLATE GREY DESC (REF 2, 5) */
.project-item:nth-child(6n+3) .poster-type-layout {
  background-color: var(--c-blue) !important;
}
.project-item:nth-child(6n+3) .poster-title {
  color: #ffffff !important; /* Bold White header */
  font-weight: 800;
}
.project-item:nth-child(6n+3) .poster-role {
  color: #a4adcf !important; /* COOL GREY PLAY ON BLUE */
}
.project-item:nth-child(6n+3) .poster-desc {
  color: #909bbf !important; /* COOL SLATE GREY DESC ON BLUE */
}
.project-item:nth-child(6n+3) .poster-meta-strip {
  color: #7b86aa !important; /* SLATE GREY STRIP */
}
.project-item:nth-child(6n+3) .poster-highlight-tag {
  color: var(--c-blue) !important;
  background-color: #ffffff;
  padding: 0.1rem 0.4rem;
  display: inline-block;
}

/* CARD 4: SOFT LIGHT PINK BLOCK — MAGENTA TITLE, CHARCOAL GREY DESC */
.project-item:nth-child(6n+4) .poster-type-layout {
  background-color: var(--c-pink) !important;
}
.project-item:nth-child(6n+4) .poster-title {
  color: #8b0032 !important;
  font-weight: 800;
}
.project-item:nth-child(6n+4) .poster-role {
  color: #4a2030 !important; /* GREY-MAGENTA PLAY */
}
.project-item:nth-child(6n+4) .poster-desc {
  color: #381a25 !important;
}
.project-item:nth-child(6n+4) .poster-meta-strip {
  color: #612c3f !important;
}
.project-item:nth-child(6n+4) .poster-highlight-tag {
  color: #ffffff !important;
  background-color: #8b0032;
  padding: 0.1rem 0.4rem;
  display: inline-block;
}

/* CARD 5: DEEP VIOLET BLOCK — WHITE TITLE, LAVENDER GREY DESC (REF 4) */
.project-item:nth-child(6n+5) .poster-type-layout {
  background-color: var(--c-violet) !important;
}
.project-item:nth-child(6n+5) .poster-title {
  color: #ffffff !important;
  font-weight: 800;
}
.project-item:nth-child(6n+5) .poster-role {
  color: #bfa3e8 !important; /* LAVENDER GREY PLAY */
}
.project-item:nth-child(6n+5) .poster-desc {
  color: #a38bc4 !important; /* COOL GREY PLAY ON VIOLET */
}
.project-item:nth-child(6n+5) .poster-meta-strip {
  color: #8a74a8 !important;
}
.project-item:nth-child(6n+5) .poster-highlight-tag {
  color: var(--c-violet) !important;
  background-color: var(--c-yellow);
  padding: 0.1rem 0.4rem;
  display: inline-block;
}

/* CARD 6: ACID YELLOW BLOCK — RED TITLE, MIDNIGHT BLACK DESC */
.project-item:nth-child(6n+6) .poster-type-layout {
  background-color: var(--c-yellow) !important;
}
.project-item:nth-child(6n+6) .poster-title {
  color: #d8001d !important;
  font-weight: 800;
}
.project-item:nth-child(6n+6) .poster-role {
  color: #4a4510 !important; /* OLIVE GREY PLAY */
}
.project-item:nth-child(6n+6) .poster-desc {
  color: var(--c-black) !important;
}
.project-item:nth-child(6n+6) .poster-meta-strip {
  color: #383514 !important;
}
.project-item:nth-child(6n+6) .poster-highlight-tag {
  color: #ffffff !important;
  background-color: #d8001d;
  padding: 0.1rem 0.4rem;
  display: inline-block;
}

/* ULTRA-COMPACT TYPOGRAPHY FOR THIN STRIP */
.poster-staggered-columns {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.poster-title {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poster-highlight-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.poster-role {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.poster-desc {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poster-meta-strip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding-top: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  opacity: 0.88;
}

.square-bullet {
  font-size: 0.65rem;
}

/* ABOUT SECTION */
.about-section {
  padding: 4rem 2rem;
  background-color: var(--c-slate);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.1fr;
  gap: 2.5rem;
}

.about-col {
  padding: 2.2rem;
  border-radius: 8px;
  font-family: var(--font-mono);
}

.about-col:nth-child(1) {
  background-color: var(--c-blue);
  color: #9cb0ef; /* GREY PLAY ON BLUE ABOUT BLOCK */
}
.about-col:nth-child(1) .about-heading {
  color: #ffffff;
}

.about-col:nth-child(2) {
  background-color: var(--c-green);
  color: var(--c-black);
}

.about-col:nth-child(3) {
  background-color: var(--c-red);
  color: #f0e6eb; /* GREY PLAY ON RED ABOUT BLOCK */
}
.about-col:nth-child(3) .about-heading {
  color: var(--c-yellow);
}

.about-heading {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.bio-lead {
  font-size: 1rem;
  line-height: 1.6;
}

.services-list ul {
  list-style: none;
}

.services-list li {
  font-size: 0.95rem;
  padding: 0.4rem 0;
  text-transform: uppercase;
}

.form-group input, .form-group select, .form-group textarea {
  padding: 0.85rem 1rem;
  background-color: #ffffff;
  color: var(--c-black);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  border-radius: 4px;
}

.submit-btn {
  background-color: var(--c-black);
  color: #ffffff;
  padding: 0.95rem 1.6rem;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.12s;
}

.submit-btn:hover {
  background-color: var(--c-yellow);
  color: var(--c-black);
}

/* MODAL OVERLAY (PURE PITCH BLACK CINEMA BACKDROP) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000000 !important; /* 100% PURE PITCH BLACK BACKDROP! */
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease-in-out;
  padding: 1.5rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* SUBTLE VIBRATION / SHAKE KEYFRAMES FOR ARROW HOVER */
@keyframes subtleArrowShake {
  0% { transform: scale(1.08) rotate(0deg); }
  25% { transform: scale(1.08) rotate(-3deg); }
  50% { transform: scale(1.08) rotate(3deg); }
  75% { transform: scale(1.08) rotate(-2deg); }
  100% { transform: scale(1.08) rotate(0deg); }
}

/* MEDIA WRAPPER FLEX LAYOUT (GUARANTEES 100% THAT ARROWS NEVER OVERLAP VIDEO/IMAGE) */
.modal-media-wrapper-relative {
  position: relative;
  width: 100%;
  min-height: 280px; /* PREVENTS SPLIT-SECOND MEDIA COLLAPSE OR TEXT FLICKER */
  background-color: #000000 !important;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2.5rem; /* PERMANENT DEDICATED SPACING BETWEEN VIDEO/IMAGE AND ARROWS */
}

/* SIDE ARROWS CONTAINER — PERMANENTLY FIXED AT VERTICAL CENTER HEIGHT ON THE RIGHT */
.modal-arrows-side {
  position: fixed;
  right: 2.2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: center;
  z-index: 1030;
}

/* TINY SPATIAL INDICATOR ARROWS ABOVE AND BELOW MAIN NAVIGATION BUTTONS */
.tiny-arrows-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  pointer-events: none;
}

.tiny-arrows-above {
  margin-bottom: 4px;
}

.tiny-arrows-below {
  margin-top: 4px;
}

.tiny-chevron {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 900;
  color: #facc15 !important; /* BRIGHT YELLOW */
  line-height: 0.9;
  opacity: 0.75;
  transition: opacity 0.2s, transform 0.2s;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.tiny-up-chevron {
  transform: rotate(90deg); /* POINTS UPWARDS ^ */
}

.tiny-down-chevron {
  transform: rotate(-90deg); /* POINTS DOWNWARDS v */
}

/* SUBTLE & GENTLE ELEVATOR BUTTON MOTION */
@keyframes elevatorArrowUp {
  0% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-7px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes elevatorArrowDown {
  0% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(7px);
  }
  100% {
    transform: translateY(0);
  }
}

.arrow-elevator-up {
  animation: elevatorArrowUp 0.38s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.arrow-elevator-down {
  animation: elevatorArrowDown 0.38s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

/* YELLOW ARROW NAVIGATION BUTTONS (SWAP BETWEEN PROJECTS) */
.project-nav-btn {
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.prev-project-btn, .next-project-btn {
  position: relative;
  top: auto;
  transform: none;
}

.yellow-arrow-circle {
  width: 44px;
  height: 44px;
  background-color: #000000 !important; /* PURE PITCH BLACK CIRCLE */
  border-radius: 50% !important; /* 100% PERFECT CIRCLE */
  border: 1.5px solid #facc15 !important; /* THIN YELLOW OUTLINE IN FONT SIZE */
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.project-nav-btn:hover .yellow-arrow-circle {
  background-color: #111520 !important;
  border-color: #ffe066 !important;
  box-shadow: none !important;
  animation: subtleArrowShake 0.3s ease-in-out infinite alternate;
}

.project-nav-btn:active .yellow-arrow-circle {
  transform: scale(0.95);
}

#project-modal .modal-card {
  background-color: #000000 !important; /* PURE PITCH BLACK INSIDE MODAL */
  color: #ffffff !important;
  border: none !important;
  width: 96vw;
  max-width: 1350px;
  height: auto;
  max-height: 96vh;
  padding: 1.5rem 2.5rem 2.5rem;
  position: relative;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
  overflow-y: auto !important; /* ENABLE VERTICAL SCROLLING UP & DOWN! */
  scrollbar-width: none !important; /* HIDE SCROLLBAR IN FIREFOX */
  -ms-overflow-style: none !important; /* HIDE SCROLLBAR IN IE/EDGE */
  -webkit-overflow-scrolling: touch;
  margin: 0 auto;
}

#project-modal .modal-card::-webkit-scrollbar {
  display: none !important; /* HIDE SCROLLBAR IN CHROME/SAFARI/WEBKIT */
  width: 0 !important;
  height: 0 !important;
}

/* SPLIT CONTAINER: STRICT TWO-COLUMN CSS GRID (ZERO OVERLAP GUARANTEED) */
.modal-split-container {
  width: 100%;
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 4.5rem; /* STRICT PERMANENT 4.5CM HORIZONTAL GAP BETWEEN TYPOGRAPHY & VIDEO */
  align-items: end;
  padding-top: 1rem;
}

/* RIGHT SIDE MEDIA COLUMN (BOUNDED STRICTLY WITHIN REMAINING GRID COLUMN) */
.modal-media-column {
  grid-column: 2;
  width: 100%;
  min-width: 0; /* PREVENTS OVERFLOW LEFTWARDS INTO TYPOGRAPHY */
  min-height: 280px; /* PREVENTS SPLIT-SECOND FLICKER OR COLLAPSE BETWEEN PROJECT SWITCHES */
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* MEDIA STARTS STRICTLY AFTER THE GAP */
}

/* TOP RIGHT METADATA TYPOGRAPHY (100% VISIBLE & FLUSH WITH RIGHT EDGE OF VIDEO) */
.modal-top-right-meta {
  width: 100%;
  text-align: right; /* FLUSH WITH RIGHT END OF VIDEO PLAYER */
  font-family: var(--font-mono);
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #facc15 !important; /* BRIGHT YELLOW FONT */
  line-height: 1.4;
  text-transform: uppercase;
  margin-bottom: 3.5rem; /* APPROVED LIFTED SPACING ABOVE VIDEO */
  overflow: visible !important;
  white-space: normal;
}

.modal-caption-left {
  grid-column: 1;
  align-self: end; /* BOTTOM EDGE OF TYPOGRAPHY MATCHES BOTTOM EDGE OF VIDEO */
  margin-bottom: 0.5rem;
  width: 270px;
  min-width: 270px;
  max-width: 270px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: right; /* RIGHT ALIGNED AS REQUESTED */
  align-items: flex-end; /* ALIGN LOGO AND TEXT TO RIGHT */
  font-family: var(--font-mono);
  color: #facc15 !important;
  text-transform: uppercase;
  z-index: 15;
}

.modal-caption-emblem {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-bottom: 0.2rem;
  width: 100%;
}

.modal-caption-logo {
  height: 28px;
  width: auto;
  max-width: 90px;
  object-fit: contain;
  margin-bottom: 0.2rem;
  display: block;
  filter: contrast(115%) brightness(105%);
}

.modal-caption-lines {
  font-family: var(--font-mono);
  font-size: 0.71rem; /* SLIGHTLY REDUCED FONT SIZE AS REQUESTED */
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.05em;
  color: #facc15 !important; /* ALL FONT BRIGHT YELLOW! */
  text-align: right; /* RIGHT ALIGNED */
  width: 100%;
}

@media (max-width: 850px) {
  .modal-split-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .modal-caption-left {
    position: relative;
    width: 100%;
  }
  .modal-top-right-meta {
    position: relative;
    top: 0;
    right: 0;
    text-align: left;
    margin-bottom: 0.5rem;
  }
}

/* MULTI-MEDIA GALLERY CONTROLLERS FOR PROJECT DETAIL MODAL */
.modal-gallery-container {
  width: 100%;
  margin: 0 auto;
}

/* SINGLE IMAGE/VIDEO — PERFECTLY BOUNDED (NEVER OVERLAPS LEFT TEXT) */
.modal-gallery-single {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: 0;
}

.modal-gallery-single img, .modal-gallery-single video {
  max-height: 78vh !important;
  max-width: 100% !important; /* STRICTLY BOUNDED TO MEDIA COLUMN — CANNOT OVERLAP LEFT TEXT */
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  display: block;
}

/* CLEAN MOTION VIDEO ENGINE — HIDE ALL NATIVE VIDEO CONTROLS & TIMELINE PROGRESS BARS */
video {
  outline: none !important;
}

video::-webkit-media-controls,
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-play-button,
video::-webkit-media-controls-timeline,
video::-webkit-media-controls-current-time-display,
video::-webkit-media-controls-time-remaining-display {
  display: none !important;
  -webkit-appearance: none !important;
  opacity: 0 !important;
}

/* MULTIPLE IMAGES/VIDEOS — SLEEK SIDE-BY-SIDE HORIZONTAL GALLERY (SIDE BY SIDE ON SCREEN) */
.modal-gallery-scroll {
  display: flex;
  flex-direction: row; /* SIDE BY SIDE HORIZONTAL LAYOUT! */
  gap: 2rem;
  width: 100%;
  max-width: 100%;
  margin: 0;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.modal-gallery-scroll::-webkit-scrollbar {
  display: none;
}

.gallery-card-item {
  flex-shrink: 0;
  width: auto;
  max-width: 440px; /* SIDE BY SIDE FIT ON SCREEN WITHOUT NEEDING TO SCROLL DOWN */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: none !important;
  border: none !important;
  outline: none !important;
  background: #000000;
  margin: 0;
}

.gallery-card-item img, .gallery-card-item video {
  max-height: 76vh !important;
  max-width: 440px !important;
  width: auto;
  height: auto;
  object-fit: contain;
.gallery-card-item[draggable="true"] {
  cursor: grab;
  user-select: none;
  transition: transform 0.15s, opacity 0.15s, outline 0.15s, box-shadow 0.15s;
}

.gallery-card-item[draggable="true"]:active {
  cursor: grabbing;
}

.gallery-card-item.card-dragging {
  opacity: 0.45;
  transform: scale(0.98);
  outline: 2px dashed #60a5fa !important;
}

.gallery-card-item.card-drag-over {
  outline: 3px solid #ff2a4b !important;
  outline-offset: 4px;
  transform: scale(1.01);
  box-shadow: 0 0 30px rgba(255, 42, 75, 0.5);
}

.modal-card {
  background-color: #050811;
  width: 96vw;
  max-width: 1400px;
  height: 94vh;
  padding: 2.5rem;
  position: relative;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.75rem;
  background: var(--c-black);
  color: #ffffff;
  font-size: 1.8rem;
  width: 44px;
  height: 44px;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* INLINE ADD PLUS BUTTON UNDER EVERY PROJECT */
.inline-add-plus-btn {
  margin-top: 0.6rem;
  background: rgba(255, 255, 255, 0.06);
  color: #a4adcf;
  border: 1px dashed rgba(255, 255, 255, 0.3) !important;
  border-radius: 4px !important;
  padding: 0.4rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.inline-add-plus-btn:hover {
  background-color: var(--c-blue);
  color: #ffffff;
  border-color: var(--c-blue) !important;
  transform: translateY(-2px);
}

/* GLOBAL DRAG & DROP OVERLAY */
.global-drag-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 18, 0.94);
  backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease-in-out;
}

.global-drag-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.global-drag-card {
  text-align: center;
  background: #080f24;
  padding: 3.5rem 5rem;
  border-radius: 12px;
  border: 3px dashed #1c3bf0;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9);
}

/* DROP ZONE BOX INSIDE MODAL */
.drop-zone-box {
  border: 2px dashed rgba(28, 59, 240, 0.5) !important;
  background: #060b19;
  padding: 1.5rem;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.drop-zone-box:hover, .drop-zone-box.drag-over {
  background: #0c1630;
  border-color: #ff2a4b !important;
}

/* STANDALONE ADD NEW WORK TILE CARD */
.add-square-card-wrapper {
  width: 100%;
  max-width: 360px !important;
  margin: 0 auto !important;
}

.add-square-card {
  width: 100%;
  min-height: 220px;
  border: 2px dashed rgba(255, 255, 255, 0.25) !important;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
  text-align: center;
}

.add-square-card:hover {
  background: rgba(28, 59, 240, 0.15);
  border-color: var(--c-blue) !important;
  transform: translateY(-4px);
}

.add-square-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.add-square-title {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.add-square-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #a4adcf;
  margin-top: 0.3rem;
}

/* VISUAL FEEDBACK FOR CARD DRAGGING & REORDERING SWAP */
.project-item.hybrid-card.card-dragging {
  opacity: 0.45;
  transform: scale(0.97);
  outline: 2px dashed #1c3bf0 !important;
}

.project-item.hybrid-card.card-drag-over {
  outline: 3px solid #ff2a4b !important;
  outline-offset: 4px;
  transform: scale(1.02);
  box-shadow: 0 0 25px rgba(255, 42, 75, 0.4);
}

/* DRAG & DROP CARD REORDERING STYLES */
.project-item.hybrid-card[draggable="true"] {
  cursor: grab;
  user-select: none;
}

.project-item.hybrid-card[draggable="true"]:active {
  cursor: grabbing;
}

.project-item.hybrid-card.card-dragging {
  opacity: 0.3;
  transform: scale(0.95);
  border: 2px dashed #1c3bf0 !important;
}

.project-item.hybrid-card.card-drag-over {
  border: 2px dashed #ff2a4b !important;
  transform: scale(1.04);
  box-shadow: 0 0 30px rgba(255, 42, 75, 0.45);
}

.specs-box {
  background-color: var(--c-blue);
  color: #a4adcf; /* GREY PLAY ON BLUE MODAL SPECS */
  padding: 1.5rem;
  border-radius: 6px;
  font-family: var(--font-mono);
}

.specs-box h4 {
  color: #ffffff;
}

.specs-box strong {
  color: var(--c-acid-yellow);
}

/* FOOTER WITH PRINTED & SCANNED YELLOW LOGO */
.site-footer {
  width: 100%;
  max-width: 1150px;
  margin: 4rem auto 2rem auto;
  padding: 3rem 1.5rem 2rem 1.5rem;
  border-top: 1px solid rgba(250, 204, 21, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  text-align: center;
  background-color: transparent;
}

.footer-logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.5rem;
}

.footer-scanned-logo {
  max-width: 220px;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: contrast(110%) brightness(105%);
  transition: transform 0.3s ease, filter 0.3s ease;
}

.footer-scanned-logo:hover {
  transform: scale(1.05);
  filter: contrast(125%) brightness(115%) drop-shadow(0 0 15px rgba(250, 204, 21, 0.45));
}

.footer-credits {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #888888;
  letter-spacing: 0.04em;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .projects-grid { grid-template-columns: 1fr; }
  .top-bar { flex-direction: column; gap: 1rem; }
}
