/* ============================================================
   Abhineet Sharma — Resume
   Built on AWS
   ============================================================ */

/* ------ Design Tokens ------ */
:root {
  --primary:      #0f172a;
  --accent:       #6366f1;
  --accent-light: #818cf8;
  --accent-pale:  #eef2ff;
  --text:         #1e293b;
  --text-muted:   #64748b;
  --bg:           #f1f5f9;
  --white:        #ffffff;
  --border:       #e2e8f0;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:       0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg:    0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.05);
  --radius:       12px;
  --radius-sm:    8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Roboto', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ------ Navigation ------ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, .97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: .65rem 0;
}

.nav-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: -.02em;
}
.nav-brand:hover { color: var(--accent-light); }

.site-nav .navbar-toggler {
  border-color: rgba(255,255,255,.2);
  padding: .25rem .5rem;
}
.site-nav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.nav-link-item {
  color: rgba(255,255,255,.62);
  text-decoration: none;
  font-size: .875rem;
  padding: .35rem .75rem;
  border-radius: 6px;
  transition: color .15s, background .15s;
  display: inline-block;
}
.nav-link-item:hover { color: #fff; background: rgba(255,255,255,.08); }

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: 50px !important;
  padding: .35rem 1rem !important;
  font-weight: 500 !important;
  margin-left: .25rem;
}
.nav-cta:hover { background: var(--accent-light) !important; }

/* ------ Hero ------ */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1a1840 55%, #0f172a 100%);
  position: relative;
  padding: 5.5rem 0 4.5rem;
  overflow: hidden;
  color: #fff;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 68% 50%, rgba(99,102,241,.18) 0%, transparent 62%);
  pointer-events: none;
}

.hero-eyebrow {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: .9rem;
}

.hero-name {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: .75rem;
}

.hero-tagline {
  font-size: 1.05rem;
  color: rgba(255,255,255,.72);
  margin-bottom: .6rem;
  font-weight: 300;
}
.accent-text { color: var(--accent-light); font-weight: 500; }

.hero-location {
  font-size: .87rem;
  color: rgba(255,255,255,.45);
  margin-bottom: 0;
}
.hero-email {
  color: rgba(255,255,255,.62);
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,255,255,.25);
  transition: color .15s;
}
.hero-email:hover { color: var(--accent-light); }

.hero-buttons { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 2rem; }

.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: .6rem 1.5rem;
  border-radius: 50px;
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .2s, transform .15s;
}
.btn-accent:hover { background: var(--accent-light); color: #fff; transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: transparent;
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.22);
  padding: .6rem 1.5rem;
  border-radius: 50px;
  font-size: .9rem;
  font-weight: 400;
  text-decoration: none;
  transition: border-color .2s, color .2s, transform .15s;
}
.btn-ghost:hover { border-color: rgba(255,255,255,.65); color: #fff; transform: translateY(-1px); }

.hero-social { display: flex; gap: .75rem; margin-top: 1.75rem; }
.hero-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.55);
  display: flex; align-items: center; justify-content: center;
  font-size: .88rem;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.hero-social a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.hero-photo {
  width: 210px;
  height: 210px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 10px rgba(99,102,241,.12), var(--shadow-lg);
}

/* ------ Sections ------ */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--white); }

.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 2.25rem;
  padding-bottom: .65rem;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 36px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section-intro {
  max-width: 720px;
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.75;
  margin: -1rem 0 1.75rem;
}

/* ------ About ------ */
.about-text {
  font-size: .975rem;
  color: var(--text);
  line-height: 1.85;
  margin: 0;
}

.mantra-card {
  border-left: 3px solid var(--accent);
  margin: 1.35rem 0 0;
  padding: .15rem 0 .15rem 1rem;
}

.mantra-card blockquote {
  color: var(--primary);
  font-family: 'Poppins', sans-serif;
  font-size: .98rem;
  line-height: 1.6;
  margin: 0;
}

