/* ---------- Base ---------- */
:root {
  --bg: #050712;
  --bg-elevated: rgba(15, 20, 40, 0.9);
  --accent: #4ade80;
  --accent-soft: rgba(74, 222, 128, 0.25);
  --accent-strong: #22c55e;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.2);
  --danger: #ef4444;
  --card-radius: 22px;
  --transition-fast: 0.2s ease-out;
  --transition-med: 0.35s ease-out;
  --glow: 0 0 40px rgba(74, 222, 128, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at top, #111827 0, #020617 40%, #000 90%);
  overflow-x: hidden;
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #020617 0, #020617 50%, #000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.loader-ring {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  border: 4px solid rgba(148, 163, 184, 0.2);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
  position: relative;
}

.loader-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: var(--glow);
}

.loader-text {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

body.loaded .preloader {
  opacity: 0;
  visibility: hidden;
}

/* ---------- Background Orbs ---------- */
.bg-orb {
  position: fixed;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  filter: blur(30px);
  opacity: 0.55;
  z-index: -1;
  mix-blend-mode: screen;
}

.orb-1 {
  background: radial-gradient(circle, #22c55e, transparent 60%);
  top: -80px;
  left: -40px;
  animation: floatOrb 16s infinite alternate;
}

.orb-2 {
  background: radial-gradient(circle, #22d3ee, transparent 60%);
  bottom: -120px;
  right: -60px;
  animation: floatOrb 20s infinite alternate;
}

.orb-3 {
  background: radial-gradient(circle, #a855f7, transparent 60%);
  top: 50%;
  left: 70%;
  transform: translate(-50%, -50%);
  animation: floatOrb 22s infinite alternate;
}

/* ---------- Layout ---------- */
.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 20px 32px;
  min-height: 100vh;
}

/* ---------- Navbar ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-radius: 999px;
  background: radial-gradient(circle at top left, #111827 0, #020617 60%);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.7);
  position: sticky;
  top: 12px;
  z-index: 20;
  backdrop-filter: blur(16px);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: radial-gradient(circle at top, var(--accent) 0, #16a34a 30%, #064e3b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #022c22;
  box-shadow: var(--glow);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-title {
  font-weight: 600;
  font-size: 1.02rem;
}

.logo-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.9rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 999px;
  transition: color var(--transition-fast), background var(--transition-fast),
    transform 0.12s ease-out;
}

.nav-links a:hover {
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.9);
  transform: translateY(-1px);
}

.nav-cta {
  border: 1px solid rgba(148, 163, 184, 0.6);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 50px 10px 40px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.badge-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.9);
}

.badge-pill {
  background: rgba(74, 222, 128, 0.07);
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--accent);
}

.hero-title {
  margin: 18px 0 10px;
  font-size: clamp(2.1rem, 4vw, 2.8rem);
  line-height: 1.1;
}

.hero-title span {
  white-space: nowrap;
}

#typing-text {
  color: var(--accent);
}

.cursor {
  display: inline-block;
  width: 1px;
  background: var(--accent);
  margin-left: 2px;
  animation: cursorBlink 0.8s steps(1) infinite;
}

.hero-subtitle {
  margin: 8px 0 18px;
  max-width: 480px;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.hero-points {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.9rem;
}

.hero-points li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.hero-points li span {
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.btn {
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-med), color var(--transition-med),
    transform 0.16s ease-out, box-shadow 0.16s ease-out;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #022c22;
  font-weight: 600;
  box-shadow: var(--glow);
}

.btn.primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 50px rgba(74, 222, 128, 0.45);
}

.btn.ghost {
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-main);
  border-color: rgba(148, 163, 184, 0.6);
}

.btn.ghost:hover {
  background: rgba(15, 23, 42, 1);
  transform: translateY(-2px);
}

.hero-footer-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
}

.online {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.9);
}

/* ---------- Phone / Right side ---------- */
.hero-right {
  position: relative;
}

.phone-wrapper {
  position: relative;
  perspective: 1200px;
}

.phone {
  width: 260px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(145deg, #020617, #0f172a);
  border-radius: 32px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.95);
  transform-style: preserve-3d;
  position: relative;
}

.phone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 8px;
  background: rgba(15, 23, 42, 0.95);
  border-radius: 99px;
}

.phone-screen {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: radial-gradient(circle at top, #22c55e 0, #16a34a 20%, #020617 80%);
  min-height: 360px;
}

.screen-gradient {
  position: absolute;
  inset: 0;
  background: conic-gradient(
    from 180deg,
    rgba(34, 197, 94, 0.25),
    rgba(56, 189, 248, 0.2),
    rgba(168, 85, 247, 0.22),
    rgba(34, 197, 94, 0.25)
  );
  mix-blend-mode: screen;
  opacity: 0.8;
  animation: rotateGrad 16s linear infinite;
}

.screen-content {
  position: relative;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1;
}

.screen-badge {
  align-self: flex-start;
  font-size: 0.7rem;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.screen-title {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.screen-text {
  margin: 0;
  font-size: 0.78rem;
  color: #e5e7eb;
}

.app-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}

.pill {
  font-size: 0.68rem;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.3);
  background: rgba(15, 23, 42, 0.7);
  color: #e5e7eb;
}

.progress-card {
  margin-top: 8px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.95);
}

.progress-top,
.progress-bottom {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.progress-bar {
  margin: 6px 0 4px;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 72%;
  background: linear-gradient(90deg, var(--accent), #22d3ee);
  border-radius: inherit;
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.3),
    transparent 60%
  );
  transform: translateX(-100%);
  animation: shimmer 1.8s infinite;
}

.phone-shadow {
  position: absolute;
  inset: auto;
  left: 14%;
  right: 14%;
  bottom: -22px;
  height: 24px;
  background: radial-gradient(
    ellipse at center,
    rgba(15, 23, 42, 0.8),
    transparent
  );
  filter: blur(4px);
  z-index: -1;
}

/* Floating chips */
.floating-chip {
  position: absolute;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  backdrop-filter: blur(10px);
}

.floating-chip span {
  font-size: 1rem;
}

.chip-1 {
  top: -16px;
  right: 14%;
  animation: floatY 3.5s ease-in-out infinite;
}

.chip-2 {
  bottom: 20%;
  right: -8px;
  animation: floatY 4.2s ease-in-out infinite;
}

.chip-3 {
  bottom: 0;
  left: 10%;
  animation: floatY 3.9s ease-in-out infinite;
}

/* ---------- Sections ---------- */
.section-heading {
  text-align: center;
  margin-bottom: 26px;
}

.section-heading h2 {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.section-heading p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* About / Timeline */
.about {
  margin-top: 28px;
  padding: 22px 18px 14px;
  background: radial-gradient(circle at top left, #020617 0, #020617 40%, #000 100%);
  border-radius: var(--card-radius);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.9);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.timeline-item {
  padding: 12px 12px 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.9rem;
}

.timeline-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.timeline-item h3 {
  margin: 0 0 5px;
  font-size: 1rem;
}

.timeline-item p {
  margin: 0;
  color: var(--text-muted);
}

/* Tech stack */
.stack {
  margin-top: 24px;
  padding: 22px 18px 16px;
  background: rgba(15, 23, 42, 0.95);
  border-radius: var(--card-radius);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.9);
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.stack-card {
  padding: 12px 12px 14px;
  border-radius: 18px;
  background: radial-gradient(circle at top, #020617 0, #020617 50%, #000 100%);
  border: 1px solid rgba(148, 163, 184, 0.3);
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.stack-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top,
    rgba(74, 222, 128, 0.14),
    transparent 60%
  );
  opacity: 0;
  transition: opacity var(--transition-med);
  pointer-events: none;
}

.stack-card:hover::before {
  opacity: 1;
}

.stack-card h3 {
  margin: 2px 0 6px;
}

.stack-card p {
  margin: 0 0 6px;
  color: var(--text-muted);
}

.stack-card ul {
  list-style: disc;
  margin: 0 0 0 16px;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.stack-tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: var(--text-muted);
}

/* Footer */
.footer {
  margin-top: 28px;
  padding: 20px 18px 10px;
  background: radial-gradient(circle at top, #020617 0, #020617 40%, #000 100%);
  border-radius: var(--card-radius);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.9);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.footer-left h2 {
  margin: 0 0 6px;
  font-size: 1.4rem;
}

.footer-left p {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.email-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  padding: 7px 12px;
  border-radius: 999px;
  text-decoration: none;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: var(--text-main);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.email-pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow);
  border-color: var(--accent);
}

.status-card {
  padding: 12px 12px 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.9rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.status-card p {
  margin: 0 0 8px;
  color: var(--text-muted);
}

.status-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-bottom {
  margin-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---------- Reveal Animations (scroll) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Keyframes ---------- */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes cursorBlink {
  0%,
  50% {
    opacity: 1;
  }
  50.01%,
  100% {
    opacity: 0;
  }
}

@keyframes rotateGrad {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

@keyframes floatY {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes floatOrb {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(40px, -20px, 0);
  }
  100% {
    transform: translate3d(-30px, 30px, 0);
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav {
    padding-inline: 14px;
  }

  .nav-links {
    gap: 8px;
    font-size: 0.8rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 36px;
  }

  .hero-right {
    order: -1;
  }

  .phone {
    margin-bottom: 18px;
  }

  .about,
  .stack,
  .footer {
    padding-inline: 14px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .page {
    padding-inline: 14px;
  }

  .nav {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-title {
    font-size: 1.85rem;
  }

  .hero-subtitle {
    font-size: 0.86rem;
  }

  .hero-points {
    font-size: 0.84rem;
  }

  .badge {
    font-size: 0.65rem;
  }
}
