/* ============================================
   R3FACTORY — Sunset Gradient Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'Outfit', sans-serif; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* ============================================
   SUNSET GRADIENT VARIABLES
   ============================================ */
:root {
  --bg-primary: #080808;
  --bg-secondary: #141014;
  --bg-card: rgba(40, 20, 45, 0.4);
  --text-primary: #fff0f5;
  --text-secondary: #d4a0c0;
  --accent: #ff6f00;
  --accent-hover: #ff8f00;
  --accent-rgb: 255, 111, 0;
  --gradient: linear-gradient(135deg, #ff6f00, #e91e63, #9c27b0);
  --nav-bg: rgba(10, 10, 10, 0.9);
  --border: rgba(255, 111, 0, 0.12);
  --hero-overlay: linear-gradient(180deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.45) 100%);
  --card-shadow: 0 8px 32px rgba(233, 30, 99, 0.1);
  --section-alt: #111015;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --card-radius: 20px;
  --hero-text-align: center;
}

/* ============================================
   SUNSET GRADIENT OVERRIDES
   ============================================ */
.section-title,
.hero-content h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
}
.hero-content h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  background: linear-gradient(90deg, #ffab40, #ff4081, #ea80fc, #ffab40);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 6s ease infinite;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}
.hero-content h1 span {
  background: inherit;
  -webkit-background-clip: text;
  background-clip: text;
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.section-title {
  background: linear-gradient(135deg, #ff6f00, #e91e63);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.service-card,
.testimonial-card {
  border-radius: 20px !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--bg-card) !important;
  border: 1px solid rgba(255,111,0,0.1) !important;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff6f00, #e91e63, #9c27b0);
}
.service-card:hover,
.work-card:hover {
  box-shadow: 0 0 50px rgba(233,30,99,0.15) !important;
}
.work-card {
  border-radius: 20px !important;
  border: 1px solid rgba(255,111,0,0.1) !important;
  backdrop-filter: blur(16px);
  background: var(--bg-card) !important;
}
.service-icon {
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,111,0,0.2), rgba(233,30,99,0.2));
  border: 1px solid rgba(255,111,0,0.2);
}
.hero-cta {
  border-radius: 50px;
  background: linear-gradient(135deg, #ff6f00, #e91e63) !important;
  box-shadow: 0 0 30px rgba(233,30,99,0.3);
  padding: 16px 40px;
}
.nav-cta {
  border-radius: 50px !important;
  background: linear-gradient(135deg, #ff6f00, #e91e63) !important;
}
.work-tag {
  border-radius: 50px;
  background: rgba(233,30,99,0.1);
  border: 1px solid rgba(233,30,99,0.15);
  color: #ff79c6;
}
.feature-number {
  background: linear-gradient(135deg, #ff6f00, #e91e63);
  -webkit-background-clip: text;
  background-clip: text;
}
.contact-form input,
.contact-form textarea {
  border-radius: 14px;
  background: rgba(58,26,66,0.3);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,111,0,0.1);
}
.contact-form button {
  border-radius: 50px;
  background: linear-gradient(135deg, #ff6f00, #e91e63);
}
.contact-icon { border-radius: 14px; background: linear-gradient(135deg, #ff6f00, #e91e63); }

/* ============================================
   COMMON LAYOUT
   ============================================ */

body {
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* ---- NAV ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img { height: 36px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s;
  letter-spacing: 0.5px;
}

.nav-links a:hover { color: var(--accent); }

.nav-dropdown { position: relative; }

.nav-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: -12px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--card-radius, 8px);
  padding: 8px 0;
  min-width: 200px;
  box-shadow: var(--card-shadow);
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-content { display: block; }

.nav-dropdown-content a {
  display: block;
  padding: 8px 20px;
  font-size: 13px;
}

.nav-dropdown-content a:hover {
  background: var(--accent);
  color: white;
}

.nav-cta {
  color: white !important;
  padding: 8px 20px;
  font-weight: 600;
  font-size: 13px !important;
  transition: all 0.3s !important;
}

.nav-cta:hover { opacity: 0.9; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-burger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    padding: 20px;
    border-bottom: 1px solid var(--border);
  }
}

/* ---- HERO ---- */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
  isolation: isolate;
}

/* Three.js canvas is injected as first child of .hero */
.hero canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100% !important;
  height: 100% !important;
  transition: opacity 0.6s;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: var(--hero-text-align, center);
  max-width: 1400px;
  width: 100%;
  padding: 48px 48px;
  pointer-events: auto;
}

.hero-content h1 {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-content p {
  font-size: clamp(0.95rem, 2vw, 1.4rem);
  color: rgba(255,255,255,0.9);
  margin-bottom: 32px;
  line-height: 1.6;
  text-shadow: 0 0 8px rgba(255,255,255,0.15), 0 1px 10px rgba(0,0,0,0.4);
}

.hero-cta {
  display: inline-block;
  color: white;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* Hero text line highlight */
.hero-line {
  opacity: 0.35;
  transition: opacity 0.6s;
  display: inline;
}
.hero-line.active {
  opacity: 1;
}

/* Hero indicator dots */
.hero-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 16px auto 0;
}
.hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  position: relative;
  transition: background 0.4s;
}
.hero-dot.active {
  background: var(--accent);
  box-shadow: 0 0 6px rgba(255,111,0,0.5);
}
.hero-dot svg {
  position: absolute;
  inset: -5px;
  width: 16px;
  height: 16px;
  transform: rotate(-90deg);
}
.hero-dot svg circle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 31.4;
  stroke-dashoffset: 31.4;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 0.3s;
}
.hero-dot.active svg circle {
  opacity: 1;
  animation: dotProgress var(--dot-duration, 6s) linear forwards;
}
@keyframes dotProgress {
  to { stroke-dashoffset: 0; }
}

/* ---- SECTIONS ---- */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
  background: var(--bg-primary);
}

.section-alt { background: var(--section-alt); }

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
  line-height: 1.6;
}