.stat-badge {
  background: var(--accent-pale);
  border: 1px solid rgba(99,102,241,.14);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
}
.stat-num {
  font-family: 'Poppins', sans-serif;
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-size: .7rem;
  color: var(--text-muted);
  margin-top: .3rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ------ Brand / Principles ------ */
.brand-section { background: var(--bg); }

.principle-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  min-height: 100%;
  box-shadow: var(--shadow);
}

.principle-title {
  font-family: 'Poppins', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 .45rem;
}

.principle-text {
  color: var(--text-muted);
  font-size: .84rem;
  line-height: 1.65;
  margin: 0;
}

/* ------ Skills ------ */
.skill-group { margin-bottom: 1.5rem; }
.skill-group:last-child { margin-bottom: 0; }

.skill-group-label {
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .75rem;
}

.skill-chips { display: flex; flex-wrap: wrap; gap: .45rem; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: .28rem .85rem;
  border-radius: 50px;
  font-size: .82rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  transition: border-color .15s, color .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.featured {
  background: var(--accent-pale);
  border-color: rgba(99,102,241,.22);
  color: var(--accent);
  font-weight: 500;
}

/* ------ Strategic Tech Radar ------ */
.radar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  height: 100%;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.radar-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.radar-header {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: .75rem;
}
.radar-header i { font-size: 1.15rem; }
.radar-header h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: .05em;
}

.radar-desc {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.15rem;
  flex-grow: 1;
}

