/* Octadecimal Portfolio - Modern Design System */

:root {
  /* Color Palette - Deep Tech Aesthetic */
  --primary: #0a0f1c;
  --secondary: #141b2d;
  --accent: #00d4aa;
  --accent-alt: #7c3aed;
  --accent-warm: #f59e0b;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(148, 163, 184, 0.1);
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  
  /* Typography */
  --font-display: 'Instrument Sans', 'SF Pro Display', -apple-system, sans-serif;
  --font-body: 'DM Sans', 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  
  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background Pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 58, 237, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(0, 212, 170, 0.1), transparent),
    radial-gradient(ellipse 50% 30% at 0% 100%, rgba(245, 158, 11, 0.08), transparent);
  pointer-events: none;
  z-index: -1;
}

/* Grid Pattern Overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

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

/* Layout */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.section {
  padding: var(--space-4xl) 0;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-lg) 0;
  backdrop-filter: blur(20px);
  background: rgba(10, 15, 28, 0.8);
  border-bottom: 1px solid var(--glass-border);
  transition: all var(--duration-normal) var(--ease-out);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo - styl identyczny z octadecimal.pl, wersja negatyw */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo-icon {
  width: 48px;
  height: 48px;
  transition: all 0.2s ease;
}

.logo:hover .logo-icon {
  transform: scale(1.05);
}

.logo-text {
  font-family: 'Inter', var(--font-display);
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  position: relative;
}

.logo:hover .logo-text {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: var(--space-xl);
}

.nav a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--duration-fast) var(--ease-out);
}

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

/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 3px;
  margin-left: var(--space-md);
}

.lang-btn {
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 6px;
  transition: all var(--duration-fast) var(--ease-out);
  letter-spacing: 0.5px;
}

.lang-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.lang-btn.active {
  color: var(--bg-primary);
  background: var(--accent-primary);
}

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

.hero-content {
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero h1 {
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-alt) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin-bottom: var(--space-2xl);
}

.hero-stats {
  display: flex;
  gap: var(--space-3xl);
}

.stat {
  text-align: left;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* Projects Grid */
.projects-section {
  padding: var(--space-4xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: var(--space-xl);
}

/* Project Card */
.project-card {
  position: relative;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 60px rgba(0, 212, 170, 0.1);
}

.project-image {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.project-image img,
.project-image svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.project-card:hover .project-image img,
.project-card:hover .project-image svg {
  transform: scale(1.05);
}

.project-logo {
  position: absolute;
  bottom: var(--space-md);
  left: var(--space-md);
  width: 56px;
  height: 56px;
  background: var(--primary);
  border-radius: 14px;
  padding: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.project-logo svg {
  width: 100%;
  height: 100%;
}

.project-content {
  padding: var(--space-xl);
}

.project-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.project-title {
  font-size: 1.4rem;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.project-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tag {
  padding: var(--space-xs) var(--space-sm);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.project-arrow {
  position: absolute;
  top: var(--space-xl);
  right: var(--space-xl);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--text-muted);
  opacity: 0;
  transform: translate(-10px, 10px);
  transition: all var(--duration-normal) var(--ease-out);
}

.project-card:hover .project-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

/* Footer */
.footer {
  padding: var(--space-3xl) 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.footer-logo .logo-container {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
}

.footer-logo .logo-icon {
  width: 32px;
  height: 32px;
  transition: all var(--duration-fast) var(--ease-out);
}

.footer-logo:hover .logo-icon {
  transform: scale(1.05);
}

.footer-logo .logo-text {
  font-family: 'Inter', var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: color var(--duration-fast) var(--ease-out);
}

.footer-logo:hover .logo-text {
  color: var(--accent);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s var(--ease-out) forwards;
  opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* =====================================================
   SCROLL REVEAL ANIMATIONS
   ===================================================== */

.scroll-reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  transition: 
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Neural Network Canvas */
.neural-canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.neural-canvas-container canvas {
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

/* Hero Background Image */
.hero-background-image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
  opacity: 0.15;
}

.hero-background-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Dodatkowy overlay dla lepszej czytelności tekstu */
.hero-background-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(10, 15, 28, 0.3) 0%, rgba(10, 15, 28, 0.5) 100%);
  z-index: 1;
}

/* Floating Orbs Container */
.hero-orbs-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* Hero Section - add position relative for absolute children */
.hero {
  position: relative;
  overflow: hidden;
}

.hero .container {
  position: relative;
  z-index: 1;
}

/* Glow effect on hero text */
.hero h1 span {
  position: relative;
}

.hero h1 span::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(to top, var(--accent), transparent);
  opacity: 0.2;
  filter: blur(8px);
  z-index: -1;
}

/* Enhanced project card hover */
.project-card {
  transition: 
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 60px rgba(0, 212, 170, 0.1);
}

/* Realizacje section - hover effects */
#realizacje .project-card:hover > div {
  transform: translateY(-4px);
  box-shadow: 
    0 12px 24px rgba(0, 0, 0, 0.2),
    0 0 40px rgba(0, 212, 170, 0.15);
}

/* Subtle glow on header logo hover */
.logo:hover .logo-icon {
  box-shadow: 0 0 20px rgba(0, 212, 170, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-stats {
    flex-wrap: wrap;
    gap: var(--space-xl);
  }
  
  .nav {
    display: none;
  }
  
  /* Hide heavy canvas animations on mobile */
  .neural-canvas-container,
  .hero-orbs-container {
    display: none !important;
  }
}

/* Project Page Styles */
.project-hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  position: relative;
  overflow: hidden;
}

.project-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.3;
}

.project-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-xl);
  transition: color var(--duration-fast) var(--ease-out);
}

.back-link:hover {
  color: var(--accent);
}

.project-page-logo {
  width: 80px;
  height: 80px;
  margin-bottom: var(--space-xl);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

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

.meta-value {
  font-size: 1rem;
  color: var(--text-primary);
}

.project-features {
  padding: var(--space-4xl) 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.feature-card {
  padding: var(--space-xl);
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all var(--duration-normal) var(--ease-out);
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-lg);
  color: var(--accent);
}

.feature-title {
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
}

.feature-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.project-screenshot {
  width: 100%;
  max-width: 1200px;
  margin: var(--space-3xl) auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
}

.cta-section {
  padding: var(--space-4xl) 0;
  text-align: center;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-2xl);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-alt) 100%);
  color: var(--primary);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 12px;
  transition: all var(--duration-normal) var(--ease-out);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 212, 170, 0.3);
  color: var(--primary);
}

/* Footer */
.footer {
  padding: var(--space-2xl) 0;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  background: rgba(10, 15, 28, 0.9);
}

.footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

