/* ============================================================
   ZIAD SALAH PORTFOLIO — style.css
   ============================================================ */

/* ─── CSS VARIABLES (Edit colors here) ─────────────────────── */
:root {
  --bg:         #0d0f14;
  --bg-card:    #13161e;
  --bg-hover:   #1a1e2a;
  --accent:     #c8f135;      /* ✏️ EDIT: Change accent color if desired */
  --accent-dim: rgba(200, 241, 53, 0.12);
  --text:       #e8eaf0;
  --text-muted: #7a7f94;
  --border:     rgba(255,255,255,0.07);
  --nav-h:      72px;

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --radius:  14px;
  --radius-sm: 8px;
  --shadow:  0 8px 40px rgba(0,0,0,0.45);
  --trans:   0.3s cubic-bezier(0.4, 0, 0.2, 1);
}



/* ─── RESET & BASE ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  /* cursor: none; */
}

#fluid {
  background: transparent !important;
}

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

/* ─── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }

/* ─── UTILITIES ─────────────────────────────────────────────── */
.container {
  width: min(1300px, 90%);
  margin-inline: auto;
}

.section {
  padding: 110px 0;
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Georgia bold', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;        /* even bolder (800 was already bold, 900 is extra) */
  line-height: 1.3;
  margin-bottom: 56px;
  letter-spacing: normal;  /* removes the "stretched" look */
}

.accent { color: var(--accent); }

/* ─── BUTTONS ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--trans);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #0d0f14;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: transparent;
  color: var(--accent);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-full { width: 100%; justify-content: center; }

/* ─── TAGS ──────────────────────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(200, 241, 53, 0.2);
  transition: var(--trans);
}
.tag:hover { background: rgba(200, 241, 53, 0.2); }
.tag-sm { font-size: 0.72rem; padding: 3px 11px; }

/* ─── NAVBAR ────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background var(--trans), box-shadow var(--trans);
}

.navbar.scrolled {
  background: rgba(13, 15, 20, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  width: min(1100px, 90%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-inline: 5%;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.dot { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 40px;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  position: relative;
  transition: color var(--trans);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width var(--trans);
}

.nav-link:hover,
.nav-link.active { color: var(--text); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--trans);
}

/* ─── HERO ──────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero-bg-text {
  position: absolute;
  font-family: var(--font-display);
  font-size: clamp(100px, 20vw, 240px);
  font-weight: 800;
  color: rgba(255,255,255,0.025);
  letter-spacing: -0.05em;
  user-select: none;
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.hero-content {
  container: hero-content;
  display: flex;
  align-items: center;
  gap: 64px;
  width: min(1100px, 90%);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* ─── HERO AVATAR ───────────────────────────────────────────── */
.hero-avatar,
.placeholder-avatar {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 12px var(--accent-dim);
}

.placeholder-avatar {
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

.hero-text { flex: 1; }

.hero-tag {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.hero-name {
  font-family: 'Impact', 'georgia bold', ;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 16px;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 460px;
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.4; transform: scaleY(0.7); }
}

/* ─── ABOUT ─────────────────────────────────────────────────── */
.about { background: var(--bg); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.9;
  margin-bottom: 20px;
}

.about-stats {
  display: flex;
  gap: 56px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; }

.stat-num {
font-family: 'verdana', sans-serif;
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 4px;
}

.skills-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 28px;
}

.skills-group { display: flex; flex-direction: column; gap: 24px; }

.skill-category { display: flex; flex-direction: column; gap: 10px; }

.skill-cat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* ─── EXPERIENCE ────────────────────────────────────────────── */
.experience { background: var(--bg-card); }

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-bottom: 48px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.timeline-item.visible { opacity: 1; transform: translateY(0); }

.timeline-dot {
  position: absolute;
  left: -28px; top: 8px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.timeline-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  transition: border-color var(--trans), transform var(--trans);
}
.timeline-card:hover {
  border-color: rgba(200, 241, 53, 0.3);
  transform: translateX(6px);
}

