/* ==========================================================
   Muhammad Basit Qamar — Portfolio
   Glassmorphism theme
   ========================================================== */

:root {
  --bg: #070a16;
  --bg-2: #0c1124;
  --text: #eef1ff;
  --muted: #a3abc9;
  --dim: #6f789b;

  --violet: #7c5cff;
  --cyan: #22d3ee;
  --green: #3ddc84;   /* Android */
  --pink: #f472b6;
  --blue: #3b82f6;

  --grad: linear-gradient(120deg, var(--violet) 0%, var(--cyan) 100%);
  --grad-warm: linear-gradient(120deg, var(--pink) 0%, var(--violet) 100%);

  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-strong: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --blur: blur(18px) saturate(160%);

  --radius: 22px;
  --radius-sm: 14px;
  --nav-h: 72px;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-head: "Space Grotesk", var(--font);
}

*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

::selection { background: rgba(124, 92, 255, 0.45); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--violet), var(--cyan)); border-radius: 10px; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

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

/* ---------- Glass ---------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--glass-shadow);
}

.card {
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  overflow: hidden;
}

/* subtle top highlight on glass cards */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.28), transparent 40%, transparent 60%, rgba(124, 92, 255, 0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.card h3 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  margin-bottom: 14px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.card p { color: var(--muted); margin-bottom: 14px; }
.card p:last-child { margin-bottom: 0; }

/* ---------- Background ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1200px 800px at 10% -10%, #151a3a 0%, transparent 60%),
    radial-gradient(1000px 700px at 110% 110%, #10213a 0%, transparent 60%),
    var(--bg);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}
.blob-1 { width: 520px; height: 520px; background: var(--violet); top: -140px; left: -120px; animation: float1 22s ease-in-out infinite; }
.blob-2 { width: 460px; height: 460px; background: var(--cyan); bottom: -160px; right: -100px; opacity: 0.4; animation: float2 26s ease-in-out infinite; }
.blob-3 { width: 380px; height: 380px; background: var(--pink); top: 40%; left: 55%; opacity: 0.25; animation: float3 30s ease-in-out infinite; }
.blob-4 { width: 300px; height: 300px; background: var(--green); top: 60%; left: 5%; opacity: 0.16; animation: float2 34s ease-in-out infinite reverse; }

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(18vw, 12vh) scale(1.15); }
  66% { transform: translate(6vw, 30vh) scale(0.9); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20vw, -25vh) scale(1.2); }
}
@keyframes float3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-25vw, -20vh) scale(1.2); }
  66% { transform: translate(-10vw, 15vh) scale(0.85); }
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

#particles { position: absolute; inset: 0; width: 100%; height: 100%; }

.spotlight {
  position: absolute;
  inset: 0;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 30%), rgba(124, 92, 255, 0.12), transparent 60%);
  transition: background 0.1s;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.98rem;
  font-family: inherit;
  border: 0;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
  color: #fff;
}
.btn-primary {
  background: var(--grad);
  box-shadow: 0 8px 30px rgba(124, 92, 255, 0.45);
}
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
.btn-primary:hover::after { left: 140%; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(34, 211, 238, 0.4); }
.btn-ghost:hover { transform: translateY(-3px); background: var(--glass-bg-strong); }
.btn-sm { padding: 10px 18px; font-size: 0.9rem; border-radius: 12px; }
.btn-block { width: 100%; }

/* ---------- Navigation ---------- */
.nav-wrap {
  position: fixed;
  top: 14px;
  left: 0; right: 0;
  z-index: 50;
  padding-inline: 16px;
}
.nav {
  max-width: 1180px;
  margin-inline: auto;
  height: var(--nav-h);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 0 26px;
  transition: background 0.3s, box-shadow 0.3s;
}
.nav-wrap.scrolled .nav { background: rgba(12, 17, 36, 0.65); }

.logo {
  display: flex;
  align-items: center;
  flex: none;
}
.logo img {
  height: 54px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.25));
  transition: transform 0.3s ease, filter 0.3s ease;
}
.logo:hover img {
  transform: scale(1.04);
  filter: drop-shadow(0 0 16px rgba(124, 92, 255, 0.55));
}

