/* ============================================================
   Cyber Theme — Said Abdelkebir Portfolio
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500&family=Poppins:wght@300;400;600;700;900&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --accent:       #00ff88;
  --accent-dim:   rgba(0,255,136,0.15);
  --accent-glow:  rgba(0,255,136,0.5);
  --bg:           #060609;
  --bg2:          #0d0d14;
  --glass:        rgba(10,10,20,0.75);
  --border:       rgba(0,255,136,0.12);
  --text:         #c8c8d8;
  --text-bright:  #f0f0ff;
  --mono:         'Fira Code', monospace;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  cursor: none !important;
  overflow-x: hidden;
}

a, button, input, label { cursor: none !important; }

/* ---------- Custom Cursor ---------- */
#cursor-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 999999;
  transform: translate(-50%,-50%);
  box-shadow: 0 0 10px var(--accent), 0 0 20px var(--accent);
  transition: transform 0.1s;
}
#cursor-ring {
  width: 36px; height: 36px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 999998;
  transform: translate(-50%,-50%);
  transition: transform 0.15s ease-out, width 0.2s, height 0.2s, opacity 0.2s;
  opacity: 0.6;
}
body:hover #cursor-ring { opacity: 1; }

/* ---------- Matrix Canvas ---------- */
#matrix-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -2;
  opacity: 0.12;
  pointer-events: none;
}

/* ---------- CRT Scanlines ---------- */
.crt {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.03) 0px,
    rgba(0,0,0,0.03) 1px,
    transparent 1px,
    transparent 4px
  );
  z-index: 999997;
  pointer-events: none;
}

/* ---------- Boot Preloader ---------- */
#boot-screen {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999999;
  padding: 40px 50px;
  font-family: var(--mono);
  color: var(--accent);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}
.boot-line { opacity: 0; text-shadow: 0 0 8px var(--accent); white-space: nowrap; }
.boot-line.ok { color: var(--accent); }
.boot-line.warn { color: #ffaa00; }
.boot-line.granted { color: #fff; font-size: 1.4em; font-weight: bold; letter-spacing: 4px; }
#boot-cursor {
  display: inline-block;
  width: 10px; height: 18px;
  background: var(--accent);
  animation: blink 0.8s step-end infinite;
  vertical-align: middle;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1a1a2a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---------- Headings ---------- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-bright);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
}

/* ---------- Glassmorphism Card ---------- */
.glass-card {
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.4s cubic-bezier(0.23,1,0.32,1);
}
.glass-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(0,255,136,0.15), 0 20px 40px rgba(0,0,0,0.6);
  transform: translateY(-6px);
}

/* ---------- Neon Accent Text ---------- */
.neon { color: var(--accent); text-shadow: 0 0 10px var(--accent-glow); }
.neon-border { border-color: var(--accent) !important; box-shadow: 0 0 12px var(--accent-glow); }

/* ---------- Buttons ---------- */
.btn-cyber {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.btn-cyber::before {
  content: '';
  position: absolute;
  left: -100%; top: 0;
  width: 100%; height: 100%;
  background: var(--accent);
  transition: left 0.3s ease;
  z-index: -1;
}
.btn-cyber:hover { color: #000; }
.btn-cyber:hover::before { left: 0; }

/* ---------- Section Titles ---------- */
.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 50px;
}
.section-header h2 {
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin: 0;
}
.section-header .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.section-header .tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  opacity: 0.7;
}

/* ---------- Hero Section ---------- */
.hero-section {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 100px 80px;
  position: relative;
  gap: 60px;
}
.hero-greeting {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 3px;
  margin-bottom: 16px;
  opacity: 0.8;
}
.hero-name {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, #a0ffd0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-title-typed {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--accent);
  min-height: 1.6em;
  margin-bottom: 24px;
}
.hero-title-typed .typed-cursor { color: var(--accent); }
.hero-bio {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text);
  max-width: 480px;
  margin-bottom: 36px;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}
.badge-cyber {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--accent);
  background: var(--accent-dim);
  letter-spacing: 1px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Hero Right - Portrait */
.hero-portrait-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-portrait-ring {
  position: relative;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,255,136,0.05) 0%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-portrait-ring::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0deg, transparent 180deg, var(--accent) 360deg);
  animation: spin 8s linear infinite;
  z-index: 0;
}
.hero-portrait-ring::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--bg);
  z-index: 1;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero-portrait {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 20px rgba(0,255,136,0.3));
  animation: float 5s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.hero-floating-tag {
  position: absolute;
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 6px 14px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  color: var(--accent);
  animation: float 4s ease-in-out infinite;
  z-index: 3;
}
.hero-floating-tag:nth-child(2) { top: 10%; right: -5%; animation-delay: -1s; }
.hero-floating-tag:nth-child(3) { bottom: 15%; left: -8%; animation-delay: -2s; }
.hero-floating-tag:nth-child(4) { top: 40%; right: -12%; animation-delay: -0.5s; }