.radar-card.adopt { border-top-color: #10b981; }
.radar-card.adopt i { color: #10b981; }
.radar-card.trial { border-top-color: var(--accent); }
.radar-card.trial i { color: var(--accent); }
.radar-card.assess { border-top-color: #f59e0b; }
.radar-card.assess i { color: #f59e0b; }
.radar-card.hold { border-top-color: #ef4444; }
.radar-card.hold i { color: #ef4444; }

/* Dark mode overrides */
[data-theme="dark"] .radar-card {
  background: var(--white);
  border-color: var(--border);
}

[data-theme="dark"] .radar-card.adopt { border-top-color: #34d399; }
[data-theme="dark"] .radar-card.trial { border-top-color: var(--accent); }
[data-theme="dark"] .radar-card.assess { border-top-color: #fbbf24; }
[data-theme="dark"] .radar-card.hold { border-top-color: #f87171; }

/* ------ Timeline ------ */
.experience-summary {
  max-width: 900px;
  margin: -1rem 0 2rem;
}

.experience-summary p {
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.75;
  margin: 0 0 .9rem;
}

.experience-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.timeline {
  position: relative;
  padding-left: 2.25rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: .45rem;
  top: .75rem;
  bottom: 0;
  width: 2px;
  background: var(--border);
  border-radius: 1px;
}

.tl-item { position: relative; margin-bottom: 1.75rem; }
.tl-item:last-child { margin-bottom: 0; }

.tl-item::before {
  content: '';
  position: absolute;
  left: -1.875rem;
  top: 1.1rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
  z-index: 1;
}

.tl-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}
.tl-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }

.tl-role {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: .1rem;
}
.tl-company {
  font-size: .9rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: .3rem;
}
.domain-pill {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: .4rem;
  padding: .08rem .48rem;
  border-radius: 50px;
  border: 1px solid rgba(99,102,241,.18);
  background: var(--accent-pale);
  color: var(--accent);
  font-size: .66rem;
  font-family: 'Roboto', system-ui, sans-serif;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}
.tl-date {
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: .6rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
}
.tl-desc {
  font-size: .88rem;
  color: var(--text-muted);
  margin-bottom: .8rem;
  line-height: 1.6;
}

.badge-current {
  display: inline-block;
  background: rgba(16,185,129,.1);
  color: #059669;
  border: 1px solid rgba(16,185,129,.2);
  border-radius: 50px;
  font-size: .68rem;
  font-weight: 500;
  padding: .12rem .6rem;
  letter-spacing: .04em;
}

.tl-highlights {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tl-highlights li {
  position: relative;
  padding-left: 1.2rem;
  font-size: .875rem;
  color: var(--text);
  margin-bottom: .4rem;
  line-height: 1.55;
}
.tl-highlights li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .58rem;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

/* ------ Selected Work ------ */
.work-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  height: 100%;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}
.work-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.work-kicker {
  color: var(--accent);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 .55rem;
}

.work-title {
  font-family: 'Poppins', sans-serif;
  color: var(--primary);
  font-size: .98rem;
  line-height: 1.45;
  margin: 0 0 .65rem;
}

.work-text {
  color: var(--text-muted);
  font-size: .86rem;
  line-height: 1.65;
  margin: 0;
}

/* ------ Private Projects ------ */
.project-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow);
  height: 100%;
}

.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .55rem;
}

.project-kicker {
  color: var(--accent);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin: 0;
}

.private-badge {
  display: inline-flex;
  align-items: center;
  padding: .12rem .5rem;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.25);
  background: rgba(148,163,184,.08);
  color: var(--text-muted);
  font-size: .68rem;
  font-weight: 500;
  white-space: nowrap;
}

.project-title {
  font-family: 'Poppins', sans-serif;
  font-size: .98rem;
  color: var(--primary);
  line-height: 1.45;
  margin: 0 0 .55rem;
}

.project-text {
  color: var(--text-muted);
  font-size: .86rem;
  line-height: 1.65;
  margin: 0 0 .7rem;
}

.project-meta {
  color: var(--text-muted);
  font-size: .74rem;
  line-height: 1.5;
  margin: 0;
}

/* Previous roles */
.prev-roles-card { background: var(--bg); }

.prev-role {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--border);
}
.prev-role:first-of-type { padding-top: 0; }
.prev-role:last-child { border-bottom: none; padding-bottom: 0; }

.prev-role-info { flex: 1; min-width: 0; }
.prev-role-title { font-size: .875rem; font-weight: 500; color: var(--text); }
.prev-role-company { font-size: .82rem; color: var(--text-muted); }
.prev-role-period { font-size: .77rem; color: var(--text-muted); white-space: nowrap; }

/* ------ Education ------ */
.edu-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.edu-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-pale);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.edu-degree {
  font-family: 'Poppins', sans-serif;
  font-size: .975rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: .2rem;
}
.edu-school { font-size: .875rem; color: var(--accent); font-weight: 500; margin-bottom: .2rem; }
.edu-period { font-size: .77rem; color: var(--text-muted); margin-bottom: .75rem; }
.edu-desc { font-size: .875rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 1rem; }

/* Thesis */
.thesis-card {
  background: linear-gradient(135deg, var(--accent-pale) 0%, var(--white) 100%);
  border: 1px solid rgba(99,102,241,.18);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.thesis-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: .5rem;
}
.thesis-title {
  font-family: 'Poppins', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: .6rem;
  line-height: 1.45;
}
.thesis-desc {
  font-size: .84rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: .85rem;
}
.thesis-link {
  font-size: .82rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.thesis-link:hover { color: var(--accent-light); }

/* ------ Footer ------ */
footer {
  background: var(--primary);
  padding: 2.5rem 0;
  text-align: center;
}
.footer-name {
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: .6rem;
}
.footer-social { display: flex; justify-content: center; gap: .75rem; margin-bottom: 1.25rem; }
.footer-social a {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.footer-social a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.footer-copy { font-size: .78rem; color: rgba(255,255,255,.28); }
.footer-copy .credit { color: var(--accent-light); }

/* ------ Writing / Blog Cards ------ */
.writing-summary {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: .85rem;
  margin-bottom: 1.25rem;
}

.writing-summary-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
  box-shadow: var(--shadow-sm);
}

.writing-summary-label {
  display: block;
  font-size: .68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .25rem;
}

.writing-summary-item strong {
  font-family: 'Poppins', sans-serif;
  color: var(--accent);
  font-size: 1.55rem;
  line-height: 1;
}

.writing-summary-tags {
  flex: 1;
  min-width: min(100%, 320px);
}

.tag-count {
  opacity: .65;
  margin-left: .15rem;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.post-title {
  font-family: 'Poppins', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: .5rem;
  line-height: 1.4;
  text-decoration: none;
  display: block;
}
.post-title:hover { color: var(--accent); }

.post-meta {
  font-size: .75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}
.post-meta i { font-size: .7rem; }

.post-summary {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: .6rem;
  flex-grow: 1;
}

.post-ai-credit {
  font-size: .65rem;
  color: var(--text-muted);
  opacity: .6;
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-top: .4rem;
}

.post-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: auto; padding-top: .75rem; }
.post-tag {
  font-size: .7rem;
  padding: .15rem .6rem;
  border-radius: 50px;
  background: var(--accent-pale);
  color: var(--accent);
  border: 1px solid rgba(99,102,241,.15);
}

.writing-cta {
  font-size: .875rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 1.75rem;
}
.writing-cta:hover { color: var(--accent-light); }

/* ------ Career Timeline (horizontal) ------ */
.career-tl-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 3rem;
}

.career-tl {
  position: relative;
  min-width: 600px;
  height: 130px;
}

.career-tl::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 2px;
  background: linear-gradient(to right, rgba(99,102,241,.2), var(--accent));
  transform: translateY(-50%);
}