.nav-links { display: flex; gap: 6px; }
.nav-links a {
  display: block;
  padding: 9px 16px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.25s, background 0.25s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); background: var(--glass-bg-strong); box-shadow: inset 0 0 0 1px var(--glass-border); }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.menu-toggle span {
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Sections ---------- */
.section { padding: 110px 0; position: relative; }

.section-head { text-align: center; margin-bottom: 60px; }
.section-head h2 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.15;
}
.section-head h2::after {
  content: "";
  display: block;
  width: 64px; height: 4px;
  border-radius: 4px;
  background: var(--grad);
  margin: 16px auto 14px;
}
.section-head p { color: var(--muted); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-h) + 60px);
  overflow-x: clip;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 26px;
}
.pulse {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(61, 220, 132, 0.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(61, 220, 132, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); }
}

.hello { color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.5rem); }
.hero-name {
  font-family: var(--font-head);
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  line-height: 1.05;
  font-weight: 700;
  margin: 6px 0 18px;
  letter-spacing: -1px;
}
.hero-role {
  font-family: var(--font-head);
  font-size: clamp(1.15rem, 2.4vw, 1.75rem);
  font-weight: 600;
  min-height: 1.6em;
  color: var(--cyan);
  letter-spacing: 0.5px;
}
.caret { color: var(--violet); animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }

.hero-desc { color: var(--muted); max-width: 540px; margin: 18px 0 32px; font-size: 1.05rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }

.socials { display: flex; flex-wrap: wrap; gap: 12px; }
.socials a {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 1.1rem;
  box-shadow: none;
  transition: transform 0.25s, color 0.25s, background 0.25s, border-color 0.25s;
}
.socials a:hover {
  transform: translateY(-4px);
  color: #fff;
  background: rgba(124, 92, 255, 0.35);
  border-color: rgba(124, 92, 255, 0.6);
}

/* Phone mockup */
.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
}
.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.14);
}
.ring-1 { width: 440px; height: 440px; animation: spin 40s linear infinite; }
.ring-2 { width: 540px; height: 540px; border-style: solid; border-color: rgba(124, 92, 255, 0.15); animation: spin 60s linear infinite reverse; }
.ring-1::after {
  content: "";
  position: absolute;
  top: -6px; left: 50%;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 20px var(--cyan);
}
@keyframes spin { to { transform: rotate(360deg); } }

