/* ================================================================
   1. THEME VARIABLES (dark default, light overrides below)
================================================================= */
:root {
  --bg: #10131a;
  --bg-raised: #161b24;
  --line: #2a3140;
  --text: #e7e6e0;
  --text-dim: #8b93a3;
  --accent: #d4a24e;
  --accent-dim: #8a6c37;
  --teal: #5fb3a3;
  --mono: "IBM Plex Mono", monospace;
  --sans: "Work Sans", sans-serif;
}

[data-theme="light"] {
  --bg: #f6f4ee;
  --bg-raised: #ffffff;
  --line: #d9d4c6;
  --text: #1c1f26;
  --text-dim: #5c6270;
  --accent: #a9741f;
  --accent-dim: #c99a4a;
  --teal: #1f7a68;
}
[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px);
}
[data-theme="light"] .btn.primary {
  color: #fff8ec;
}

/* ================================================================
   2. BASE / RESET
================================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
  transition:
    background 0.25s ease,
    color 0.25s ease;
}
::selection {
  background: var(--accent);
  color: #10131a;
}
a {
  color: inherit;
  text-decoration: none;
}

/* subtle grid texture behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

/* Hindi typography: swap in Devanagari font wherever data-lang="hi" */
[data-lang="hi"] body {
  font-family: "Noto Sans Devanagari", var(--sans);
}
[data-lang="hi"] .intro-text,
[data-lang="hi"] .about-grid p,
[data-lang="hi"] .achievement-text,
[data-lang="hi"] .project-card p,
[data-lang="hi"] .cert-issuer,
[data-lang="hi"] .edu-subtitle,
[data-lang="hi"] h1,
[data-lang="hi"] h2,
[data-lang="hi"] h3,
[data-lang="hi"] .skill-pill,
[data-lang="hi"] .btn,
[data-lang="hi"] .nav-node,
[data-lang="hi"] .contact-value {
  font-family: "Noto Sans Devanagari", var(--sans);
}
/* keep literal-code lines in monospace/English even in Hindi mode */
[data-lang="hi"] .prompt,
[data-lang="hi"] .role,
[data-lang="hi"] .achievement-header span,
[data-lang="hi"] .struct-tag {
  font-family: var(--mono);
}

/* ================================================================
   3. NAV (linked-list styled)
================================================================= */
nav {
  position: sticky;
  top: 0;
  background: rgba(16, 19, 26, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 50;
  transition: background 0.25s ease;
}
[data-theme="light"] nav {
  background: rgba(246, 244, 238, 0.92);
}
.navlist {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  padding: 14px 14px;
  max-width: 920px;
  margin: 0 auto;
  scrollbar-width: none;
}
.navlist::-webkit-scrollbar {
  display: none;
}
.nav-node {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 10px;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-node:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
}
.nav-node .nav-bullet {
  color: var(--text-dim);
  font-size: 10px;
}
.separator-arrow {
  color: var(--accent-dim);
  font-family: var(--mono);
  font-size: 13px;
  padding: 0 2px;
  flex-shrink: 0;
}
.nav-node.null {
  color: var(--text-dim);
  font-style: italic;
}

/* theme + language toggle buttons, live in the nav bar */
.theme-toggle,
.lang-toggle {
  margin-left: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--accent);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.theme-toggle:hover {
  border-color: var(--accent);
  transform: rotate(20deg);
}
.lang-toggle {
  width: auto;
  min-width: 34px;
  border-radius: 14px;
  padding: 0 9px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ================================================================
   4. HERO (#home)
================================================================= */
header {
  padding: 90px 0 70px;
  position: relative;
}
.prompt {
  font-family: var(--mono);
  color: var(--teal);
  font-size: 14px;
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}
.prompt .cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
h1 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
h1 .accent {
  color: var(--accent);
}
.role {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--text-dim);
  margin-bottom: 28px;
}
.role span {
  color: var(--teal);
}
.intro-text {
  max-width: 560px;
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: 34px;
}
.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.btn {
  font-family: var(--mono);
  font-size: 13px;
  padding: 11px 20px;
  border-radius: 4px;
  border: 1px solid var(--line);
  transition: all 0.2s ease;
}
.btn.primary {
  background: var(--accent);
  color: #141821;
  border-color: var(--accent);
  font-weight: 600;
}
.btn.primary:hover {
  background: #e3b567;
}
.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* profile chip row: LinkedIn / GitHub / LeetCode */
.profile-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.profile-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 7px 14px 7px 10px;
  background: var(--bg-raised);
  transition: all 0.2s ease;
}
.profile-chip:hover {
  border-color: var(--accent-dim);
  transform: translateY(-1px);
}
.profile-chip .chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.profile-chip[data-platform="linkedin"] .chip-dot {
  background: #4a90c4;
}
.profile-chip[data-platform="github"] .chip-dot {
  background: var(--text);
}
.profile-chip[data-platform="leetcode"] .chip-dot {
  background: var(--accent);
}
.profile-chip[data-platform="portfolio"] .chip-dot,
.profile-chip:not([data-platform="linkedin"]):not([data-platform="github"]):not(
    [data-platform="leetcode"]
  )
  .chip-dot {
  background: var(--teal);
}

/* ================================================================
   5. SECTION SHARED (eyebrow / heading styles used by every section)
================================================================= */
section {
  padding: 64px 0;
  border-top: 1px solid var(--line);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}
h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  margin-bottom: 26px;
  letter-spacing: -0.01em;
}
.struct-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px 6px;
  margin-left: 10px;
  vertical-align: middle;
}

