/* ============================================================
   ZAKARIA — PERSONAL PORTFOLIO DESIGN SYSTEM
   Brand: near-black background, lime accent (#d5ff40).
   Type:  Space Grotesk (display) + Inter (text), both self-hosted.
   ============================================================ */

/* ---------- Fonts (self-hosted variable, latin subset) ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #09090a;
  --bg-soft: #0f0f11;
  --bg-elevated: #131315;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.065);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.2);

  --primary: #d5ff40;
  --primary-dim: rgba(213, 255, 64, 0.12);
  --primary-glow: rgba(213, 255, 64, 0.35);

  --white: #ffffff;
  --muted: rgba(255, 255, 255, 0.62);
  --dim: rgba(255, 255, 255, 0.5); /* ~5.3:1 on --bg (was 3:1) */

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Fluid type scale (min @ ~375px, max @ ~1600px) */
  --fs-display: clamp(3.2rem, min(1.2rem + 8.6vw, 13.5svh), 9rem); /* also capped by viewport height */
  --fs-h1: clamp(2.3rem, 1.4rem + 3.4vw, 4.2rem);
  --fs-h2: clamp(1.8rem, 1.2rem + 2.3vw, 3.1rem);
  --fs-h3: clamp(1.15rem, 1.05rem + 0.45vw, 1.4rem);
  --fs-lead: clamp(1.05rem, 0.98rem + 0.35vw, 1.2rem);
  --fs-body: clamp(0.98rem, 0.94rem + 0.15vw, 1.06rem);
  --fs-small: 0.875rem;
  --fs-label: 0.75rem;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 100px;

  --gutter: clamp(20px, 5vw, 72px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1360px;
}

/* ---------- Reset ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 400;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

input,
textarea {
  font-family: inherit;
}

svg {
  display: block;
}

::selection {
  background: var(--primary);
  color: #0a0a0a;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--container);
  width: 90%;
  margin: 0 auto;
}

.container-fluid {
  max-width: 1800px;
  width: 95%;
  margin: 0 auto;
}

section {
  position: relative;
}

/* ---------- Ambient background grid + glow ---------- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(600px circle at var(--mx, 50%) var(--my, 20%), var(--primary-dim), transparent 45%),
    linear-gradient(var(--bg), var(--bg));
  transition: background 0.2s ease-out;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  color: var(--white);
  font-weight: 500;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 600;
}

h2 {
  font-size: var(--fs-h2);
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-transform: none;
}

h2 span,
h1 span {
  color: var(--primary);
  font-style: normal;
}

/* word wrappers created by the text-reveal script must not pick up the accent colour */
h1 .w,
h1 .wi,
h2 .w,
h2 .wi {
  color: inherit;
}

h3 {
  font-size: var(--fs-h3);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h4,
h5,
h6 {
  letter-spacing: -0.01em;
  font-weight: 600;
}

p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--muted);
  text-wrap: pretty;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 22px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--primary);
  display: inline-block;
}

/* Visually hidden but available to assistive tech / crawlers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 5px 5px 5px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--white);
  font-size: 0.9rem;
  letter-spacing: 0;
  font-weight: 500;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease), color 0.4s var(--ease);
  position: relative;
}

.btn .btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  transition: transform 0.5s var(--ease);
}

.btn:hover {
  border-color: var(--primary);
  background: var(--primary-dim);
}

.btn:hover .btn-icon {
  transform: rotate(45deg);
}

.btn-solid {
  background: var(--primary);
  color: #0a0a0a;
  border-color: var(--primary);
  font-weight: 500;
}

.btn-solid .btn-icon {
  background: #0a0a0a;
  color: var(--primary);
}

.btn-solid:hover {
  background: var(--white);
  border-color: var(--white);
}

.btn-ghost {
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
  transition: all 0.35s var(--ease);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ---------- Glass surface ---------- */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: var(--radius-md);
}

/* ---------- Custom cursor ---------- */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width 0.25s var(--ease), height 0.25s var(--ease);
}

.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.cursor-ring.is-active {
  width: 76px;
  height: 76px;
  background: var(--primary-dim);
  border-color: var(--primary);
}

@media (hover: none),
(pointer: coarse) {

  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

/* ================= HEADER ================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding: 26px 0;
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

header.is-scrolled {
  padding: 16px 0;
  background: rgba(9, 9, 10, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

header .flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo img {
  height: 24px;
  width: auto;
}

.navmenu ul {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navmenu a {
  position: relative;
  padding: 10px 18px;
  font-size: 0.92rem;
  color: var(--muted);
  border-radius: var(--radius-pill);
  transition: color 0.3s var(--ease);
}

.navmenu li.is-active a,
.navmenu a:hover {
  color: var(--white);
}

.navmenu li.is-active a::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 4px;
  height: 5px;
  border-radius: 2px;
  background: var(--primary);
  opacity: 0.9;
}

.mob-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  z-index: 600;
}

.mob-btn span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}

.mob-btn.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mob-btn.is-active span:nth-child(2) {
  opacity: 0;
}

.mob-btn.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ================= FOOTER ================= */
footer {
  padding: 90px 0 32px;
  margin-top: 60px;
}

.footer-panel {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr;
  gap: 40px;
  padding: 48px 44px;
  margin-bottom: 56px;
}

.footer-col h5 {
  font-family: var(--font-display);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dim);
  margin-bottom: 20px;
  font-weight: 600;
}

