/* ==========================================================================
   Boris Barbulovski - Personal Website Design System & Global Styles
   Aesthetic: Cyberpunk/Glassmorphism Dark Tech with Vibrant Cyan/Emerald Accents
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-dark: #0a0d14;
  --bg-card: rgba(16, 22, 34, 0.7);
  --bg-card-hover: rgba(23, 32, 50, 0.85);
  --bg-terminal: #07090e;
  
  --border-glow: rgba(0, 242, 254, 0.2);
  --border-light: rgba(255, 255, 255, 0.08);
  
  --accent-cyan: #00f2fe;
  --accent-emerald: #00f5a0;
  --accent-purple: #7928ca;
  --accent-magenta: #ff0080;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Fonts */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, Monaco, 'Courier New', monospace;
  
  /* Shadows & Effects */
  --glow-shadow: 0 0 25px rgba(0, 242, 254, 0.15);
  --glass-backdrop: blur(16px) saturate(180%);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background Ambient Glows & Grid Pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 15% 20%, rgba(0, 242, 254, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 60%, rgba(0, 245, 160, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(121, 40, 202, 0.07) 0%, transparent 50%);
  pointer-events: none;
  z-index: -2;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
  mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 80%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  color: #fff;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-emerald));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-purple {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mono {
  font-family: var(--font-mono);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(10, 13, 20, 0.75);
  backdrop-filter: var(--glass-backdrop);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  display: flex;
  align-items: center;
}

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

.nav-brand {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-brand span.prompt {
  color: var(--accent-cyan);
}

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

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-small {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-outline {
  background: transparent;
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
}

.btn-outline:hover {
  background: rgba(0, 242, 254, 0.1);
  box-shadow: var(--glow-shadow);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), #00b4d8);
  color: #050508;
  border: none;
  font-weight: 700;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.3);
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Sections Base */
section {
  padding: 6rem 0;
  position: relative;
}

.section-header {
  margin-bottom: 3.5rem;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-emerald);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  padding-top: 9rem;
  padding-bottom: 4rem;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 2.5rem;
  align-items: center;
}

/* Hero Avatar Styling */
.hero-avatar-container {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.35);
  transition: var(--transition-smooth);
}

.profile-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(0, 242, 254, 0.6);
  border-color: var(--accent-emerald);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.9rem;
  background: rgba(0, 245, 160, 0.08);
  border: 1px solid rgba(0, 245, 160, 0.25);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-emerald);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  font-weight: 800;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 580px;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.stat-item .num {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
}

.stat-item .label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Terminal Component */
.terminal-window {
  background: var(--bg-terminal);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), var(--glow-shadow);
  overflow: hidden;
  font-family: var(--font-mono);
}

.terminal-header {
  background: rgba(255, 255, 255, 0.04);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

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

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

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

.terminal-body {
  padding: 1.25rem;
  min-height: 280px;
  max-height: 380px;
  overflow-y: auto;
  font-size: 0.88rem;
  color: #d1d5db;
}

.terminal-line {
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

.terminal-prompt {
  color: var(--accent-cyan);
  margin-right: 0.5rem;
}

.terminal-input-container {
  display: flex;
  align-items: center;
  margin-top: 0.75rem;
}

.terminal-input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  flex: 1;
}

/* Tech Badges Grid */
.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.pill:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.05);
}

/* Category Color Variants */
.pill-lang {
  color: var(--accent-emerald);
  background: rgba(0, 245, 160, 0.07);
  border-color: rgba(0, 245, 160, 0.25);
}

.pill-lang:hover {
  background: rgba(0, 245, 160, 0.15);
  border-color: var(--accent-emerald);
  box-shadow: 0 0 10px rgba(0, 245, 160, 0.25);
}

.pill-layer {
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.07);
  border-color: rgba(0, 242, 254, 0.25);
}

.pill-layer:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.25);
}

.pill-hw {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
}