/* ---------- Terminal ---------- */
.terminal-wrap {
  background: #0a0a0f;
  border: 1px solid var(--accent);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,255,136,0.1);
}
.terminal-bar {
  background: #111118;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(0,255,136,0.1);
}
.terminal-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.terminal-dot.r { background: #ff5f57; }
.terminal-dot.y { background: #ffbd2e; }
.terminal-dot.g { background: #28c840; }
.terminal-title {
  flex: 1;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #555;
}
.terminal-body {
  padding: 20px;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  min-height: 200px;
  max-height: 320px;
  overflow-y: auto;
}
.terminal-body::-webkit-scrollbar { width: 4px; }
.terminal-body::-webkit-scrollbar-thumb { background: #1a2a1a; }
.terminal-output { line-height: 1.9; }
.terminal-output .cmd { color: #888; }
.terminal-output .res { color: var(--accent); }
.terminal-input-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.terminal-prompt { color: #fff; font-weight: 500; white-space: nowrap; }
.terminal-input {
  background: transparent;
  border: none;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.85rem;
  flex: 1;
  outline: none;
  caret-color: var(--accent);
}

/* ---------- Skills ---------- */
.skill-bar-wrap { margin-bottom: 20px; }
.skill-bar-header { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.85rem; }
.skill-bar-track {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #00ccff);
  border-radius: 2px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.23,1,0.32,1);
  box-shadow: 0 0 8px rgba(0,255,136,0.4);
}

/* ---------- Experience Cards ---------- */
.exp-card {
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.exp-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 3px; height: 0;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  transition: height 0.4s ease;
}
.exp-card:hover::before { height: 100%; }
.exp-date {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 10px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 12px;
  letter-spacing: 1px;
}
.exp-role { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; color: var(--text-bright); }
.exp-company { font-size: 0.82rem; color: var(--accent); margin-bottom: 12px; opacity: 0.8; }
.exp-desc { font-size: 0.85rem; line-height: 1.7; color: var(--text); }

/* ---------- Counters ---------- */
.counter-card { padding: 30px 20px; text-align: center; }
.counter-val {
  font-family: var(--mono);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
  line-height: 1;
  margin-bottom: 8px;
}
.counter-label { font-size: 0.8rem; color: var(--text); letter-spacing: 1px; text-transform: uppercase; }

/* ---------- Services ---------- */
.service-card { padding: 36px 28px; text-align: center; }
.service-icon {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 20px;
  display: block;
  text-shadow: 0 0 15px var(--accent-glow);
  transition: transform 0.3s;
}
.service-card:hover .service-icon { transform: scale(1.2) rotate(-5deg); }
.service-card h4 { font-size: 1rem; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 2px; }
.service-card p { font-size: 0.85rem; line-height: 1.7; }

/* ---------- Portfolio ---------- */
.portfolio-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  display: block;
  text-decoration: none;
}
.portfolio-item img { width: 100%; display: block; transition: transform 0.5s ease; }
.portfolio-item:hover img { transform: scale(1.06); }
.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  transform: translateY(10px);
  opacity: 0;
  transition: all 0.4s;
}
.portfolio-item:hover .portfolio-overlay { opacity: 1; transform: translateY(0); }
.portfolio-overlay h5 { color: #fff; margin-bottom: 6px; }
.portfolio-overlay p { font-size: 0.82rem; color: #ccc; }
.portfolio-border {
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent);
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: inset 0 0 20px rgba(0,255,136,0.1);
  pointer-events: none;
}
.portfolio-item:hover .portfolio-border { opacity: 1; }

/* ---------- Testimonials ---------- */
.testimonial-card { padding: 36px; }
.testimonial-stars { color: #ffd700; margin-bottom: 16px; letter-spacing: 2px; }
.testimonial-text { font-size: 0.9rem; line-height: 1.8; font-style: italic; margin-bottom: 20px; }
.testimonial-author { display: flex; align-items: center; gap: 14px; }
.testimonial-author-info h6 { color: var(--text-bright); margin: 0 0 4px; }
.testimonial-author-info span { font-size: 0.78rem; color: var(--accent); }

/* ---------- Contact Section ---------- */
.contact-form input,
.contact-form textarea {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 14px 16px;
  color: var(--text-bright);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  margin-bottom: 16px;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,255,136,0.08);
}
.contact-form textarea { min-height: 120px; resize: vertical; }

/* ---------- PGP Block ---------- */
.pgp-block {
  background: rgba(0,0,0,0.6);
  border: 1px dashed rgba(0,255,136,0.3);
  border-radius: 8px;
  padding: 20px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #666;
  position: relative;
  overflow-x: auto;
}
.pgp-copy {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--accent);
  color: #000;
  border: none;
  padding: 4px 12px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 1px;
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 40px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.8rem;
  color: #555;
}
.site-footer span { color: var(--accent); }

/* ---------- Scroll Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Glitch ---------- */
.glitch {
  position: relative;
  display: inline-block;
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
}
.glitch::before {
  left: 2px;
  text-shadow: -1px 0 #ff0040;
  clip-path: inset(0 0 50% 0);
  animation: glitch1 3s infinite;
}
.glitch::after {
  left: -2px;
  text-shadow: 1px 0 #00ccff;
  clip-path: inset(50% 0 0 0);
  animation: glitch2 3s infinite;
}
@keyframes glitch1 {
  0%,45%,55%,100% { clip-path: inset(0 0 100% 0); }
  50% { clip-path: inset(0 0 30% 0); transform: translateX(-3px); }
}
@keyframes glitch2 {
  0%,45%,55%,100% { clip-path: inset(100% 0 0 0); }
  50% { clip-path: inset(40% 0 0 0); transform: translateX(3px); }
}

/* ---------- Nav ---------- */
.nav-sticky { position: sticky; top: 0; z-index: 1000; backdrop-filter: blur(20px); background: rgba(6,6,9,0.9); border-bottom: 1px solid var(--border); }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .hero-section { grid-template-columns: 1fr; padding: 80px 30px; text-align: center; }
  .hero-portrait-wrap { order: -1; }
  .hero-portrait-ring { width: 260px; height: 260px; }
  .hero-portrait { width: 230px; height: 230px; }
  .hero-bio { margin: 0 auto 30px; }
  .hero-badges, .hero-actions { justify-content: center; }
}
@media (max-width: 576px) {
  .hero-section { padding: 70px 20px; }
  .section-header h2 { font-size: 1.4rem; }
}
