/* Portfolio Laptop Mockup and Slider CSS */

.portfolio-section {
  background-color: var(--bg-black);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.portfolio-header {
  text-align: center;
  margin-bottom: 64px;
}

.portfolio-pretitle {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.portfolio-title {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  color: var(--color-text-main);
}

.portfolio-subtitle {
  font-size: 16px;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Carousel Slider Mechanics */
.portfolio-slider-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 20px 0;
}

.portfolio-slides {
  position: relative;
  width: 100%;
  min-height: 480px;
}

.portfolio-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  z-index: 1;
}

.portfolio-slide.active {
  position: relative;
  /* Expand parent container height dynamically */
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

.slide-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
}

/* Left Column: Project Info */
.project-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.project-category {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-primary);
  background-color: rgba(var(--color-primary-rgb), 0.08);
  padding: 6px 12px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.project-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--color-text-main);
  margin-bottom: 20px;
}

.project-description {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-bottom: 32px;
}

.btn-project-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-main);
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 4px;
}

.btn-project-link:hover {
  color: var(--color-primary);
}

.btn-project-link .arrow {
  transition: var(--transition-smooth);
}

.btn-project-link:hover .arrow {
  transform: translateX(5px);
}

/* Right Column: Laptop Mockup */
.mockup-column {
  display: flex;
  justify-content: center;
}

.laptop-mockup {
  position: relative;
  width: 100%;
  max-width: 540px;
}

.laptop-screen {
  background-color: #000;
  border: 14px solid #1a1a1a;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.screen-content {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background-color: #0d0d0f;
}

.screen-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.laptop-keyboard {
  height: 14px;
  background: linear-gradient(90deg, #2b2b2b 0%, #1e1e1e 10%, #1e1e1e 90%, #2b2b2b 100%);
  border-bottom: 4px solid #0d0d0d;
  border-radius: 0 0 12px 12px;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.laptop-keyboard::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 4px;
  background-color: #0b0b0c;
  border-radius: 0 0 4px 4px;
}

/* Dashboard Mockup Fallbacks CSS */
.css-dashboard-mockup {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #0e0e11;
  font-family: sans-serif;
  user-select: none;
}

.mockup-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background-color: #151518;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mockup-header .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.mockup-header .dot.red {
  background-color: #ff5f56;
}

.mockup-header .dot.yellow {
  background-color: #ffbd2e;
}

.mockup-header .dot.green {
  background-color: #27c93f;
}

.mockup-url {
  font-size: 8px;
  color: rgba(255, 255, 255, 0.2);
  margin-left: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mockup-body {
  flex-grow: 1;
  display: flex;
}

.mockup-sidebar {
  width: 44px;
  background-color: #131317;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mockup-sidebar .bar-item {
  height: 6px;
  border-radius: 3px;
  background-color: rgba(255, 255, 255, 0.06);
  width: 80%;
  margin: 0 auto;
}

.mockup-sidebar .bar-item.active {
  background-color: var(--color-primary);
}

.mockup-main {
  flex-grow: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mockup-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mockup-card-small {
  height: 24px;
  background-color: #17171c;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

/* Colorful highlights for different projects */
.dashboard-orange .mockup-card-small.highlight {
  border-color: rgba(var(--color-primary-rgb), 0.3);
  box-shadow: inset 0 0 6px rgba(var(--color-primary-rgb), 0.15);
}

.dashboard-teal .mockup-card-small.highlight {
  border-color: rgba(3, 250, 250, 0.3);
  box-shadow: inset 0 0 6px rgba(3, 250, 250, 0.15);
}

.dashboard-purple .mockup-card-small.highlight {
  border-color: rgba(181, 10, 250, 0.3);
  box-shadow: inset 0 0 6px rgba(181, 10, 250, 0.15);
}

.mockup-chart-large {
  flex-grow: 1;
  background-color: #17171c;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 15px 15px;
}

.chart-line {
  position: absolute;
  bottom: 25px;
  left: 10px;
  width: calc(100% - 20px);
  height: 40px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.dashboard-orange .chart-line::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-bottom: 2px solid var(--color-primary);
  border-left: 2px solid transparent;
  clip-path: polygon(0% 90%, 25% 60%, 50% 70%, 75% 30%, 100% 10%, 100% 100%, 0% 100%);
  background: linear-gradient(180deg, rgba(var(--color-primary-rgb), 0.15) 0%, transparent 100%);
}

.dashboard-teal .chart-line::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-bottom: 2px solid #03fafa;
  clip-path: polygon(0% 80%, 20% 40%, 45% 65%, 70% 20%, 100% 5%, 100% 100%, 0% 100%);
  background: linear-gradient(180deg, rgba(3, 250, 250, 0.15) 0%, transparent 100%);
}

.dashboard-purple .chart-line::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-bottom: 2px solid #b50afa;
  clip-path: polygon(0% 70%, 30% 80%, 55% 45%, 80% 60%, 100% 15%, 100% 100%, 0% 100%);
  background: linear-gradient(180deg, rgba(181, 10, 250, 0.15) 0%, transparent 100%);
}

/* Slider Controls */
.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 48px;
  position: relative;
  z-index: 3;
}

.control-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--color-btn-gray);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-text-main);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.control-btn:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 15px rgba(var(--color-primary-rgb), 0.35);
  transform: scale(1.08);
}

.slider-dots {
  display: flex;
  gap: 10px;
}

.dot-nav {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.dot-nav.active {
  background-color: var(--color-primary);
  width: 24px;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(var(--color-primary-rgb), 0.4);
}

/* Responsive Rules for Portfolio */
@media (max-width: 992px) {
  .slide-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .project-info {
    align-items: center;
  }

  .portfolio-slides {
    min-height: auto;
  }
}

@media (max-width: 576px) {
  .laptop-screen {
    border-width: 8px;
  }

  .laptop-keyboard {
    height: 10px;
  }

  .mockup-sidebar {
    width: 32px;
    padding: 6px 2px;
  }

  .mockup-main {
    padding: 8px;
  }
}