/* =============================================
   BUKHTAWAR ALI — Personal Portfolio
   Apple-inspired · Dark Mode · Colour-blind Safe
   ============================================= */

/* ── Light theme (default) ── */
:root {
  --bg-primary:      #fbfbfd;
  --bg-secondary:    #f5f5f7;
  --bg-tertiary:     #e8e8ed;
  --bg-card:         #ffffff;
  --text-primary:    #1d1d1f;
  --text-secondary:  #6e6e73;
  --text-tertiary:   #a1a1a6;
  --accent:          #0055b3;    /* WCAG AAA on white — safe for deuteranopia & protanopia */
  --accent-hover:    #003d82;
  --accent-light:    #ddeeff;
  --accent-2:        #b35c00;    /* Amber — distinguishable from blue for all CVD types */
  --accent-2-light:  #fff0db;
  --border:          #c7c7cc;
  --border-light:    #e2e2e7;
  --white:           #ffffff;
  --shadow-sm:       0 2px 8px  rgba(0,0,0,.07);
  --shadow-md:       0 8px 24px rgba(0,0,0,.09);
  --shadow-lg:       0 20px 60px rgba(0,0,0,.11);
  --radius-sm:       10px;
  --radius-md:       18px;
  --radius-lg:       28px;
  --font-display:    'Inter', sans-serif;
  --font-body:       'Inter', sans-serif;
  --nav-height:      68px;
  --max-width:       1120px;
  --transition:      0.3s cubic-bezier(0.25,0.46,0.45,0.94);
}

/* ── Dark theme ── */
[data-theme="dark"] {
  --bg-primary:      #0f0f11;
  --bg-secondary:    #1a1a1e;
  --bg-tertiary:     #242428;
  --bg-card:         #1e1e22;
  --text-primary:    #f5f5f7;
  --text-secondary:  #a1a1a6;
  --text-tertiary:   #6e6e73;
  --accent:          #4da3ff;
  --accent-hover:    #73b8ff;
  --accent-light:    #0a2040;
  --accent-2:        #ffb347;
  --accent-2-light:  #2a1800;
  --border:          #3a3a3e;
  --border-light:    #2c2c30;
  --white:           #1e1e22;
  --shadow-sm:       0 2px 8px  rgba(0,0,0,.3);
  --shadow-md:       0 8px 24px rgba(0,0,0,.4);
  --shadow-lg:       0 20px 60px rgba(0,0,0,.5);
}

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

html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s ease, color 0.4s ease;
  font-feature-settings: 'cv02','cv03','cv04','cv11'; /* Inter optical tweaks */
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
img { display: block; max-width: 100%; }
ul { list-style: none; }

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

/* ── Utilities ── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
  display: flex; align-items: center; gap: 7px;
}
.section-label::before {
  content: ''; display: inline-block;
  width: 18px; height: 2px;
  background: var(--accent); border-radius: 2px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700; line-height: 1.15;
  color: var(--text-primary); margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.section-sub {
  font-size: 1.05rem; color: var(--text-secondary);
  max-width: 560px; line-height: 1.7;
}

/* ── Scroll reveal ── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Skip link ── */
.skip-link {
  position: absolute; top: -100%; left: 16px;
  background: var(--accent); color: #fff;
  padding: 10px 20px; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-weight: 700; font-size: 0.9rem; z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }


/* ============================================================
   NAVIGATION
   ============================================================ */
#navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height); z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}

#navbar.scrolled {
  background: rgba(251,251,253,.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 var(--border-light);
}
[data-theme="dark"] #navbar.scrolled { background: rgba(15,15,17,.88); }

.nav-inner {
  max-width: var(--max-width); margin: 0 auto;
  padding: 0 24px; height: 100%;
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
}

.nav-logo {
  font-family: var(--font-display); font-size: 0.95rem;
  font-weight: 700; color: var(--text-primary);
  letter-spacing: -0.02em; flex-shrink: 0;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex; gap: 2px; align-items: center;
  flex: 1; justify-content: center;
}

