:root {
  --bg-color: #050208;
  --accent-color: #a855f7;
  --accent-glow: rgba(168, 85, 247, 0.6);
  --text-color: #f9fafb; /* Gray 50 */
  --text-muted: rgba(255, 255, 255, 0.85); /* Increased from 0.6 for better contrast */
  --glass-bg: rgba(20, 10, 30, 0.4);
  --glass-border: rgba(168, 85, 247, 0.2);
  --font-main: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(76, 29, 149, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(168, 85, 247, 0.08), transparent 25%);
  
  /* Sticky Footer Setup */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.animate-fade-in {
  animation: fade-in-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Scroll Animation Classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 { transition-delay: 0.1s; animation-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; animation-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; animation-delay: 0.3s; }

@keyframes halo-pulse {
  0% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.7; }
  100% { transform: scale(1); opacity: 0.5; }
}

.halo-effect {
  position: absolute;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(80px);
  animation: halo-pulse 6s ease-in-out infinite;
}

@keyframes form-glow {
  0% { box-shadow: 0 0 20px rgba(168, 85, 247, 0.1); border-color: rgba(168, 85, 247, 0.2); }
  50% { box-shadow: 0 0 30px rgba(168, 85, 247, 0.2); border-color: rgba(168, 85, 247, 0.4); }
  100% { box-shadow: 0 0 20px rgba(168, 85, 247, 0.1); border-color: rgba(168, 85, 247, 0.2); }
}

/* --- Components --- */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
  /* Removed shorthand 'padding: 0 2rem' to prevent overriding section's vertical padding */
}

/* --- Navigation Spice --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1.25rem 0; /* Increased from 1rem for more breathing room */
  background: rgba(5, 2, 8, 0.8);
  backdrop-filter: blur(16px);
  /* Gradient border bottom */
  border-bottom: 2px solid transparent;
  background-image: linear-gradient(rgba(5, 2, 8, 0.9), rgba(5, 2, 8, 0.9)), 
                    linear-gradient(90deg, transparent, var(--accent-color), transparent);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

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

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

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  transition: all 0.3s ease;
  position: relative;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  text-shadow: 0 0 8px var(--accent-color);
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-color) 0%, transparent 60%),
              linear-gradient(to right, rgba(5,2,8,0.95) 0%, rgba(5,2,8,0.7) 100%);
  z-index: 1;
}

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

.hero h1 {
  font-size: clamp(3rem, 5vw, 5rem);
  margin-bottom: 1.5rem;
  line-height: 1.25; /* Increased to fix clipped descenders */
  padding-bottom: 0.2em; /* Extra space for 'ą/ę' */
  background: linear-gradient(135deg, #fff 30%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; 
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  max-width: 600px;
}

.btn-glow {
  display: inline-block;
  background: var(--accent-color);
  color: #fff;
  padding: 1rem 2.5rem;
  border-radius: 99px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px var(--accent-glow);
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--accent-glow), inset 0 0 20px rgba(255,255,255,0.2);
  background: #9333ea;
}

/* --- Sections --- */
section {
  padding: 6rem 0; /* Reduced from 10rem as requested */
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 4rem;
}

/* --- Cards (Sins Spiced) --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.sins-card {
  padding: 3rem 2rem;
  background: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.sins-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, var(--glass-border), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.sins-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--accent-color);
  box-shadow: 0 10px 40px -10px rgba(168, 85, 247, 0.3);
}

.sins-card:hover::before {
  opacity: 1;
}

.sins-icon {
  width: 60px;
  height: 60px;
  background: rgba(168, 85, 247, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 1px solid rgba(168, 85, 247, 0.2);
  margin-bottom: 1.5rem;
  color: var(--accent-color);
}

.sins-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #fff;
}

.sins-card p {
  color: var(--text-muted);
  line-height: 1.7;
}

.feature-card { /* Kept for legacy or general usage */
  padding: 3rem 2rem;
  transition: transform 0.4s ease, border-color 0.4s ease;
}

/* --- Portfolio --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.portfolio-item {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

/* --- Spiced Contact --- */
.contact-spiced {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  padding: 3rem;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(20, 10, 30, 0.6), rgba(5, 2, 8, 0.8));
  border: 1px solid rgba(168, 85, 247, 0.3);
  animation: form-glow 4s infinite;
}

.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(168, 85, 247, 0.1);
  color: #fff;
  border-radius: 12px;
  font-family: var(--font-main);
  color: #fff;
  border-radius: 12px;
  font-family: var(--font-main);
  transition: all 0.3s ease;
  resize: none; /* Disable manual resizing */
}

