/* ============ CloudX — Anjul Upadhyay ============ */
:root {
  --bg: #0e0815;
  --bg-soft: #150d20;
  --card: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.09);
  --text: #f0eaf6;
  --muted: #a195b3;
  --accent: #fbbf24;
  --accent-2: #fb7185;
  --accent-3: #fb923c;
  --grad: linear-gradient(100deg, #fbbf24, #fb7185 55%, #c084fc);
  --font-main: "Sora", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.7;
  overflow-x: hidden;
}
::selection { background: rgba(251, 191, 36, 0.35); }

/* background canvas + aurora */
#sky {
  position: fixed; inset: 0;
  z-index: -2;
}
.aurora {
  position: fixed; inset: -20%;
  z-index: -1;
  background:
    radial-gradient(40% 35% at 15% 20%, rgba(251, 191, 36, 0.13), transparent 70%),
    radial-gradient(35% 30% at 85% 15%, rgba(251, 113, 133, 0.12), transparent 70%),
    radial-gradient(45% 40% at 60% 90%, rgba(192, 132, 252, 0.08), transparent 70%);
  animation: drift 24s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes drift {
  to { transform: translate3d(3%, -2%, 0) scale(1.06) rotate(1.5deg); }
}

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

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(20px, 6vw, 72px);
  backdrop-filter: blur(14px);
  background: rgba(6, 9, 19, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.logo {
  font-family: var(--font-mono);
  font-weight: 700; font-size: 1.25rem;
  color: var(--text); text-decoration: none;
}
.logo span { color: var(--accent); }
.logo em { color: var(--accent-3); animation: blink 1.1s steps(1) infinite; font-style: normal; }
@keyframes blink { 50% { opacity: 0; } }

.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 600;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-cta {
  font-size: 0.85rem; font-weight: 700; text-decoration: none;
  color: var(--accent); border: 1px solid var(--accent);
  padding: 8px 18px; border-radius: 999px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { background: var(--accent); color: #1c1206; box-shadow: 0 0 24px rgba(251,191,36,.45); }

/* ============ HERO ============ */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 70px);
  padding: 48px clamp(20px, 6vw, 72px) 72px;
  max-width: 1280px; margin: 0 auto;
}
.kicker {
  font-family: var(--font-mono); color: var(--accent-3);
  font-size: 0.9rem; margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.08;
}
.typing-line {
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  color: var(--accent); font-weight: 500;
  margin: 18px 0 20px; min-height: 1.6em;
}
.caret { animation: blink 0.9s steps(1) infinite; color: var(--accent-3); }
.lede { color: var(--muted); max-width: 56ch; font-size: 1.04rem; }
.lede strong { color: var(--text); }

.hero-actions { display: flex; gap: 16px; margin: 30px 0 26px; flex-wrap: wrap; }
.btn {
  text-decoration: none; font-weight: 700; font-size: 0.95rem;
  padding: 13px 26px; border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn-primary {
  background: var(--grad); color: #1c1206;
  box-shadow: 0 8px 30px rgba(251, 191, 36, 0.25);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(251, 113, 133, 0.4); }
.btn-ghost {
  color: var(--text); border: 1px solid var(--card-border);
  font-family: var(--font-mono); font-weight: 500; font-size: 0.88rem;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-big { font-size: 1.1rem; padding: 16px 38px; }

.badges { display: flex; gap: 10px; flex-wrap: wrap; }
.badge {
  font-family: var(--font-mono); font-size: 0.8rem;
  background: var(--card); border: 1px solid var(--card-border);
  padding: 6px 14px; border-radius: 999px; color: var(--muted);
}

/* terminal */
.terminal {
  background: rgba(8, 12, 24, 0.85);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(251,191,36,.06);
  overflow: hidden;
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
  transition: transform .4s ease;
}
.terminal:hover { transform: perspective(1200px) rotateY(0) rotateX(0); }
.term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--card-border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f57; } .dot.yellow { background: #febc2e; } .dot.green { background: #28c840; }
.term-title { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-left: 10px; }
.term-body {
  font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.75;
  padding: 18px 20px; min-height: 320px; white-space: pre-wrap;
  color: #cfc4dd;
}
.term-body .c-green { color: var(--accent-3); }
.term-body .c-blue { color: var(--accent); }
.term-body .c-dim { color: #6f6386; }
.term-body .c-purple { color: var(--accent-2); }

/* ============ STATS ============ */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  max-width: 1280px; margin: 0 auto; padding: 0 clamp(20px, 6vw, 72px) 40px;
}
.stat {
  text-align: center; padding: 26px 10px;
  background: var(--card); border: 1px solid var(--card-border); border-radius: 16px;
}
.stat .num {
  display: block; font-size: 2.4rem; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .lbl { color: var(--muted); font-size: 0.85rem; }

/* ============ SECTIONS ============ */
.section {
  max-width: 1280px; margin: 0 auto;
  padding: 72px clamp(20px, 6vw, 72px);
}
.sec-title {
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800;
  margin-bottom: 38px; display: flex; align-items: baseline; gap: 12px;
}
.sec-title span { font-family: var(--font-mono); color: var(--accent); font-size: 0.7em; }
.sec-title::after {
  content: ""; flex: 1; height: 1px; margin-left: 18px;
  background: linear-gradient(90deg, var(--card-border), transparent);
}
.live-tag {
  font-family: var(--font-mono); font-size: 0.65rem; font-weight: 500;
  color: var(--accent-3); border: 1px solid rgba(251, 146, 60, 0.35);
  padding: 3px 10px; border-radius: 999px;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.55; } }

/* about */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; }
.about-grid p { color: var(--muted); margin-bottom: 16px; }
.about-grid strong, .about-grid em { color: var(--text); }
.mono-note { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent-3) !important; }
.inline-link { color: var(--accent); text-decoration: none; font-weight: 700; }
.inline-link:hover { text-decoration: underline; }
.about-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 16px; padding: 28px; height: fit-content;
}
.about-card h4 { font-family: var(--font-mono); color: var(--accent); margin-bottom: 14px; }
.about-card ul { list-style: none; }
.about-card li { color: var(--muted); padding: 7px 0; font-size: 0.95rem; }

/* skills */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.skill-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 16px; padding: 28px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.skill-card:hover {
  transform: translateY(-6px); border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 18px 50px rgba(251, 191, 36, 0.1);
}
.skill-icon { font-size: 1.8rem; margin-bottom: 12px; }
.skill-card h4 { margin-bottom: 14px; font-size: 1.05rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
  font-family: var(--font-mono); font-size: 0.74rem;
  background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.18);
  color: #f7dca2; padding: 4px 11px; border-radius: 999px;
}