/* ================================================================
   6. ABOUT (#about)
================================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
}
.about-grid p {
  color: var(--text-dim);
  margin-bottom: 14px;
}
.about-grid p strong {
  color: var(--text);
  font-weight: 600;
}
.stat-box {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
  font-family: var(--mono);
}
.stat-box .stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
}
.stat-box .stat-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}
.stat-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ================================================================
   7. SKILLS (#skills)
================================================================= */
.skills-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.skill-card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
}
.skill-card .skill-category {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--teal);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skill-pill {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 4px;
  color: var(--text);
}

/* ================================================================
   8. ACHIEVEMENTS (#achievements) — terminal-style log box
================================================================= */
.achievement-box {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.achievement-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.status-dot.red {
  background: #e0685f;
}
.status-dot.yellow {
  background: #e0b45f;
}
.status-dot.green {
  background: #5fb3a3;
}
.achievement-body {
  padding: 22px;
}
.achievement-item {
  display: flex;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  align-items: baseline;
}
.achievement-item:last-child {
  border-bottom: none;
}
.achievement-index {
  font-family: var(--mono);
  color: var(--accent-dim);
  font-size: 12px;
  width: 24px;
  flex-shrink: 0;
}
.achievement-text strong {
  color: var(--text);
}
.achievement-text {
  color: var(--text-dim);
  font-size: 14px;
}

/* ================================================================
   9. PROJECTS (#projects)
================================================================= */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.project-card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}
.project-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}
.project-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.project-card h3 {
  font-size: 17px;
  font-weight: 700;
}
.project-link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--teal);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 8px;
  flex-shrink: 0;
}
.project-link:hover {
  border-color: var(--teal);
}
.project-card p {
  color: var(--text-dim);
  font-size: 14px;
  margin-bottom: 14px;
  flex-grow: 1;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  border: 1px solid var(--line);
  padding: 3px 7px;
  border-radius: 3px;
}

/* ================================================================
   10. CERTIFICATIONS (#certifications)
================================================================= */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.cert-card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}
.cert-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}
.cert-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}
.cert-card h3 {
  font-size: 15px;
  font-weight: 700;
}
.cert-issuer {
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 6px;
}
.cert-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent-dim);
}

/* ================================================================
   11. EDUCATION (#education)
================================================================= */
.edu-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.edu-item:last-child {
  border-bottom: none;
}
.edu-year {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  white-space: nowrap;
  padding-top: 2px;
  min-width: 90px;
}
.edu-main h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 2px;
}
.edu-main .edu-subtitle {
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 8px;
}
.edu-detail {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}
.edu-detail b {
  color: var(--teal);
}

/* ================================================================
   12. CONTACT (#contact)
================================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.contact-card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
  display: block;
  transition: border-color 0.2s ease;
}
.contact-card:hover {
  border-color: var(--accent-dim);
}
.contact-card .contact-field {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.contact-card .contact-value {
  font-size: 14px;
  color: var(--text);
  word-break: break-word;
}

/* ================================================================
   13. FOOTER
================================================================= */
footer {
  padding: 36px 0 50px;
  text-align: center;
}
footer .foot-line {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}
footer .foot-line .separator-arrow {
  color: var(--accent-dim);
}

/* ================================================================
   14. RESPONSIVE
================================================================= */
@media (max-width: 640px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  header {
    padding: 60px 0 46px;
  }
}
