/* ==========================================================================
   Dipu Kumar Verma — White & Sky Blue Developer Portfolio (Pure HTML5 + CSS3)
   ========================================================================== */

:root {
  --bg-main: #ffffff;
  --bg-soft: #e0f2fe;
  --bg-soft-alt: #f0f9ff;
  --bg-card: #f8fafc;
  --sky-primary: #0ea5e9;
  --sky-hover: #0284c7;
  --sky-accent: #38bdf8;
  --navy-heading: #0f172a;
  --slate-body: #475569;
  --slate-muted: #64748b;
  --border-light: #e2e8f0;

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 30px rgba(14, 165, 233, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 45px rgba(14, 165, 233, 0.14);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--slate-body);
  background-color: var(--bg-main);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--sky-accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--sky-primary);
  color: #ffffff;
  padding: 10px 16px;
  z-index: 200;
  font-weight: 600;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

.container {
  width: min(1160px, 92%);
  margin-inline: auto;
}

.section {
  padding: 84px 0;
}

.section-soft {
  background: linear-gradient(180deg, var(--bg-soft-alt) 0%, var(--bg-soft) 100%);
}

.text-sky {
  color: var(--sky-primary);
}

/* ==========================================================================
   Dynamic Pure-CSS Keyframe Animations
   ========================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulseRing {
  0% {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.45);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(14, 165, 233, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
  }
}

@keyframes blobMorph {
  0%, 100% {
    border-radius: 44% 56% 52% 48% / 48% 44% 56% 52%;
    transform: rotate(0deg) scale(1);
  }
  50% {
    border-radius: 54% 46% 42% 58% / 56% 52% 48% 44%;
    transform: rotate(8deg) scale(1.04);
  }
}

@keyframes cursorBlink {
  0%, 49% {
    border-right-color: var(--sky-primary);
  }
  50%, 100% {
    border-right-color: transparent;
  }
}

/* Role 1: "Flutter Developer" (17ch) types in 0-18%, holds 18-36%, erases 36-48%, hidden 50-100% */
@keyframes typeRoleOne {
  0% {
    width: 0;
    opacity: 1;
  }
  18% {
    width: 17ch;
    opacity: 1;
  }
  36% {
    width: 17ch;
    opacity: 1;
  }
  48% {
    width: 0;
    opacity: 1;
  }
  50%, 100% {
    width: 0;
    opacity: 0;
  }
}

/* Role 2: "React Native Developer" (22ch) hidden 0-50%, types 50-68%, holds 68-86%, erases 86-98% */
@keyframes typeRoleTwo {
  0%, 49.9% {
    width: 0;
    opacity: 0;
  }
  50% {
    width: 0;
    opacity: 1;
  }
  68% {
    width: 22ch;
    opacity: 1;
  }
  86% {
    width: 22ch;
    opacity: 1;
  }
  98%, 100% {
    width: 0;
    opacity: 1;
  }
}

.anim-fade-up {
  animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.anim-delay-1 { animation-delay: 0.08s; }
.anim-delay-2 { animation-delay: 0.16s; }
.anim-delay-3 { animation-delay: 0.24s; }
.anim-delay-4 { animation-delay: 0.32s; }
.anim-delay-5 { animation-delay: 0.4s; }

.anim-float {
  animation: floatSlow 5s ease-in-out infinite;
}

/* Badges & Section Headers */
.section-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-soft);
  color: var(--sky-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 12px;
}

.section-soft .section-badge {
  background-color: #ffffff;
  border: 1px solid #bae6fd;
}

.section-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  line-height: 1.2;
  color: var(--navy-heading);
  font-weight: 800;
}