.ct-node {
  position: absolute;
  top: 0; bottom: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ct-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--accent);
  flex-shrink: 0;
  z-index: 2;
}

.ct-dot.ct-edu {
  background: var(--white);
  border-color: var(--accent);
}

.ct-above {
  height: 50px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  white-space: nowrap;
  padding-bottom: 7px;
}

.ct-below {
  height: 50px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  white-space: nowrap;
  padding-top: 7px;
}

.ct-co {
  font-size: .72rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.3;
  display: block;
}

.ct-yr {
  font-size: .62rem;
  color: var(--text-muted);
  display: block;
}

/* ------ Now (Currently Learning) ------ */
.now-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  height: 100%;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: .65rem;
  transition: box-shadow .2s, transform .2s;
}
.now-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.now-icon-wrap {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: var(--accent-pale);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
}

.now-topic {
  font-family: 'Poppins', sans-serif;
  font-size: .92rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
  line-height: 1.4;
}

.now-text {
  font-size: .84rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
  flex-grow: 1;
}

.now-output {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding-top: .25rem;
  margin-top: auto;
}

.now-pill {
  font-size: .68rem;
  font-weight: 500;
  padding: .15rem .6rem;
  border-radius: 50px;
  background: rgba(99,102,241,.08);
  color: var(--accent);
  border: 1px solid rgba(99,102,241,.15);
}

.now-updated {
  font-size: .78rem;
  color: var(--text-muted);
  margin: 0;
}

/* ------ Featured Projects ------ */
.featured-project-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: box-shadow .2s;
}
.featured-project-card:hover { box-shadow: var(--shadow-lg); }

.featured-project-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 .7rem;
  line-height: 1.3;
}

