/* ============================================================
   PORTFOLIO STYLES — Hania Khattak
   Change colors once in :root and the whole site updates.
   ============================================================ */

:root {
  /* --- COLORS (edit to re-theme) --- */
  --bg:        #0B0718;   /* deep violet-black page background */
  --bg-2:      #120C26;
  --surface:   #17102E;   /* cards / panels */
  --surface-2: #201748;   /* raised panels, tags */
  --text:      #F4F1FF;   /* main text */
  --muted:     #A79FC9;   /* secondary text */
  --line:      rgba(255, 255, 255, 0.09);

  /* vibrant accents */
  --violet: #A855F7;
  --pink:   #F63FB0;
  --cyan:   #35E7F0;

  /* gradients (the star of the theme) */
  --grad:   linear-gradient(120deg, #A855F7 0%, #F63FB0 100%);
  --grad-2: linear-gradient(120deg, #7C3AED 0%, #35E7F0 100%);

  /* --- TYPE --- */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  /* --- LAYOUT --- */
  --maxw: 1080px;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

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

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Gradient text helper — use class="grad-text" on any word */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ambient glowing background orbs */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}
.orb--1 { width: 480px; height: 480px; background: #7C3AED; top: -140px; left: -120px; }
.orb--2 { width: 420px; height: 420px; background: #F63FB0; top: 40%; right: -160px; opacity: 0.35; }


/* Section spacing (kept in one place) */
.section { padding: 90px 0; }

.section__head { margin-bottom: 46px; max-width: 720px; }
.section__num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.2vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.section__sub {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.08rem;
}


/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 7, 24, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.nav__logo { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.nav__links { display: flex; gap: 32px; }
.nav__links a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}
.nav__links a:hover { color: var(--text); }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav__toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; }


/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 100px 0 80px; }
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--violet);
  margin-bottom: 22px;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 900px;
  margin-bottom: 26px;
}
.hero__lead {
  max-width: 620px;
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 36px;
}
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 64px; }


/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 14px 26px;
  border-radius: 12px;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active { transform: translateY(1px); }

.btn--grad {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 30px -8px rgba(246, 63, 176, 0.6);
}
.btn--grad:hover { box-shadow: 0 12px 40px -8px rgba(168, 85, 247, 0.75); transform: translateY(-2px); }

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1.5px solid var(--line);
}
.btn--ghost:hover { border-color: var(--violet); }

.btn--lg { padding: 17px 34px; font-size: 1.1rem; }


/* ============================================================
   FLOW PIPELINE (signature element)
   ============================================================ */
.flow {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
}
.flow__node {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  flex: 1;
  min-width: 150px;
  justify-content: center;
}
.flow__icon { font-size: 1.3rem; }
.flow__label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.92rem;
  white-space: nowrap;
}
.flow__arrow {
  flex: 0 0 26px;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
  position: relative;
}
.flow__arrow::after {
  content: "";
  position: absolute;
  right: -1px; top: 50%;
  transform: translateY(-50%);
  border-left: 6px solid var(--pink);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}


/* ============================================================
   BROWSER FRAME + VIDEO
   ============================================================ */
.browser {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 30px 80px -30px rgba(168, 85, 247, 0.45);
  margin-bottom: 56px;
}
.browser__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot--red { background: #ff5f57; }
.dot--yellow { background: #febc2e; }
.dot--green { background: #28c840; }
.browser__url {
  margin-left: 12px;
  flex: 1;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 14px;
  font-size: 0.82rem;
  color: var(--muted);
}
.browser__screen {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0a0713;
}
.demo-video { width: 100%; height: 100%; display: block; object-fit: cover; }

.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
  background: radial-gradient(circle at 50% 40%, #1c1140, #0a0713);
  pointer-events: none;
}
.video-placeholder__icon {
  font-size: 2.2rem;
  color: var(--pink);
}
.video-placeholder code {
  color: var(--text);
  background: rgba(255,255,255,0.1);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.82rem;
}


/* ============================================================
   FEATURED PROJECT DETAILS
   ============================================================ */
.block-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 40px 0 22px;
}

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.feature {
  display: flex;
  gap: 16px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.feature:hover { border-color: var(--violet); transform: translateY(-3px); }
.feature__icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
}
.feature h4 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 5px; }
.feature p { color: var(--muted); font-size: 0.95rem; }

/* Tag pills */
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-2);
}

/* Result callout */
.result {
  margin-top: 40px;
  padding: 28px 32px;
  border-radius: var(--radius);
  background: var(--grad-2);
  position: relative;
}
.result::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius) - 1px);
  background: var(--bg);
  z-index: 0;
}
.result__label,
.result p { position: relative; z-index: 1; }
.result__label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 10px;
}
.result p { font-size: 1.15rem; color: var(--text); }
.result strong { color: #fff; }


/* ============================================================
   MORE WORK GRID
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.2s ease;
}
/* gradient bar that reveals on hover */
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.card:hover { transform: translateY(-5px); border-color: var(--violet); }
.card:hover::before { transform: scaleX(1); }
.card__icon { font-size: 1.9rem; }
.card h3 { font-family: var(--font-display); font-size: 1.25rem; }
.card p { color: var(--muted); font-size: 0.95rem; flex-grow: 1; }

/* 2-column layout for project cards that contain videos */
.grid--2 { grid-template-columns: 1fr 1fr; }

/* Mini browser frame inside a card */
.mini-browser {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
  margin-bottom: 20px;
}
.mini-browser__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--line);
}
.mini-browser__bar .dot { width: 9px; height: 9px; }
.mini-browser__screen {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0a0713;
}
.mini-browser__screen .demo-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
/* smaller placeholder text for the mini frames */
.video-placeholder--sm { gap: 4px; padding: 0 12px; }
.video-placeholder--sm .video-placeholder__icon { font-size: 1.6rem; }
.video-placeholder--sm small { font-size: 0.75rem; }


/* ============================================================
   SERVICES
   ============================================================ */
.services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.service {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 1.02rem;
  font-weight: 500;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.service span { font-size: 1.4rem; }
.service:hover { border-color: var(--pink); background: var(--surface-2); }


/* ============================================================
   ABOUT
   ============================================================ */
.about__text { max-width: 760px; }
.about__text p { color: var(--muted); font-size: 1.12rem; margin-bottom: 18px; }


/* ============================================================
   CONTACT
   ============================================================ */
.contact { text-align: center; }
.contact__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 16px;
}
.contact__lead {
  color: var(--muted);
  font-size: 1.15rem;
  margin-bottom: 32px;
}
.contact__socials { margin-top: 28px; }
.contact__socials a {
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1.5px solid transparent;
  transition: 0.15s ease;
}
.contact__socials a:hover { color: var(--text); border-color: var(--cyan); }


/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line); padding: 30px 0; }
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer__inner a:hover { color: var(--text); }


/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .features, .services { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; }
  .flow__arrow { display: none; }
  .flow__node { min-width: 46%; }
}

@media (max-width: 640px) {
  .section { padding: 66px 0; }
  .grid { grid-template-columns: 1fr; }
  .flow { flex-direction: column; }
  .flow__node { width: 100%; }

  .nav__links {
    position: absolute;
    top: 70px; left: 0; right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 14px 24px; }
  .nav__toggle { display: flex; }
}


/* ============================================================
   ACCESSIBILITY
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}