/* --- Section Dividers Removed --- */
/* section + section { border-top: ... } */

.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  background: rgba(168, 85, 247, 0.05);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.1);
}

/* --- Performance Chart --- */
.perf-chart {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.bar-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.bar-label {
  width: 120px;
  text-align: right;
  font-weight: 600;
  color: var(--text-muted);
}

.bar-track {
  flex-grow: 1;
  height: 24px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  width: 0; /* Animate this inline */
  transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Admin --- */
.input-field {
  width: 100%;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 8px;
  font-family: var(--font-main);
  transition: all 0.3s ease;
}

.input-field:focus {
  outline: none;
  border-color: var(--accent-color);
  background: rgba(168, 85, 247, 0.05);
}


/* --- Light Mode Overrides --- */
[data-theme="light"] {
  --bg-color: #fafafa;
  --accent-color: #7e22ce; /* Darker purple for better contrast on light bg */
  --accent-glow: rgba(126, 34, 206, 0.4);
  --text-color: #111827; /* Darker/Black */
  --text-muted: #374151; /* Darker gray (Gray 700) - was #4b5563 */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(126, 34, 206, 0.15);
}

[data-theme="light"] body {
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(147, 51, 234, 0.05), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(147, 51, 234, 0.05), transparent 25%);
}

[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  background-image: none;
}

[data-theme="light"] .nav-link {
  color: #6b7280;
}

[data-theme="light"] .nav-link:hover, 
[data-theme="light"] .nav-link.active {
  color: var(--accent-color);
  text-shadow: none;
}

[data-theme="light"] .hero h1 {
  background: linear-gradient(135deg, #1f2937 30%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

[data-theme="light"] .sins-card {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0,0,0,0.05);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .sins-card h3 {
  color: #111827;
}

[data-theme="light"] .sins-card p {
  color: #4b5563;
}

[data-theme="light"] .btn-glow {
  color: #fff; /* Keep button text white */
  box-shadow: 0 4px 14px 0 rgba(147, 51, 234, 0.39);
}

[data-theme="light"] .input-field {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0,0,0,0.1);
  color: #1f2937;
}

[data-theme="light"] .contact-spiced {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(243, 244, 246, 0.9));
  border: 1px solid rgba(0,0,0,0.05);
}

[data-theme="light"] .bar-track {
  background: rgba(0,0,0,0.05);
}

[data-theme="light"] footer {
  border-top: 1px solid rgba(0,0,0,0.05);
  background: linear-gradient(to bottom, rgba(255,255,255,0.8), #fff);
  color: #6b7280;
}

/* --- Spiced Footer --- */
footer {
  margin-top: auto; /* Push to bottom if flex fails for some reason */
  position: relative;
  border-top: 1px solid transparent;
  background-image: linear-gradient(var(--bg-color), var(--bg-color)), 
                    linear-gradient(90deg, transparent, var(--accent-color), transparent);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  padding: 4rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

[data-theme="light"] .hero-overlay {
  background: linear-gradient(to top, var(--bg-color) 0%, transparent 60%),
              linear-gradient(to right, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.6) 100%);
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
  /* General Layout */
  .container {
    padding: 0 1.25rem;
  }
  
  section {
    padding: 5rem 0; /* Reduced from 10rem */
  }

  /* Typography */
  .hero h1 {
    font-size: clamp(2.5rem, 10vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  
  .hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }
  
  .section-title {
    font-size: 2rem;
    margin-bottom: 2.5rem;
  }

  /* Navigation (Scrollable Horizontal) */
  .navbar .container {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .nav-logo {
    justify-content: center;
  }

  .nav-links {
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch; /* Smooth scroll iOS */
    white-space: nowrap;
    mask-image: linear-gradient(to right, black 85%, transparent 100%); /* Fade out right */
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
  }
  
  .nav-link {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem !important; /* Override inline styles */
  }

  /* Cards */
  .grid-3, .grid-2, .portfolio-grid {
    grid-template-columns: 1fr; /* Force single column */
    gap: 1.5rem;
  }
  
  .sins-card {
    padding: 2rem 1.5rem;
  }

  /* Contact Form */
  .contact-spiced {
    padding: 2rem 1.5rem;
  }
  
  .contact-form input, .contact-form textarea {
    padding: 1rem;
  }
  
  /* Cookie Banner Mobile */
  #cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-width: none;
    padding: 1rem;
  }
}