.phone {
  position: relative;
  width: 270px;
  height: 550px;
  border-radius: 46px;
  padding: 12px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(124, 92, 255, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: hover 6s ease-in-out infinite;
  transform-style: preserve-3d;
}
@keyframes hover {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -16px; }
}
.phone-notch {
  position: absolute;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  width: 90px; height: 24px;
  border-radius: 20px;
  background: #05070f;
  z-index: 2;
}
.phone-screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: #0b0b0b;
}
.phone-screen img { width: 100%; height: 100%; object-fit: cover; }
.phone-overlay {
  position: absolute;
  left: 12px; right: 12px; bottom: 14px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(10, 12, 28, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
}
.phone-title { font-family: var(--font-head); font-weight: 700; }
.phone-sub { font-size: 0.8rem; color: var(--muted); }
.phone-sub i { color: var(--cyan); margin-right: 4px; }

.chip {
  position: absolute;
  padding: 10px 16px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.chip i { font-size: 1.05rem; }
.chip-1 { top: 14%; left: 0; animation: bob 5s ease-in-out infinite; }
.chip-1 i { color: var(--green); }
.chip-2 { top: 30%; right: -10px; animation: bob 6s ease-in-out infinite 0.6s; }
.chip-2 i { color: var(--cyan); }
.chip-3 { bottom: 24%; left: 2%; animation: bob 5.5s ease-in-out infinite 1.2s; }
.chip-4 { bottom: 10%; right: 4%; animation: bob 6.5s ease-in-out infinite 0.3s; }
.chip-4 i { color: var(--violet); }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.scroll-hint {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}
.scroll-hint span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: var(--cyan);
  animation: scroll 1.8s ease-in-out infinite;
}
@keyframes scroll {
  0% { opacity: 0; transform: translateY(0); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  align-items: start;
}
.photo-frame {
  border-radius: 28px;
  padding: 12px;
  position: relative;
}
.photo-frame::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 30px;
  background: conic-gradient(from var(--angle, 0deg), var(--violet), var(--cyan), var(--pink), var(--violet));
  z-index: -1;
  filter: blur(18px);
  opacity: 0.55;
  animation: rotate 8s linear infinite;
}
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes rotate { to { --angle: 360deg; } }

.photo-frame img {
  border-radius: 20px;
  aspect-ratio: 1 / 1.05;
  object-fit: cover;
  width: 100%;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}
.stat {
  border-radius: var(--radius-sm);
  padding: 18px 10px;
  text-align: center;
  box-shadow: none;
}
.stat strong {
  font-family: var(--font-head);
  font-size: 2rem;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span { font-weight: 600; margin-left: 2px; }
.stat small { display: block; color: var(--dim); font-size: 0.78rem; }

.about-content { display: grid; gap: 24px; }

.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; }
.skill-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 600;
}
.skill-top i { width: 20px; color: var(--cyan); margin-right: 8px; }
.skill-top span:last-child { color: var(--cyan); font-size: 0.9rem; }
.bar {
  height: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0;
  border-radius: 8px;
  background: var(--grad);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.6);
  transition: width 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Experience timeline ---------- */
.timeline {
  position: relative;
  max-width: 980px;
  margin-inline: auto;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(var(--violet), var(--cyan), transparent);
}
.tl-item {
  position: relative;
  width: 50%;
  padding: 0 44px 44px 0;
}
.tl-item:nth-child(even) { margin-left: 50%; padding: 0 0 44px 44px; }
.tl-dot {
  position: absolute;
  top: 30px;
  right: -9px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
  z-index: 1;
}
.tl-item:nth-child(even) .tl-dot { right: auto; left: -9px; border-color: var(--violet); box-shadow: 0 0 18px var(--violet); }

.tl-card { padding: 26px 28px; transition: transform 0.3s, background 0.3s; }
.tl-card:hover { transform: translateY(-6px); background: var(--glass-bg-strong); }
.tl-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  margin-bottom: 14px;
}
.tl-role {
  font-family: var(--font-head);
  font-size: 1.3rem;
  margin-bottom: 4px;
}
.tl-company { font-weight: 600; color: var(--text); }
.tl-company em { font-style: italic; font-weight: 500; color: var(--violet); filter: brightness(1.35); }
.tl-loc { color: var(--dim); font-size: 0.86rem; margin: 2px 0 12px; }
.tl-loc i { margin-right: 6px; }
.tl-desc { color: var(--muted); font-size: 0.95rem; }

/* ---------- Projects ---------- */
.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.project {
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s;
  transform-style: preserve-3d;
  will-change: transform;
}
.project:hover {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(124, 92, 255, 0.3);
  border-color: rgba(124, 92, 255, 0.45);
}
.project-media {
  position: relative;
  height: 200px;
  margin: 12px 12px 0;
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(124, 92, 255, 0.12), transparent 60%),
    radial-gradient(circle at 80% 90%, rgba(34, 211, 238, 0.14), transparent 60%),
    rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
