/* ==========================================================================
   Design System & Custom Properties
   ========================================================================== */
:root {
  --bg-primary: #060814;
  --bg-secondary: #0d1122;
  --bg-secondary-rgb: 13, 17, 34;
  
  --accent-primary: #8b5cf6;
  --accent-primary-rgb: 139, 92, 246;
  --accent-secondary: #06b6d4;
  --accent-secondary-rgb: 6, 182, 212;
  --accent-success: #10b981;
  --accent-error: #ef4444;
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-inverse: #060814;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-glow: rgba(139, 92, 246, 0.2);
  --glass-bg: rgba(13, 17, 34, 0.6);
  --glass-blur: blur(16px);
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
  
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --container-max: 1200px;
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

img, svg {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ==========================================================================
   Ambient Background Design
   ========================================================================== */
.bg-grid-glow {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 100%);
  pointer-events: none;
}

.bg-orb {
  position: fixed;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  z-index: -2;
  pointer-events: none;
  mix-blend-mode: screen;
}

.bg-orb-primary {
  background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
  top: -20%;
  left: -10%;
  animation: floatOrb 20s infinite alternate ease-in-out;
}

.bg-orb-secondary {
  background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
  bottom: -10%;
  right: -10%;
  animation: floatOrb 25s infinite alternate-reverse ease-in-out;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, 8%) scale(1.1); }
}

/* ==========================================================================
   Typography & Typography Utilities
   ========================================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-primary) 20%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem auto;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
  background: linear-gradient(to bottom, #ffffff 40%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  color: var(--text-muted);
  font-weight: 300;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  transition: var(--transition-smooth);
  border-bottom: 1px solid transparent;
}

#site-header.scrolled {
  background-color: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
}

/* Shrinking header scroll animation config */
@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  #site-header {
    animation: shrinkHeader auto linear both;
    animation-timeline: scroll(block root);
    animation-range: 0px 100px;
  }
}

@keyframes shrinkHeader {
  to {
    background-color: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
  }
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  transition: var(--transition-smooth);
}

#site-header.scrolled .header-container {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  color: var(--text-main);
}

.logo-accent {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  margin-right: 0.4rem;
  color: var(--text-inverse);
  font-weight: 900;
}

.nav-desktop .nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