.nav-links a {
  font-size: 0.8rem; font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
  padding: 6px 10px; border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 5px;
  white-space: nowrap;
}
.nav-links a .nav-icon { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.65; transition: opacity var(--transition); }
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); background: var(--bg-secondary); }
.nav-links a:hover .nav-icon, .nav-links a.active .nav-icon { opacity: 1; }

.nav-cta {
  font-size: 0.8rem !important; font-weight: 700 !important;
  color: #fff !important; background: var(--accent) !important;
  padding: 8px 16px !important; border-radius: 980px !important;
}
.nav-cta:hover { background: var(--accent-hover) !important; color: #fff !important; transform: translateY(-1px) !important; }
.nav-cta .nav-icon { display: none !important; }

/* Right controls */
.nav-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Dark mode toggle */
.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card); color: var(--text-secondary);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: border-color var(--transition), transform var(--transition), color var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); transform: rotate(20deg); color: var(--accent); }
.theme-toggle svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sun  { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun  { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ── Compact translate button ── */
.lang-wrap {
  position: relative;
  flex-shrink: 0;
}

.lang-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
  flex-shrink: 0;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); transform: rotate(15deg); }
.lang-btn svg { width: 16px; height: 16px; }

.lang-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 160px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: fadeUp 0.2s ease;
}
.lang-dropdown[hidden] { display: none; }

.lang-option {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition), color var(--transition);
  width: 100%;
}
.lang-option:hover { background: var(--bg-secondary); color: var(--text-primary); }
.lang-option.active { color: var(--accent); font-weight: 700; background: var(--accent-light); }

/* Suppress Google's own UI entirely */
.goog-te-banner-frame, .goog-te-banner-frame.skiptranslate { display: none !important; }
body { top: 0 !important; }
.goog-te-gadget { font-size: 0 !important; }
.goog-te-gadget-simple { display: none !important; }
.goog-te-gadget-icon { display: none !important; }

/* Hamburger */
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; background: none; border: none; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ============================================================
   LINKEDIN BANNER
   ============================================================ */
#banner {
  margin-top: var(--nav-height);
  width: 100%; overflow: hidden;
  max-height: 220px;
}
#banner img {
  width: 100%; height: 220px;
  object-fit: cover; object-position: center 35%;
  display: block;
}


/* ============================================================
   HERO
   ============================================================ */
#hero {
  padding: 70px 0 96px;
  position: relative; overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 60% 30%, rgba(0,85,179,.09) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(179,92,0,.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-grid {
  display: grid; grid-template-columns: 1fr auto;
  gap: 72px; align-items: center; width: 100%;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
  opacity: 0; animation: fadeUp 0.8s 0.2s forwards;
}
.hero-eyebrow::before { content: ''; width: 24px; height: 2px; background: var(--accent); border-radius: 2px; }

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.2rem);
  font-weight: 800; line-height: 1.05;
  letter-spacing: -0.04em; color: var(--text-primary);
  margin-bottom: 14px;
  opacity: 0; animation: fadeUp 0.8s 0.3s forwards;
}

.hero-role {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  font-weight: 500; color: var(--text-secondary);
  margin-bottom: 22px; letter-spacing: -0.01em;
  opacity: 0; animation: fadeUp 0.8s 0.4s forwards;
}
.hero-role strong { color: var(--accent); font-weight: 700; }

.hero-summary {
  font-size: 1rem; color: var(--text-secondary);
  line-height: 1.78; max-width: 510px; margin-bottom: 34px;
  opacity: 0; animation: fadeUp 0.8s 0.5s forwards;
}

.hero-actions {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 44px;
  opacity: 0; animation: fadeUp 0.8s 0.6s forwards;
}