.section-subtitle {
  margin: 0 auto;
  max-width: 620px;
  color: var(--slate-body);
}

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

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.link-arrow {
  color: var(--sky-primary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.link-arrow:hover {
  color: var(--sky-hover);
  transform: translateX(3px);
}

.body-copy {
  margin: 0 0 16px;
  color: var(--slate-body);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.btn-sm {
  padding: 9px 18px;
  font-size: 0.875rem;
}

.btn-primary {
  background-color: var(--sky-primary);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.25);
}

.btn-primary:hover {
  background-color: var(--sky-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.34);
}

.btn-outline {
  background-color: #ffffff;
  color: var(--navy-heading);
  border-color: var(--border-light);
}

.btn-outline:hover {
  border-color: var(--sky-primary);
  color: var(--sky-primary);
  transform: translateY(-2px);
}

.btn-soft {
  background-color: var(--bg-soft);
  color: var(--sky-primary);
}

.btn-soft:hover {
  background-color: #bae6fd;
  transform: translateY(-2px);
}

/* ==========================================================================
   Header & Pure-CSS Mobile Menu
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--navy-heading);
}

.brand-icon {
  color: var(--sky-primary);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--slate-body);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--sky-primary);
  border-bottom-color: var(--sky-primary);
}

/* Pure-CSS Scroll-Spy Indicator (No JS — Chrome/Edge CSS View Timelines) */
@keyframes navScrollSpy {
  0%, 18%, 82%, 100% {
    color: var(--slate-body);
    border-bottom-color: transparent;
  }
  28%, 72% {
    color: var(--sky-primary);
    border-bottom-color: var(--sky-primary);
  }
}

@supports (timeline-scope: --sec-home) and (animation-timeline: view()) {
  html {
    timeline-scope: --sec-home, --sec-about, --sec-projects, --sec-skills, --sec-experience, --sec-blog, --sec-contact;
  }

  #home { view-timeline-name: --sec-home; view-timeline-axis: block; }
  #about { view-timeline-name: --sec-about; view-timeline-axis: block; }
  #projects { view-timeline-name: --sec-projects; view-timeline-axis: block; }
  #skills { view-timeline-name: --sec-skills; view-timeline-axis: block; }
  #experience { view-timeline-name: --sec-experience; view-timeline-axis: block; }
  #blog { view-timeline-name: --sec-blog; view-timeline-axis: block; }
  #contact { view-timeline-name: --sec-contact; view-timeline-axis: block; }

  .nav-link.active {
    color: var(--slate-body);
    border-bottom-color: transparent;
  }

  .nav-link[href="#home"] { animation: navScrollSpy linear both; animation-timeline: --sec-home; }
  .nav-link[href="#about"] { animation: navScrollSpy linear both; animation-timeline: --sec-about; }
  .nav-link[href="#projects"] { animation: navScrollSpy linear both; animation-timeline: --sec-projects; }
  .nav-link[href="#skills"] { animation: navScrollSpy linear both; animation-timeline: --sec-skills; }
  .nav-link[href="#experience"] { animation: navScrollSpy linear both; animation-timeline: --sec-experience; }
  .nav-link[href="#blog"] { animation: navScrollSpy linear both; animation-timeline: --sec-blog; }
  .nav-link[href="#contact"] { animation: navScrollSpy linear both; animation-timeline: --sec-contact; }
}

.nav-toggle {
  display: none;
}

.nav-toggle-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: #ffffff;
  cursor: pointer;
}

.nav-toggle-btn span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--navy-heading);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ==========================================================================
   Hero Section & Typing Animation
   ========================================================================== */
.hero {
  padding: 72px 0 88px;
  background: radial-gradient(circle at 85% 20%, rgba(56, 189, 248, 0.16), transparent 45%),
              radial-gradient(circle at 10% 80%, rgba(224, 242, 254, 0.75), transparent 40%),
              #ffffff;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  align-items: center;
  gap: 48px;
}

.availability-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-soft-alt);
  border: 1px solid #bae6fd;
  color: var(--sky-primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--sky-primary);
  animation: pulseRing 2s infinite;
}