/* ---- SERVICES ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.service-card {
  padding: 36px 28px;
  transition: all 0.4s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.service-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 24px;
  color: white;
  transition: all 0.4s ease;
}

.service-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---- FEATURES ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.feature-item {
  text-align: center;
  padding: 24px;
}

.feature-number {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: clamp(1.75rem, 5.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.feature-item h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-item p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ---- WORKS ---- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
}

.work-card {
  overflow: hidden;
  transition: all 0.4s ease;
}

.work-card:hover {
  transform: translateY(-4px);
}

.work-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.work-card-body { padding: 24px; }

.work-card-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.work-card-body p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.work-tag {
  font-size: 11px;
  padding: 3px 10px;
  font-weight: 500;
  transition: all 0.3s ease;
}

/* ---- TESTIMONIALS ---- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.testimonial-card {
  padding: 32px;
  transition: all 0.4s ease;
}

.testimonial-card:hover { box-shadow: var(--card-shadow); }

.testimonial-quote {
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  transition: all 0.4s ease;
}

.testimonial-name { font-weight: 600; font-size: 0.95rem; }
.testimonial-role { color: var(--text-secondary); font-size: 0.8rem; }

/* ---- CONTACT ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

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

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form input,
.contact-form textarea {
  padding: 14px 18px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.contact-form textarea { min-height: 140px; resize: vertical; }

.contact-form button {
  color: white;
  border: none;
  padding: 14px 32px;
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.3s;
}

.contact-form button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.contact-info h3 { font-size: 1.5rem; margin-bottom: 24px; }

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.contact-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  color: white;
  transition: all 0.4s ease;
}

.contact-item p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; }
.contact-item strong { color: var(--text-primary); display: block; margin-bottom: 2px; }

/* ---- FOOTER ---- */
.footer {
  position: relative;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 80px 24px 40px;
}

.footer-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}

.footer-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo img { height: 32px; }

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-social { display: flex; gap: 12px; margin-top: 8px; }

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.3s;
  font-size: 14px;
}

.footer-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 4px 0;
  transition: color 0.3s;
}

.footer-col a:hover { color: var(--text-primary); }

.footer-col p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  padding: 4px 0;
}

.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-text { color: var(--text-secondary); font-size: 0.8rem; }

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