.pill-hw:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* Glass Card */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.75rem;
  transition: var(--transition-smooth);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: var(--glow-shadow);
}

/* About Grid */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.skill-bar-group {
  margin-top: 1.5rem;
}

.skill-item {
  margin-bottom: 1.2rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  font-family: var(--font-mono);
}

.skill-progress {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-emerald));
  border-radius: 3px;
  width: 0%;
  transition: width 1.2s ease-out;
}

/* Projects Grid */
.projects-filter {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-cyan);
  color: #050508;
  border-color: var(--accent-cyan);
  font-weight: 600;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.75rem;
}

.project-card {
  position: relative;
  overflow: hidden;
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.project-icon {
  width: 42px;
  height: 42px;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 1.25rem;
}

.project-links {
  display: flex;
  gap: 0.75rem;
}

.project-link {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: var(--transition-fast);
}

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

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

.project-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex: 1;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Timeline / Contributions */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 0.3rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  transform: translateX(-50%);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-emerald);
  margin-bottom: 0.25rem;
}

.timeline-title {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

/* Footer */
footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border-light);
  background: rgba(5, 7, 12, 0.8);
  backdrop-filter: var(--glass-backdrop);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

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

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 1.2rem;
  transition: var(--transition-fast);
}

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

/* Responsive Media Queries */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2.75rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Contact Form Styles
   ========================================================================== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(7, 9, 14, 0.6);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: var(--transition-fast);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
  background: rgba(7, 9, 14, 0.85);
}

.form-input::placeholder {
  color: var(--text-dim);
}

textarea.form-input {
  resize: vertical;
  min-height: 110px;
}

/* Field Validation States */
.form-input.is-invalid {
  border-color: #ff5f56 !important;
  background: rgba(255, 95, 86, 0.05) !important;
}

.form-input.is-valid {
  border-color: var(--accent-emerald) !important;
}

.field-error {
  font-size: 0.8rem;
  color: #ff5f56;
  font-family: var(--font-mono);
  display: none;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.field-error.visible {
  display: flex;
}

.contact-alert {
  padding: 0.85rem 1.1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-alert.success {
  background: rgba(0, 245, 160, 0.1);
  border: 1px solid var(--accent-emerald);
  color: var(--accent-emerald);
}

.contact-alert.error {
  background: rgba(255, 95, 86, 0.1);
  border: 1px solid #ff5f56;
  color: #ff5f56;
}

/* ==========================================================================
   Experience Section Styles
   ========================================================================== */
.experience-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.exp-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.75rem;
}

.exp-role {
  font-size: 1.25rem;
  color: #fff;
}

.exp-company {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-cyan);
  margin-top: 0.2rem;
}

.exp-period {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-emerald);
  background: rgba(0, 245, 160, 0.08);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  border: 1px solid rgba(0, 245, 160, 0.2);
}

.exp-details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.exp-details li {
  position: relative;
  padding-left: 1.25rem;
  line-height: 1.5;
}

.exp-details li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
}

.form-input.is-invalid {
  border-color: var(--accent-magenta) !important;
  box-shadow: 0 0 12px rgba(255, 0, 128, 0.25) !important;
}

.form-input.is-valid {
  border-color: var(--accent-emerald) !important;
  box-shadow: 0 0 10px rgba(0, 245, 160, 0.15);
}

.field-error {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--accent-magenta);
  margin-top: 0.2rem;
  min-height: 18px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.field-error.visible {
  visibility: visible;
  opacity: 1;
}

/* Form Alert Boxes */
.contact-alert {
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  line-height: 1.4;
}

.contact-alert.success {
  background: rgba(0, 245, 160, 0.1);
  border: 1px solid var(--accent-emerald);
  color: var(--accent-emerald);
}

.contact-alert.error {
  background: rgba(255, 0, 128, 0.1);
  border: 1px solid var(--accent-magenta);
  color: #ff6b8b;
}

.contact-alert i {
  font-size: 1.2rem;
}