.hero-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 4.4vw, 3.2rem);
  line-height: 1.12;
  color: var(--navy-heading);
  font-weight: 800;
}

.hero-role-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  min-height: 40px;
}

.role-prefix {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 700;
  color: var(--navy-heading);
}

.typing-role-wrap {
  position: relative;
  display: inline-grid;
  align-items: center;
  min-width: 24ch;
  height: 1.5em;
  font-family: "Consolas", "Courier New", monospace;
  font-size: clamp(1.1rem, 2.2vw, 1.42rem);
  font-weight: 700;
  color: var(--sky-primary);
}

.typing-role {
  grid-area: 1 / 1;
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--sky-primary);
  width: 0;
}

.typing-role-1 {
  animation: typeRoleOne 8s steps(17, end) infinite, cursorBlink 0.7s step-end infinite;
}

.typing-role-2 {
  animation: typeRoleTwo 8s steps(22, end) infinite, cursorBlink 0.7s step-end infinite;
}

.hero-description {
  margin: 0 0 28px;
  max-width: 540px;
  font-size: 1.05rem;
  color: var(--slate-body);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.social-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--navy-heading);
  font-size: 0.78rem;
  font-weight: 700;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.social-icon:hover {
  background-color: var(--sky-primary);
  border-color: var(--sky-primary);
  color: #ffffff;
  transform: translateY(-3px);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.hero-blob {
  position: absolute;
  width: 340px;
  height: 340px;
  background: linear-gradient(135deg, #bae6fd 0%, #38bdf8 100%);
  opacity: 0.36;
  z-index: 0;
  animation: blobMorph 9s ease-in-out infinite;
}

.hero-dots {
  position: absolute;
  left: 14px;
  bottom: 22px;
  width: 96px;
  height: 96px;
  background-image: radial-gradient(var(--sky-accent) 2px, transparent 2px);
  background-size: 14px 14px;
  opacity: 0.55;
  z-index: 0;
}

.hero-photo-frame {
  position: relative;
  z-index: 1;
  width: min(350px, 100%);
  aspect-ratio: 4 / 4.4;
  border-radius: var(--radius-lg);
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 16px;
}

.hero-floating-chip {
  position: absolute;
  bottom: -14px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background-color: #ffffff;
  border: 1px solid #bae6fd;
  box-shadow: var(--shadow-md);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy-heading);
}

.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
}

/* ==========================================================================
   About Me Section
   ========================================================================== */
.about-card {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 40px;
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 26px;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  color: var(--navy-heading);
}

.check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--bg-soft);
  color: var(--sky-primary);
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.about-photo-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.about-photo-bg {
  position: absolute;
  inset: 14px -10px -12px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--bg-soft), #bae6fd);
  z-index: 0;
}

.about-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 310px;
  aspect-ratio: 1 / 1.05;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-md);
  border: 3px solid #ffffff;
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Projects Section (Real UI Showcase Images)
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: #7dd3fc;
}

.project-cover-img {
  position: relative;
  height: 215px;
  padding: 12px 12px 0;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
}

.project-cover-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  filter: saturate(1.25) contrast(1.04);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), filter 0.3s ease;
}

.project-card:hover .project-cover-img img {
  transform: scale(1.06);
  filter: saturate(1.35) contrast(1.06);
}

