/*
  Styles for umerimran.me — Dark cyber theme (black + bloody red)
  Lightweight, responsive, smooth animations.
*/

:root {
  --bg: #0a0a0a;
  --bg-2: #0f0f10;
  --surface: #121214;
  --muted: #9aa0a6;
  --text: #e6e6e6;
  --red: #e50914; /* primary accent */
  --red-2: #ff1a2b; /* glow */
  --border: #1e1e22;
  --ring: rgba(229, 9, 20, 0.35);
  --ok: #18c964;
  --warning: #ffb020;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* Modern system font stack with a futuristic touch */
@font-face {
  font-family: "GeistMonoVar";
  src: local("Consolas");
  size-adjust: 96%;
  ascent-override: 92%;
  descent-override: 24%;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 800px at 120% -10%, rgba(229, 9, 20, 0.08), transparent 60%),
              radial-gradient(800px 600px at -10% 110%, rgba(229, 9, 20, 0.06), transparent 60%),
              var(--bg);
  line-height: 1.6;
}

/* Fixed subtle glitch background mount layer */
.glitch-bg {
  position: fixed;
  inset: 0;
  z-index: -1; /* behind everything */
  pointer-events: none;
}

/* Optional very light vignette (subtle) */
.glitch-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 100% at 50% 50%, transparent 55%, rgba(0,0,0,0.18) 100%);
  opacity: 0.18;
}

