/* ═══════════════════════════════════════════════════════════════
   MUHAMMAD SHAFEEQ – PORTFOLIO CSS
   Design: Light theme, sage & teal accent palette
═══════════════════════════════════════════════════════════════ */

/* ─── DESIGN TOKENS ─────────────────────────────────────────── */
/* Theme: "Sage & Teal" — a calm, natural palette in place of the
   usual dev-portfolio blue/violet. Teal anchors it as the darkest,
   most "engineered" tone; sage and lime step down into highlights;
   cream is the background tint. Darkened slightly from the raw hex
   codes only where used as small text, for AA-safe contrast. */
:root {
  --bg-primary: #fbfdf7;
  --bg-secondary: #f2f7e6;
  --bg-card: rgba(31,41,33,0.035);
  --bg-card-hover: rgba(31,41,33,0.06);
  --border: rgba(31,41,33,0.09);
  --border-hover: rgba(53,133,142,0.45);

  --accent-cyan: #2b6b72;
  --accent-violet: #4f7a63;
  --accent-pink: #7c9a52;
  --accent-emerald: #3f7a6d;
  --accent-amber: #8ea866;

  --text-primary: #1f2d27;
  --text-secondary: #4b5d54;
  --text-muted: #7c8d83;

  --gradient-main: linear-gradient(135deg, #35858E 0%, #7DA78C 55%, #C2D099 100%);
  --gradient-card: linear-gradient(145deg, rgba(53,133,142,0.07) 0%, rgba(125,167,140,0.07) 100%);
  --gradient-bolt: linear-gradient(135deg, #C2D099 0%, #7c9a52 100%);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-glow: 0 0 40px rgba(53,133,142,0.14);
  --shadow-card: 0 8px 32px rgba(31,41,33,0.08);

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  --spot-x: 50%;
  --spot-y: 50%;
}

/* Film grain, keeps the deep background from feeling flat/plasticky */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scroll progress — a compile bar for the page itself */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--gradient-main);
  box-shadow: 0 0 12px rgba(43, 107, 114,0.6);
  z-index: 2000;
  transition: width 0.1s linear;
}

/* Custom cursor: a hot-reload bolt trailing a soft ring */
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 32px; height: 32px;
  border: 1.5px solid rgba(43, 107, 114, 0.55);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, opacity 0.2s ease;
}
.cursor-ring.hovering {
  width: 52px; height: 52px;
  border-color: var(--accent-amber);
  background: rgba(142, 168, 102,0.08);
}
.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 5px; height: 5px;
  background: var(--accent-cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px rgba(43, 107, 114,0.9);
}
@media (hover: none), (pointer: coarse) {
  .cursor-ring, .cursor-dot { display: none; }
}

/* Spotlight glass cards — a cursor-tracked glow, like a torch over a widget tree */
.glass-card {
  position: relative;
  isolation: isolate;
}
.glass-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(320px circle at var(--spot-x) var(--spot-y), rgba(43, 107, 114,0.55), rgba(79, 122, 99,0.25) 40%, transparent 65%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}
.glass-card:hover::after { opacity: 1; }
.glass-card > * { position: relative; z-index: 0; }

/* ─── RESET & BASE ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

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

::selection {
  background: rgba(43, 107, 114, 0.3);
  color: #fff;
}

/* ─── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--accent-cyan), var(--accent-violet));
  border-radius: 3px;
}

/* ─── UTILITIES ──────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow), var(--shadow-card);
}

.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--gradient-main);
  border-radius: 1px;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 60px;
  letter-spacing: -0.02em;
}

/* ─── REVEAL ANIMATIONS ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* ─── NAVBAR ─────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.nav-logo .dot { color: var(--accent-cyan); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-main);
  border-radius: 1px;
  transform: scaleX(0);
  transition: var(--transition);
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { transform: scaleX(1); }

.btn-hire {
  padding: 8px 22px;
  border-radius: 50px;
  background: var(--gradient-main);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(43, 107, 114, 0.3);
}

.btn-hire:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(43, 107, 114, 0.45);
}

.btn-cv {
  padding: 8px 18px;
  border-radius: 50px;
  background: transparent;
  border: 1px solid rgba(43, 107, 114,0.4);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-cyan);
  white-space: nowrap;
  transition: var(--transition);
  margin-right: 4px;
}

.btn-cv:hover {
  background: rgba(43, 107, 114,0.1);
  transform: translateY(-2px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: var(--transition);
}

/* ─── SCROLL HINT ────────────────────────────────────────────── */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  animation: fadeSlideDown 1s ease 1s both;
  z-index: 1;
}

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

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(5px); }
}

