/* ============================================================
   CV PREMIUM 1 — Anoor Style Split Portfolio (Updated with Modals)
   ============================================================ */

:root {
  --bg: #ffffff;
  --sidebar-bg: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #f1f5f9;
  --card-bg: #ffffff;
  --primary: #0f172a;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

[data-theme="dark"] {
  --bg: #0b0f19;
  --sidebar-bg: #0f172a;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --card-bg: #111827;
  --primary: #f8fafc;
  --accent: #38bdf8;
  --accent-light: rgba(56, 189, 248, 0.1);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ==================== SITE WRAPPER (SPLIT LAYOUT) ==================== */
.site-wrapper {
  display: flex;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
}

/* ==================== LEFT SIDEBAR ==================== */
.sidebar {
  width: 280px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; bottom: 0; left: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px;
  z-index: 100;
  transition: background 0.3s ease;
}

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

.brand-logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
}

.theme-toggle-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--card-bg);
  color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; transition: 0.2s;
}
.theme-toggle-btn:hover { border-color: var(--accent); color: var(--accent); }

.sidebar-nav ul {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-link {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: 0.2s;
  display: inline-block;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
  transform: translateX(4px);
}

.sidebar-footer { display: none; }

/* ==================== RIGHT MAIN CONTENT ==================== */
.main-content {
  margin-left: 280px;
  flex: 1;
  padding: 60px 80px;
  max-width: 960px;
}

.content-section {
  opacity: 0;
  transform: translateY(15px);
  visibility: hidden;
  position: absolute;
  pointer-events: none;
  height: 0;
  overflow: hidden;
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
  margin-bottom: 80px;
}
.content-section.active {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  position: relative;
  pointer-events: auto;
  height: auto;
  overflow: visible;
}

.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 40px;
  letter-spacing: -0.02em;
}

/* About Section */
.about-grid { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: center; }
.about-img-card { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.about-img-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.about-details h3 { font-size: 1.5rem; margin-bottom: 14px; }
.about-details p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 24px; line-height: 1.7; }
.about-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 30px; font-size: 0.9rem; }
.about-meta div strong { color: var(--text); margin-right: 6px; }
.about-meta div { color: var(--text-muted); }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--text); color: var(--bg); padding: 14px 28px;
  border-radius: 50px; font-weight: 700; font-size: 0.9rem; transition: 0.2s;
}
.btn-primary:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }

/* Services Section */
.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.service-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 20px; padding: 36px 30px; box-shadow: var(--shadow); transition: 0.3s;
  cursor: pointer; display: flex; flex-direction: column;
}
.service-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.serv-icon {
  width: 56px; height: 56px; border-radius: 16px; background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 24px;
}
.service-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.service-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; margin-bottom: 20px; flex: 1; }
.service-more { font-size: 0.85rem; font-weight: 700; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }

/* Portfolio Section */
.portfolio-filters { display: flex; gap: 10px; margin-bottom: 30px; flex-wrap: wrap; }
.filter-btn {
  padding: 8px 20px; border-radius: 50px; border: 1px solid var(--border);
  background: var(--card-bg); color: var(--text-muted); font-weight: 600; font-size: 0.875rem;
  cursor: pointer; transition: 0.2s;
}
.filter-btn.active, .filter-btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }

.portfolio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.port-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: 0.3s;
}
.port-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.port-img { aspect-ratio: 16 / 10; overflow: hidden; }
.port-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.3s; }
.port-card:hover .port-img img { transform: scale(1.05); }
.port-info { padding: 20px; }
.port-tag { font-size: 0.75rem; font-weight: 700; color: var(--accent); text-transform: uppercase; margin-bottom: 4px; display: inline-block; }
.port-info h3 { font-size: 1.05rem; }

/* Testimonial Section */
.testimonial-slider { position: relative; }
.testimonial-box {
  display: none; background: var(--card-bg); border: 1px solid var(--border); border-radius: 24px; padding: 48px; box-shadow: var(--shadow);
  animation: fadeIn 0.4s ease;
}
.testimonial-box.active { display: block; }
.testi-stars { color: var(--accent); display: flex; gap: 4px; font-size: 1rem; margin-bottom: 20px; }
.testi-quote { font-size: 1.15rem; font-style: italic; color: var(--text); line-height: 1.7; margin-bottom: 24px; }
.testi-author strong { display: block; font-size: 1rem; }
.testi-author span { font-size: 0.85rem; color: var(--text-muted); }