/* work */
.work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.work-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 16px; padding: 30px 26px; position: relative; overflow: hidden;
  transition: transform 0.25s, border-color 0.25s;
}
.work-card:hover { transform: translateY(-6px); border-color: rgba(251, 113, 133, 0.45); }
.work-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--grad); opacity: 0; transition: opacity 0.25s;
}
.work-card:hover::before { opacity: 1; }
.work-num { font-family: var(--font-mono); color: var(--accent-2); font-size: 0.8rem; }
.work-card h4 { margin: 10px 0 10px; font-size: 1.1rem; }
.work-card p { color: var(--muted); font-size: 0.92rem; }

/* experience timeline */
.timeline { position: relative; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), transparent);
  opacity: 0.45;
}
.tl-item { position: relative; padding: 0 0 42px 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -34px; top: 5px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.55);
}
.tl-item:first-child .tl-dot { background: var(--accent); }
.tl-date { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-3); margin-bottom: 6px; }
.tl-item h4 { font-size: 1.12rem; margin-bottom: 12px; }
.tl-co { color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.tl-item ul { list-style: none; }
.tl-item li {
  color: var(--muted); font-size: 0.94rem; padding: 4px 0 4px 22px; position: relative;
}
.tl-item li::before {
  content: "▹"; position: absolute; left: 0; color: var(--accent);
}

/* featured project */
.featured {
  position: relative;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.06), rgba(251, 113, 133, 0.05), rgba(192, 132, 252, 0.06));
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 20px; padding: 42px;
  overflow: hidden;
}
.featured::before {
  content: "ब्रह्माण्ड"; position: absolute; right: -20px; bottom: -48px;
  font-size: 9rem; font-weight: 800; opacity: 0.045; pointer-events: none;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.feat-tag {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 10px;
}
.featured h4 { font-size: 1.7rem; margin-bottom: 4px; }
.feat-sub { font-family: var(--font-mono); color: var(--muted); font-size: 0.85rem; margin-bottom: 18px; }
.featured p { color: var(--muted); margin-bottom: 16px; }
.featured p strong { color: var(--text); }
.feat-points { list-style: none; }
.feat-points li {
  color: var(--muted); font-size: 0.93rem; padding: 5px 0 5px 24px; position: relative;
}
.feat-points li::before { content: "✦"; position: absolute; left: 0; color: var(--accent); }
.feat-arch {
  background: rgba(10, 6, 18, 0.75); border: 1px solid var(--card-border);
  border-radius: 14px; padding: 22px;
  font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.9;
  color: #cfc4dd; white-space: pre; overflow-x: auto; height: fit-content;
}
.feat-arch .fa-gold { color: var(--accent); }
.feat-arch .fa-rose { color: var(--accent-2); }
.feat-arch .fa-dim { color: #6f6386; }
@media (max-width: 960px) {
  .featured { grid-template-columns: 1fr; padding: 30px 24px; }
}

/* projects */
.repo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.repo-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 16px; padding: 26px;
  display: flex; flex-direction: column; gap: 12px;
  text-decoration: none; color: var(--text);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.repo-card:hover {
  transform: translateY(-6px); border-color: rgba(251, 146, 60, 0.45);
  box-shadow: 0 18px 50px rgba(251, 146, 60, 0.08);
}
.repo-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.proj-icon { font-size: 1.2rem; }
.repo-name { font-family: var(--font-mono); font-weight: 700; color: var(--accent); font-size: 1rem; }
.proj-status {
  margin-left: auto; font-family: var(--font-mono); font-size: 0.68rem;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.st-live { color: #6ee7a0; border: 1px solid rgba(110, 231, 160, 0.35); }
.st-local { color: var(--accent); border: 1px solid rgba(251, 191, 36, 0.35); }
.st-internal { color: var(--muted); border: 1px solid var(--card-border); }
.repo-desc { color: var(--muted); font-size: 0.9rem; flex: 1; }
.repo-desc strong { color: var(--text); }
.repo-meta { display: flex; gap: 8px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.repo-meta span {
  background: rgba(251, 191, 36, 0.07); border: 1px solid rgba(251, 191, 36, 0.16);
  color: #d9c8a8; padding: 3px 10px; border-radius: 999px;
}
.proj-link {
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700;
  color: var(--accent); text-decoration: none; margin-top: 4px;
}
a.proj-link:hover { text-decoration: underline; }
.proj-link-muted { color: var(--muted); font-weight: 500; }
.more-link { margin-top: 26px; }
.more-link a { color: var(--accent); text-decoration: none; font-weight: 700; font-family: var(--font-mono); font-size: 0.9rem; }
.more-link a:hover { text-decoration: underline; }

/* contact */
.contact { text-align: center; }
.contact .sec-title { justify-content: center; }
.contact .sec-title::after { display: none; }
.contact-lede { color: var(--muted); max-width: 52ch; margin: 0 auto 34px; }
.socials { margin-top: 34px; display: flex; gap: 14px; justify-content: center; color: var(--muted); }
.socials a { color: var(--muted); text-decoration: none; font-weight: 600; transition: color 0.2s; }
.socials a:hover { color: var(--accent); }

/* footer */
.footer {
  text-align: center; padding: 44px 20px 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted); font-size: 0.9rem;
}
.footer .mono-note { margin-top: 6px; font-size: 0.78rem; color: #6f6386 !important; }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; min-height: unset; }
  .terminal { transform: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
