:root {
  --bg: #020617;
  --card: rgba(15, 23, 42, 0.72);
  --glass-border: rgba(255, 255, 255, 0.14);
  --primary: #38bdf8;
  --secondary: #818cf8;
  --text: #e5e7eb;
  --muted: #94a3b8;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.25), transparent 35%),
    radial-gradient(circle at top right, rgba(129, 140, 248, 0.22), transparent 35%),
    linear-gradient(135deg, #020617, #0f172a 55%, #020617);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  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: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent);
  pointer-events: none;
  z-index: -1;
}

.header {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--glass-border);
}

.navbar {
  max-width: 1100px;
  margin: auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 22px;
  color: #fff;
}

.logo span,
.hero h2 span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 24px;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  transition: 0.3s;
}

.nav-links a:hover {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

.section {
  max-width: 1100px;
  margin: auto;
  padding: 110px 24px 60px;
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: center;
  gap: 40px;
}

.badge {
  display: inline-block;
  color: var(--primary);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.22);
  padding: 8px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h2 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero p {
  color: #cbd5e1;
  max-width: 620px;
}

.hero-buttons,
.doc-actions,
.project-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.btn {
  position: relative;
  overflow: hidden;
  display: inline-block;
  padding: 12px 20px;
  border-radius: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: 0.3s ease;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  left: -100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.35),
    transparent
  );
  transition: 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #020617;
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.25);
}

.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 45px rgba(56, 189, 248, 0.35);
}

.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.18);
}

.secondary:hover {
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-3px);
}

.hero-card,
.about-card,
.doc-card,
.contact-form,
.pdf-preview,
.figma-preview,
.project-card {
  background: var(--card);
  border: 1px solid var(--glass-border);
  border-radius: 26px;
  padding: 28px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.profile-circle {
  width: 145px;
  height: 145px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 0 8px rgba(56, 189, 248, 0.08),
    0 0 45px rgba(56, 189, 248, 0.35);
}

.profile-circle::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(
    from 180deg,
    var(--primary),
    var(--secondary),
    var(--primary)
  );
  z-index: -1;
  animation: spinGlow 6s linear infinite;
}

.profile-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card {
  text-align: center;
}

.hero-card h3 {
  margin-bottom: 8px;
}

.hero-card p {
  color: var(--muted);
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 36px;
  margin-bottom: 10px;
}

.section-title p {
  color: var(--muted);
}

.about-grid,
.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.about-card p,
.doc-card p {
  color: #cbd5e1;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skills span,
.project-tech span {
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.16);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.loading-text {
  color: var(--muted);
  text-align: center;
  grid-column: 1 / -1;
}

.project-card {
  overflow: hidden;
  position: relative;
  transform: translateY(40px) scale(0.96);
  opacity: 0;
  transition: 0.7s ease;
}

.project-card.active {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.project-img {
  width: calc(100% + 56px);
  margin: -28px -28px 0;
  height: 190px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: grid;
  place-items: center;
  overflow: hidden;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-placeholder {
  font-size: 42px;
  font-weight: bold;
  color: white;
}

.project-content {
  padding-top: 24px;
}

.project-content h3 {
  font-size: 22px;
  margin-bottom: 10px;
  color: #fff;
}

.project-content p {
  color: #cbd5e1;
  font-size: 14px;
  margin-bottom: 18px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tech span {
  font-size: 12px;
}

.about-card,
.doc-card,
.project-card,
.pdf-preview,
.figma-preview {
  transition: 0.35s ease;
}

.about-card:hover,
.doc-card:hover,
.project-card:hover,
.pdf-preview:hover,
.figma-preview:hover {
  transform: translateY(-8px);
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow:
    0 28px 90px rgba(56, 189, 248, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.pdf-preview,
.figma-preview {
  margin-top: 28px;
}

.pdf-preview h3,
.figma-preview h3 {
  margin-bottom: 16px;
}

.pdf-preview iframe,
.figma-preview iframe {
  width: 100%;
  height: 520px;
  border: none;
  border-radius: 16px;
  background: #fff;
}

.contact-form {
  max-width: 650px;
  margin: auto;
  display: grid;
  gap: 16px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(2, 6, 23, 0.7);
  color: #fff;
  outline: none;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #020617;
  font-size: 22px;
  cursor: pointer;
  display: none;
  box-shadow: 0 15px 35px rgba(56, 189, 248, 0.3);
}

.back-to-top.show {
  display: block;
}

.footer {
  text-align: center;
  padding: 28px;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.reveal {
  opacity: 0;
  transform: translateY(42px) scale(0.96);
  filter: blur(8px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease,
    filter 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.hero-content.reveal.active {
  animation: slideHero 0.9s ease both;
}

.hero-card.reveal.active {
  animation: floatCard 4s ease-in-out infinite;
}

@keyframes slideHero {
  from {
    opacity: 0;
    transform: translateX(-45px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes floatCard {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-14px);
  }
}

@keyframes spinGlow {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 70px;
    right: 24px;
    left: 24px;
    display: none;
    flex-direction: column;
    background: rgba(2, 6, 23, 0.95);
    padding: 22px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(18px);
  }

  .nav-links.active {
    display: flex;
  }

  .hero,
  .about-grid,
  .doc-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    text-align: center;
  }

  .hero-buttons,
  .doc-actions,
  .project-actions {
    justify-content: center;
  }

  .pdf-preview iframe,
  .figma-preview iframe {
    height: 420px;
  }
}

@media (max-width: 600px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}