.btn-primary {
  font-family: var(--font-body); font-size: 0.88rem; font-weight: 700;
  color: #fff; background: var(--accent);
  padding: 12px 24px; border-radius: 980px; border: none; cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  display: inline-flex; align-items: center; gap: 7px;
  text-decoration: underline; text-decoration-color: transparent;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,85,179,.35); color: #fff; }

.btn-secondary {
  font-family: var(--font-body); font-size: 0.88rem; font-weight: 700;
  color: var(--accent); background: transparent;
  padding: 11px 24px; border-radius: 980px; border: 2px solid var(--border); cursor: pointer;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  display: inline-flex; align-items: center; gap: 7px;
}
.btn-secondary:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.hero-stats {
  display: flex; gap: 28px;
  opacity: 0; animation: fadeUp 0.8s 0.7s forwards;
}

.hero-stat {
  border-left: 3px solid var(--accent); /* shape cue */
  padding-left: 12px;
}
.hero-stat-num {
  font-family: var(--font-display); font-size: 1.9rem;
  font-weight: 800; color: var(--text-primary);
  line-height: 1; letter-spacing: -0.03em;
}
.hero-stat-label { font-size: 0.76rem; color: var(--text-secondary); margin-top: 3px; font-weight: 500; }

/* Photo */
/* ── Hero right column ── */
.hero-right {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Photo wrap ── */
.hero-photo-wrap {
  position: relative;
  width: 360px; height: 360px;
  flex-shrink: 0;
  opacity: 0;
  animation: fadeIn 1s 0.4s forwards;
}

/* ── Tech strip — full width below hero ── */
.tech-strip-wrap {
  margin-top: 56px;
  text-align: center;
}

.tech-strip-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-tertiary);
  margin-bottom: 18px;
}

.tech-strip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 6px;
  background: #1c1c1e;
  border-radius: 72px;
  padding: 10px 18px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  box-shadow: 0 8px 40px rgba(0,0,0,.22);
}
.tech-strip::-webkit-scrollbar { display: none; }

.tech-icon {
  width: 48px; height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: default;
  transition: transform var(--transition);
}
.tech-icon:hover { transform: translateY(-6px) scale(1.15); }
.tech-icon img {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}

.hero-photo-ring {
  position: absolute; inset: -14px; border-radius: 50%;
  background: conic-gradient(from 180deg, var(--accent) 0deg, transparent 120deg, var(--accent-2) 240deg, transparent 360deg);
  animation: spinRing 10s linear infinite; opacity: 0.22;
}
.hero-photo {
  width: 100%; max-width: 360px; aspect-ratio: 1;
  object-fit: cover; border-radius: 50%;
  position: relative; z-index: 1;
  box-shadow: var(--shadow-lg); border: 6px solid var(--bg-card);
}

@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
@keyframes spinRing { to { transform: rotate(360deg); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }


/* ============================================================
   SECTIONS
   ============================================================ */
section { padding: 92px 0; }
section:nth-child(even) { background: var(--bg-secondary); }
.section-header { margin-bottom: 58px; }


/* ============================================================
   ABOUT
   ============================================================ */
#about .about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }

.about-text p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 18px; font-size: 0.99rem; }

.about-highlights { display: flex; flex-direction: column; gap: 12px; }

.highlight-item {
  display: flex; align-items: flex-start; gap: 13px;
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-left: 4px solid var(--accent); /* shape cue */
  border-radius: var(--radius-md); padding: 14px 18px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.highlight-item:hover { box-shadow: var(--shadow-md); transform: translateX(4px); }
.highlight-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.highlight-text strong { display: block; font-weight: 700; color: var(--text-primary); font-size: 0.87rem; margin-bottom: 2px; }
.highlight-text span { font-size: 0.78rem; color: var(--text-secondary); }


/* ============================================================
   SKILLS
   ============================================================ */
#skills .skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 16px; }

.skill-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-top: 4px solid var(--accent); /* alternating shape cues */
  border-radius: var(--radius-md); padding: 24px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.skill-card:nth-child(even) { border-top-color: var(--accent-2); }
.skill-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }

.skill-card-icon { font-size: 1.7rem; margin-bottom: 11px; }
.skill-card-title { font-family: var(--font-display); font-size: 0.76rem; font-weight: 700; color: var(--text-primary); margin-bottom: 11px; text-transform: uppercase; letter-spacing: 0.07em; }

.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tag {
  font-size: 0.76rem; font-weight: 600;
  color: var(--text-secondary); background: var(--bg-secondary);
  border: 1px solid var(--border-light); padding: 4px 11px; border-radius: 980px;
  transition: background var(--transition), color var(--transition);
}
.skill-card:hover .skill-tag { background: var(--accent-light); color: var(--accent); }
.skill-card:nth-child(even):hover .skill-tag { background: var(--accent-2-light); color: var(--accent-2); }


/* ============================================================
   EXPERIENCE — Timeline
   ============================================================ */
#experience .timeline { position: relative; padding-left: 36px; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(to bottom, var(--accent), var(--border-light)); border-radius: 2px;
}
.timeline-item { position: relative; margin-bottom: 42px; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute; left: -43px; top: 8px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg-card); border: 2.5px solid var(--accent);
  transition: background var(--transition), transform var(--transition); z-index: 1;
}
.timeline-item:hover .timeline-dot { background: var(--accent); transform: scale(1.35); }

.timeline-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-md); padding: 24px 28px;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.timeline-item:hover .timeline-card { box-shadow: var(--shadow-md); border-color: var(--border); }

.timeline-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 5px; flex-wrap: wrap; }
.timeline-role { font-family: var(--font-display); font-size: 0.98rem; font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em; }
.timeline-period {
  font-size: 0.74rem; font-weight: 700; color: var(--accent);
  background: var(--accent-light); padding: 4px 11px; border-radius: 980px;
  white-space: nowrap; flex-shrink: 0;
  border: 1px solid rgba(0,85,179,.2); /* non-colour shape cue */
}
.timeline-org { font-size: 0.83rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 13px; }

.timeline-bullets { padding: 0; margin: 0; }
.timeline-bullets li { font-size: 0.87rem; color: var(--text-secondary); line-height: 1.65; padding-left: 18px; position: relative; margin-bottom: 7px; }
.timeline-bullets li:last-child { margin-bottom: 0; }
.timeline-bullets li::before { content: '▸'; position: absolute; left: 0; color: var(--accent); font-size: 0.68rem; top: 4px; } /* symbol shape cue */

.timeline-item.break .timeline-dot { border-color: var(--text-tertiary); border-style: dashed; }
.timeline-item.break .timeline-card { background: var(--bg-secondary); border-style: dashed; }


/* ============================================================
   EDUCATION & CERTS
   ============================================================ */
#education .edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }

.edu-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-left: 4px solid var(--accent); border-radius: var(--radius-md); padding: 24px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.edu-card + .edu-card { margin-top: 14px; }
.edu-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.edu-degree { font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; line-height: 1.3; }
.edu-institution { font-size: 0.81rem; color: var(--accent); font-weight: 600; margin-bottom: 4px; }
.edu-period { font-size: 0.76rem; color: var(--text-tertiary); margin-bottom: 10px; }
.edu-note { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.6; border-top: 1px solid var(--border-light); padding-top: 10px; margin-top: 10px; }

.certs-list { display: flex; flex-direction: column; gap: 9px; }
.cert-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); padding: 11px 15px;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.cert-item:hover { box-shadow: var(--shadow-sm); border-color: var(--border); }
.cert-icon { font-size: 1rem; flex-shrink: 0; }
.cert-year {
  font-size: 0.67rem; font-weight: 800; color: var(--accent);
  background: var(--accent-light); padding: 3px 8px; border-radius: 980px;
  white-space: nowrap; flex-shrink: 0;
  border: 1px solid rgba(0,85,179,.2); letter-spacing: 0.02em;
}
.cert-name { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); line-height: 1.4; }