.timeline-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.timeline-role {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.timeline-company {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

.timeline-date {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.timeline-bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: disc;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ─── PROJECTS ──────────────────────────────────────────────── */
.projects { background: var(--bg); }

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

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--trans), transform var(--trans), box-shadow var(--trans);
  opacity: 0;
  transform: translateY(24px);
}
.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.project-card:hover {
  border-color: rgba(200, 241, 53, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.project-img-placeholder,
.project-img {
  width: 100%;
  height: 180px;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
  object-fit: cover;
}

.project-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.project-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  flex: 1;
}

.project-links {
  display: flex;
  gap: 16px;
  margin-top: 6px;
}

.project-link {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.03em;
  transition: opacity var(--trans);
}
.project-link:hover { opacity: 0.7; }

/* ─── CERTIFICATES ──────────────────────────────────────────── */
.certificates { background: var(--bg-card); }

/* Grid layout — same rhythm as projects-grid */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}

/* The outer anchor is the clickable card wrapper */
.cert-card {
  display: block;
  height: 320px;
  perspective: 1000px;   /* depth for the 3-D flip */
  cursor: pointer;
  text-decoration: none;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.cert-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* The inner wrapper rotates on hover */
.cert-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius);
}
.cert-card:hover .cert-inner {
  transform: rotateY(180deg);
}

/* Shared face styles */
.cert-front,
.cert-back {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

/* ── FRONT: certificate image ── */
.cert-front {
  background: var(--bg);
  border: 1px solid var(--border);
}
.cert-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.cert-card:hover .cert-img {
  transform: scale(1.04);
}

/* Small "Click to view" label at the bottom of the front */
.cert-front-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 10px 16px;
  background: linear-gradient(to top, rgba(13,15,20,0.85), transparent);
  font-size: 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── BACK: certificate details ── */
.cert-back {
  background: var(--bg-hover);
  border: 1px solid rgba(200, 241, 53, 0.25);
  transform: rotateY(180deg);     /* starts face-down, shows after flip */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 24px;
  text-align: center;
}

.cert-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}

.cert-issuer {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

.cert-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.cert-level {
  margin-top: 4px;
}

/* ─── CONTACT ───────────────────────────────────────────────── */
.contact { background: var(--bg-card); }

.contact-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 540px;
  margin-bottom: 56px;
  line-height: 1.8;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}

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

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-icon {
  font-size: 1.2rem;
  line-height: 1;
  margin-top: 2px;
  flex-shrink: 0;
}

.contact-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.contact-val {
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--trans);
}
.contact-val:hover { color: var(--accent); }

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 14px 18px;
  outline: none;
  transition: border-color var(--trans);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-note {
  font-size: 0.85rem;
  color: var(--accent);
  text-align: center;
  min-height: 1.4em;
}

/* ─── FOOTER ────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

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

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--trans);
}
.footer-links a:hover { color: var(--accent); }

/* ─── ANIMATIONS (page load) ────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-tag     { animation: fadeUp 0.7s ease 0.1s both; }
.hero-name    { animation: fadeUp 0.7s ease 0.2s both; }
.hero-tagline { animation: fadeUp 0.7s ease 0.3s both; }
.hero-sub     { animation: fadeUp 0.7s ease 0.4s both; }
.hero-cta     { animation: fadeUp 0.7s ease 0.5s both; }
.hero-avatar,
.placeholder-avatar { animation: fadeUp 0.7s ease 0.15s both; }

/* ─── RESPONSIVE ────────────────────────────────────────────── */

/* Tablet */
@media (max-width: 900px) {
  .hero-content { flex-direction: column; text-align: center; gap: 36px; }
  .hero-sub { margin-inline: auto; }
  .hero-cta { justify-content: center; }

  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .cert-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* Mobile */
@media (max-width: 640px) {
  .section { padding: 80px 0; }

  /* Hamburger nav */
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(13, 15, 20, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 20px 0 32px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open { display: flex; }

  .nav-links li { width: 100%; }
  .nav-link {
    display: block;
    padding: 14px 5%;
    font-size: 1.1rem;
    color: var(--text);
    text-align: center;
  }
  .nav-link::after { display: none; }

  .hamburger { display: flex; }

  /* Hamburger animation */
  .hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero-avatar,
  .placeholder-avatar { width: 180px; height: 180px; }
  .hero-name { font-size: 2.8rem; }

  .hero-cta { flex-direction: column; align-items: center; }
  .hero-cta .btn { width: 100%; justify-content: center; }

  .about-stats { gap: 28px; }

  .cert-card { height: 280px; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ─── CUSTOM CURSOR (follow dot) ──────────────────────────── */
#custom-cursor-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;  /* allows clicking through canvas */
  z-index: 9999;
}


