/* ============================================
   STYLE.CSS — Main Styles
   Profile Website: Md. Mazenul Islam Khan
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary:      #6366f1;   /* Indigo */
  --primary-light:#818cf8;
  --primary-bg:   #eef2ff;
  --accent:       #f472b6;   /* Pink */
  --accent-bg:    #fdf2f8;
  --green:        #34d399;
  --yellow:       #fbbf24;

  --bg:           #ffffff;
  --surface:      #f8fafc;
  --surface-2:    #f1f5f9;
  --border:       #e2e8f0;

  --text:         #0f172a;
  --text-muted:   #64748b;
  --text-light:   #94a3b8;

  --radius-sm:    6px;
  --radius:       12px;
  --radius-lg:    20px;
  --radius-full:  9999px;

  --shadow-sm:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:       0 4px 16px rgba(99,102,241,0.10);
  --shadow-lg:    0 10px 40px rgba(99,102,241,0.15);

  --transition:   0.25s ease;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-heading: 'Lora', Georgia, serif;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

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

/* ---------- Container ---------- */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* ---------- Section Shared ---------- */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-bg);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}
.btn-primary:hover {
  background: #4f46e5;
  box-shadow: 0 6px 20px rgba(99,102,241,0.45);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary-bg);
}

.btn-full { width: 100%; justify-content: center; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

.navbar.scrolled {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(0,0,0,0.07);
  padding: 12px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
}
.nav-logo span { color: var(--primary); }

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active { color: var(--primary); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 80px;
  background: linear-gradient(135deg, #fff 0%, #f0f4ff 50%, #fdf2f8 100%);
  position: relative;
  overflow: hidden;
}

/* Soft background orbs */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
}
.hero::before {
  width: 500px; height: 500px;
  background: var(--primary-light);
  top: -100px; right: -100px;
}
.hero::after {
  width: 400px; height: 400px;
  background: var(--accent);
  bottom: -80px; left: -80px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  position: relative;
  z-index: 1;
}

.hero-greeting {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 16px;
}

.hero-role {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.role-tag {
  background: var(--primary);
  color: #fff;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Avatar */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.avatar-wrapper {
  position: relative;
  width: 280px;
  height: 280px;
}

.avatar-blob {
  position: absolute;
  inset: 0;
  border-radius: 60% 40% 55% 45% / 50% 45% 55% 50%;
  background: linear-gradient(135deg, var(--primary-bg), var(--accent-bg));
  animation: blobMorph 8s ease-in-out infinite;
}

.avatar-img {
  position: absolute;
  inset: 12px;
  border-radius: inherit;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 55% 45% 50% 50% / 50% 45% 55% 50%;
}

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

.avatar-placeholder {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-bg);
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Floating badges */
.floating-badge {
  position: absolute;
  background: #fff;
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  white-space: nowrap;
  animation: floatBadge 3s ease-in-out infinite;
}

.badge-1 { top: 10px; right: -20px; animation-delay: 0s; }
.badge-2 { bottom: 40px; right: -30px; animation-delay: 0.8s; }
.badge-3 { bottom: 0px; left: -10px; animation-delay: 1.6s; }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.scroll-arrow {
  width: 20px; height: 20px;
  border-right: 2px solid var(--text-light);
  border-bottom: 2px solid var(--text-light);
  transform: rotate(45deg);
  animation: scrollBounce 1.5s ease-in-out infinite;
}

/* ============================================
   ABOUT
   ============================================ */
.about { background: var(--bg); }

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 18px;
  font-size: 1.02rem;
}
.about-text strong { color: var(--text); }

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.highlight-item:hover {
  box-shadow: var(--shadow);
  transform: translateX(4px);
}

.highlight-icon { font-size: 1.4rem; }

.highlight-item div {
  display: flex;
  flex-direction: column;
}
.highlight-item strong { font-size: 0.95rem; color: var(--text); }
.highlight-item span   { font-size: 0.82rem; color: var(--text-muted); }

/* Stats */
.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.stat-num {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}
.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================
   SKILLS
   ============================================ */
.skills { background: var(--surface); }

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

/* Last row: if odd item count, center the last card */
.skills-grid .skill-category:last-child:nth-child(3n - 1) {
  grid-column: 2 / 3;
}

.skill-category {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.skill-category:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.category-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
}

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

.pill {
  background: var(--primary-bg);
  color: var(--primary);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  cursor: default;
}
.pill:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

/* ============================================
   PROJECTS
   ============================================ */
.projects { background: var(--bg); }

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

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.project-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.project-img {
  height: 180px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-bg), var(--accent-bg));
}
.project-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.project-card:hover .project-img img { transform: scale(1.05); }

.project-img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  opacity: 0.3;
}

.project-info { padding: 24px; }

.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.tag {
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 18px;
}

.project-links { display: flex; gap: 16px; align-items: center; }

.project-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  transition: color var(--transition);
}
.project-link:hover { color: #4f46e5; }

.project-link-secondary {
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}
.project-link-secondary:hover { background: var(--border); color: var(--text); }

/* ============================================
   CONTACT
   ============================================ */
.contact { background: var(--surface); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}

.contact-intro {
  font-size: 1.02rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 32px;
}

.contact-links { display: flex; flex-direction: column; gap: 14px; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: box-shadow var(--transition), transform var(--transition), color var(--transition);
}
.contact-item:hover {
  box-shadow: var(--shadow);
  transform: translateX(4px);
  color: var(--primary);
}

.contact-icon { font-size: 1.2rem; }

/* Form */
.contact-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.93rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: none;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
  background: var(--bg);
}

.form-note {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 12px;
  min-height: 20px;
  color: var(--green);
}
.form-note.error { color: #f87171; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.footer strong { color: #fff; }

.footer-sub {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .hero-inner     { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .hero-visual    { order: -1; }
  .hero-desc      { margin: 0 auto 36px; }
  .hero-role      { justify-content: center; }
  .hero-cta       { justify-content: center; }
  .about-grid     { grid-template-columns: 1fr; }
  .projects-grid  { grid-template-columns: repeat(2, 1fr); }
  .contact-grid   { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .section         { padding: 70px 0; }
  .nav-links       { display: none; }
  .nav-links.open  {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    justify-content: center;
    align-items: center;
    gap: 36px;
    font-size: 1.4rem;
    z-index: 999;
  }
  .hamburger       { display: flex; z-index: 1001; }
  .skills-grid     { grid-template-columns: 1fr; }
  .projects-grid   { grid-template-columns: 1fr; }
  .about-cards     { grid-template-columns: 1fr 1fr; }
  .contact-form    { padding: 24px; }
  .avatar-wrapper  { width: 220px; height: 220px; }
  .floating-badge  { display: none; }
}