.project-media img {
  position: absolute;
  inset: 40px 28px 22px;
  width: calc(100% - 56px);
  height: calc(100% - 62px);
  object-fit: contain;
  transition: transform 0.6s ease;
}
.project:hover .project-media img { transform: scale(1.06); }
.project-tag {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 1;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(120deg, rgba(124, 92, 255, 0.9), rgba(34, 211, 238, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.project-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.project-body h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  margin-bottom: 10px;
}
.project-body p {
  color: var(--muted);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 20px;
}
.project-links { display: flex; gap: 10px; margin-top: auto; }
.project-links a {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  transition: transform 0.25s, background 0.25s, color 0.25s;
}
.project-links a:hover { transform: translateY(-3px); background: var(--grad); color: #fff; border-color: transparent; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  max-width: 1000px;
  margin-inline: auto;
}
.contact-info p { margin-bottom: 26px; }
.info-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  word-break: break-word;
}
.info-row small { display: block; color: var(--dim); font-size: 0.78rem; }
.info-icon {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--grad);
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.4);
}
.contact-info .socials { margin-top: 28px; }

.contact-form { display: grid; gap: 20px; }
.field { position: relative; }
.field input,
.field textarea {
  width: 100%;
  padding: 20px 18px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  resize: vertical;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.field textarea { min-height: 150px; }
.field label {
  position: absolute;
  left: 18px; top: 16px;
  color: var(--dim);
  pointer-events: none;
  transition: all 0.2s ease;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--violet);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.18);
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  top: 5px;
  font-size: 0.74rem;
  color: var(--cyan);
}

.spinner {
  display: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
.btn.loading .btn-label { display: none; }
.btn.loading .spinner { display: block; }
.btn:disabled { cursor: progress; opacity: 0.85; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 140%);
  max-width: calc(100% - 32px);
  padding: 14px 22px;
  border-radius: 14px;
  font-weight: 500;
  color: #fff;
  background: rgba(20, 24, 48, 0.75);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--glass-shadow);
  z-index: 100;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.toast.show { transform: translate(-50%, 0); }
.toast.success { border-color: rgba(61, 220, 132, 0.55); }
.toast.error { border-color: rgba(244, 63, 94, 0.6); background: rgba(80, 16, 32, 0.7); }

/* ---------- Footer ---------- */
.footer {
  padding: 30px 0 36px;
  text-align: center;
  color: var(--dim);
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(7, 10, 22, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0s);
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .projects { grid-template-columns: repeat(2, 1fr); }
  .nav-cta { display: none; }
}

@media (max-width: 860px) {
  :root { --nav-h: 64px; }
  .section { padding: 84px 0; }

  .menu-toggle { display: flex; }
  .nav { padding: 0 10px 0 16px; }
  .logo img { height: 44px; }
  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0; right: 0;
    flex-direction: column;
    padding: 12px;
    border-radius: 20px;
    background: rgba(12, 17, 36, 0.92);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: 14px 16px; }

  .hero { padding-top: calc(var(--nav-h) + 50px); }
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 20px; }
  .hero-desc { margin-inline: auto; }
  .hero-actions, .hero .socials { justify-content: center; }
  .hero-visual { min-height: 500px; }
  .scroll-hint { display: none; }

  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 440px; margin-inline: auto; width: 100%; }

  .timeline::before { left: 9px; }
  .tl-item,
  .tl-item:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 32px 40px; }
  .tl-dot,
  .tl-item:nth-child(even) .tl-dot { left: 0; right: auto; }
}

@media (max-width: 600px) {
  .card { padding: 24px 20px; }
  .projects { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr; }
  .stats { gap: 10px; }
  .stat strong { font-size: 1.6rem; }
  .ring-1 { width: 320px; height: 320px; }
  .ring-2 { width: 380px; height: 380px; }
  .phone { width: 220px; height: 450px; border-radius: 38px; }
  .phone-screen { border-radius: 30px; }
  .hero-visual { min-height: 480px; }
  .chip { font-size: 0.8rem; padding: 8px 12px; }
  .chip-1 { left: 0; }
  .chip-2 { right: 0; }
  .blob { filter: blur(70px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
