:root {
  --bg: #f3f6fb;
  --bg-2: #e9f0ff;
  --surface: #ffffff;
  --surface-2: #f8fbff;
  --text: #0f172a;
  --muted: #526174;
  --accent: #1d4ed8;
  --accent-2: #2563eb;
  --border: rgba(15, 23, 42, 0.08);
  --shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(29, 78, 216, 0.09), transparent 24%),
    linear-gradient(135deg, #f7faff 0%, #eef4ff 100%);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

body.content-ready .hero,
body.content-ready .section,
body.content-ready .modern-footer {
  animation: contentReveal 0.45s cubic-bezier(.2,.8,.2,1) both;
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(36px);
  opacity: 0.5;
  animation: ambientDrift 14s ease-in-out infinite;
}

body::before {
  width: 260px;
  height: 260px;
  top: -70px;
  right: -80px;
  background: rgba(29, 78, 216, 0.14);
}

body::after {
  width: 220px;
  height: 220px;
  left: -60px;
  bottom: 120px;
  background: rgba(37, 99, 235, 0.12);
  animation-duration: 18s;
}

.page-intro {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.16), transparent 28%),
    linear-gradient(135deg, #07111f 0%, #1d4ed8 55%, #2563eb 100%);
  color: white;
  cursor: pointer;
  padding: 1.5rem;
  overflow: hidden;
}

.page-intro::before,
.page-intro::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  animation: drift 10s ease-in-out infinite;
}

.page-intro::before {
  width: 320px;
  height: 320px;
  background: rgba(255,255,255,0.08);
  top: -80px;
  left: -60px;
}

.page-intro::after {
  width: 260px;
  height: 260px;
  background: rgba(255,255,255,0.1);
  right: -70px;
  bottom: -70px;
  animation-duration: 13s;
}

.page-intro.hidden {
  animation: fadeOutIntro 0.8s ease forwards;
}

.intro-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.28);
  position: absolute;
  animation: pulse 1.6s ease-in-out infinite;
  box-shadow: inset 0 0 40px rgba(255,255,255,0.08);
  transform-origin: center;
}

.intro-text {
  text-align: center;
  z-index: 1;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 28px;
  padding: 2rem 2.4rem;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.26);
  animation: introCardIn 0.95s cubic-bezier(.2,.8,.2,1) both;
}

.intro-text span {
  display: inline-block;
  margin-bottom: 0.5rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.78rem;
  opacity: 0.8;
}

.intro-text h2 {
  margin: 0 0 0.45rem;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
}

.intro-text p {
  margin: 0 0 1.1rem;
  opacity: 0.9;
  max-width: 420px;
}

.intro-button {
  margin-top: 0.2rem;
  padding: 0.85rem 1.25rem;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.12));
  color: white;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.16);
}

.intro-button:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(255,255,255,0.28), rgba(255,255,255,0.16));
  box-shadow: 0 16px 30px rgba(2, 6, 23, 0.2);
}

.intro-button:active {
  transform: scale(0.97);
}

a {
  color: inherit;
  text-decoration: none;
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(248, 251, 255, 0.86);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset;
}

.modern-nav {
  width: min(1120px, 92%);
  margin: 0 auto;
  padding: 1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 1rem;
}

.nav-links a {
  color: var(--muted);
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent);
  background: rgba(29, 78, 216, 0.08);
}

main {
  width: min(1120px, 92%);
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
  padding: 3.8rem 0 4.2rem;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  right: -2rem;
  bottom: -1rem;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(29, 78, 216, 0.16), transparent 70%);
  pointer-events: none;
  animation: glowPulse 6s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.08);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(29, 78, 216, 0.12);
}

.hero h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  margin: 0 0 1rem;
  line-height: 1.1;
  color: #0f172a;
  animation: riseIn 0.9s ease both;
}

.hero-description {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 700px;
  margin: 0 0 1.2rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.hero-stat {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.hero-stat strong {
  display: block;
  font-size: 1.15rem;
  color: #0f172a;
}

.hero-stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

.highlight {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.16);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
}

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text);
  background: white;
}

.card-panel {
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.6rem;
  box-shadow: var(--shadow);
  animation: floatCard 4.2s ease-in-out infinite;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.12);
}

.profile-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  margin-bottom: 1rem;
  box-shadow: 0 12px 26px rgba(29, 78, 216, 0.22);
}

.card-panel h3 {
  margin-top: 0;
  color: #0f172a;
}

.card-panel ul {
  padding-left: 1rem;
  color: var(--muted);
}

.card-panel li {
  margin-bottom: 0.35rem;
}

.section {
  padding: 2.2rem 0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.info-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
}

.info-card h3 {
  margin: 0 0 0.5rem;
  color: #0f172a;
}

.info-card p {
  margin: 0.25rem 0;
  color: var(--muted);
}

.section-heading {
  margin-bottom: 1rem;
}

.section-heading h2 {
  margin: 0 0 0.35rem;
  color: #0f172a;
  font-size: 1.45rem;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.14);
}

.project-card h3 {
  margin-top: 0;
  color: #0f172a;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.8rem 0;
}

.tags span {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

.project-card a {
  color: var(--accent);
  font-weight: 700;
  display: inline-block;
  margin-top: 0.4rem;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.skills-list span {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  color: #334155;
  font-weight: 600;
}

.contact-box {
  background: linear-gradient(135deg, #ffffff, #f5f7ff);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.6rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.contact-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

.contact-box h2 {
  margin-top: 0;
  color: #0f172a;
}

.contact-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.contact-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem 1rem;
}

.contact-item strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #0f172a;
}

.contact-item a,
.contact-item span {
  color: var(--muted);
}

footer {
  padding: 0 0 2rem;
}

.modern-footer {
  width: min(1120px, 92%);
  margin: 0 auto;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding: 1.2rem 0 0;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--muted);
  font-size: 0.95rem;
  position: relative;
}

.footer-content p {
  margin: 0;
  text-align: center;
}

.fade-in {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  filter: blur(6px);
  transition: opacity 0.8s cubic-bezier(.2,.8,.2,1), transform 0.8s cubic-bezier(.2,.8,.2,1), filter 0.8s ease;
  will-change: transform, opacity, filter;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

@keyframes fadeOutIntro {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.05); visibility: hidden; }
}

@keyframes pulse {
  0%, 100% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.05); opacity: 1; }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes introCardIn {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(18px, -20px, 0) scale(1.05); }
}

@keyframes ambientDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(20px, -20px, 0) scale(1.08); }
}

@keyframes glowPulse {
  0%, 100% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.05); opacity: 1; }
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

@keyframes contentReveal {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .modern-nav {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.9rem 0 1rem;
  }

  .nav-links {
    gap: 0.5rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-details {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-content {
    flex-direction: column;
    gap: 0.4rem;
    text-align: center;
  }

  .page-intro {
    padding: 1rem;
  }
}
