/* ==========================================================
   Ziad El Alami · Portfolio
   Brand: night background, violet accent, cyan highlight
   ========================================================== */
:root {
  --bg: #05060D;
  --bg-soft: #0B0D1A;
  --card: rgba(255, 255, 255, 0.035);
  --border: rgba(255, 255, 255, 0.08);
  --violet: #6D3FD8;
  --violet-light: #9B7BF0;
  --cyan: #67E8F9;
  --text: #ECEBF5;
  --muted: #A3A1B8;
  --radius: 16px;
  --max: 1100px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", var(--font);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
}
/* Soft violet glow behind the hero */
body::before {
  content: "";
  position: fixed;
  inset: -20% -10% auto auto;
  width: 70vw; height: 70vw;
  background: radial-gradient(circle, rgba(109, 63, 216, 0.28), transparent 60%);
  pointer-events: none;
  z-index: -1;
}
#stars { position: fixed; inset: 0; z-index: -2; }

a { color: inherit; text-decoration: none; }
img { display: block; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 14px max(16px, calc((100vw - var(--max)) / 2));
  background: rgba(5, 6, 13, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; }
.nav nav { display: flex; align-items: center; gap: 22px; font-size: 0.95rem; color: var(--muted); }
.nav nav a:hover { color: var(--text); }
.lang {
  font: 600 0.8rem var(--font);
  color: var(--cyan);
  background: transparent;
  border: 1px solid rgba(103, 232, 249, 0.4);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
}
.lang:hover { background: rgba(103, 232, 249, 0.1); }

/* ---------- Layout ---------- */
main { padding: 0 16px; }
.section, .hero { max-width: var(--max); margin: 0 auto; }
.section { padding: 96px 0 0; scroll-margin-top: 70px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.sub { color: var(--muted); margin: 8px 0 36px; }

/* ---------- Hero ---------- */
.hero { padding: 120px 0 40px; }
.eyebrow {
  display: inline-block;
  color: var(--cyan);
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2.6rem, 8vw, 5rem); letter-spacing: -0.02em; }
.hero h1 span { display: block; }
.gradient {
  background: linear-gradient(90deg, var(--violet-light), var(--cyan));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.lead { max-width: 620px; font-size: 1.15rem; color: var(--muted); margin: 22px 0 34px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.stack { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 44px; }
.stack li {
  font-size: 0.8rem; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font: 600 0.95rem var(--font);
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--violet); color: #fff; box-shadow: 0 8px 30px rgba(109, 63, 216, 0.45); }
.btn.primary:hover { box-shadow: 0 10px 36px rgba(109, 63, 216, 0.65); }
.btn.ghost { border-color: var(--border); color: var(--text); }
.btn.ghost:hover { border-color: var(--cyan); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 20px; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: rgba(109, 63, 216, 0.6); }
.card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.95rem; }
.icon {
  width: 44px; height: 44px; margin-bottom: 18px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(109, 63, 216, 0.18);
}
.icon svg { width: 22px; height: 22px; fill: none; stroke: var(--cyan); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Project cards */
.project { display: flex; flex-direction: column; gap: 6px; }
.thumb { height: 150px; border-radius: 12px; margin-bottom: 14px; border: 1px solid var(--border); }
.t1 { background: radial-gradient(circle at 30% 40%, rgba(103,232,249,.35), transparent 50%), linear-gradient(135deg, #1a1036, #0b0d1a); }
.t2 { background: radial-gradient(circle at 70% 30%, rgba(109,63,216,.6), transparent 55%), linear-gradient(135deg, #0b0d1a, #12203a); }
.t3 { background: radial-gradient(circle at 50% 60%, rgba(155,123,240,.45), transparent 50%), linear-gradient(135deg, #0b0d1a, #1a1036); }
.tags { font-size: 0.8rem !important; color: var(--cyan) !important; margin-top: auto; padding-top: 8px; }
.thumb.shot { width: 100%; object-fit: cover; object-position: top left; background: var(--bg-soft); }
.links { display: flex; flex-wrap: wrap; gap: 16px; }
.soon, .link { font-size: 0.85rem; font-weight: 600; }
.soon { color: var(--muted); }
.link { color: var(--violet-light); }
.link:hover { color: var(--cyan); }

/* ---------- Contact ---------- */
.contact-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.form input, .form textarea {
  font: inherit; color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  resize: vertical;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(109, 63, 216, 0.25); }
.form .btn { align-self: flex-start; }
.form-note { font-size: 0.85rem; min-height: 1.2em; color: var(--cyan) !important; }
.contact-info { display: flex; flex-direction: column; gap: 20px; }
.info { display: flex; flex-direction: column; gap: 2px; word-break: break-word; }
.info .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cyan); }

/* ---------- Footer ---------- */
.footer { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 80px 16px 40px; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav nav a { display: none; }       /* keep only language toggle on small screens */
  .brand span { font-size: 0.95rem; }
  .hero { padding-top: 72px; }
  .section { padding-top: 72px; }
  .contact-wrap { grid-template-columns: 1fr; }
}
