/* ============================================================
   WASSIM BANNOUT — PORTFOLIO  v3
   ============================================================ */


/* ── 1. TOKENS ────────────────────────────────────────────── */
:root {
  --bg:       #08080D;
  --bg-raise: #0C0C14;
  --card:     #101019;
  --card-hi:  #141422;

  --border:    #1C1C2E;
  --border-hi: #262640;

  --text:   #ECEDF4;
  --sub:    #7070A0;
  --muted:  #44445E;

  --accent:  #7B72F5;
  --accent2: #A99EFF;
  --adim:    rgba(123, 114, 245, 0.07);
  --aglow:   rgba(123, 114, 245, 0.25);

  /* Syntax colours for code card */
  --syn-kw:  #C084FC; /* keywords: async, def, return */
  --syn-fn:  #7DD3FC; /* functions */
  --syn-str: #86EFAC; /* strings */
  --syn-typ: #FCA5A5; /* types */
  --syn-pun: #94A3B8; /* punctuation */
  --syn-ci:  #FDE68A; /* interpolation */

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --nav-h:  66px;
  --r:      10px;
  --r-lg:   14px;
  --sec-py: 8rem;
}


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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a    { text-decoration: none; color: inherit; }
ul   { list-style: none; }
pre  { margin: 0; }
code { font-family: var(--mono); }

::selection { background: var(--adim); color: var(--accent2); }

::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }


/* ── 3. SCROLL PROGRESS ───────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  z-index: 9999;
  pointer-events: none;
  transition: width 0.08s linear;
}


/* ── 4. NAVIGATION ────────────────────────────────────────── */
#navbar {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s;
  z-index: 1000;
}

#navbar.scrolled {
  background: rgba(8, 8, 13, 0.88);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom-color: var(--border);
}

.brand {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  transition: color 0.15s;
}
.brand:hover { color: var(--accent2); }

.navbar-nav .nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sub);
  padding: 0.5rem 0.85rem !important;
  letter-spacing: 0.01em;
  transition: color 0.15s;
  position: relative;
}
.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.25s var(--ease);
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active       { color: var(--text); }
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after { width: 55%; }

.nav-cta {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--accent);
  border: 1px solid rgba(123, 114, 245, 0.32);
  padding: 0.45rem 1.1rem;
  border-radius: var(--r);
  transition: all 0.15s;
}
.nav-cta:hover {
  background: var(--adim);
  border-color: var(--accent);
  color: var(--accent2);
  transform: translateY(-1px);
}

.navbar-toggler {
  background: transparent;
  border: 1px solid var(--border-hi);
  padding: 0.5rem 0.65rem;
  border-radius: var(--r);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.15s;
}
.navbar-toggler:hover { border-color: var(--sub); }
.hbar {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--sub);
  border-radius: 1px;
  transition: background 0.15s;
}
.navbar-toggler:hover .hbar { background: var(--text); }

@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(8, 8, 13, 0.97);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    margin-top: 0.625rem;
    padding: 1.125rem 1.375rem;
  }
  .navbar-nav .nav-link { padding: 0.625rem 0 !important; }
  .navbar-nav .nav-link::after { display: none; }
}


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

/* Subtle ambient glow behind left column */
.hero::before {
  content: '';
  position: absolute;
  width: 800px; height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(123, 114, 245, 0.05) 0%, transparent 65%);
  top: -20%; left: -20%;
  pointer-events: none;
}

.hero-row {
  min-height: calc(100svh - var(--nav-h));
  padding: 5rem 0;
}

/* Left: text */
.hero-copy { max-width: 580px; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 2.25rem;
  animation: hFade 0.9s var(--ease) 0.05s both;
}

.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.55);
  flex-shrink: 0;
  animation: beacon 2.5s ease-in-out infinite;
}
@keyframes beacon {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(0.7); opacity: 0.55; }
}

.hero-h1 {
  font-size: clamp(2.75rem, 5.5vw, 5.5rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 1.875rem;
  animation: hFade 0.9s var(--ease) 0.14s both;
}
/* Second line — lighter weight, recedes slightly */
.h1-dim {
  font-weight: 300;
  color: var(--sub);
  letter-spacing: -0.03em;
}
/* Third line — accent */
.h1-accent {
  color: var(--accent);
}

.hero-sub {
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--sub);
  line-height: 1.78;
  max-width: 460px;
  margin-bottom: 2.5rem;
  animation: hFade 0.9s var(--ease) 0.24s both;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  flex-wrap: wrap;
  animation: hFade 0.9s var(--ease) 0.34s both;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #08080D;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.8125rem 2rem;
  border-radius: var(--r);
  border: 1px solid var(--accent);
  transition: all 0.15s;
}
.btn-primary:hover {
  background: var(--accent2);
  border-color: var(--accent2);
  color: #08080D;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--aglow);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--sub);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.8125rem 2rem;
  border-radius: var(--r);
  border: 1px solid var(--border-hi);
  transition: all 0.15s;
}
.btn-ghost:hover {
  background: var(--card);
  border-color: var(--sub);
  color: var(--text);
  transform: translateY(-2px);
}

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