/* ─── ABOUT ──────────────────────────────────────────────────── */
.about-section { background: var(--bg-secondary); }

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.about-card {
  padding: 28px;
  position: relative;
}

.about-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}

.about-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.about-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.about-card p strong { color: var(--accent-cyan); }

/* ─── SKILLS ─────────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

.skill-category {
  padding: 28px;
}

.skill-cat-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.skill-category h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.skill-tag {
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(31, 41, 33,0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
}

.skill-tag.primary {
  background: rgba(43, 107, 114, 0.1);
  border-color: rgba(43, 107, 114, 0.25);
  color: var(--accent-cyan);
}

.skill-tag:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.skill-bar-row {
  display: grid;
  grid-template-columns: 80px 1fr 36px;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.skill-bar {
  height: 6px;
  background: rgba(31, 41, 33,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: var(--gradient-main);
  border-radius: 3px;
  width: 0;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.pct { color: var(--accent-cyan); font-weight: 600; font-size: 0.75rem; }

/* ─── EXPERIENCE ─────────────────────────────────────────────── */
.experience-section { background: var(--bg-secondary); }

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-violet));
  opacity: 0.3;
}

.timeline-item {
  position: relative;
  padding-left: 56px;
  margin-bottom: 32px;
}

.timeline-dot {
  position: absolute;
  left: 8px;
  top: 28px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--text-muted);
  z-index: 1;
}

.timeline-dot.active {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(43, 107, 114, 0.5);
  background: var(--accent-cyan);
}

.timeline-card {
  padding: 28px;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 16px;
}

.exp-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.exp-company {
  color: var(--accent-cyan);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 2px;
}

.exp-badge {
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(31, 41, 33,0.06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.exp-badge.current {
  background: rgba(63, 122, 109, 0.1);
  border-color: rgba(63, 122, 109, 0.3);
  color: var(--accent-emerald);
}

.exp-period {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-family: 'JetBrains Mono', monospace;
}

.exp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.exp-list li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}

.exp-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
}

.exp-list li strong { color: var(--text-primary); }

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.exp-tags span {
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(79, 122, 99, 0.1);
  border: 1px solid rgba(79, 122, 99, 0.2);
  color: var(--accent-violet);
}

/* ─── ACHIEVEMENTS ───────────────────────────────────────────── */
.achievements-section { background: var(--bg-secondary); }

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.achievement-card {
  padding: 32px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.achievement-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-card);
  border-radius: inherit;
  opacity: 0;
  transition: var(--transition);
}

.achievement-card:hover::before { opacity: 1; }

.achievement-number {
  font-size: 2.8rem;
  font-weight: 900;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
  position: relative;
}

.achievement-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 12px;
  position: relative;
}

.achievement-icon {
  font-size: 1.5rem;
  position: relative;
}

/* ─── CERTIFICATIONS ─────────────────────────────────────────── */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.cert-card {
  padding: 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cert-icon { font-size: 2.5rem; }

.cert-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.cert-org {
  font-size: 0.82rem;
  color: var(--accent-cyan);
  font-weight: 500;
}

.cert-period {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* ─── CONTACT LAYOUT & FORM ─────────────────────────── */
.contact-section { background: var(--bg-secondary); }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.contact-card {
  padding: 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.contact-intro {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin-bottom: 40px;
  line-height: 1.8;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 28px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cinfo-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  color: inherit;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}

.cinfo-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateX(4px);
  box-shadow: var(--shadow-glow);
}

.cinfo-icon { font-size: 1.4rem; flex-shrink: 0; }

.cinfo-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.cinfo-value {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  word-break: break-word;
}

.cinfo-cv {
  background: rgba(43, 107, 114,0.06);
  border-color: rgba(43, 107, 114,0.2);
}

.cinfo-cv .cinfo-label { color: var(--accent-cyan); }
.cinfo-cv .cinfo-value { color: var(--accent-cyan); font-weight: 700; }

.contact-form-wrap { padding: 36px; }

.form-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.form-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

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

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}

.form-group input,
.form-group textarea {
  background: rgba(31, 41, 33,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
  width: 100%;
  resize: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-cyan);
  background: rgba(43, 107, 114,0.05);
  box-shadow: 0 0 0 3px rgba(43, 107, 114,0.12);
}

.btn-submit {
  width: 100%;
  border: none;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px;
  border-radius: 50px;
}

.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; }

.form-success {
  background: rgba(63, 122, 109, 0.1);
  border: 1px solid rgba(63, 122, 109, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--accent-emerald);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
}

.form-error {
  background: rgba(124, 154, 82, 0.1);
  border: 1px solid rgba(124, 154, 82, 0.3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--accent-pink);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
}

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

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

