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

:root {
  --bg:        #ffffff;
  --surface:   #f5f7ff;
  --border:    #e2e5f1;
  --text:      #1a1a2e;
  --muted:     #5a5f7d;
  --accent:    #4f46e5;
  --accent-lt: #eef2ff;
  --radius:    10px;
  --shadow:    0 2px 12px rgba(79,70,229,.10);
  --nav-h:     64px;
}
/* ── Dark Mode ────────────────────────────────────────────── */
body.dark {
  --bg:        #0f0f1a;
  --surface:   #1a1a2e;
  --border:    #2e2e4a;
  --text:      #e8e8f0;
  --muted:     #9090b0;
  --accent:    #818cf8;
  --accent-lt: #1e1e3a;
  --shadow:    0 2px 12px rgba(0,0,0,.35);
}

body.dark nav {
  background: rgba(15,15,26,.92);
}

body.dark #hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 100%);
}

body.dark .skill-row,
body.dark .edu-card,
body.dark .contact-card {
  background: #1a1a2e;
}

body.dark .chip {
  background: #1e1e35;
  border-color: #3a3a5c;
  color: var(--text);
}

body.dark .chip:hover {
  background: var(--accent-lt);
  border-color: var(--accent);
  color: var(--accent);
}
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

/* ── Navbar ───────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

nav .brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -.3px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
}

nav ul li a {
  text-decoration: none;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 500;
  padding: .4rem .75rem;
  border-radius: 6px;
  transition: background .2s, color .2s;
}

nav ul li a:hover,
nav ul li a.active {
  background: var(--accent-lt);
  color: var(--accent);
}

#theme-toggle {
  background: var(--accent-lt);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--accent);
  cursor: pointer;
  font-size: 1rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s, color .2s, border-color .2s;
}

#theme-toggle:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Sections shared ──────────────────────────────────────────── */
section {
  padding: 80px 1.5rem;
}

section:nth-child(even) { background: var(--surface); }

.container {
  max-width: 860px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
}

/* ── Hero ─────────────────────────────────────────────────────── */
#hero {
  background: linear-gradient(135deg, #eef2ff 0%, #f5f7ff 60%, #fff 100%);
  padding: 100px 1.5rem 80px;
  text-align: center;
}

#hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.5px;
  margin-bottom: .5rem;
}

#hero .tagline {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 2rem;
}

.contact-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem 1rem;
  border-radius: 50px;
  background: #fff;
  border: 1.5px solid var(--border);
  font-size: .85rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, background .2s;
  position: relative;
}

.chip:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(79,70,229,.15);
  background: var(--accent-lt);
  color: var(--accent);
}

.chip i { font-size: 15px; flex-shrink: 0; }

/* tooltip */
.chip .tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  font-size: .75rem;
  padding: .3rem .65rem;
  border-radius: 5px;
  white-space: nowrap;
  pointer-events: none;
}
.chip .tooltip.show { display: block; }

/* ── About ────────────────────────────────────────────────────── */
#about p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 720px;
}

/* ── Skills ───────────────────────────────────────────────────── */
.skill-grid {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.skill-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1.15rem;
  box-shadow: var(--shadow);
}

.skill-label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .5px;
  min-width: 130px;
  padding-top: .15rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.tag {
  background: var(--accent-lt);
  color: var(--accent);
  border-radius: 5px;
  padding: .25rem .65rem;
  font-size: .82rem;
  font-weight: 600;
}

/* ── Education ────────────────────────────────────────────────── */
.edu-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.edu-card .edu-left h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.edu-card .edu-left p {
  color: var(--muted);
  font-size: .92rem;
}

.edu-badge {
  background: var(--accent-lt);
  color: var(--accent);
  font-size: .82rem;
  font-weight: 700;
  padding: .3rem .8rem;
  border-radius: 50px;
  white-space: nowrap;
}

/* ── Contact ──────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.contact-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .85rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  position: relative;
  overflow: visible;
}

.contact-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 18px rgba(79,70,229,.18);
  transform: translateY(-2px);
}

.contact-card i {
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-card .cc-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: .1rem;
}

.contact-card .cc-value {
  font-size: .88rem;
  font-weight: 600;
  word-break: break-all;
}

.contact-card .tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  font-size: .75rem;
  padding: .3rem .65rem;
  border-radius: 5px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}
.contact-card .tooltip.show { display: block; }

/* ── Clipboard fallback textarea ─────────────────────────────── */
.clipboard-area {
  position: fixed;
  opacity: 0;
  pointer-events: none;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  nav ul { gap: 0; }
  nav ul li a { padding: .35rem .5rem; font-size: .8rem; }

  .skill-row { flex-direction: column; gap: .5rem; }
  .skill-label { min-width: unset; }

  .edu-card { flex-direction: column; }
}