.nav-btn {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: var(--text-main);
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

/* Mobile Toggle Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 105;
}

.nav-toggle .bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  position: absolute;
  transition: var(--transition-fast);
}

.nav-toggle .bar-top { top: 0; }
.nav-toggle .bar-mid { top: 9px; }
.nav-toggle .bar-bot { bottom: 0; }

.nav-toggle[aria-expanded="true"] .bar-top {
  transform: translateY(9px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .bar-mid {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .bar-bot {
  transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Menu Panel */
.nav-mobile {
  position: fixed;
  inset: 0;
  background-color: rgba(6, 8, 20, 0.95);
  backdrop-filter: blur(20px);
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.nav-mobile.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-mobile-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.nav-mobile-link {
  font-size: 1.5rem;
  font-family: var(--font-display);
  color: var(--text-muted);
}

.nav-mobile-link:hover {
  color: var(--text-main);
}

.nav-mobile-btn {
  font-size: 1.3rem;
  font-family: var(--font-display);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

/* ==========================================================================
   Hero Section Styling
   ========================================================================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  padding-bottom: 60px;
  position: relative;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 4rem;
}

.hero-tagline {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-secondary);
  margin-bottom: 1.5rem;
  display: inline-block;
  background: rgba(6, 182, 212, 0.1);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  padding: 0.9rem 2rem;
  border-radius: 8px;
  transition: var(--transition-fast);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: var(--text-main);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Hero Canvas Card Visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-canvas-card {
  width: 100%;
  max-width: 450px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.hero-canvas-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), transparent);
}

.card-dots {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
}

.card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.card-dot.red { background-color: #ef4444; }
.card-dot.yellow { background-color: #f59e0b; }
.card-dot.green { background-color: #10b981; }

.visual-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.visual-badge {
  display: inline-block;
  align-self: flex-start;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.1));
  border: 1px solid var(--border-color-glow);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-main);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.visual-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.metric-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 1rem;
}

.metric-val {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 0.2rem;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.visual-bars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 10px;
  transform-origin: left;
  animation: expandBar 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes expandBar {
  from { transform: scaleX(0); }
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.services-section {
  padding: 100px 0;
  position: relative;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, transparent, rgba(139, 92, 246, 0.3), rgba(6, 182, 212, 0.3), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: var(--transition-smooth);
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow: 0 15px 35px rgba(139, 92, 246, 0.1);
}

.service-card:hover::after {
  opacity: 1;
}

.service-icon-wrapper {
  background: rgba(139, 92, 246, 0.08);
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.75rem;
  color: var(--accent-primary);
  border: 1px solid rgba(139, 92, 246, 0.15);
  transition: var(--transition-smooth);
}

.service-card:hover .service-icon-wrapper {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-secondary);
  transform: scale(1.05) rotate(5deg);
}

.service-icon {
  width: 28px;
  height: 28px;
}

.service-card-title {
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.service-card-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.service-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
}

.service-card-list li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--text-main);
}

.service-card-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-secondary);
  font-size: 0.8rem;
}

/* ==========================================================================
   Portfolio Section
   ========================================================================== */
.portfolio-section {
  padding: 100px 0;
}

.portfolio-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3.5rem;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.6rem 1.25rem;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: var(--text-main);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.portfolio-item {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  transition: var(--transition-smooth);
  border: 1px solid var(--border-color);
}

/* JavaScript Dynamic Filter animation states */
.portfolio-item.filtered-out {
  display: none;
}

.portfolio-item.filtered-in {
  animation: filterFadeIn 0.5s ease forwards;
}

@keyframes filterFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.portfolio-image-wrapper {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #0b0f19;
}

/* Overlay that appears on hover */
.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(6, 8, 20, 0.4) 0%, rgba(6, 8, 20, 0.92) 80%);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  z-index: 2;
  transition: var(--transition-smooth);
  transform: translateY(15px);
}

.portfolio-item:hover .project-overlay {
  opacity: 1;
  transform: translateY(0);
}

.project-tag {
  align-self: flex-start;
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.project-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.project-summary {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.btn-project-detail {
  align-self: flex-start;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: var(--text-main);
  border: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(139, 92, 246, 0.2);
  transition: var(--transition-fast);
}

.btn-project-detail:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(139, 92, 246, 0.4);
}

/* Beautiful Custom CSS Illustrations representing portfolios */
.visual-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.portfolio-item:hover .visual-placeholder {
  transform: scale(1.08);
}

/* Project 1 & 5 UI Mockup styling */
.creative-1 {
  background: radial-gradient(circle at top right, #3b0764, #0f172a);
}
.creative-2 {
  background: radial-gradient(circle at bottom left, #022c22, #0f172a);
}

.ui-mockup {
  width: 80%;
  height: 70%;
  background: #1e293b;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ui-mockup-header {
  height: 20px;
  background: #0f172a;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.ui-mockup-body {
  flex-grow: 1;
  display: flex;
  position: relative;
  padding: 8px;
  gap: 8px;
}

.mockup-sidebar {
  width: 25%;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.mockup-canvas {
  flex-grow: 1;
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
  overflow: hidden;
}

.mockup-line-glow {
  position: absolute;
  top: 30%;
  left: 10%;
  width: 80%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 10px;
  box-shadow: 0 0 10px var(--accent-primary);
}

.mockup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 25px;
  padding: 0 8px;
}

.mockup-grid::before, .mockup-grid::after {
  content: '';
  height: 30px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

/* Dashboard design for project 5 */
.dashboard .mockup-chart-radial {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 6px solid rgba(255, 255, 255, 0.03);
  border-top-color: var(--accent-secondary);
  border-right-color: var(--accent-primary);
}

.dashboard .mockup-rows {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mock-row {
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  width: 80%;
}
.mock-row:nth-child(2) { width: 50%; }

/* Project 2 Art glowing shapes */
.art-1 {
  background: radial-gradient(circle, #581c87 0%, #030712 100%);
}

.art-mockup {
  position: relative;
  width: 120px;
  height: 120px;
}

.glowing-shape-1 {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-primary), transparent);
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  animation: rotateShape 12s infinite linear;
}

.glowing-shape-2 {
  position: absolute;
  inset: 15px;
  background: linear-gradient(135deg, transparent, var(--accent-secondary));
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  mix-blend-mode: screen;
  animation: rotateShape 8s infinite linear reverse;
}

@keyframes rotateShape {
  to { transform: rotate(360deg); }
}

/* Project 3 Print hardcover mockup */
.print-1 {
  background: radial-gradient(circle at bottom, #1e1b4b, #030712);
}

.book-mockup {
  perspective: 600px;
}

.book-cover {
  width: 90px;
  height: 130px;
  background: #111827;
  border-radius: 4px 8px 8px 4px;
  box-shadow: 15px 15px 25px rgba(0, 0, 0, 0.6);
  transform: rotateY(-20deg) rotateX(10deg);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: #1f2937;
  border-radius: 4px 0 0 4px;
  box-shadow: inset -2px 0 5px rgba(0, 0, 0, 0.5);
}

.book-foil {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: #d1d5db; /* silver foil representation */
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

/* Project 6 poster series */
.print-2 {
  background: radial-gradient(circle at left, #1e293b, #090d16);
}

.poster-mockup {
  width: 100px;
  height: 140px;
  background: #f8fafc;
  padding: 10px;
  box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.5);
  transform: rotate(3deg);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.poster-graphic {
  width: 100%;
  height: 100%;
  background: #1e1b4b;
  position: relative;
  overflow: hidden;
}

.poster-sun {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #f43f5e;
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 20px #f43f5e;
}

/* Project 4 consulting chart mockup */
.consulting-1 {
  background: radial-gradient(circle, #022c22, #030712);
}

.chart-mockup {
  width: 120px;
  height: 80px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 0 10px;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  width: 100%;
  height: 100%;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.chart-bar {
  flex-grow: 1;
  height: var(--height);
  background: linear-gradient(to top, var(--accent-secondary), var(--accent-primary));
  border-radius: 4px 4px 0 0;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.chart-line-indicator {
  position: absolute;
  top: 15%;
  left: 10%;
  width: 80%;
  height: 2px;
  background: var(--accent-success);
  transform: rotate(-10deg);
  box-shadow: 0 0 10px var(--accent-success);
}
.chart-line-indicator::before {
  content: '';
  position: absolute;
  right: 0;
  top: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-success);
}

/* ==========================================================================
   Client Testimonials Section
   ========================================================================== */
.testimonials-section {
  padding: 100px 0;
  background-color: rgba(13, 17, 34, 0.4);
  position: relative;
}

.testimonials-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.testimonials-slider-wrapper {
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.testimonials-slider {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-slide {
  min-width: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.testimonial-slide.active {
  opacity: 1;
}

.testimonial-rating {
  color: #fbbf24;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
}

.testimonial-quote {
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  font-weight: 300;
  line-height: 1.5;
  color: var(--text-main);
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  font-size: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-main);
}

.author-title {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Slider Controls */
.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.slider-arrow {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.slider-arrow:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.arrow-icon {
  width: 20px;
  height: 20px;
}

.slider-dots {
  display: flex;
  gap: 0.5rem;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.slider-dot:hover {
  background: rgba(255, 255, 255, 0.30);
}

.slider-dot.active {
  background: var(--accent-secondary);
  box-shadow: 0 0 8px var(--accent-secondary);
  width: 24px;
  border-radius: 10px;
}

/* ==========================================================================
   Custom Lead Generation Form Styling
   ========================================================================== */
.contact-section {
  padding: 100px 0;
  position: relative;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 5rem;
  align-items: start;
}

.contact-info-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 1rem;
  margin-bottom: 3rem;
  font-weight: 300;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-detail-item {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.detail-icon {
  font-size: 1.5rem;
  background: rgba(139, 92, 246, 0.08);
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  border: 1px solid rgba(139, 92, 246, 0.15);
}

.contact-detail-item h4 {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.contact-detail-item a {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
}

.contact-detail-item a:hover {
  color: var(--accent-secondary);
}

/* The Form Panel */
.contact-form-wrapper {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
  position: relative;
}

/* Subtle border light */
.contact-form-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), var(--accent-secondary), transparent);
}

/* Form Structure */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group label {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.required-indicator {
  color: var(--accent-error);
  margin-left: 0.2rem;
}

/* Form Hints */
.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Error Messages - Adjacent Sibling Pattern */
.error-msg {
  display: none;
  color: var(--accent-error);
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 0.4rem;
  animation: slideDownError 0.25s ease forwards;
}

@keyframes slideDownError {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Input Fields Common Style */
.contact-form-wrapper input[type="text"],
.contact-form-wrapper input[type="email"],
.contact-form-wrapper select,
.contact-form-wrapper textarea {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  outline: none;
  transition: var(--transition-fast);
  width: 100%;
}

.contact-form-wrapper input[type="text"]:focus,
.contact-form-wrapper input[type="email"]:focus,
.contact-form-wrapper select:focus,
.contact-form-wrapper textarea:focus {
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}

/* Interactive custom Validation rules via pseudo-classes */
.contact-form-wrapper input[type="text"]:user-invalid,
.contact-form-wrapper input[type="email"]:user-invalid,
.contact-form-wrapper select:user-invalid,
.contact-form-wrapper textarea:user-invalid {
  border-color: var(--accent-error);
  background: rgba(239, 68, 68, 0.03);
}

/* Render error messages only adjacent to invalid items */
.contact-form-wrapper input[type="text"]:user-invalid ~ .error-msg,
.contact-form-wrapper input[type="email"]:user-invalid ~ .error-msg,
.contact-form-wrapper select:user-invalid ~ .error-msg,
.contact-form-wrapper textarea:user-invalid ~ .error-msg {
  display: block;
}

/* Success Highlight for User interactions */
.contact-form-wrapper input[type="text"]:user-valid,
.contact-form-wrapper input[type="email"]:user-valid,
.contact-form-wrapper select:user-valid,
.contact-form-wrapper textarea:user-valid {
  border-color: var(--accent-success);
}

/* Custom Select Dropdown Arrow */
.select-wrapper {
  position: relative;
  width: 100%;
}

.select-wrapper::after {
  content: "▾";
  font-size: 1rem;
  color: var(--text-muted);
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.contact-form-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 2.5rem;
}

.contact-form-wrapper select option {
  background: var(--bg-secondary);
  color: var(--text-main);
}

/* Custom Styled Budget Range Slider */
.budget-value-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent-secondary);
  background: rgba(6, 182, 212, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  outline: none;
  margin: 1.2rem 0 0.5rem 0;
}

/* Slider Webkit Thumb */
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  cursor: pointer;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.8);
  transition: transform 0.1s ease;
  border: 2px solid #fff;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Slider Mozilla Thumb */
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  cursor: pointer;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.8);
  border: 2px solid #fff;
  transition: transform 0.1s ease;
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.2);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* Textarea customization */
.contact-form-wrapper textarea {
  resize: vertical;
}

/* Submit Button & Spinner */
.btn-submit {
  width: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  font-size: 1.05rem;
  padding: 1rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
}

.btn-submit .spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  position: absolute;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-submit.loading {
  pointer-events: none;
  color: transparent;
}

.btn-submit.loading .spinner {
  display: block;
}

/* Custom Success Panel (Replaces the Form on Success) */
.form-success-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: successScaleUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  padding: 1.5rem 0;
}

@keyframes successScaleUp {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success-icon-shield {
  width: 72px;
  height: 72px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--accent-success);
  margin-bottom: 1.5rem;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.success-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #fff, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.success-message {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  max-width: 400px;
}

/* User Lead Summary in success UI */
.success-summary-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: left;
  width: 100%;
  max-width: 450px;
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

.success-summary-box h4 {
  font-size: 0.95rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.success-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.success-summary-row:last-child {
  margin-bottom: 0;
}
.summary-label {
  color: var(--text-muted);
}
.summary-value {
  color: var(--text-main);
  font-weight: 600;
}

.btn-success-reset {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
}
.btn-success-reset:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Footer Section
   ========================================================================== */
.site-footer {
  background-color: #03040a;
  border-top: 1px solid var(--border-color);
  padding: 5rem 0 2rem 0;
}

.footer-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand .logo {
  margin-bottom: 1.25rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 320px;
}

.footer-links h4 {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links ul a:hover {
  color: var(--accent-secondary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Project Detail Dialog Modal Styling
   ========================================================================== */
.project-modal {
  border: none;
  background: transparent;
  width: 100vw;
  height: 100vh;
  max-width: 100%;
  max-height: 100%;
  position: fixed;
  inset: 0;
  display: none; /* Controlled by flex overlay in class toggle */
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}

.project-modal[open] {
  display: flex;
}

.project-modal::backdrop {
  background: rgba(3, 4, 10, 0.8);
  backdrop-filter: blur(8px);
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 100%;
  max-width: 650px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  overflow: hidden;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.05);
}

.modal-body-content {
  padding: 3rem 2.5rem;
}

.modal-project-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.modal-project-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: var(--accent-secondary);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.modal-project-visual {
  width: 100%;
  height: 200px;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.modal-project-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.modal-project-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

.modal-project-features h4 {
  font-size: 0.9rem;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.modal-feature-item {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.modal-feature-item::before {
  content: "✔";
  color: var(--accent-success);
  position: absolute;
  left: 0;
}

/* ==========================================================================
   Scroll Reveal System (Intersection Observer Interaction Fallbacks)
   ========================================================================== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Delay reveals in sequences for premium flow */
.scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.15s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.25s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.35s; }

/* Native Scroll Timeline Reveal (Progressive Enhancement for Chromium / Safari 26+) */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes viewFadeIn {
      from {
        opacity: 0;
        transform: translateY(30px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    .scroll-reveal {
      animation: viewFadeIn auto linear both;
      animation-timeline: view();
      animation-range: entry 10% entry 40%;
      /* Reset standard transitions if scrolltimeline handles it */
      transition: none;
    }
  }
}

/* ==========================================================================
   Responsive Layout Overrides
   ========================================================================== */
@media (max-width: 991px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  
  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-visual {
    order: -1;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
  
  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .testimonials-slider-wrapper {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 576px) {
  .footer-container {
    grid-template-columns: 1fr;
  }
  
  .footer-brand {
    grid-column: span 1;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
}