img { max-width: 100%; display: block; }

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.skip-link {
  position: absolute; left: -999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus { left: 16px; top: 16px; width: auto; height: auto; padding: 8px 12px; background: var(--surface); color: var(--text); border-radius: 6px; }

/* Header / Nav */
.site-header {
  position: sticky; top: 0; z-index: 50;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background: linear-gradient(180deg, rgba(10,10,10,0.9), rgba(10,10,10,0.6));
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--text); letter-spacing: 0.08em; font-weight: 700; }
.brand-text { font-family: GeistMonoVar, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.brand-mark { color: var(--red); text-shadow: 0 0 12px var(--red-2); }

.nav-toggle { display: none; background: transparent; border: 0; padding: 6px; cursor: pointer; }
.nav-toggle .bar { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: transform .3s ease, opacity .3s ease; }

.site-nav ul { display: flex; gap: 18px; align-items: center; list-style: none; padding: 0; margin: 0; }
.site-nav a { color: var(--text); text-decoration: none; padding: 8px 10px; border-radius: 8px; transition: color .2s ease, background .2s ease, box-shadow .2s ease; }
.site-nav a:hover { color: white; background: rgba(229, 9, 20, 0.08); box-shadow: 0 0 0 2px var(--ring); }

.btn { display: inline-block; border-radius: 10px; padding: 10px 14px; text-decoration: none; font-weight: 600; letter-spacing: 0.02em; transition: transform .2s ease, box-shadow .25s ease, background .25s ease, color .25s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--red), #8b0000); color: #fff; box-shadow: 0 8px 24px rgba(229, 9, 20, 0.3), inset 0 0 0 1px rgba(255,255,255,0.08); }
.btn-primary:hover { box-shadow: 0 0 0 2px var(--ring), 0 10px 30px rgba(229, 9, 20, 0.45); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--red); color: #fff; box-shadow: 0 0 24px rgba(229, 9, 20, 0.25); }
.btn-outline { border: 1px solid var(--red); color: #fff; background: transparent; }
.btn-outline:hover { background: rgba(229,9,20,0.08); box-shadow: 0 0 24px rgba(229, 9, 20, 0.25); }

/* Hero */
.hero { padding: 64px 0 32px; border-bottom: 1px solid var(--border); position: relative; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(32px, 6vw, 56px); line-height: 1.08; margin: 0 0 10px; }
.hero .accent { color: var(--red); text-shadow: 0 0 16px rgba(229,9,20,0.35); }
.tagline { font-weight: 600; color: #fff; letter-spacing: 0.02em; margin: 0 0 12px; }
.bio { color: var(--muted); max-width: 70ch; }
.cta { display: flex; gap: 12px; margin-top: 18px; }

/* Rotating badge for hero subtitle (non-clickable button look) */
/* Rotating titles styled as a red button for readability */
.rotating-btn { pointer-events: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; font-size: 14px; line-height: 1.2; }
/* Smooth width auto-resize without layout shift around it */
.tagline > span.rotating-btn { display: inline-flex; align-items: center; transition: width .3s ease; }

/* Radar visual */
.radar { position: relative; width: min(360px, 60vw); aspect-ratio: 1 / 1; border-radius: 50%; background: radial-gradient(circle at center, rgba(229,9,20,0.12), rgba(229,9,20,0.06) 40%, rgba(229,9,20,0.0) 66%),
  linear-gradient(0deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--border); box-shadow: inset 0 0 40px rgba(229,9,20,0.08), 0 20px 60px rgba(0,0,0,0.5);
  overflow: hidden;}
.sweep { position: absolute; inset: -10% -10% -10% -10%; background: conic-gradient(from 0deg, rgba(229,9,20,0.35), rgba(229,9,20,0.0) 45% 100%); animation: sweep 5s linear infinite; filter: blur(1px); }
.dot { position: absolute; width: 6px; height: 6px; background: var(--red); border-radius: 50%; box-shadow: 0 0 12px var(--red-2); }
.dot.d1 { top: 22%; left: 66%; }
.dot.d2 { top: 58%; left: 28%; }
.dot.d3 { top: 76%; left: 70%; }
@keyframes sweep { to { transform: rotate(360deg); } }

/* Sections */
.section { padding: 56px 0; }
.section { scroll-margin-top: 80px; }
.section-title { font-size: 28px; letter-spacing: 0.06em; margin: 0 0 20px; position: relative; }
.section-title::after { content: ""; display: block; width: 56px; height: 3px; background: linear-gradient(90deg, var(--red), transparent); margin-top: 10px; border-radius: 3px; }

.about-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 24px; align-items: start; }
.quick-info { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.quick-info li { display: grid; grid-template-columns: 28px 1fr; align-items: start; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.qi-icon { font-size: 18px; }
.qi-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(180deg, rgba(18,18,20,1), rgba(12,12,14,1)); padding: 16px; position: relative; overflow: hidden; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.card:hover { transform: translateY(-3px); border-color: rgba(229,9,20,0.45); box-shadow: 0 18px 50px rgba(229, 9, 20, 0.16); }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }
.pill { display: inline-block; padding: 6px 10px; border-radius: 999px; background: rgba(229, 9, 20, 0.12); color: #fff; border: 1px solid rgba(229, 9, 20, 0.35); box-shadow: inset 0 0 18px rgba(229, 9, 20, 0.22); font-weight: 600; letter-spacing: .02em; }

/* Community section card and CTA */
.community-card { display: grid; gap: 16px; align-items: start; }
.community-card { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 24px; border-radius: 16px; border: 1px solid rgba(229,9,20,0.35); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 0 30px rgba(229,9,20,0.08); }
.community-card p { font-size: 15px; color: var(--text); max-width: 70ch; }
.logo-wrap { display: grid; place-items: center; }
.community-logo { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(229,9,20,0.25)); }
.cyberster-btn {
  position: relative;
  display: inline-block;
  padding: 14px 22px;
  border: 2px solid #fefefe;
  text-transform: uppercase;
  color: #fefefe;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  isolation: isolate;
}
.cyberster-btn::before {
  content: '';
  position: absolute;
  top: 6px;
  left: -2px;
  width: calc(100% + 4px);
  height: calc(100% - 12px);
  background-color: #212121;
  transition: 0.3s ease-in-out;
  transform: scaleY(1);
  z-index: 1;
}
.cyberster-btn:hover::before { transform: scaleY(0); }
.cyberster-btn::after {
  content: '';
  position: absolute;
  left: 6px;
  top: -2px;
  height: calc(100% + 4px);
  width: calc(100% - 12px);
  background-color: #212121;
  transition: 0.3s ease-in-out;
  transform: scaleX(1);
  transition-delay: 0.5s;
  z-index: 1;
}
.cyberster-btn:hover::after { transform: scaleX(0); }
.cyberster-btn span { position: relative; z-index: 2; }

/* Projects: normalize cards (no special load animation or secondary dimming) */

/* Certifications grid refinements */
#certificates .certifications-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#certificates .card { position: relative; padding-top: 18px; }
#certificates .card h3 { font-size: 16px; margin-bottom: 6px; }
#certificates .card p.muted { font-size: 13px; }
#certificates .card::before {
  content: '✔';
  position: absolute;
  top: 14px; right: 14px;
  font-size: 14px;
  color: var(--red);
  text-shadow: 0 0 10px rgba(229,9,20,0.4);
}

 /* Base timeline (Education and others) */
 .timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
 .timeline li { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; background: var(--surface); box-shadow: var(--shadow); }
 .timeline h3 { margin: 0 0 6px; font-size: 16px; }
 .exp-subtitle { margin: 4px 0 10px; font-size: 14px; font-weight: 600; color: var(--text); }

 /* Enhanced vertical timeline (Experience only) */
 #experience .timeline { position: relative; padding-left: 28px; gap: 18px; }
 #experience .timeline::before { content: ""; position: absolute; left: 10px; top: 2px; bottom: 2px; width: 2px; background: linear-gradient(180deg, rgba(229,9,20,0.0), rgba(229,9,20,0.5), rgba(229,9,20,0.0)); box-shadow: 0 0 14px rgba(229,9,20,0.35); }
 #experience .timeline li { position: relative; border-radius: 12px; padding: 14px 16px; background: linear-gradient(180deg, rgba(18,18,20,1), rgba(12,12,14,1)); }
 #experience .timeline li::before { content: ""; position: absolute; left: -20px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px rgba(229,9,20,0.25), 0 0 18px rgba(229,9,20,0.45); }
 #experience .timeline h3 { margin: 0 0 8px; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
 #experience .timeline h3 .muted { margin-left: auto; font-size: 13px; padding: 2px 8px; border: 1px solid rgba(229,9,20,0.35); border-radius: 999px; background: rgba(229,9,20,0.08); color: #fff; }
 #experience .timeline .exp-subtitle { margin: 2px 0 10px; }
 #experience .timeline .list { margin-top: 8px; }
.muted { color: var(--muted); font-weight: 400; }

.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.contact-form { display: none; }
.field { display: none; }
label { font-size: 13px; letter-spacing: 0.06em; color: #fff; }
input, textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: #0b0b0c; color: var(--text); outline: none; transition: box-shadow .2s ease, border-color .2s ease; }
input:focus, textarea:focus { border-color: rgba(229,9,20,0.4); box-shadow: 0 0 0 3px var(--ring); }
.error { color: var(--red-2); min-height: 16px; font-size: 12px; }
.form-status { margin-top: 10px; color: var(--ok); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 20px 0; color: var(--muted); background: #0a0a0a; text-align: center; }

/* Floating back to top */
.to-top { position: fixed; right: 16px; bottom: 16px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: #0b0b0c; color: #fff; cursor: pointer; box-shadow: var(--shadow); display: grid; place-items: center; opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease; }
.to-top.show { opacity: 1; transform: translateY(0); }
.to-top:hover { box-shadow: 0 0 0 2px var(--ring), 0 12px 36px rgba(229, 9, 20, 0.28); }

/* Grid overlay background under header */
.grid-bg { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px); background-size: 28px 28px; -webkit-mask-image: linear-gradient(to bottom, black, transparent); mask-image: linear-gradient(to bottom, black, transparent); }

/* Reveal animations */
[data-animate] { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
[data-animate].visible { opacity: 1; transform: translateY(0); }

/* Respect user reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Responsive */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  /* Keep text first and radar after on mobile */
  .hero-text { order: 1; }
  .hero-visual { order: 2; justify-self: center; margin-left: 0; }
  #certificates .certifications-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: 1fr; }
}

/* Desktop: place radar on the left with 100px offset */
@media (min-width: 961px) {
  .hero-text { order: 1; }
  .hero-visual { order: 2; justify-self: end; margin-left: 0; margin-right: 40px; }
}

@media (max-width: 640px) {
  #experience .timeline { padding-left: 22px; gap: 16px; }
  #experience .timeline::before { left: 8px; }
  #experience .timeline li::before { left: -18px; }
  .site-nav ul { display: none; position: absolute; right: 16px; top: 60px; flex-direction: column; background: #0c0c0e; border: 1px solid var(--border); padding: 12px; border-radius: 12px; width: calc(100vw - 32px); }
  .site-nav.open ul { display: flex; }
  .nav-toggle { display: block; }
  .cards { grid-template-columns: 1fr; }
}

/* TargetCursor styles removed */