/* Vibrant per-project color themes (cards, badges, tags & links) */
.theme-astro .project-cover-img { background: linear-gradient(135deg, #6366f1 0%, #a855f7 55%, #f59e0b 100%); }
.theme-astro .project-featured-badge,
.theme-astro .project-link { color: #7c3aed; }
.theme-astro .tag { background-color: #f5f3ff; border-color: #ddd6fe; color: #7c3aed; }

.theme-hospital .project-cover-img { background: linear-gradient(135deg, #0ea5e9 0%, #14b8a6 60%, #34d399 100%); }
.theme-hospital .project-featured-badge,
.theme-hospital .project-link { color: #0d9488; }
.theme-hospital .tag { background-color: #f0fdfa; border-color: #99f6e4; color: #0d9488; }

.theme-gym .project-cover-img { background: linear-gradient(135deg, #f97316 0%, #ef4444 55%, #8b5cf6 100%); }
.theme-gym .project-featured-badge,
.theme-gym .project-link { color: #ea580c; }
.theme-gym .tag { background-color: #fff7ed; border-color: #fed7aa; color: #ea580c; }

.theme-laundry .project-cover-img { background: linear-gradient(135deg, #06b6d4 0%, #38bdf8 55%, #818cf8 100%); }
.theme-laundry .project-featured-badge,
.theme-laundry .project-link { color: #0284c7; }
.theme-laundry .tag { background-color: #ecfeff; border-color: #a5f3fc; color: #0891b2; }

.theme-news .project-cover-img { background: linear-gradient(135deg, #ef4444 0%, #f59e0b 55%, #3b82f6 100%); }
.theme-news .project-featured-badge,
.theme-news .project-link { color: #dc2626; }
.theme-news .tag { background-color: #fef2f2; border-color: #fecaca; color: #dc2626; }

.theme-study .project-cover-img { background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 55%, #f59e0b 100%); }
.theme-study .project-featured-badge,
.theme-study .project-link { color: #9333ea; }
.theme-study .tag { background-color: #fdf4ff; border-color: #f5d0fe; color: #a21caf; }

.theme-doctools .project-cover-img { background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 55%, #14b8a6 100%); }
.theme-doctools .project-featured-badge,
.theme-doctools .project-link { color: #2563eb; }
.theme-doctools .tag { background-color: #eff6ff; border-color: #bfdbfe; color: #2563eb; }

.theme-tris .project-cover-img { background: linear-gradient(135deg, #059669 0%, #10b981 55%, #06b6d4 100%); }
.theme-tris .project-featured-badge,
.theme-tris .project-link { color: #059669; }
.theme-tris .tag { background-color: #ecfdf5; border-color: #a7f3d0; color: #059669; }

.theme-deepkart .project-cover-img { background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 55%, #3b82f6 100%); }
.theme-deepkart .project-featured-badge,
.theme-deepkart .project-link { color: #db2777; }
.theme-deepkart .tag { background-color: #fdf2f8; border-color: #fbcfe8; color: #db2777; }

.project-featured-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background-color: rgba(255, 255, 255, 0.94);
  color: var(--sky-primary);
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.project-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px;
  background-color: #ffffff;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--slate-muted);
  margin-bottom: 8px;
}

.project-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: var(--navy-heading);
}

.project-summary {
  margin: 0 0 16px;
  font-size: 0.92rem;
  color: var(--slate-body);
  flex: 1;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tag {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-soft-alt);
  border: 1px solid #bae6fd;
  color: var(--sky-primary);
  font-size: 0.76rem;
  font-weight: 600;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--sky-primary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.project-link:hover {
  color: var(--sky-hover);
  transform: translateX(3px);
}

.published-strip {
  margin-top: 38px;
  padding: 24px 28px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--bg-soft-alt) 0%, #ffffff 100%);
  border: 1px solid #bae6fd;
}

.published-strip-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.published-strip-head .section-badge {
  margin-bottom: 0;
}

.published-strip-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--navy-heading);
}

.published-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.published-pill {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  font-size: 0.88rem;
  color: var(--slate-body);
}

.published-pill strong {
  color: var(--navy-heading);
}

/* ==========================================================================
   Skills Section
   ========================================================================== */
.skills-categories {
  display: grid;
  gap: 28px;
}

.skill-group {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.skill-group-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--navy-heading);
}

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

.skill-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 14px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--navy-heading);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.skill-tile:hover {
  transform: translateY(-4px);
  border-color: var(--sky-accent);
  box-shadow: var(--shadow-md);
}

.skill-logo-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease;
}

.skill-tile:hover .skill-logo-box {
  transform: scale(1.08);
}

.logo-flutter,
.logo-dart,
.logo-api { background-color: #f0f9ff; border-color: #bae6fd; }
.logo-rn { background-color: #ecfeff; border-color: #a5f3fc; }
.logo-provider { background-color: #eef2ff; border-color: #c7d2fe; }
.logo-firebase { background-color: #fffbeb; border-color: #fde68a; }
.logo-sqlite { background-color: #f0fdfa; border-color: #99f6e4; }
.logo-arch { background-color: #f5f3ff; border-color: #ddd6fe; }
.logo-python { background-color: #eff6ff; border-color: #bfdbfe; }
.logo-html { background-color: #fff7ed; border-color: #fed7aa; }
.logo-git { background-color: #f1f5f9; border-color: #cbd5e1; }
.logo-playstore { background-color: #ecfdf5; border-color: #a7f3d0; }

/* ==========================================================================
   Experience Section
   ========================================================================== */
.experience-card {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: center;
  gap: 40px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.timeline {
  position: relative;
  padding-left: 26px;
  margin-top: 24px;
  display: grid;
  gap: 24px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background-color: #bae6fd;
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -26px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--sky-primary);
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 2px #bae6fd;
}

.timeline-company {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--navy-heading);
}

.timeline-role {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--sky-primary);
}

.timeline-role span {
  color: var(--slate-muted);
  font-weight: 500;
}

.timeline-desc {
  margin: 0;
  font-size: 0.94rem;
  color: var(--slate-body);
}

.experience-visual {
  display: flex;
  justify-content: center;
}

.trophy-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, var(--bg-soft) 100%);
  border: 1px solid #bae6fd;
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Blog Section
   ========================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: #7dd3fc;
}

.blog-cover {
  position: relative;
  height: 176px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 18px;
  color: #ffffff;
}

.blog-cover-flutter {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 55%, #7c3aed 100%);
}

.blog-cover-rn {
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 55%, #8b5cf6 100%);
}

.blog-cover-api {
  background: linear-gradient(135deg, #f97316 0%, #ec4899 55%, #8b5cf6 100%);
}

.blog-cover-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.blog-category-pill {
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background-color: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
}

.blog-read-time {
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.blog-cover-center {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.blog-cover-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  flex-shrink: 0;
}

.blog-cover-label {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.blog-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px;
}

.blog-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.12rem;
  line-height: 1.35;
  color: var(--navy-heading);
}

.blog-excerpt {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: var(--slate-body);
  flex: 1;
}

.blog-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.blog-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.blog-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid #bae6fd;
}

.blog-author-name {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy-heading);
  line-height: 1.2;
}

.blog-date {
  display: block;
  font-size: 0.76rem;
  color: var(--slate-muted);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  background: linear-gradient(135deg, #ffffff 0%, var(--bg-soft-alt) 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.contact-details {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.contact-details li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  color: var(--navy-heading);
}

.contact-details a:hover {
  color: var(--sky-primary);
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background-color: var(--bg-soft);
  color: var(--sky-primary);
  flex-shrink: 0;
}

.contact-form {
  display: grid;
  gap: 16px;
  background-color: #ffffff;
  padding: 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: grid;
  gap: 6px;
}

.form-group label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--navy-heading);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background-color: var(--bg-card);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--navy-heading);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--sky-primary);
  background-color: #ffffff;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  position: relative;
  background: radial-gradient(circle at 85% 15%, rgba(14, 165, 233, 0.16), transparent 40%),
              linear-gradient(180deg, #0f172a 0%, #090f1d 100%);
  color: #cbd5e1;
  padding: 64px 0 28px;
  border-top: 4px solid transparent;
  border-image: linear-gradient(90deg, #0ea5e9, #38bdf8, #8b5cf6, #ec4899) 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.14);
}

.brand-light {
  color: #ffffff;
}

.footer-tagline {
  margin: 12px 0 20px;
  font-size: 0.94rem;
  color: #94a3b8;
  max-width: 320px;
}

.social-row-dark .social-icon {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.social-row-dark .social-icon:hover {
  background-color: var(--sky-primary);
  border-color: var(--sky-primary);
}

.footer-links h3,
.footer-connect h3 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: #ffffff;
}

.footer-links ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  gap: 10px 24px;
}

.footer-links a {
  font-size: 0.92rem;
  color: #cbd5e1;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.footer-links a:hover {
  color: var(--sky-accent);
  transform: translateX(3px);
}

.footer-connect-text {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: #94a3b8;
}

.footer-contact-mini {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.footer-contact-mini a {
  color: #e2e8f0;
  transition: color 0.2s ease;
}

.footer-contact-mini a:hover {
  color: var(--sky-accent);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  font-size: 0.88rem;
  color: #94a3b8;
  flex-wrap: wrap;
}

.footer-bottom p {
  margin: 0;
}

.footer-made {
  color: #cbd5e1;
}

.back-to-top {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background-color: rgba(56, 189, 248, 0.14);
  color: var(--sky-accent);
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.back-to-top:hover {
  background-color: var(--sky-primary);
  color: #ffffff;
}

@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ==========================================================================
   Pure CSS :target Modals
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.modal:target {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  position: relative;
  width: min(560px, 100%);
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s ease;
}

.modal:target .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--bg-card);
  color: var(--navy-heading);
  font-size: 1.4rem;
  line-height: 1;
}

.modal-close:hover {
  background-color: var(--bg-soft);
  color: var(--sky-primary);
}

.modal-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--navy-heading);
}

.modal-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

/* ==========================================================================
   CV Page Styles (cv.html)
   ========================================================================== */
.cv-page-body {
  background-color: var(--bg-soft-alt);
}

.cv-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cv-wrapper {
  width: min(900px, 94%);
  margin: 36px auto 64px;
}

.cv-sheet {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow-md);
}

.cv-top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--bg-soft);
  flex-wrap: wrap;
}

.cv-name {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--navy-heading);
}

.cv-role {
  margin: 0;
  font-weight: 700;
  color: var(--sky-primary);
}

.cv-contact-list {
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
}

.cv-contact-list a {
  color: var(--sky-primary);
}

.cv-section {
  margin-top: 26px;
}

.cv-heading {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--navy-heading);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

.cv-skills-list p {
  margin: 0 0 6px;
  font-size: 0.94rem;
}

.cv-entry {
  margin-bottom: 18px;
}

.cv-entry-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.cv-entry-head h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--navy-heading);
}

.cv-org {
  margin: 2px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sky-primary);
}

.cv-date {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-muted);
}

.cv-bullets {
  padding-left: 18px;
  list-style: disc;
  display: grid;
  gap: 6px;
  font-size: 0.94rem;
}

.cv-two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.cv-mini-card {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
}

.cv-mini-card h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  color: var(--navy-heading);
}

.cv-mini-card p {
  margin: 0;
  font-size: 0.88rem;
}

.cv-print-tip {
  margin: 28px 0 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-soft);
  color: var(--navy-heading);
  font-size: 0.9rem;
}

@media print {
  .cv-no-print {
    display: none !important;
  }
  .cv-page-body {
    background: #ffffff;
  }
  .cv-wrapper {
    width: 100%;
    margin: 0;
  }
  .cv-sheet {
    border: none;
    box-shadow: none;
    padding: 0;
  }
}

/* ==========================================================================
   Responsive Breakpoints (Tablet & Mobile)
   ========================================================================== */
@media (max-width: 960px) {
  .hero-grid,
  .about-card,
  .experience-card,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .projects-grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-toggle-btn {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 20px 4%;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    display: none;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .nav-toggle:checked ~ .site-nav {
    display: flex;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 60px 0;
  }

  .projects-grid,
  .blog-grid,
  .form-row,
  .cv-two-col {
    grid-template-columns: 1fr;
  }

  .about-card,
  .experience-card,
  .contact-card,
  .cv-sheet {
    padding: 24px;
  }

  .contact-form {
    padding: 20px;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

/* ==========================================================================
   Scroll-Reveal Flow & Interactive Micro-Animations (Pure CSS, Zero JS)
   ========================================================================== */
.brand-icon svg {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand:hover .brand-icon svg {
  transform: rotate(90deg) scale(1.08);
}

.published-pill {
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.published-pill:hover {
  transform: translateY(-3px);
  border-color: var(--sky-accent);
  box-shadow: var(--shadow-sm);
}

.timeline-dot {
  animation: pulseRing 2.6s infinite;
}

.timeline-item {
  transition: transform 0.22s ease;
}

.timeline-item:hover {
  transform: translateX(4px);
}

@keyframes scrollRevealCard {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@supports (animation-timeline: view()) {
  .about-card,
  .project-card,
  .published-strip,
  .skill-group,
  .experience-card,
  .blog-card,
  .contact-card {
    animation-name: scrollRevealCard;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    animation-fill-mode: both;
    animation-timeline: view();
    animation-range: entry 0% cover 24%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-curtain {
    display: none !important;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Pure-CSS Cinematic Split Curtain Intro
   ========================================================================== */
.intro-curtain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
  animation: curtainContainerHide 0.1s ease 1.65s forwards;
}

.curtain-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.03) 0px,
      rgba(255, 255, 255, 0.03) 18px,
      rgba(0, 0, 0, 0.16) 36px
    ),
    linear-gradient(180deg, #0f172a 0%, #0b2545 55%, #075985 100%);
  box-shadow: 0 0 40px rgba(14, 165, 233, 0.25);
}

.curtain-left {
  left: 0;
  border-right: 2px solid rgba(56, 189, 248, 0.45);
  animation: curtainOpenLeft 1.15s cubic-bezier(0.77, 0, 0.175, 1) 0.45s forwards;
}

.curtain-right {
  right: 0;
  border-left: 2px solid rgba(56, 189, 248, 0.45);
  animation: curtainOpenRight 1.15s cubic-bezier(0.77, 0, 0.175, 1) 0.45s forwards;
}

/* Golden Curtain Tie-Back Ropes ("Rassi") */
.curtain-rope {
  position: absolute;
  top: 52%;
  width: 78px;
  height: 22px;
  border-radius: 0 0 40px 40px;
  border-bottom: 6px solid #f59e0b;
  box-shadow: 0 3px 0 #b45309, 0 6px 12px rgba(0, 0, 0, 0.35);
}

.curtain-rope-left {
  right: 12px;
  transform: rotate(-18deg);
}

.curtain-rope-right {
  left: 12px;
  transform: rotate(18deg);
}

.curtain-tassel {
  position: absolute;
  bottom: -24px;
  width: 14px;
  height: 24px;
  border-radius: 4px 4px 8px 8px;
  background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);
}

.curtain-rope-left .curtain-tassel {
  left: 6px;
}

.curtain-rope-right .curtain-tassel {
  right: 6px;
}

.curtain-center-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.92);
  border: 1.5px solid rgba(56, 189, 248, 0.6);
  box-shadow: 0 18px 45px rgba(14, 165, 233, 0.35);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  white-space: nowrap;
  animation: curtainBadgeFade 0.55s ease 0.35s forwards;
}

@keyframes curtainOpenLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-105%);
  }
}

@keyframes curtainOpenRight {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(105%);
  }
}

@keyframes curtainBadgeFade {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.12);
  }
}

@keyframes curtainContainerHide {
  to {
    visibility: hidden;
    display: none;
  }
}