/* ── Hero code card ──── */
.hero-code-card {
  background: #0C0C18;
  border: 1px solid var(--border-hi);
  border-radius: var(--r-lg);
  overflow: hidden;
  width: 100%;
  max-width: 480px;
  box-shadow:
    0 0 0 1px var(--border),
    0 40px 80px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(123, 114, 245, 0.04);
  animation: hFade 1.1s var(--ease) 0.5s both;
}

.code-chrome {
  background: #13131E;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.125rem;
  display: flex;
  align-items: center;
  gap: 0.875rem;
}
.code-dots { display: flex; gap: 6px; }
.code-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.code-dots span:nth-child(1) { background: #FF5F57; }
.code-dots span:nth-child(2) { background: #FEBC2E; }
.code-dots span:nth-child(3) { background: #28C840; }
.code-filename {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.code-body {
  padding: 1.375rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.75;
  color: var(--syn-pun);
  overflow-x: auto;
  tab-size: 4;
}

/* Syntax token colours */
.ck { color: var(--syn-kw); }   /* keywords */
.cf { color: var(--syn-fn); }   /* function names */
.cs { color: var(--syn-str); }  /* strings */
.ct { color: var(--syn-typ); }  /* types */
.cp { color: var(--syn-pun); }  /* punctuation */
.ci { color: var(--syn-ci); }   /* string interpolation */


/* ── 6. SECTION SHARED ────────────────────────────────────── */
.sec { padding: var(--sec-py) 0; }

.sec-alt {
  background: var(--bg-raise);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Eyebrow with leading accent line */
.sec-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-family: var(--mono);
  font-size: 0.675rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}
.sec-eyebrow::before {
  content: '';
  display: block;
  width: 1.75rem;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.sec-title {
  font-size: clamp(1.875rem, 3.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
}

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


/* ── 7. ABOUT ─────────────────────────────────────────────── */

/* Photo */
.about-photo-wrap {
  position: relative;
  width: 100%;
  max-width: 340px;
}

/* Accent glow behind the photo */
.about-photo-wrap::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 22px;
  background: radial-gradient(ellipse at center,
    rgba(123, 114, 245, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* Subtle offset border that sits behind the image */
.about-photo-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  border: 1px solid rgba(123, 114, 245, 0.25);
  translate: 8px 8px;
  pointer-events: none;
  transition: translate 0.4s var(--ease);
}

.about-photo-wrap:hover::after {
  translate: 12px 12px;
}

.about-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: 16px;
  border: 1px solid var(--border-hi);
  display: block;
  filter: grayscale(15%);
  transition: filter 0.4s, box-shadow 0.4s;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.about-photo-wrap:hover .about-photo {
  filter: grayscale(0%);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

/* About copy */
.about-copy { margin: 1.75rem 0 2.5rem; }
.about-copy p {
  font-size: 0.9875rem;
  color: var(--sub);
  line-height: 1.85;
  margin-bottom: 1rem;
}
.about-copy p:last-child { margin-bottom: 0; }

/* Stats — specific numbers from actual projects */
.about-stats {
  display: flex;
  align-items: flex-start;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.astat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-right: 1.75rem;
  margin-right: 1.75rem;
  border-right: 1px solid var(--border);
}
.astat:last-child { border-right: none; padding-right: 0; margin-right: 0; }

.astat-n {
  font-family: var(--mono);
  font-size: 2.375rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1;
}
.astat-l {
  font-size: 0.775rem;
  color: var(--muted);
  line-height: 1.5;
}


/* ── 8. PROJECTS ──────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.pcard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}

/* Watermark project number */
.pcard::before {
  content: attr(data-n);
  position: absolute;
  bottom: 1.5rem; right: 1.75rem;
  font-family: var(--mono);
  font-size: 5rem;
  font-weight: 800;
  color: var(--text);
  opacity: 0.025;
  line-height: 1;
  letter-spacing: -0.06em;
  pointer-events: none;
  user-select: none;
}

/* Top shimmer on hover */
.pcard::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.pcard:hover {
  transform: translateY(-5px);
  border-color: rgba(123, 114, 245, 0.28);
  box-shadow:
    0 20px 56px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(123, 114, 245, 0.07);
}
.pcard:hover::after { opacity: 1; }

.pcard-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.375rem;
}

.ptag {
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--adim);
  padding: 0.275rem 0.625rem;
  border-radius: 5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.parrow {
  font-size: 1.25rem;
  color: var(--muted);
  line-height: 1;
  display: inline-block;
  transition: color 0.15s, transform 0.15s;
}
.parrow:hover,
.pcard:hover .parrow { color: var(--accent); transform: translate(2px, -2px); }

.pcard-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.875rem;
}

/* One-line technical lead — the single most impressive fact */
.pcard-lead {
  font-family: var(--mono);
  font-size: 0.775rem;
  color: var(--accent2);
  line-height: 1.6;
  margin-bottom: 1rem;
  padding: 0.625rem 0.875rem;
  background: rgba(123, 114, 245, 0.05);
  border-left: 2px solid var(--accent);
  border-radius: 0 5px 5px 0;
}

.pcard-desc {
  font-size: 0.875rem;
  color: var(--sub);
  line-height: 1.82;
  flex: 1;
  margin-bottom: 1.75rem;
}

.pstack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: auto;
}
.pstack span {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.2rem 0.525rem;
  border-radius: 4px;
  letter-spacing: 0.03em;
  transition: color 0.15s, border-color 0.15s;
}
.pcard:hover .pstack span {
  color: var(--sub);
  border-color: var(--border-hi);
}

.projects-more { text-align: center; margin-top: 3rem; }


/* ── 9. SKILLS ────────────────────────────────────────────── */
.skills-table {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.sk-row {
  display: grid;
  grid-template-columns: 10rem 1fr;
  border-bottom: 1px solid var(--border);
  align-items: stretch;
  transition: background 0.2s;
}
.sk-row:last-child { border-bottom: none; }
.sk-row:hover { background: rgba(123, 114, 245, 0.025); }

.sk-cat {
  padding: 1.25rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  background: var(--card);
  transition: color 0.2s, background 0.2s;
}
.sk-row:hover .sk-cat { color: var(--sub); background: var(--card-hi); }

.sk-list {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.sk-list span {
  font-size: 0.9rem;
  color: var(--sub);
  transition: color 0.15s;
}
.sk-list span::after {
  content: ' ·';
  color: var(--border-hi);
  margin-right: 0.5rem;
  margin-left: 0.125rem;
}
.sk-list span:last-child::after { content: ''; }
.sk-row:hover .sk-list span { color: var(--text); }


/* ── 10. CONTACT ──────────────────────────────────────────── */
.contact-block { max-width: 620px; }

.contact-h2 {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.036em;
  line-height: 1.08;
  color: var(--text);
  margin: 0.75rem 0 1.5rem;
}

.contact-sub {
  font-size: 1rem;
  color: var(--sub);
  line-height: 1.78;
  max-width: 440px;
  margin-bottom: 2.75rem;
}

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

.clink {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--sub);
  border: 1px solid var(--border-hi);
  background: var(--card);
  padding: 0.8125rem 1.625rem;
  border-radius: var(--r);
  transition: all 0.15s;
  letter-spacing: 0.01em;
}
.clink:hover {
  color: var(--accent);
  border-color: rgba(123, 114, 245, 0.38);
  background: var(--adim);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(123, 114, 245, 0.08);
}
.clink-arrow { font-size: 0.875rem; transition: transform 0.15s; }
.clink:hover .clink-arrow { transform: translate(2px, -2px); }


/* ── 11. FOOTER ───────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background: var(--bg);
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-sig {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sub);
}
.footer-note { font-size: 0.8125rem; color: var(--muted); }


/* ── 12. REVEAL ───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }


/* ── 13. CURSOR GLOW ──────────────────────────────────────── */
#cursor-glow {
  position: fixed;
  pointer-events: none;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(123, 114, 245, 0.03) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  z-index: 0;
  will-change: left, top;
}


/* ── 14. RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 991.98px) {
  :root { --sec-py: 5.5rem; }

  .hero-row { padding: 4rem 0; min-height: auto; }

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

  .about-photo-wrap { max-width: 280px; }
}

@media (max-width: 767.98px) {
  :root { --sec-py: 4.5rem; }

  .hero-row { padding: 3.5rem 0; }

  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-ghost { justify-content: center; }

  .about-stats { flex-wrap: wrap; gap: 1.5rem 0; }
  .astat { flex: 0 0 50%; border-right: none; padding-right: 0; margin-right: 0; }
  .astat:nth-child(odd) {
    padding-right: 1.25rem;
    border-right: 1px solid var(--border);
    margin-right: 0;
  }
  .astat:nth-child(n+3) {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
  }

  .sk-row { grid-template-columns: 1fr; }
  .sk-cat {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0.875rem 1.25rem;
  }
  .sk-list { padding: 1rem 1.25rem; }

  .footer-row { flex-direction: column; gap: 0.375rem; text-align: center; }

  .contact-links { flex-direction: column; }
  .clink { justify-content: center; }
}

@media (max-width: 575.98px) {
  .hero-h1 { font-size: 2.75rem; letter-spacing: -0.03em; }
  .contact-h2 { font-size: 2rem; }
}