.testi-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; }
.testi-btn {
  background: var(--card-bg); border: 1px solid var(--border); color: var(--text); padding: 8px 16px;
  border-radius: 50px; font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: 0.2s;
}
.testi-btn:hover { background: var(--text); color: var(--bg); }
.testi-dots { display: flex; gap: 8px; }
.testi-dots .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); cursor: pointer; transition: 0.2s; }
.testi-dots .dot.active { background: var(--accent); width: 24px; border-radius: 6px; }

/* Contact Section */
.contact-box {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 24px; padding: 40px; box-shadow: var(--shadow);
}
.contact-box > p { color: var(--text-muted); font-size: 1rem; margin-bottom: 30px; }
.contact-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.contact-method-card {
  display: flex; align-items: center; gap: 16px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px; transition: 0.2s;
}
.contact-method-card:hover { border-color: var(--accent); }
.contact-method-card i { font-size: 1.5rem; color: var(--accent); }
.contact-method-card strong { display: block; font-size: 0.95rem; }
.contact-method-card span { font-size: 0.825rem; color: var(--text-muted); }

/* ==================== MODAL POPUP STYLES ==================== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; z-index: 9999;
  opacity: 0; visibility: hidden; transition: 0.3s ease; padding: 20px;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal-box {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 24px;
  max-width: 600px; width: 100%; max-height: 90vh; overflow-y: auto;
  position: relative; box-shadow: 0 25px 50px rgba(0,0,0,0.3);
  transform: translateY(20px); transition: transform 0.3s ease;
}
.modal-overlay.open .modal-box { transform: translateY(0); }

.modal-close {
  position: absolute; top: 16px; right: 16px; width: 36px; height: 36px;
  border-radius: 50%; border: 1px solid var(--border); background: var(--bg);
  color: var(--text); font-size: 1.2rem; cursor: pointer; display: flex;
  align-items: center; justify-content: center; z-index: 10; transition: 0.2s;
}
.modal-close:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.modal-img-wrap { aspect-ratio: 16/9; overflow: hidden; border-radius: 24px 24px 0 0; }
.modal-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: 32px; }
.modal-tag { font-size: 0.75rem; font-weight: 700; color: var(--accent); text-transform: uppercase; margin-bottom: 6px; display: inline-block; }
.modal-body h3 { font-size: 1.5rem; margin-bottom: 12px; }
.modal-body p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; margin-bottom: 20px; }
.modal-tech { font-size: 0.9rem; margin-bottom: 16px; }
.modal-tech strong { color: var(--text); }
.modal-tech span { color: var(--text-muted); }

.modal-serv-icon {
  width: 64px; height: 64px; border-radius: 18px; background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin-bottom: 20px;
}
.modal-serv-details { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 18px; margin-bottom: 20px; font-size: 0.9rem; }
.modal-serv-details strong { display: block; margin-bottom: 8px; color: var(--text); }
.modal-serv-details ul { padding-left: 20px; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
  .site-wrapper { flex-direction: column; }
  .sidebar {
    width: 100%; position: sticky; top: 0; left: 0; right: 0;
    padding: 16px 24px; flex-direction: row; align-items: center;
    background: var(--sidebar-bg); border-bottom: 1px solid var(--border); z-index: 1000;
  }
  .sidebar-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--sidebar-bg); border-bottom: 1px solid var(--border);
    padding: 20px 24px; box-shadow: var(--shadow);
  }
  .sidebar-nav.open { display: block; animation: fadeIn 0.3s ease; }
  .sidebar-nav ul { gap: 14px; }
  .sidebar-footer { display: block; }
  .mobile-menu-toggle {
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--card-bg);
    color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 1rem; transition: 0.2s;
  }
  .main-content { margin-left: 0; padding: 40px 20px; max-width: 100%; }
  .about-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .contact-methods { grid-template-columns: 1fr; }
}
