/* ============================================
   DEWAN MAHMUD PORTFOLIO - FINAL style.css
   (Clean, No duplicates, Dark Mode Ready)
   ============================================ */

/* ===== THEME ===== */
:root {
  --primary: #10b981;
  --primary-dark: #059669;

  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --card-bg: #ffffff;

  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --container-width: 1100px;
  --section-padding: 80px;

  --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);

  /* Tech stack surfaces */
  --stack-surface: rgba(2, 6, 23, 0.55);
  --stack-border: rgba(148, 163, 184, 0.14);
}

body.dark {
  --bg: #0b1220;
  --bg-alt: #0f172a;
  --text: #e5e7eb;
  --text-muted: #94a3b8;
  --border: #223046;
  --card-bg: #0f172a;

  --shadow: 0 14px 40px rgba(0, 0, 0, 0.45);

  --stack-surface: rgba(2, 6, 23, 0.65);
  --stack-border: rgba(148, 163, 184, 0.18);
}

/* ===== RESET / BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.25s, color 0.25s;
}

a { text-decoration: none; color: inherit; }
h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; }

.section { padding: var(--section-padding) 0; }
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Used for pages with fixed navbar (experience page) */
.page-offset { padding-top: 110px; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.logo {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.3px;
}

.logo-accent { color: var(--primary); }

.tagline {
  margin-top: 6px;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-right { display: flex; align-items: center; gap: 10px; }

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 12px 24px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.mobile-menu a { padding: 10px 0; color: var(--text-muted); }
.mobile-menu a:hover { color: var(--text); }
.mobile-menu.active { display: flex; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
  border: none;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { background: var(--bg-alt); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}
.btn-ghost:hover { color: var(--text); background: var(--bg-alt); }

.btn-full { width: 100%; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
}

.hero-content {
  max-width: 680px;
  padding: 84px 24px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--primary);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 22px;
}

.hero h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); margin-bottom: 14px; }
.text-accent { color: var(--primary); }

.typing-container {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  margin-bottom: 18px;
  height: 30px;
}

.cursor { animation: blink 1s infinite; }
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

.hero-description {
  font-size: 1.08rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.75;
}

.hero-buttons { display: flex; gap: 14px; margin-bottom: 26px; flex-wrap: wrap; }
.social-links { display: flex; gap: 16px; flex-wrap: wrap; }

.social-link {
  color: var(--text-muted);
  font-size: 0.95rem;
  border-bottom: 1px dashed transparent;
  transition: color 0.2s, border-color 0.2s;
}
.social-link:hover { color: var(--primary); border-color: rgba(16,185,129,0.6); }

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

.section-title {
  font-size: 1.8rem;
  margin-bottom: 34px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
  margin-bottom: 44px;
  max-width: 100%;
}

.about-text p { color: var(--text-muted); margin-bottom: 16px; }
.about-text strong { color: var(--text); }

.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ===== TECH STACK ===== */
.tech-stack { width: 100%; }

.stack-title {
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-weight: 900;
}

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

.stack-card {
  border: 1px solid var(--stack-border);
  border-radius: 18px;
  padding: 18px 16px;
  background: var(--stack-surface);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 110px;
  transition: transform 0.15s ease, border-color 0.2s ease;
}

.stack-card:hover {
  transform: translateY(-2px);
  border-color: rgba(16,185,129,0.45);
}

.stack-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(148,163,184,0.08);
  color: var(--text-muted);
  margin-bottom: 10px;
}

.stack-label {
  font-size: 1.05rem;
  font-weight: 800;
  color: rgba(226,232,240,0.92);
}

/* SVG sizing */
.stack-icon svg { width: 34px; height: 34px; stroke: currentColor; fill: none; }
.stack-icon svg text { fill: currentColor; font-family: var(--font); }
.stack-icon svg circle { fill: currentColor; stroke: none; }

/* Color accents */
.stack-icon.js { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.30); color: #fbbf24; }
.stack-icon.js span { font-weight: 900; letter-spacing: 0.5px; }

.stack-icon.react { color: #61dafb; }
.stack-icon.node { color: #22c55e; }
.stack-icon.mongo { color: #10b981; }
.stack-icon.express { color: #e2e8f0; }
.stack-icon.html { color: #f97316; }
.stack-icon.css { color: #60a5fa; }
.stack-icon.tailwind { color: #38bdf8; }
.stack-icon.git { color: #f97316; }

/* Light mode tweak for stack cards */
body:not(.dark) .stack-label { color: rgba(15,23,42,0.92); }
body:not(.dark) .stack-card {
  background: rgba(255,255,255,0.92);
  box-shadow: 0 10px 30px rgba(2,6,23,0.08);
}

/* ===== EXPERIENCE (TIMELINE) ===== */
.experience-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.experience-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1rem;
  align-items: start;
}

.experience-left .period {
  font-weight: 900;
  color: var(--text-muted);
  padding-top: 0.9rem;
}

.experience-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(2,6,23,0.06);
}

body.dark .experience-card {
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
}

.experience-card h4 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.company {
  color: var(--primary);
  font-weight: 900;
  margin-bottom: 12px;
}

.experience-card ul { list-style: none; }

.experience-card li {
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 6px 0 6px 18px;
  position: relative;
}

.experience-card li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 900;
}

/* ===== APPS ===== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.section-note { font-size: 0.85rem; color: var(--text-muted); }

.app-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  transition: transform 0.15s, border-color 0.2s;
}

.app-card:hover { transform: translateY(-2px); border-color: rgba(16,185,129,0.5); }

.featured-badge {
  font-size: 0.8rem;
  padding: 4px 10px;
  background: var(--bg-alt);
  border-radius: 999px;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.app-description { color: var(--text-muted); margin: 12px 0 14px; }
.app-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.tag {
  font-size: 0.8rem;
  padding: 5px 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
}

.app-links { display: flex; gap: 10px; }
.app-links .btn { flex: 1; padding: 10px 14px; }

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

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
}

.contact-info-section p { color: var(--text-muted); margin-bottom: 20px; }

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

.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.contact-link:hover { color: var(--text); }

.contact-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.contact-form-container {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
}

.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-weight: 800; }

.form-group input,
.form-group textarea {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* ===== FOOTER ===== */
.footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--text); }

/* ===== RESPONSIVE ===== */
@media (max-width: 920px) {
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: inline-block; }

  .contact-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { width: 100%; }
  .footer-content { flex-direction: column; text-align: center; }

  .experience-item { grid-template-columns: 1fr; }
  .experience-left .period { padding-top: 0; }
}

@media (max-width: 480px) {
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
}
/* ===== Resume Snapshot Card ===== */
.resume-card {
  margin-top: 60px;
  padding: 26px;
}

.resume-header {
  margin-bottom: 14px;
}

.resume-name {
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.resume-contact {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.resume-link {
  color: var(--primary);
  font-weight: 800;
  border-bottom: 1px dashed transparent;
}
.resume-link:hover { border-bottom-color: rgba(16,185,129,0.6); }

.resume-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 14px;
}

.resume-block {
  border: 1px solid var(--border);
  background: var(--bg-alt);
  border-radius: 14px;
  padding: 14px;
}

.resume-title {
  font-size: 0.95rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.resume-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.resume-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.resume-list > li { margin-bottom: 10px; }

.resume-sublist {
  margin-top: 8px;
  padding-left: 18px;
  list-style: disc;
  color: var(--text-muted);
}

.resume-work {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

body.dark .resume-block {
  background: rgba(2, 6, 23, 0.35);
}

/* Mobile */
@media (max-width: 768px) {
  .resume-grid { grid-template-columns: 1fr; }
}
