/*
  Premium single-page portfolio styling
  - Dark theme
  - Glassmorphism
  - Animated background blobs + hero orbs
  - Scroll reveal
  - Scroll progress bar
  - Active navbar indicator

  Notes:
  - No Bootstrap/Tailwind/React
  - Keep existing contact form/EmailJS working (same IDs)
*/

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #7c3aed;
  --secondary: #38bdf8;
  --bg: #0f172a;
  --card: #1e293b;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);

  --glass: rgba(255, 255, 255, 0.06);
  --glass2: rgba(255, 255, 255, 0.1);
  --stroke: rgba(255, 255, 255, 0.14);

  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  --shadow2: 0 10px 35px rgba(0, 0, 0, 0.35);

  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;

  --ring: 0 0 0 4px rgba(124, 58, 237, 0.25);

  --maxw: 1120px;
  --header-h: 76px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: Poppins, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1000px 500px at 15% 5%, rgba(124, 58, 237, 0.35), transparent 60%),
    radial-gradient(900px 450px at 85% 20%, rgba(56, 189, 248, 0.25), transparent 55%),
    radial-gradient(1000px 600px at 50% 90%, rgba(255, 79, 216, 0.12), transparent 60%),
    linear-gradient(180deg, #0b1020, var(--bg));
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 12px;
}

/* Layout */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 18px;
}

.section {
  padding: 78px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
}

.section-head p {
  color: var(--muted);
  max-width: 62ch;
}

.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.045));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow2);
  backdrop-filter: blur(14px);
}

/* Sticky header + progress */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(15, 23, 42, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.nav {
  height: var(--header-h);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(124, 58, 237, 0.9), rgba(56, 189, 248, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  border: 1px solid transparent;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.nav-link:hover {
  color: rgba(255, 255, 255, 1);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.nav-link.is-active {
  color: rgba(255, 255, 255, 1);
  border-color: rgba(124, 58, 237, 0.6);
  background: rgba(124, 58, 237, 0.12);
}

.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 650;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, opacity 180ms ease;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(124, 58, 237, 1), rgba(56, 189, 248, 1));
  border: 0;
  color: #071018;
  box-shadow: 0 22px 60px rgba(124, 58, 237, 0.25);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 28px 80px rgba(124, 58, 237, 0.35);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.btn-small {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.95rem;
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.02);
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  height: 42px;
  width: 44px;
}

.nav-toggle-lines {
  display: block;
  width: 18px;
  height: 2px;
  background: rgba(255, 255, 255, 0.92);
  margin: 0 auto;
  border-radius: 2px;
  position: relative;
}

.nav-toggle-lines::before,
.nav-toggle-lines::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 2px;
}

.nav-toggle-lines::before { top: -6px; }
.nav-toggle-lines::after { top: 6px; }

.scroll-progress {
  height: 2px;
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
}

.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

/* Mobile nav */
@media (max-width: 940px) {
  .nav-actions .btn-outline { display: none; }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    position: absolute;
    top: var(--header-h);
    right: 0;
    left: 0;
    background: rgba(15, 23, 42, 0.78);
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    padding: 12px 18px 18px;
    display: none;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  .nav-links.is-open { display: flex; }
  .nav-link { text-align: center; }
  .nav-actions { display: none; }
}

/* Hero */
.hero {
  padding: 96px 0 70px;
  position: relative;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: -60px 0 auto 0;
  height: 420px;
  z-index: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.55), rgba(255,255,255,0.06) 35%, rgba(124, 58, 237, 0.16) 60%, rgba(0,0,0,0) 70%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 40px 120px rgba(124, 58, 237, 0.18);
  animation: floatOrb 7.5s ease-in-out infinite;
  opacity: 0.95;
}

.orb--1 { left: 7%; top: 40px; width: 240px; height: 240px; animation-duration: 8.5s; }
.orb--2 { left: 42%; top: 12px; width: 290px; height: 290px; animation-duration: 10.5s; opacity: 0.85; }
.orb--3 { left: 72%; top: 60px; width: 200px; height: 200px; animation-duration: 7.2s; opacity: 0.75; }

@keyframes floatOrb {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -18px, 0) scale(1.03); }
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
}

.hero-title {
  font-size: clamp(2.2rem, 4.1vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.typing {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.94);
  font-weight: 650;
}

.typing-static { color: rgba(255, 255, 255, 0.98); }

.hero-description {
  color: var(--muted);
  max-width: 62ch;
  margin-bottom: 20px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tech-floating {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tech-pill {
  font-size: 0.95rem;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.86);
  transition: transform 160ms ease, background-color 160ms ease;
}

.tech-pill:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
}

.hero-visual {
  position: relative;
  z-index: 1;
}

.profile-wrap {
  width: min(360px, 80vw);
  margin-left: auto;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  position: relative;
  display: grid;
  place-items: center;
}

.profile-glow {
  position: absolute;
  inset: -28px;
  border-radius: 999px;
  background: conic-gradient(from 180deg, rgba(124, 58, 237, 0.9), rgba(56, 189, 248, 0.8), rgba(255, 79, 216, 0.5), rgba(124, 58, 237, 0.9));
  filter: blur(18px);
  opacity: 0.35;
  animation: spinGlow 9s linear infinite;
}

@keyframes spinGlow {
  to { transform: rotate(360deg); }
}

.profile-image {
  width: 82%;
  height: 82%;
  object-fit: cover;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow2);
}

