/* CV Mohammed EL MOUNJIDE - Modern Dark Minimalist Design */

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #121212;
  --bg-surface: #1a1a1a;
  --bg-card: #1e1e1e;
  --accent: #00bcd4;
  --accent-hover: #00acc1;
  --accent-glow: rgba(0, 188, 212, 0.15);
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #707070;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.5);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.125rem; }

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

a:hover {
  color: var(--accent-hover);
}

/* Layout */
.page {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  gap: 20px;
}

/* Sidebar Header */
.header {
  position: sticky;
  top: 20px;
  height: calc(100vh - 40px);
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow-y: auto;
}

.header-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
  box-shadow: 0 0 30px var(--accent-glow);
  margin-bottom: 24px;
}

.header-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-titles h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.header-titles h4 {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Navigation */
.main-menu {
  list-style: none;
  margin: 30px 0;
  width: 100%;
}

.main-menu li {
  margin: 4px 0;
}

.main-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.main-menu a:hover,
.main-menu a.active {
  background: var(--accent-glow);
  color: var(--accent);
}

.main-menu .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.main-menu .icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* Social Links */
.social-links {
  margin: 20px 0;
}

.social-links ul {
  list-style: none;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-surface);
  border-radius: 50%;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.social-links svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Download CV Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  margin-top: auto;
}

.btn-primary:hover {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 0 20px var(--accent-glow);
}

.copyrights {
  margin-top: 20px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Main Content */
.content-area {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.section {
  padding: 50px;
  min-height: calc(100vh - 40px);
  animation: fadeIn 0.4s ease-out;
}

.section:not(.active) {
  display: none !important;
}

.section.active {
  display: block !important;
}

.section.start-page.active {
  display: flex !important;
}

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

/* Page Titles */
.page-title {
  margin-bottom: 40px;
  position: relative;
  display: inline-block;
}

.page-title h2 {
  position: relative;
}

.page-title h2 span {
  color: var(--accent);
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* Home Section */
.start-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  position: relative;
  overflow: hidden;
}

.start-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../img/main_bg.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.1;
}

.title-block {
  position: relative;
  z-index: 1;
}

.title-block h2 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sp-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
}

/* About Section */
.info-list ul {
  list-style: none;
}

.info-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.info-list li:last-child {
  border-bottom: none;
}

.info-list .icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.info-list .icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* Clients Carousel */
.clients-section {
  margin-top: 50px;
}

.clients-grid {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 20px 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.clients-grid::-webkit-scrollbar {
  display: none;
}

.client-block {
  flex: 0 0 120px;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.client-block:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.client-block img {
  max-width: 80px;
  max-height: 60px;
  object-fit: contain;
  filter: grayscale(100%) brightness(0.8);
  transition: var(--transition);
}

.client-block:hover img {
  filter: grayscale(0%) brightness(1);
}

/* Resume Section */
.resume-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
}

.block-title {
  margin-bottom: 24px;
}

.block-title h3 {
  font-size: 1.25rem;
  position: relative;
  display: inline-block;
}

.block-title h3::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 30px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  padding-bottom: 30px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--accent);
}

.timeline-item .period {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 4px;
}

.timeline-item .company {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.timeline-item h4 {
  margin-bottom: 10px;
}

.timeline-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.timeline-item .tech {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.timeline-item .tech strong {
  color: var(--accent);
}

/* Skills Tags */
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin-bottom: 30px;
}

.skills-list li {
  padding: 6px 14px;
  background: var(--accent-glow);
  color: var(--accent);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(0, 188, 212, 0.3);
  transition: var(--transition);
}

.skills-list li:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

/* About Grid */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.about-text p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.about-text strong {
  color: var(--accent);
}

/* Languages Section */
.languages-section {
  margin-top: 40px;
}

.languages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.language-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.language-item span {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.language-bar {
  height: 6px;
  background: var(--bg-surface);
  border-radius: 3px;
  overflow: hidden;
}

.language-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* Certifications */
.certifications-section {
  margin-top: 40px;
}

/* Job Tasks */
.job-tasks {
  list-style: none;
  margin: 10px 0;
  padding-left: 0;
}

.job-tasks li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.job-tasks li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Resume Grid */
.resume-left {
  padding-right: 20px;
}

.resume-right {
  border-left: 1px solid var(--border-color);
  padding-left: 40px;
}

/* Info Block with text */
.info-block div h4 {
  margin-bottom: 4px;
}

.info-block div p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.info-block.highlight {
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* Home description */
.sp-description {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 16px;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-block {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.info-block:hover {
  border-color: var(--accent);
}

.info-block .icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
  flex-shrink: 0;
}

.info-block .icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.info-block h4 {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Contact Form */
.contact-form {
  background: var(--bg-card);
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  position: relative;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control::placeholder {
  color: var(--text-muted);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.btn-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 10px;
}

.btn-send:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.messages {
  margin-bottom: 20px;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.alert-success {
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.3);
  color: #4caf50;
}

.alert-danger {
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.3);
  color: #f44336;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  cursor: pointer;
  z-index: 1000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Navigation Arrows */
.arrows-nav {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  gap: 8px;
  z-index: 100;
}

.arrows-nav button {
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.arrows-nav button:hover {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.arrows-nav svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Responsive */
@media (max-width: 1024px) {
  .page {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .header {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 300px;
    border-radius: 0;
    z-index: 999;
    transition: var(--transition);
  }

  .header.open {
    right: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .content-area {
    margin-top: 0;
  }

  .section {
    padding: 30px 20px;
    min-height: auto;
  }

  .title-block h2 {
    font-size: 2.5rem;
  }

  .resume-grid,
  .contact-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .resume-right {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    margin-top: 30px;
  }

  .languages-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .arrows-nav {
    bottom: 20px;
    right: 20px;
  }
}

@media (max-width: 600px) {
  .title-block h2 {
    font-size: 2rem;
  }

  .sp-subtitle {
    font-size: 1rem;
  }

  .section {
    padding: 25px 15px;
  }

  .header {
    width: 280px;
  }

  .arrows-nav button {
    width: 40px;
    height: 40px;
  }
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

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

/* Print Styles */
@media print {
  .header,
  .menu-toggle,
  .arrows-nav {
    display: none !important;
  }

  .page {
    display: block;
  }

  .section {
    display: block !important;
    page-break-inside: avoid;
  }
}