.footer-brand .logo img {
  height: 22px;
  margin-bottom: 20px;
}

.footer-brand .role {
  color: var(--primary);
  font-size: 0.95rem;
  margin-bottom: 14px;
  font-weight: 500;
}

.footer-brand .tagline {
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 320px;
  margin: 0;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.3s var(--ease), padding-left 0.3s var(--ease);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--primary);
  padding-left: 6px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-contact a,
.footer-contact span {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.3s;
}

.footer-contact a:hover {
  color: var(--primary);
}

.footer-contact .socials {
  margin-top: 10px;
}

footer .socials {
  display: flex;
  gap: 14px;
}

footer .socials a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 15px;
  transition: all 0.35s var(--ease);
}

footer .socials a:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
}

footer .bottom-row {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  position: relative;
}

footer .bottom-row span {
  font-size: 0.82rem;
  color: var(--muted);
}

footer .big-mark {
  display: block;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 9.5vw, 8.5rem);
  line-height: 0.8;
  color: #09090a !important;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
  overflow-wrap: break-word;
  user-select: none;
  position: relative;
  paint-order: stroke fill;
}

@supports (-webkit-text-stroke: 1px red) {
  footer .big-mark {
    color: transparent;
    -webkit-text-stroke: 3px var(--border-strong);
  }
}

@media (max-width: 900px) {
  .footer-panel {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 36px 26px;
  }
}

/* ================= INNER BANNER (about/portfolio/contact) ================= */
.inner-banner {
  padding: clamp(150px, 18vw, 230px) 0 clamp(48px, 6vw, 80px);
}

.inner-banner h1 {
  font-size: clamp(2.6rem, 1.1rem + 6vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 600;
}

.inner-banner .flex {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 40px;
}

.inner-banner ul {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--dim);
  font-size: 0.9rem;
}

.inner-banner ul li a {
  color: var(--dim);
  transition: color 0.3s;
}

.inner-banner ul li a:hover {
  color: var(--primary);
}

/* ================= SCHEDULE / CTA BAND ================= */
.cta-band {
  padding: 60px 0;
}

.cta-band .panel {
  padding: 70px 60px;
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.cta-band .panel::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, var(--primary-glow), transparent 70%);
  right: -160px;
  top: -160px;
  opacity: 0.35;
  border-radius: 50%;
}

.cta-band h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  position: relative;
  z-index: 1;
}

.cta-band h2 .line {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.5em;
  margin-top: 6px;
  letter-spacing: 0.05em;
}

/* ---------- Sections shared ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.section-pad {
  padding: 130px 0;
}

.section-pad-sm {
  padding: 90px 0;
}

/* ---------- Utility ---------- */
.reveal {
  opacity: 0;
}

.text-primary {
  color: var(--primary);
}

.text-muted {
  color: var(--muted);
}

/* ================= RESPONSIVE: HEADER / NAV / FOOTER ================= */
@media (max-width: 900px) {
  .desktop-cta {
    display: none;
  }

  .mob-btn {
    display: flex;
  }

  .nave {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(360px, 84vw);
    height: 100vh;
    background: rgba(10, 10, 11, 0.98);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    padding: 110px 36px 40px;
    visibility: hidden; /* off-canvas links must not be keyboard-focusable while closed */
    transition: right 0.5s var(--ease), visibility 0s linear 0.5s;
    z-index: 550;
  }

  .nave.is-active {
    right: 0;
    visibility: visible;
    transition: right 0.5s var(--ease), visibility 0s;
  }

  .navmenu {
    width: 100%;
  }

  .navmenu ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
  }

  .navmenu a {
    display: block;
    width: 100%;
    padding: 14px 18px;
    font-size: 1.05rem;
  }

  .navmenu li.is-active a::after {
    display: none;
  }

  .navmenu li.is-active a {
    color: var(--primary);
  }

  .inner-banner {
    padding: 150px 0 60px;
  }
}

@media (max-width: 560px) {
  .container {
    width: 92%;
  }

  .section-pad {
    padding: 90px 0;
  }

  .section-pad-sm {
    padding: 64px 0;
  }

  .cta-band .panel h2 {
    font-size: 1.6rem;
  }
}

/* ================= ACCESSIBILITY / UTILITY ================= */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 3100;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #0a0a0a;
  font-size: 0.9rem;
  font-weight: 600;
  transform: translateY(-200%);
  transition: transform 0.25s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.notfound-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 34px;
}


/* ---------- Facts list (text-only profile detail; used in About areas) ---------- */
.facts {
  border-top: 1px solid var(--border);
  margin: 0;
}

.facts > div {
  display: grid;
  gap: 6px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.facts dt {
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.facts dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 0.95rem + 0.45vw, 1.3rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--white);
}