/* Cards */
.card {
  border-radius: var(--radius-xl);
}

.card.glass {
  padding: 22px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 980px) {
  .about-grid { grid-template-columns: 1fr; }
}

.list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.list li {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 540px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 980px) {
  .skills-grid { grid-template-columns: repeat(4, 1fr); }
}


.skill-card {
  padding: 18px;
  border-radius: var(--radius-xl);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.skill-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 58, 237, 0.45);
  box-shadow: var(--shadow);
}

.skill-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.skill-icon {
  font-size: 1.35rem;
}

.progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 1000ms cubic-bezier(.2,.9,.2,1);
}

.skill-meta {
  margin-top: 10px;
  color: var(--muted);
  text-align: right;
  font-weight: 650;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 540px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 980px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}


.project-card {
  padding: 18px;
  border-radius: var(--radius-xl);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(124, 58, 237, 0.45);
}

.project-media {
  height: 120px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 14px;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn.btn-small {
  font-size: 0.95rem;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 960px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr; }
}

.stat-card {
  padding: 20px;
  border-radius: var(--radius-xl);
}

.stat-value {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--muted);
  font-weight: 650;
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
}

@media (max-width: 940px) {
  .contact-layout { grid-template-columns: 1fr; }
}

.contact-left .card { padding: 22px; }

.contact-links {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.contact-links li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.social-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.contact-form-wrap {
  padding: 22px;
  border-radius: var(--radius-xl);
}

.contact-form-title { margin-bottom: 14px; }

/* Reuse EmailJS form styling IDs/classes */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 740px) {
  .grid { grid-template-columns: 1fr; }
}

.field {
  position: relative;
}

.field input,
.field textarea {
  width: 100%;
  padding: 18px 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(10, 16, 32, 0.45);
  color: var(--text);
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: transparent;
}

.field label {
  position: absolute;
  left: 14px;
  top: 16px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.95rem;
  pointer-events: none;
  transform-origin: left top;
  transition: transform 180ms ease, opacity 180ms ease, color 180ms ease;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(124, 58, 237, 0.55);
  box-shadow: var(--ring);
  background: rgba(10, 16, 32, 0.62);
  outline: none;
}

.field input:focus + label,
.field textarea:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:not(:placeholder-shown) + label {
  transform: translateY(-10px) scale(0.92);
  opacity: 0.95;
  color: rgba(124, 58, 237, 0.95);
}

.field input.is-invalid,
.field textarea.is-invalid {
  border-color: rgba(255, 92, 122, 0.75);
  box-shadow: 0 0 0 4px rgba(255, 92, 122, 0.18);
}

.error {
  margin-top: 8px;
  min-height: 18px;
  font-size: 0.95rem;
  color: rgba(255, 92, 122, 0.95);
}

.actions {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.submit-btn {
  width: 100%;
  border: 0;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 750;
  cursor: pointer;
  color: #071018;
  background: linear-gradient(135deg, rgba(124, 58, 237, 1), rgba(56, 189, 248, 1));
  box-shadow: 0 22px 60px rgba(124, 58, 237, 0.25);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease, opacity 180ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 28px 80px rgba(124, 58, 237, 0.35);
  filter: saturate(1.06);
}

.submit-btn:disabled {
  opacity: 0.78;
  cursor: not-allowed;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.18);
  border-top-color: rgba(0, 0, 0, 0.65);
  animation: spin 800ms linear infinite;
  display: none;
}

.spinner.is-visible {
  display: inline-block;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.toast {
  margin-top: 14px;
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  display: none;
}

.toast.is-visible {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.toast .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
}

.toast.success {
  border-color: rgba(47, 229, 167, 0.35);
  background: rgba(47, 229, 167, 0.12);
}

.toast.success .dot { background: rgba(47, 229, 167, 0.95); }

.toast.error {
  border-color: rgba(255, 92, 122, 0.35);
  background: rgba(255, 92, 122, 0.12);
}

.toast.error .dot { background: rgba(255, 92, 122, 0.95); }

.toast h4 { font-size: 1.02rem; }
.toast p { color: var(--muted); margin-top: 2px; }

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.site-footer {
  background: rgba(15, 23, 42, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding: 26px 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 980px) {
  .footer-inner { grid-template-columns: 1fr; }
}

.footer-brand .brand-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.footer-name { font-weight: 900; }

.footer-sub {
  color: var(--muted);
  margin-top: 8px;
  font-size: 0.95rem;
}

.footer-links {
  list-style: none;
  display: grid;
  gap: 10px;
}

.footer-links a {
  display: inline-flex;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.78);
  transition: background-color 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.footer-links a:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
  color: rgba(255, 255, 255, 0.98);
}

.footer-social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  place-items: center;
  font-weight: 800;
  transition: transform 160ms ease, background-color 160ms ease;
}

.social-icon:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
}

.footer-copy {
  margin-top: 10px;
  color: var(--muted);
  font-weight: 650;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * {
    transition: none !important;
    animation: none !important;
  }
}