/* ============================================================
   SOCIAL / GITHUB
   ============================================================ */
#social .social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

.social-card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-lg); padding: 32px; overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.social-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.social-card-header { display: flex; align-items: center; gap: 13px; margin-bottom: 24px; }
.social-logo { width: 40px; height: 40px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.social-logo.github  { background: #1b1f23; }
.social-logo.linkedin{ background: #0a66c2; }
.social-logo svg { width: 21px; height: 21px; fill: #fff; }
.social-platform { font-family: var(--font-display); font-size: 0.97rem; font-weight: 700; color: var(--text-primary); }
.social-handle { font-size: 0.77rem; color: var(--text-secondary); }

.github-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 20px; }
.gh-stat { text-align: center; background: var(--bg-secondary); border-radius: var(--radius-sm); padding: 13px 6px; border: 1px solid var(--border-light); }
.gh-stat-num { font-family: var(--font-display); font-size: 1.45rem; font-weight: 800; color: var(--text-primary); line-height: 1; letter-spacing: -0.03em; }
.gh-stat-label { font-size: 0.68rem; color: var(--text-secondary); margin-top: 4px; font-weight: 600; }

.gh-repos-list { display: flex; flex-direction: column; gap: 8px; }
.gh-repo {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 13px; background: var(--bg-secondary); border-radius: var(--radius-sm);
  font-size: 0.8rem; text-decoration: none;
  border: 1px solid var(--border-light);
  transition: background var(--transition), border-color var(--transition);
}
.gh-repo:hover { background: var(--accent-light); border-color: rgba(0,85,179,.2); }
.gh-repo-name { font-weight: 700; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gh-repo-lang { font-size: 0.68rem; color: var(--text-secondary); background: var(--border-light); padding: 2px 8px; border-radius: 980px; white-space: nowrap; flex-shrink: 0; font-weight: 600; }

.gh-loading, .gh-error { color: var(--text-tertiary); font-size: 0.83rem; text-align: center; padding: 18px; }

.linkedin-content { text-align: center; padding: 6px 0; }
.linkedin-avatar { width: 78px; height: 78px; border-radius: 50%; object-fit: cover; margin: 0 auto 13px; border: 3px solid var(--border-light); }
.linkedin-name { font-family: var(--font-display); font-size: 1.03rem; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.linkedin-title { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 18px; }
.linkedin-cta {
  display: inline-flex; align-items: center; gap: 7px;
  background: #0a66c2; color: #fff;
  font-size: 0.83rem; font-weight: 700;
  padding: 10px 20px; border-radius: 980px;
  transition: background var(--transition), transform var(--transition);
}
.linkedin-cta:hover { background: #004182; color: #fff; transform: translateY(-2px); }

.social-cta-row { margin-top: 17px; text-align: center; }
.social-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.83rem; font-weight: 700; color: var(--accent);
  text-decoration: underline; text-underline-offset: 3px; /* non-colour cue */
  transition: gap var(--transition);
}
.social-link:hover { gap: 10px; }


/* ============================================================
   BLOG — Dev.to feed
   ============================================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
  margin-bottom: 48px;
  min-height: 200px;
}

/* Loading state */
.blog-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 0;
  color: var(--text-tertiary);
  font-size: 0.88rem;
}

.blog-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Error state */
.blog-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 0;
  color: var(--text-tertiary);
  font-size: 0.88rem;
}
.blog-error a { color: var(--accent); font-weight: 600; }

/* Article card */
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

/* Cover image */
.blog-card-cover {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: var(--bg-secondary);
}

.blog-card-cover-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--accent-light), var(--bg-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

/* Card body */
.blog-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

/* Tags row */
.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.blog-card-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 9px;
  border-radius: 980px;
  text-transform: lowercase;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}

/* Title */
.blog-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0;
}
.blog-card:hover .blog-card-title { color: var(--accent); }

/* Description */
.blog-card-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta row */
.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  gap: 8px;
  flex-wrap: wrap;
}
.blog-card-date {
  font-size: 0.74rem;
  color: var(--text-tertiary);
  font-weight: 500;
}
.blog-card-reading {
  font-size: 0.74rem;
  color: var(--text-tertiary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Reactions */
.blog-card-reactions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.blog-card-reaction {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
}

/* Dev.to badge */
.blog-devto-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-tertiary);
  padding: 3px 8px;
  border-radius: 980px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
}