/* ---- LANGUAGE SELECTOR ---- */
.lang-select {
  position: relative;
  display: inline-block;
}
.lang-select-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}
.lang-select-btn:hover { border-color: var(--accent); color: var(--accent); }
.lang-select-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: rgba(20,16,20,0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 0;
  min-width: 80px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.lang-select-menu.open { display: block; }
.lang-select-menu a {
  display: block;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.lang-select-menu a:hover { background: var(--accent); color: white; }
.lang-select-menu a.active { color: var(--accent); font-weight: 600; }

@media (max-width: 768px) {
  .lang-select { margin-top: 8px; }
  .lang-select-menu { right: auto; left: 0; }
}

/* ---- MOBILE HERO RESPONSIVE ---- */
@media (max-width: 768px) {
  .hero { min-height: 100vh !important; min-height: 100dvh !important; }
  .hero-content { padding: 20px 16px; max-width: 100vw; box-sizing: border-box; overflow: hidden; }
  .hero-content h1 { font-size: clamp(1.6rem, 6vw, 2.2rem) !important; margin-bottom: 10px; line-height: 1.3 !important; }
  .hero-content p { font-size: 0.95rem; margin-bottom: 12px; line-height: 1.4; }
  .hero-cta { font-size: 13px; padding: 10px 18px; }
  .hero-dots { gap: 6px; margin-top: 8px; }
  .hero-line { display: inline; }
  .services-grid { grid-template-columns: 1fr !important; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .portfolio-slider { overflow: hidden; }
  .slider-arrow { display: none; }
  .testimonials-grid { grid-template-columns: 1fr !important; }
  .contact-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: clamp(1.3rem, 5.5vw, 1.8rem) !important; }
  .hero-content p { font-size: 0.85rem; }
  .hero-cta { font-size: 12px; padding: 9px 16px; }
  .features-grid { grid-template-columns: 1fr; }
}

/* ---- SCROLL ANIMATIONS ---- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation for cards */
.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.2s; }
.fade-in:nth-child(4) { transition-delay: 0.3s; }
.fade-in:nth-child(5) { transition-delay: 0.4s; }
.fade-in:nth-child(6) { transition-delay: 0.5s; }

/* ---- PORTFOLIO SLIDER (HOME) ---- */
.portfolio-slider {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid rgba(255,111,0,0.1);
}

.slider-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.slider-slide {
  flex: 1 0 0%;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  padding: 16px;
  box-sizing: border-box;
}

.slider-slide:hover { color: inherit; }

.slider-slide-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 12px;
  pointer-events: none;
}

.slider-slide-body {
  padding: 20px 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slider-slide-body h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.slider-slide-body p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

.slider-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}

.slider-dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.3s;
}

.slider-arrow:hover { background: rgba(0,0,0,0.8); }
.slider-arrow--prev { left: 12px; }
.slider-arrow--next { right: 12px; }

@media (max-width: 768px) {
  .slider-slide { flex: none; }
  .slider-slide-img { height: 200px; }
  .slider-slide-body { padding: 16px 4px; }
  .slider-arrow { display: none; }
}

/* ---- PROJECT DETAIL MODAL ---- */
.project-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
  overflow-y: auto;
  animation: modalFadeIn 0.3s ease;
}

.project-modal.open { display: block; }

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.project-modal-inner {
  max-width: 900px;
  margin: 60px auto;
  padding: 0 24px 60px;
}

.project-modal-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2001;
  transition: background 0.3s;
}

.project-modal-close:hover { background: rgba(255,255,255,0.2); }

.project-modal-header {
  text-align: center;
  margin-bottom: 40px;
}

.project-modal-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-modal-header .project-date {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.project-modal-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 32px;
  text-align: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.project-gallery img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  aspect-ratio: 16/10;
  transition: transform 0.3s;
  cursor: pointer;
}

.project-gallery img.portrait {
  aspect-ratio: 9/16;
  object-fit: contain;
  background: #0a0a0a;
  max-height: 560px;
  justify-self: center;
  width: auto;
  max-width: 100%;
}

.project-gallery img:hover { transform: scale(1.02); }

/* ---- Image Lightbox (click-to-zoom from project gallery) ---- */
.image-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  cursor: zoom-out;
  align-items: center;
  justify-content: center;
  padding: 40px;
  animation: lightboxFade 0.2s ease-out;
}

.image-lightbox.open { display: flex; }

.image-lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  cursor: default;
}

.image-lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 1;
}

.image-lightbox-close:hover { background: rgba(255, 255, 255, 0.2); }

.image-lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 1;
  padding: 0;
}

.image-lightbox-prev { left: 24px; }
.image-lightbox-next { right: 24px; }

.image-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}
.image-lightbox-prev:hover { transform: translateY(-50%) translateX(-2px); }
.image-lightbox-next:hover { transform: translateY(-50%) translateX(2px); }

@keyframes lightboxFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 640px) {
  .image-lightbox { padding: 16px; }
  .image-lightbox-close { top: 12px; right: 12px; width: 40px; height: 40px; }
  .image-lightbox-nav { width: 44px; height: 44px; font-size: 26px; }
  .image-lightbox-prev { left: 8px; }
  .image-lightbox-next { right: 8px; }
}

.project-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.project-modal-tags .work-tag {
  font-size: 14px;
  padding: 8px 18px;
  font-weight: 600;
}

.work-card[data-project] { cursor: pointer; }

.project-modal-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.project-modal-link {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 50px;
  background: linear-gradient(135deg, #ff6f00, #e91e63);
  color: white !important;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
}

.project-modal-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(233,30,99,0.3);
}
