/* ==========================================================================
   UZAIR ZEB — STYLESHEET
   Premium, modern, minimal. Dark theme by default, light theme via
   [data-theme="light"] on <html>. Colours are CSS variables so they can
   be changed in one place (and the accent comes from js/content.js).
   Mobile-first: base styles are for phones, larger screens add columns.
   No frameworks, no external files — vanilla CSS only.
   ========================================================================== */

:root {
  --bg: #0b0f14;
  --bg-soft: #10161d;
  --surface: #141c24;
  --surface-2: #1a232e;
  --border: #232f3c;
  --text: #e8edf2;
  --muted: #9aa8b5;
  --accent: #2dd4bf;
  --accent-ink: #062e29;
  --danger: #f87171;
  --radius: 16px;
  --max-width: 1080px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] {
  --bg: #f6f7f8;
  --bg-soft: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef1f3;
  --border: #dde3e8;
  --text: #16212b;
  --muted: #5b6b78;
  --accent: #0d9488;
  --accent-ink: #ffffff;
  --danger: #b91c1c;
  --shadow: 0 14px 32px rgba(22, 33, 43, 0.12);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.6rem; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.3rem, 7vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin-top: 0; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--border); }

.eyebrow {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lede { color: var(--muted); font-size: 1.15rem; max-width: 62ch; }
.muted { color: var(--muted); }

/* --- Accessibility: skip link --- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* --- Header / navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand { color: var(--text); display: flex; flex-direction: column; line-height: 1.2; }
.brand:hover { text-decoration: none; }
.brand-name { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; }
.brand-title { font-size: 0.8rem; color: var(--muted); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--accent); }

.nav-links {
  display: none;
  list-style: none;
  margin: 0;
  padding: 12px 0 16px;
  flex-direction: column;
  gap: 4px;
}
.nav-links a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  font-weight: 600;
}
.nav-links a:hover { background: var(--surface-2); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--accent); }

.nav-open .nav-links { display: flex; flex-basis: 100%; }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.theme-toggle:hover { border-color: var(--accent); }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border: 1px solid transparent; }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(45, 212, 191, 0.35); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; }

.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }

/* --- Hero --- */
.hero { padding: 56px 0 64px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.hero-text p.lede { margin-bottom: 1.25rem; }
.hero-image { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hero-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 30%;
}
.hero-image figcaption {
  padding: 10px 14px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
}

/* --- Cards --- */
.card-grid { display: grid; gap: 16px; margin-top: 2rem; }
.card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--muted); margin-bottom: 0; }

.tag {
  display: inline-block;
  padding: 4px 10px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* --- Project --- */
.project-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.project-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.project-body { padding: 28px; }
.project-body h2, .project-body h3 { margin-bottom: 0.5rem; }
.project-body p { color: var(--muted); }
.project-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.25rem; }

/* --- Social links --- */
.social-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 12px; }
.social-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.social-list a:hover { transform: translateY(-2px); border-color: var(--accent); text-decoration: none; }
.social-list svg { flex: 0 0 auto; width: 26px; height: 26px; fill: var(--accent); }
.social-list strong { display: block; }
.social-list span { display: block; color: var(--muted); font-size: 0.9rem; }

/* --- Forms --- */
.form { max-width: 640px; margin-top: 2rem; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; margin-bottom: 6px; font-weight: 600; }
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.field-error { color: var(--danger); font-size: 0.9rem; margin-top: 4px; min-height: 1.2em; }
.form-field input[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] { border-color: var(--danger); }

/* Honeypot: hidden from sighted and keyboard users, present for bots. */
.honeypot { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Notices */
.notice {
  padding: 14px 16px;
  margin: 0 0 20px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  background: var(--surface);
}
.notice p { margin: 0; }
.notice-warn { border-left-color: #f59e0b; }
.notice-error { border-left-color: var(--danger); }
.notice-success { border-left-color: var(--accent); }

/* --- Footer --- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; }
.footer-grid { display: flex; flex-direction: column; gap: 20px; }
.footer-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-nav a { color: var(--muted); font-weight: 600; }
.footer-nav a:hover { color: var(--accent); }

/* --- Reveal on scroll --- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .social-list a:hover { transform: none; }
}

/* --- Larger screens --- */
@media (min-width: 700px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .social-list { grid-template-columns: 1fr 1fr; }
  .footer-grid { flex-direction: row; align-items: flex-start; justify-content: space-between; }
}

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .nav-links {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    flex-basis: auto;
    gap: 4px;
    padding: 0;
  }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 48px; }
  .hero-image img { aspect-ratio: 4 / 5; }
  .section { padding: 84px 0; }
}