/* CTA row */
.blog-cta-row {
  text-align: center;
  margin-top: 8px;
}


/* ============================================================
   CONTACT
   ============================================================ */
.contact-wrap { max-width: 660px; margin: 0 auto; text-align: center; }
.contact-wrap .section-sub { margin: 0 auto 44px; }

.contact-links { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }

.contact-link-item {
  display: flex; align-items: center; gap: 9px;
  background: var(--bg-card); border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md); padding: 13px 18px;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  text-decoration: none; color: var(--text-primary);
}
.contact-link-item:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--accent); color: var(--accent); }
.contact-link-icon { font-size: 1.15rem; }
.contact-link-text { font-size: 0.85rem; font-weight: 700; }


/* ============================================================
   FOOTER
   ============================================================ */
footer { background: #1d1d1f; color: rgba(255,255,255,.5); padding: 36px 0 28px; }
[data-theme="dark"] footer { background: #000; }

/* Hashtags */
.footer-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 24px;
}

.hashtag {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,.35);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  padding: 4px 11px;
  border-radius: 980px;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.hashtag:hover {
  color: var(--accent);
  background: var(--accent-light);
  border-color: rgba(77,163,255,.3);
}

.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-logo { font-family: var(--font-display); font-size: 0.92rem; font-weight: 700; color: #fff; }
.footer-copy { font-size: 0.76rem; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 0.76rem; color: rgba(255,255,255,.4); transition: color var(--transition); }
.footer-links a:hover { color: #fff; }


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; text-align: center; }
  .hero-right { order: -1; }
  .hero-photo-wrap { width: 260px; height: 260px; }
  .tech-strip-wrap { margin-top: 40px; }
  .tech-icon { width: 44px; height: 44px; }
  .tech-icon img { width: 44px; height: 44px; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-summary { margin: 0 auto 34px; }
  .hero-eyebrow { justify-content: center; }
  #about .about-grid { grid-template-columns: 1fr; gap: 34px; }
  #education .edu-grid { grid-template-columns: 1fr; }
  #social .social-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  section { padding: 62px 0; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: var(--nav-height); left: 0; right: 0;
    background: rgba(251,251,253,.96);
    backdrop-filter: blur(20px); padding: 18px;
    gap: 4px; border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
  }
  [data-theme="dark"] .nav-links.open { background: rgba(15,15,17,.96); }
  .nav-links.open a { padding: 11px 14px; border-radius: var(--radius-sm); }
  #google-translate-wrap { display: none; }
  .contact-links { flex-direction: column; align-items: center; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}

@media (max-width: 480px) {
  .hero-name { font-size: 2.8rem; }
  .hero-stats { flex-direction: column; gap: 12px; align-items: center; }
  .hero-photo-wrap { width: 210px; height: 210px; }
  .tech-strip { gap: 4px; padding: 9px 14px; }
  .tech-icon { width: 40px; height: 40px; }
  .tech-icon img { width: 40px; height: 40px; }
  .skills-grid { grid-template-columns: 1fr; }
}

/* ── High-contrast support ── */
@media (prefers-contrast: more) {
  :root { --accent: #003b80; --border: #555; --text-secondary: #444; }
  .skill-tag, .cert-year { border-width: 2px; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .hero-photo-ring { display: none; }
}