.featured-project-lead {
  font-size: .93rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.featured-project-section-label {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin: 0 0 .65rem;
}

.featured-project-meta-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.featured-project-meta-label {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin: 0 0 .6rem;
}

/* ------ Print ------ */
.print-header { padding: 1rem 0 .5rem; }
.print-header h1 { font-size: 1.5rem; margin-bottom: .25rem; }
.print-header p { font-size: .82rem; color: #555; margin-bottom: .15rem; }

@media print {
  body { background: #fff; }
  .section { padding: 1.5rem 0; }
  .section-alt { background: #fff; }
  .tl-card, .edu-card { box-shadow: none; border: 1px solid #ddd; }
  .tl-card:hover, .edu-card:hover { transform: none; }
  .stat-badge { background: #f5f5f5; border: 1px solid #ddd; }
  .thesis-card { background: #fafafa; }
}

/* ------ Responsive ------ */
@media (max-width: 991px) {
  .hero-photo { width: 170px; height: 170px; }
}

@media (max-width: 767px) {
  .hero { padding: 3.5rem 0 3rem; }
  .hero-photo { width: 140px; height: 140px; }
  .section { padding: 3rem 0; }
  .timeline { padding-left: 1.75rem; }
  .tl-item::before { left: -1.5rem; }
  .timeline::before { left: .35rem; }
}

@media (max-width: 575px) {
  .hero-buttons { flex-direction: column; align-items: flex-start; }
  .btn-accent, .btn-ghost { width: 100%; justify-content: center; }
}

/* ------ Dark Mode Toggle ------ */
.dark-toggle {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  padding: 0;
}
.dark-toggle:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ------ Dark Mode Theme ------ */
[data-theme="dark"] {
  --primary:      #e2e8f0;
  --accent:       #818cf8;
  --accent-light: #a5b4fc;
  --accent-pale:  rgba(99,102,241,.12);
  --text:         #cbd5e1;
  --text-muted:   #94a3b8;
  --bg:           #0f172a;
  --white:        #1e293b;
  --border:       #334155;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --shadow:       0 4px 6px -1px rgba(0,0,0,.35), 0 2px 4px -2px rgba(0,0,0,.25);
  --shadow-lg:    0 10px 15px -3px rgba(0,0,0,.5), 0 4px 6px -4px rgba(0,0,0,.3);
}

[data-theme="dark"] body { background: var(--bg); color: var(--text); }

[data-theme="dark"] .section-alt { background: var(--white); }

[data-theme="dark"] .chip {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
}
[data-theme="dark"] .chip.featured {
  background: var(--accent-pale);
  border-color: rgba(129,140,248,.25);
  color: var(--accent);
}

[data-theme="dark"] .tl-card,
[data-theme="dark"] .edu-card,
[data-theme="dark"] .post-card,
[data-theme="dark"] .repo-card,
[data-theme="dark"] .github-summary-card {
  background: var(--white);
  border-color: var(--border);
}

[data-theme="dark"] .tl-item::before {
  border-color: var(--bg);
}

[data-theme="dark"] .career-tl::before {
  background: linear-gradient(to right, rgba(129,140,248,.15), var(--accent));
}

[data-theme="dark"] .ct-dot {
  border-color: var(--bg);
}
[data-theme="dark"] .ct-dot.ct-edu {
  background: var(--bg);
  border-color: var(--accent);
}

[data-theme="dark"] .stat-badge {
  background: var(--accent-pale);
  border-color: rgba(129,140,248,.2);
}

[data-theme="dark"] .thesis-card {
  background: linear-gradient(135deg, var(--accent-pale) 0%, var(--white) 100%);
  border-color: rgba(129,140,248,.2);
}

[data-theme="dark"] .contact-input {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
}
[data-theme="dark"] .contact-input:focus {
  border-color: var(--accent);
  background: var(--bg);
  color: var(--text);
}
[data-theme="dark"] .contact-input::placeholder { color: var(--text-muted); }

[data-theme="dark"] .form-label { color: var(--text); }

[data-theme="dark"] footer {
  background: #0a0f1e;
}
[data-theme="dark"] .footer-name { color: #fff; }
[data-theme="dark"] .footer-social a { color: rgba(255,255,255,.65); }
[data-theme="dark"] .footer-copy { color: rgba(255,255,255,.35); }

/* ------ GitHub Repos ------ */
.github-summary-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  font-size: .9rem;
  color: var(--text);
  line-height: 1.6;
}

.github-projects-heading {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
}

.repo-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  height: 100%;
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.repo-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.repo-name {
  font-family: 'Poppins', sans-serif;
  font-size: .92rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: .4rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.repo-name a { color: inherit; text-decoration: none; }
.repo-name a:hover { color: var(--accent); }

.repo-private {
  font-size: .72rem;
  color: var(--text-muted);
}

.repo-desc {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: .75rem;
  flex-grow: 1;
}

.repo-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .75rem;
  color: var(--text-muted);
}

.repo-lang {
  display: flex;
  align-items: center;
  gap: .3rem;
}
.repo-lang-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ------ Contact Form ------ */
.contact-form { }

.contact-input {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .9rem;
  padding: .65rem 1rem;
  width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.contact-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.contact-input::placeholder { color: var(--text-muted); }

textarea.contact-input { resize: vertical; min-height: 120px; }

.contact-status {
  border-radius: var(--radius-sm);
  padding: .65rem 1rem;
  font-size: .875rem;
  margin-bottom: 1rem;
}
.contact-status-ok {
  background: rgba(16,185,129,.1);
  border: 1px solid rgba(16,185,129,.25);
  color: #059669;
}
.contact-status-error {
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.2);
  color: #dc2626;
}

/* Honeypot — visually hidden but not display:none so bots don't skip it */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* ============================================================
   Chat Widget
   ============================================================ */
#chat-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
}

#chat-toggle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, transform .15s;
}
#chat-toggle:hover { background: var(--accent-light); transform: scale(1.08); }

#chat-panel {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 360px;
  max-width: calc(100vw - 2rem);
  height: 520px;
  max-height: calc(100vh - 5rem);
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

#chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  background: var(--accent);
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  gap: .5rem;
}
.chat-header-actions {
  display: flex;
  gap: .25rem;
}
#chat-header button {
  background: none;
  border: none;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  padding: .25rem .4rem;
  border-radius: 4px;
  font-size: .85rem;
  line-height: 1;
  transition: color .15s, background .15s;
}
#chat-header button:hover { color: #fff; background: rgba(255,255,255,.15); }

#chat-disclaimer {
  font-size: .72rem;
  color: var(--text-muted);
  background: var(--accent-pale);
  padding: .4rem .85rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .35rem;
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: .85rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.chat-msg {
  max-width: 82%;
  padding: .55rem .8rem;
  border-radius: 14px;
  font-size: .85rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-msg-user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg-assistant {
  align-self: flex-start;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: .55rem .85rem;
  min-height: 36px;
}
.chat-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: chatBounce 1.2s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: .2s; }
.chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes chatBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .4; }
  40%            { transform: translateY(-6px); opacity: 1; }
}

#chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: .5rem;
  padding: .6rem .75rem;
  border-top: 1px solid var(--border);
  background: var(--white);
}
#chat-input {
  flex: 1;
  resize: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .5rem .75rem;
  font-size: .85rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  outline: none;
  overflow-y: auto;
  max-height: 100px;
  line-height: 1.45;
  transition: border-color .2s;
}
#chat-input:focus { border-color: var(--accent); background: var(--white); }
#chat-send {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
#chat-send:hover    { background: var(--accent-light); }
#chat-send:disabled { background: var(--border); cursor: not-allowed; }

/* Dark mode for Now + Projects */
[data-theme="dark"] .now-card,
[data-theme="dark"] .featured-project-card {
  background: var(--white);
  border-color: var(--border);
}
[data-theme="dark"] .featured-project-meta-box {
  background: var(--bg);
  border-color: var(--border);
}
[data-theme="dark"] .now-pill {
  background: rgba(129,140,248,.1);
  border-color: rgba(129,140,248,.2);
  color: var(--accent);
}

/* Dark mode */
[data-theme="dark"] #chat-panel {
  background: var(--white);
  border-color: var(--border);
}
[data-theme="dark"] #chat-input {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
}
[data-theme="dark"] #chat-input:focus { background: var(--white); }
[data-theme="dark"] .chat-msg-assistant {
  background: var(--bg);
  border-color: var(--border);
}

/* Phones: this Bootstrap build's gutters (g-3 = 2rem, g-5 = 3rem) are wider than
   the full-width container's 12px padding, so rows stuck out and the page
   scrolled sideways. Cap the horizontal gutter at twice the container padding. */
@media (max-width: 575.98px) {
  .row {
    --bs-gutter-x: 1.5rem;
  }
}