.footer-logo {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.footer-logo .dot { color: var(--accent-cyan); }

.footer-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-content p strong { color: var(--text-secondary); }

.footer-year { font-family: 'JetBrains Mono', monospace; }

.footer-socials {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.footer-socials a {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  padding: 6px 12px;
  border-radius: 50px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.footer-socials a:hover {
  color: var(--accent-cyan);
  border-color: rgba(43, 107, 114, 0.3);
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 100px 0 60px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: float 8s ease-in-out infinite;
}
.orb1 { width: 600px; height: 600px; background: radial-gradient(circle, #2b6b72, transparent); top: -200px; left: -200px; }
.orb2 { width: 500px; height: 500px; background: radial-gradient(circle, #4f7a63, transparent); top: 50%; right: -150px; animation-delay: 3s; }
.orb3 { width: 400px; height: 400px; background: radial-gradient(circle, #7c9a52, transparent); bottom: -150px; left: 40%; animation-delay: 6s; }
.orb4 { width: 280px; height: 280px; background: radial-gradient(circle, #8ea866, transparent); top: 18%; left: 55%; opacity: 0.1; animation-delay: 1.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

/* Constellation canvas — nodes ping like hot-reloaded widgets rebuilding */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(31, 41, 33,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(31, 41, 33,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

/* KEY FIX: hero uses flex, content and photo are direct flex children */
.hero-content {
  max-width: 640px;
  padding-left: 24px;
  padding-right: 40px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-left: calc((100vw - 1200px) / 2);
  margin-left: max(0px, calc((100vw - 1200px) / 2));
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 50px;
  background: rgba(63, 122, 109, 0.1);
  border: 1px solid rgba(63, 122, 109, 0.25);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-emerald);
  margin-bottom: 24px;
}

.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(63, 122, 109, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(63, 122, 109, 0); }
}

.hero-name {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
}

.hero-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.role-tag {
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.role-tag.flutter { background: rgba(43, 107, 114,0.15); border: 1px solid rgba(43, 107, 114,0.3); color: var(--accent-cyan); }
.role-tag.mobile  { background: rgba(79, 122, 99,0.15); border: 1px solid rgba(79, 122, 99,0.3); color: var(--accent-violet); }
.role-tag.cross   { background: rgba(124, 154, 82,0.15); border: 1px solid rgba(124, 154, 82,0.3); color: var(--accent-pink); }

.hero-desc { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 32px; line-height: 1.8; }
.hero-desc strong { color: var(--text-primary); }

.hero-stats { display: flex; align-items: center; gap: 24px; margin-bottom: 36px; }
.stat { text-align: center; }
.stat-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; font-weight: 500; }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

.hero-cta { display: flex; gap: 16px; margin-bottom: 36px; }

.btn-primary {
  padding: 14px 32px;
  border-radius: 50px;
  background: var(--gradient-main);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(43, 107, 114,0.3);
  display: inline-block;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 35px rgba(43, 107, 114,0.5); }

/* Hot-reload bolt that flicks onto the primary CTA on hover */
.btn-primary { position: relative; overflow: visible; }
.btn-primary::after {
  content: '⚡';
  position: absolute;
  right: -6px; top: -10px;
  font-size: 0.85rem;
  opacity: 0;
  transform: scale(0.5) rotate(-20deg);
  transition: var(--transition);
  filter: drop-shadow(0 0 6px rgba(142,168,102,0.8));
}
.btn-primary:hover::after { opacity: 1; transform: scale(1) rotate(0deg) translateY(-4px); }

/* Magnetic targets — JS nudges these toward the cursor within range */
.magnetic { will-change: transform; }

/* Tilt targets — JS applies perspective rotation on mousemove */
.tilt-card { transform-style: preserve-3d; will-change: transform; }

.btn-secondary {
  padding: 14px 32px;
  border-radius: 50px;
  background: transparent;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: var(--transition);
  display: inline-block;
}
.btn-secondary:hover { border-color: var(--border-hover); background: rgba(43, 107, 114,0.06); transform: translateY(-3px); }

.hero-socials { display: flex; gap: 12px; }
.social-link {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
}
.social-link svg { width: 18px; height: 18px; }
.social-link:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); background: rgba(43, 107, 114,0.1); transform: translateY(-2px); }

/* ── HERO PHOTO: positioned as flex child, not absolute ── */
.hero-photo-wrap {
  position: relative;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: max(24px, calc((100vw - 1200px) / 2 + 24px));
  z-index: 1;
}

.hero-photo-ring {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  padding: 4px;
  background: var(--gradient-main);
  box-shadow: 0 0 60px rgba(43, 107, 114,0.25), 0 0 120px rgba(79, 122, 99,0.12), 0 30px 60px rgba(31, 41, 33,0.18);
  animation: photoBob 5s ease-in-out infinite;
  position: relative;
}

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

.hero-photo-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-secondary);
  border: 3px solid #ffffff;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(25%) contrast(1.05);
  transition: var(--transition);
}
.hero-photo-ring:hover .hero-photo { filter: grayscale(0%) contrast(1.05); }

/* badge and pill: absolute inside hero-photo-ring */
.hero-photo-badge {
  position: absolute;
  bottom: 20px;
  left: -20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 50px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(43, 107, 114,0.3);
  backdrop-filter: blur(12px);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-cyan);
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(31, 41, 33,0.12);
}

.flutter-badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  animation: pulse-dot 2s infinite;
}

.hero-photo-stat-pill {
  position: absolute;
  top: 30px;
  right: -30px;
  padding: 8px 14px;
  border-radius: 50px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(79, 122, 99,0.3);
  backdrop-filter: blur(12px);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-violet);
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(31, 41, 33,0.12);
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  z-index: 1;
}
.scroll-arrow {
  width: 20px; height: 20px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: scrollBounce 1.5s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(5px); }
}

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

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

.project-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
}
.project-card:hover { transform: translateY(-6px); }

.project-header {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  position: relative;
}
.project-icon { font-size: 3rem; filter: drop-shadow(0 4px 12px rgba(31, 41, 33,0.2)); }
.project-links { display: flex; gap: 8px; }
.proj-link {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(31, 41, 33,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: #fff;
}
.proj-link:hover { background: rgba(31, 41, 33,0.35); transform: scale(1.1); }
.proj-link svg { width: 16px; height: 16px; }

.project-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.project-body h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; color: var(--text-primary); }
.project-body p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; }

.project-highlights { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.project-highlights li { font-size: 0.82rem; color: var(--text-secondary); }

.project-tech { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.project-tech span {
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(31, 41, 33,0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ─── BLOGS SECTION ─────────────────────────────────────────── */
/* ── Blog section styles ── */
.blogs-intro {
  color: var(--text-secondary, #a0aec0);
  max-width: 560px;
  margin: 0 0 2.5rem 0;
  font-size: 1.05rem;
  line-height: 1.7;
}

.blogs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.8rem;
}

.blog-card {
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(31, 41, 33,0.14);
}

.blog-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-cover {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.blog-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-cover img {
  transform: scale(1.05);
}

.blog-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(102, 126, 234, 0.9);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.blog-body {
  padding: 1.4rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.blog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.blog-author {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary, #a0aec0);
}

.blog-author-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(102, 126, 234, 0.5);
}

.blog-date {
  font-size: 0.78rem;
  color: var(--text-secondary, #a0aec0);
  opacity: 0.8;
}

.blog-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-primary, #fff);
  margin: 0;
}

.blog-excerpt {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-secondary, #a0aec0);
  margin: 0;
  flex: 1;
}

.blog-read-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4f7a63;
  letter-spacing: 0.02em;
  margin-top: auto;
  transition: gap 0.2s;
}

.blog-card:hover .blog-read-more {
  text-decoration: underline;
}

.blogs-cta {
  text-align: center;
  margin-top: 2.5rem;
}

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

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hero-phone { display: none; }
  .hero-content {
    padding-left: 24px;
    margin-left: 0;
    max-width: 580px;
  }
  .hero-photo-wrap {
    margin-right: 24px;
  }
}

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

@media (max-width: 768px) {
  .section { padding: 70px 0; }
  .btn-cv { display: none; }
  .nav-links, .btn-hire { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 60px; left: 0; right: 0;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    gap: 20px;
  }
  .nav-links.open + .btn-hire { display: block; margin: 0 24px 24px; }
  .hamburger { display: flex; }
  .hero-name { font-size: 3rem; }
  .hero-stats { gap: 16px; }
  .stat-number { font-size: 1.4rem; }
  .hero-cta { flex-direction: column; }
  .btn-primary, .btn-secondary { text-align: center; }
  .hero-photo-wrap { display: none; }
  .about-grid,
  .skills-grid,
  .projects-grid,
  .achievements-grid,
  .certs-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section-title { font-size: 2rem; margin-bottom: 36px; }
  .timeline::before { display: none; }
  .timeline-item { padding-left: 0; }
  .timeline-dot { display: none; }
}

@media (max-width: 480px) {
  .hero { padding: 80px 0 40px; }
  .hero-name { font-size: 2.5rem; }
  .hero-roles { gap: 6px; }
  .role-tag { font-size: 0.72rem; }
  .contact-form-wrap { padding: 20px; }
}