/* ==========================================================================
   Gulshad Ansari — Cloud & DevOps Architect
   Aesthetic: mission-console / NOC terminal. Dark carbon base, blueprint
   grid, glowing status accents (signal green / electric cyan / amber).
   ========================================================================== */

:root {
  --bg: #06090a;
  --bg-alt: #0a0f11;
  --panel: #0d1517;
  --panel-border: #1c2a2c;
  --text: #eaf3ef;
  --text-dim: #8fa39c;
  --text-faint: #5b6d68;

  --green: #2bffa6;
  --cyan: #37c8ff;
  --amber: #ffb020;
  --magenta: #ff4d8d;

  --grad: linear-gradient(120deg, var(--green), var(--cyan) 55%, var(--amber) 100%);

  --font-display: "Chakra Petch", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", monospace;

  --container: 1100px;
  --radius: 10px;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; letter-spacing: 0.01em; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.mono { font-family: var(--font-mono); }

/* ---------- background texture ---------- */

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(43, 255, 166, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 255, 166, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
}

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tag-inline {
  display: inline-block;
  margin: 0 3px;
  padding: 0.05em 0.55em;
  border: 1px solid var(--panel-border);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 0.78em;
  color: var(--cyan);
  background: rgba(55, 200, 255, 0.06);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn--primary {
  background: var(--grad);
  color: #04100b;
  font-weight: 600;
  box-shadow: 0 0 0 rgba(43, 255, 166, 0);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(43, 255, 166, 0.25);
}

.btn--ghost {
  border-color: var(--panel-border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}
.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-2px);
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 56px);
  background: rgba(6, 9, 10, 0.55);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease, padding 0.3s ease;
}
.nav.is-scrolled {
  border-bottom-color: var(--panel-border);
  background: rgba(6, 9, 10, 0.85);
  padding-top: 12px;
  padding-bottom: 12px;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.nav__logo-dot { color: var(--green); }

.nav__links {
  display: flex;
  gap: clamp(16px, 2.4vw, 34px);
}
.nav__link {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.94rem;
  color: var(--text-dim);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.nav__num { color: var(--text-faint); font-size: 0.75rem; }
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 0; height: 1px;
  background: var(--grad);
  transition: width 0.25s ease;
}
.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__link:hover::after, .nav__link.is-active::after { width: 100%; }

.nav__status {
  display: flex;
  align-items: center;
  gap: 0.55em;
  font-size: 0.82rem;
  color: var(--green);
  border: 1px solid rgba(43, 255, 166, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(43, 255, 166, 0.06);
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 1.8s ease-in-out infinite;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px; height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 60;
}
.nav__toggle span {
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 140px 24px 80px;
  z-index: 2;
  overflow: hidden;
}

.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.28;
  z-index: -1;
  animation: drift 16s ease-in-out infinite alternate;
}
.hero__blob--a {
  width: 46vw; height: 46vw; max-width: 620px; max-height: 620px;
  background: radial-gradient(circle, var(--green), transparent 70%);
  top: -12%; left: -12%;
}
.hero__blob--b {
  width: 40vw; height: 40vw; max-width: 560px; max-height: 560px;
  background: radial-gradient(circle, var(--cyan), transparent 70%);
  bottom: -18%; right: -10%;
  animation-delay: -8s;
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(4%, 6%) scale(1.08); }
}

.hero__inner {
  max-width: 860px;
  text-align: center;
}

.hero__eyebrow {
  color: var(--green);
  font-size: 0.95rem;
  margin-bottom: 18px;
}
.cursor { animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero__title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.05;
  margin-bottom: 10px;
}

.hero__role {
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  font-family: var(--font-display);
  margin-bottom: 24px;
}

.hero__tagline {
  color: var(--text-dim);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  max-width: 680px;
  margin: 0 auto 34px;
}

.hero__cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  max-width: 720px;
  margin: 0 auto;
  padding-top: 30px;
  border-top: 1px solid var(--panel-border);
}
.hero__stats div { display: flex; flex-direction: column; gap: 4px; }
.hero__stats dt { font-size: 1.5rem; font-weight: 600; color: var(--text); }
.hero__stats dd { margin: 0; font-size: 0.72rem; color: var(--text-faint); letter-spacing: 0.02em; }

.hero__scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.hero__scroll-line {
  width: 1px; height: 34px;
  background: linear-gradient(var(--green), transparent);
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  50.01% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- sections (shared) ---------- */

.section {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: 120px 24px;
}

.section__head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 56px;
}
.section__num { color: var(--text-faint); font-size: 0.85rem; }
.section__head h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.section__head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--panel-border), transparent);
}

/* reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- about ---------- */

.about__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
  align-items: start;
}
.about__text p { color: var(--text-dim); }
.about__text strong { color: var(--text); }

.about__stats {
  display: grid;
  gap: 20px;
}
.about__stats li {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 0.88rem;
}
.about__stats .grad-text { font-size: 1.5rem; font-weight: 700; }

/* ---------- skills ---------- */

.skills__groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 70px;
}

.skill-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.skill-card:hover { border-color: rgba(55, 200, 255, 0.35); transform: translateY(-3px); }
.skill-card h3 { font-size: 0.82rem; color: var(--green); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 16px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.2s ease;
  cursor: default;
}
.tag:hover {
  color: var(--bg);
  background: var(--grad);
  border-color: transparent;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 20px rgba(43, 255, 166, 0.2);
}

.skills__bars-title {
  font-size: 0.82rem;
  color: var(--amber);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.bar-list { display: grid; gap: 20px; }
.bar__label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-dim);
}
.bar__pct { color: var(--text-faint); }
.bar__track {
  height: 8px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  overflow: hidden;
}
.bar__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--grad);
  transition: width 1.4s cubic-bezier(.2,.7,.2,1);
}
.bar.in-view .bar__fill { width: var(--w, 0%); }

/* ---------- experience timeline ---------- */

.timeline {
  position: relative;
  padding-left: 34px;
  border-left: 1px solid var(--panel-border);
  display: grid;
  gap: 44px;
}

.timeline__item { position: relative; }

.timeline__dot {
  position: absolute;
  left: -39.5px;
  top: 6px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--text-faint);
}
.timeline__dot--current {
  border-color: var(--green);
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(43, 255, 166, 0.15);
  animation: pulse 2s ease-in-out infinite;
}

.timeline__card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 28px 30px;
  transition: border-color 0.25s ease;
}
.timeline__card:hover { border-color: rgba(43, 255, 166, 0.3); }

.timeline__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.timeline__date { color: var(--cyan); font-size: 0.85rem; }
.pill {
  font-size: 0.68rem;
  padding: 2px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pill--current { color: var(--green); border: 1px solid rgba(43,255,166,0.4); background: rgba(43,255,166,0.08); }

.timeline__card h3 { font-size: 1.2rem; margin-bottom: 4px; }
.timeline__org { color: var(--text-faint); font-size: 0.88rem; margin-bottom: 16px; }
.timeline__card ul { display: grid; gap: 10px; }
.timeline__card li {
  position: relative;
  padding-left: 20px;
  color: var(--text-dim);
  font-size: 0.94rem;
  line-height: 1.55;
}
.timeline__card li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--amber);
}
.timeline__card li strong { color: var(--text); }

/* ---------- certifications ---------- */

.cert__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.cert-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.cert-card:hover { transform: translateY(-4px); border-color: rgba(255, 176, 32, 0.35); }
.cert-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(255, 176, 32, 0.1);
  color: var(--amber);
  margin-bottom: 14px;
  font-size: 1rem;
}
.cert-card h3 { font-size: 1rem; margin-bottom: 6px; }
.cert-card p { color: var(--text-faint); font-size: 0.85rem; margin: 0; }

/* ---------- contact ---------- */

.contact { text-align: center; max-width: 720px; margin: 0 auto; }
.contact__lead { color: var(--text-dim); font-size: 1.05rem; margin-bottom: 40px; }
.contact__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.contact__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
a.contact__item:hover { border-color: var(--cyan); transform: translateY(-3px); }
.contact__label { color: var(--text-faint); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.contact__value { color: var(--text); font-size: 0.9rem; overflow-wrap: break-word; }

/* ---------- footer ---------- */

.footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 30px clamp(20px, 5vw, 56px) 40px;
  border-top: 1px solid var(--panel-border);
  color: var(--text-faint);
  font-size: 0.78rem;
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background: rgba(6, 9, 10, 0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    padding: 40px;
    border-left: 1px solid var(--panel-border);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(.2,.7,.2,1);
  }
  .nav__links.is-open { transform: translateX(0); }
  .nav__link { font-size: 1.1rem; }
  .nav__status { display: none; }

  .nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle.is-open span:nth-child(2) { opacity: 0; }
  .nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .section { padding: 90px 20px; }
  .timeline { padding-left: 26px; }
  .timeline__dot { left: -31.5px; }
  .timeline__card { padding: 22px; }
}
