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

:root {
  --black:    #080810;
  --dark:     #0f0f1a;
  --gray-1:   #1c1c2e;
  --gray-2:   #4a4a6a;
  --gray-3:   #8888aa;
  --gray-4:   #bbbbcc;
  --gray-5:   #e8e8f0;
  --gray-6:   #f4f4f8;
  --white:    #ffffff;

  --accent:        #4f6ef7;
  --accent-light:  #7b96ff;
  --accent-glow:   rgba(79, 110, 247, 0.12);
  --teal:          #00c4b8;
  --green:         #22c55e;

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;

  --nav-h:       64px;
  --section-gap: 88px;
  --max-w:       980px;
  --radius:      12px;
  --radius-sm:   8px;
}

/* ── Dark mode overrides ── */
[data-theme="dark"] {
  --black:   #f0f0f8;
  --gray-1:  #d8d8f0;
  --gray-2:  #b0b0cc;
  --gray-3:  #8888a8;
  --gray-4:  #525270;
  --gray-5:  #2a2a42;
  --gray-6:  #181828;
  --white:   #0c0c1a;
  --accent-glow: rgba(79, 110, 247, 0.2);
}

[data-theme="dark"] body { background: #0c0c18; }

[data-theme="dark"] #nav {
  background: rgba(12, 12, 24, 0.82);
}

[data-theme="dark"] .company-header {
  background: #13132000;
  background: var(--gray-6);
}

[data-theme="dark"] .hero-photo-frame {
  box-shadow: none;
}

[data-theme="dark"] .btn-primary {
  background: #f0f0f8;
  color: #0c0c18;
}
[data-theme="dark"] .btn-primary:hover { background: #d4d4ec; }

[data-theme="dark"] .btn-ghost {
  border-color: var(--gray-5);
  color: var(--gray-2);
  background: transparent;
}

[data-theme="dark"] .nav-logo {
  background: #f0f0f8;
  color: #0c0c18;
}

[data-theme="dark"] .company-initial.telus    { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
[data-theme="dark"] .company-initial.dynacare { background: linear-gradient(135deg, #0ea5e9, #0891b2); }
[data-theme="dark"] .company-initial.pcc      { background: linear-gradient(135deg, #10b981, #059669); }

[data-theme="dark"] .edu-award {
  background: rgba(255,200,0,0.06);
  border-color: rgba(255,200,0,0.15);
}

[data-theme="dark"] .skill-group:hover {
  box-shadow: 0 4px 20px rgba(79,110,247,0.12);
}

[data-theme="dark"] #back-to-top {
  background: var(--gray-6);
  border-color: var(--gray-5);
  color: var(--gray-2);
}

[data-theme="dark"] #kbd-toast {
  background: #f0f0f8;
  color: #3a3a58;
}
[data-theme="dark"] #kbd-toast kbd {
  background: #e0e0f0;
  color: #3a3a58;
  border-color: #c0c0d8;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Typography ── */
h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
}
h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}
h3 { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
h4 {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-3);
  margin-bottom: 0.9rem;
}
p { color: var(--gray-2); line-height: 1.75; }

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

.section-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0 56px;
  align-items: start;
}

.section-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-4);
  padding-top: 6px;
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}

section { padding: var(--section-gap) 0; }
section + section { border-top: 1px solid var(--gray-5); }

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── Nav ── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  z-index: 100;
  transition: border-color 0.25s;
}
#nav.scrolled { border-color: var(--gray-5); }

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

.nav-logo {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #4f6ef7, #00c4b8, #a855f7, #4f6ef7);
  background-size: 300% 300%;
  animation: logo-gradient 4s ease infinite;
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0;
  flex-shrink: 0;
}

@keyframes logo-gradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Nav identity (persists after hero scrolls away) ── */
.nav-identity {
  display: flex;
  align-items: center;
  text-decoration: none;
  position: relative;
  height: 36px;
  min-width: 34px;
}

/* MM logo — visible by default, JS drives opacity/transform */
.nav-logo-mm {
  opacity: 1;
  transform: scale(1);
  will-change: opacity, transform;
  flex-shrink: 0;
}

/* Profile — JS drives opacity/transform */
.nav-profile {
  display: flex;
  align-items: center;
  gap: 9px;
  position: absolute;
  left: 0;
  opacity: 0;
  transform: translateX(-8px);
  will-change: opacity, transform;
  pointer-events: none;
  white-space: nowrap;
}

.nav-avatar {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  object-position: 50% 30%;
  border: 1.5px solid var(--gray-5);
  flex-shrink: 0;
}

.nav-profile-text {
  display: flex;
  flex-direction: column;
}

.nav-profile-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--black);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.nav-profile-title {
  font-size: 0.68rem;
  color: var(--gray-3);
  font-weight: 500;
  line-height: 1.25;
}

/* Scrolled past hero: hide MM, show profile */
#nav.has-identity .nav-logo-mm {
  opacity: 0;
  transform: scale(0.75) translateY(2px);
  pointer-events: none;
}
#nav.has-identity .nav-profile {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
/* widen container once profile is visible */
#nav.has-identity .nav-identity {
  min-width: 180px;
  transition: min-width 0.3s ease;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

#theme-toggle {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--gray-4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s;
  flex-shrink: 0;
  padding: 0;
}
#theme-toggle:hover {
  color: var(--gray-2);
}

/* show sun in dark mode, moon in light mode */
.icon-moon { display: block; }
.icon-sun  { display: none;  }
[data-theme="dark"] .icon-moon { display: none;  }
[data-theme="dark"] .icon-sun  { display: block; }

/* smooth theme transition */
body, #nav, .company-card, .skill-group, .edu-card,
.contact-item, .role-bullets li, .btn-ghost {
  transition: background 0.25s ease, background-color 0.25s ease,
              border-color 0.25s ease, color 0.25s ease;
}

/* Resume nav link */
.nav-resume {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(135deg, #4f6ef7, #00c4b8, #a855f7, #4f6ef7);
  background-size: 300% 300%;
  animation: logo-gradient 4s ease infinite;
  padding: 5px 13px;
  border-radius: 20px;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.nav-resume:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.nav-links { display: flex; gap: 2px; }
.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-3);
  padding: 6px 13px;
  border-radius: 20px;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--black); background: var(--gray-6); }
.nav-links a.active { color: var(--black); background: var(--gray-5); }

/* ── Hero ── */
#hero {
  padding-top: calc(var(--nav-h) + 48px);
  padding-bottom: 56px;
  min-height: 0;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}


#hero::before {
  content: '';
  position: absolute;
  top: 5%; left: -8%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(79,110,247,0.07) 0%, transparent 65%);
  pointer-events: none;
  border-radius: 50%;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 56px;
  align-items: flex-end;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-3);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 18px; height: 1.5px;
  background: var(--accent);
  border-radius: 2px;
}

#hero h1 { margin-bottom: 14px; }

.hero-name-accent {
  background: linear-gradient(130deg, var(--accent) 0%, var(--teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-6);
  border: 1px solid var(--gray-5);
  border-radius: 20px;
  padding: 5px 13px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-2);
  margin-bottom: 20px;
}
.hero-badge-mark {
  width: 8px; height: 8px;
  background: linear-gradient(135deg, #4f6ef7, #00c4b8, #a855f7, #4f6ef7);
  background-size: 300% 300%;
  animation: logo-gradient 4s ease infinite;
  border-radius: 2px;
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* ── Hero role display ── */
.hero-role-display {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.hero-company-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-6);
  border: 1px solid var(--gray-5);
  border-radius: 20px;
  padding: 5px 13px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-2);
  width: fit-content;
}

.hero-role-line {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--black);
  letter-spacing: -0.02em;
  height: 1.6rem;
  display: flex;
  align-items: center;
  gap: 1px;
  overflow: hidden;
}

.type-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  border-radius: 1px;
  margin-left: 1px;
  animation: blink 1s step-end infinite;
  vertical-align: middle;
  flex-shrink: 0;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-sub {
  font-size: 1rem;
  color: var(--gray-2);
  max-width: 480px;
  margin-bottom: 32px;
  line-height: 1.75;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--black);
  color: var(--white);
  border-radius: 100px;
  padding: 13px 20px 13px 26px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  overflow: hidden;
  position: relative;
}
.cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.22);
  background: var(--gray-1);
}

.cta-arrow {
  width: 30px;
  height: 30px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 12px;
  flex-shrink: 0;
  transition: transform 0.22s ease, background 0.18s;
}
.cta-primary:hover .cta-arrow {
  transform: translateX(3px);
  background: rgba(255,255,255,0.2);
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-3);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.18s;
}
.cta-secondary::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.cta-secondary:hover {
  color: var(--black);
}
.cta-secondary:hover::after {
  width: 100%;
}
.cta-secondary svg {
  opacity: 0.6;
  transition: transform 0.2s, opacity 0.2s;
}
.cta-secondary:hover svg {
  transform: translate(2px, -2px);
  opacity: 1;
}

/* ── Photo ── */
.hero-photo-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  position: relative;
  margin-bottom: -56px;
}

.hero-photo-frame {
  position: relative;
  z-index: 1;
  width: 380px; height: 500px;
  overflow: visible;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.hero-photo {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center bottom;
  display: block;
  filter:
    drop-shadow(0 8px 24px rgba(0,0,0,0.3))
    drop-shadow(0 2px 6px rgba(0,0,0,0.15));
}

[data-theme="dark"] .hero-photo {
  filter:
    drop-shadow(0 8px 32px rgba(0,0,0,0.5))
    drop-shadow(0 0 50px rgba(79,110,247,0.18))
    drop-shadow(0 0 24px rgba(0,196,184,0.1));
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.18s ease;
  cursor: pointer;
  letter-spacing: -0.01em;
}
.btn-primary {
  background: var(--black);
  color: var(--white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15), 0 4px 14px rgba(0,0,0,0.08);
}
.btn-primary:hover { background: #1a1a2e; transform: translateY(-1px); }
.btn-ghost {
  border: 1px solid var(--gray-5);
  color: var(--gray-2);
  background: var(--white);
}
.btn-ghost:hover { border-color: var(--gray-4); color: var(--black); background: var(--gray-6); transform: translateY(-1px); }

/* ── About ── */
#about .section-content p + p { margin-top: 0.9rem; }

.about-stats {
  display: flex;
  gap: 28px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-5);
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(130deg, var(--accent), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 0.72rem; color: var(--gray-3); font-weight: 500; }

/* ═══════════════════════════════════════
   EXPERIENCE — Card-based redesign
═══════════════════════════════════════ */
.timeline { display: flex; flex-direction: column; gap: 16px; }

.company-card {
  border: 1px solid var(--gray-5);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.company-card:hover {
  border-color: rgba(79,110,247,0.3);
  box-shadow: 0 4px 24px rgba(79,110,247,0.06);
}

/* Company header strip */
.company-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--gray-6);
  border-bottom: 1px solid var(--gray-5);
}

.company-initial {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.company-initial.telus    { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.company-initial.dynacare { background: linear-gradient(135deg, #0891b2, #0e7490); }
.company-initial.pcc      { background: linear-gradient(135deg, #059669, #047857); }

.company-meta { flex: 1; min-width: 0; }
.company-meta h3 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}
.company-tagline {
  font-size: 0.75rem;
  color: var(--gray-3);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-tenure {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gray-3);
  font-family: var(--mono);
  background: var(--white);
  border: 1px solid var(--gray-5);
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Role entries inside card */
.company-roles { padding: 0 20px; }

.role-entry {
  padding: 16px 0;
  border-bottom: 1px dashed var(--gray-5);
}
.role-entry:last-child { border-bottom: none; }

.role-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.role-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.015em;
  line-height: 1.35;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-5);
  display: block;
  width: 100%;
}

.role-date {
  font-size: 0.7rem;
  color: var(--gray-4);
  font-family: var(--mono);
  white-space: nowrap;
  padding-top: 2px;
  flex-shrink: 0;
}

.role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}
.tag {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(79,110,247,0.2);
  padding: 2px 8px;
  border-radius: 20px;
}
.tag.teal {
  color: #0891b2;
  background: rgba(8,145,178,0.08);
  border-color: rgba(8,145,178,0.2);
}
.tag.green {
  color: #059669;
  background: rgba(5,150,105,0.08);
  border-color: rgba(5,150,105,0.2);
}

.role-bullets {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 2px;
}
.role-bullets li {
  list-style: none;
  font-size: 0.825rem;
  color: var(--gray-3);
  line-height: 1.55;
  padding: 8px 10px 8px 12px;
  border-left: 2px solid var(--gray-5);
  border-radius: 0 6px 6px 0;
  transition: border-color 0.15s, background 0.15s;
}
.role-bullets li:hover {
  border-left-color: var(--accent);
  background: var(--gray-6);
}
.role-bullets li strong {
  color: var(--black);
  font-weight: 600;
}

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.skill-group {
  border: 1px solid var(--gray-5);
  border-radius: var(--radius);
  border-top-width: 3px;
  padding: 18px 20px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.skill-group[data-color="purple"] { background: rgba(139,92,246,0.04); border-top-color: #8b5cf6; }
.skill-group[data-color="blue"]   { background: rgba(79,110,247,0.04);  border-top-color: #4f6ef7; }
.skill-group[data-color="teal"]   { background: rgba(0,196,184,0.04);   border-top-color: #00c4b8; }
.skill-group[data-color="amber"]  { background: rgba(245,158,11,0.04);  border-top-color: #f59e0b; }

.skill-group[data-color="purple"]:hover { box-shadow: 0 4px 24px rgba(139,92,246,0.1); transform: translateY(-2px); }
.skill-group[data-color="blue"]:hover   { box-shadow: 0 4px 24px rgba(79,110,247,0.1);  transform: translateY(-2px); }
.skill-group[data-color="teal"]:hover   { box-shadow: 0 4px 24px rgba(0,196,184,0.1);   transform: translateY(-2px); }
.skill-group[data-color="amber"]:hover  { box-shadow: 0 4px 24px rgba(245,158,11,0.1);  transform: translateY(-2px); }

.skill-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.skill-group-header h4 { margin-bottom: 0; }

.skill-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.skill-icon--purple { background: rgba(139,92,246,0.12); color: #8b5cf6; }
.skill-icon--blue   { background: rgba(79,110,247,0.12);  color: #4f6ef7; }
.skill-icon--teal   { background: rgba(0,196,184,0.12);   color: #00c4b8; }
.skill-icon--amber  { background: rgba(245,158,11,0.12);  color: #f59e0b; }

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

.skill-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-2);
  background: var(--white);
  border: 1px solid var(--gray-5);
  border-radius: 20px;
  padding: 4px 11px;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
  cursor: default;
}

.skill-group[data-color="purple"] .skill-tag:hover { background: rgba(139,92,246,0.08); border-color: rgba(139,92,246,0.3); color: #8b5cf6; transform: translateY(-1px); }
.skill-group[data-color="blue"]   .skill-tag:hover { background: rgba(79,110,247,0.08);  border-color: rgba(79,110,247,0.3);  color: #4f6ef7; transform: translateY(-1px); }
.skill-group[data-color="teal"]   .skill-tag:hover { background: rgba(0,196,184,0.08);   border-color: rgba(0,196,184,0.3);   color: #00c4b8; transform: translateY(-1px); }
.skill-group[data-color="amber"]  .skill-tag:hover { background: rgba(245,158,11,0.08);  border-color: rgba(245,158,11,0.3);  color: #f59e0b; transform: translateY(-1px); }

/* dark mode adjustments */
[data-theme="dark"] .skill-tag {
  background: var(--gray-5);
  border-color: var(--gray-4);
}

/* ── Education ── */
.edu-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.edu-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  background: var(--gray-6);
  border: 1px solid var(--gray-5);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.edu-card:hover { border-color: var(--gray-4); }
.edu-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--gray-5);
  border: 1px solid var(--gray-5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gray-3);
}
.edu-card h3 { font-size: 0.875rem; margin-bottom: 3px; }
.edu-org {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 3px;
  line-height: 1.4;
}
.edu-detail {
  font-size: 0.775rem;
  color: var(--gray-3);
  line-height: 1.5;
  margin-bottom: 5px;
}
.edu-award {
  font-size: 0.75rem;
  color: var(--gray-2);
  background: rgba(255,200,0,0.07);
  border: 1px solid rgba(255,200,0,0.2);
  border-radius: 6px;
  padding: 4px 9px;
  line-height: 1.5;
  display: inline-block;
}

.community { padding-top: 4px; }
.community-list { display: flex; flex-direction: column; }
.community-list li {
  font-size: 0.85rem;
  color: var(--gray-2);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--gray-5);
  gap: 12px;
}
.community-list li:last-child { border-bottom: none; }
.community-list li span {
  font-size: 0.72rem;
  color: var(--gray-4);
  font-family: var(--mono);
  white-space: nowrap;
}

/* ── Contact ── */
#contact p { margin-bottom: 28px; }

.contact-links { display: flex; flex-direction: column; gap: 8px; }

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--gray-2);
  padding: 11px 16px;
  border: 1px solid var(--gray-5);
  border-radius: var(--radius);
  background: var(--white);
  transition: all 0.18s ease;
  width: fit-content;
  font-weight: 500;
}
.contact-item:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
  transform: translateX(4px);
}
.contact-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--gray-5);
  color: var(--gray-2);
  flex-shrink: 0;
  transition: background 0.18s, color 0.18s;
}
.contact-item:hover .contact-icon { background: rgba(79,110,247,0.15); color: var(--accent); }

/* ── Scroll Progress Bar ── */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--teal));
  z-index: 200;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ── Section Dots ── */
.section-dots {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 90;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gray-5);
  border: 1.5px solid var(--gray-4);
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
  display: block;
}
.dot:hover {
  background: var(--gray-4);
  transform: scale(1.3);
}
.dot.active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.25);
}

/* ── Back to Top ── */
#back-to-top {
  position: fixed;
  bottom: 28px;
  right: 24px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--white);
  border: 1px solid var(--gray-5);
  color: var(--gray-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s, border-color 0.15s;
  pointer-events: none;
  z-index: 90;
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#back-to-top:hover {
  background: var(--gray-6);
  border-color: var(--gray-4);
  color: var(--black);
}

/* ── Keyboard toast ── */
#kbd-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--black);
  color: var(--gray-4);
  font-size: 0.72rem;
  padding: 7px 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
  z-index: 90;
}
#kbd-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#kbd-toast kbd {
  background: var(--gray-1);
  color: var(--gray-4);
  border: 1px solid var(--gray-2);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: var(--mono);
  font-size: 0.68rem;
}

@media (max-width: 700px) {
  .section-dots { display: none; }
  #kbd-toast    { display: none; }
}

/* ── Footer ── */
footer {
  padding: 24px 0;
  border-top: 1px solid var(--gray-5);
}
footer .container { display: flex; align-items: center; justify-content: space-between; }
footer p { font-size: 0.75rem; color: var(--gray-4); }
.footer-links { display: flex; gap: 18px; }
.footer-links a { font-size: 0.75rem; color: var(--gray-4); transition: color 0.15s; }
.footer-links a:hover { color: var(--gray-2); }

/* ── Responsive ── */

/* Prevent any horizontal overflow */
html, body { overflow-x: hidden; max-width: 100%; }

@media (max-width: 820px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 0;
    align-items: flex-start;
  }
  .hero-photo-wrap {
    justify-content: center;
    margin-bottom: -56px;
  }
  .hero-photo-frame { width: 260px; height: 340px; }
}

@media (max-width: 700px) {
  :root { --section-gap: 56px; }

  /* Nav: hide links, keep logo + toggle */
  .nav-links { display: none; }
  .nav-inner { padding: 0 20px; }

  /* Layout */
  .section-grid { grid-template-columns: 1fr; gap: 8px 0; }
  .section-label { position: static; margin-bottom: 6px; }
  .container { padding: 0 20px; }

  /* Hero */
  #hero { padding-top: calc(var(--nav-h) + 32px); }
  .hero-role-line { font-size: 0.95rem; }
  .hero-sub { font-size: 0.95rem; }

  /* Stats */
  .about-stats { gap: 20px; }

  /* Experience */
  .timeline { gap: 12px; }
  .company-header { flex-wrap: wrap; gap: 10px; padding: 14px 16px; }
  .company-roles { padding: 0 14px; }
  .role-header { flex-direction: column; align-items: flex-start; gap: 4px; }
  .role-date { align-self: flex-start; }
  .role-tags { gap: 4px; }

  /* Skills */
  .skills-grid { grid-template-columns: 1fr; }

  /* Education */
  .edu-card { flex-direction: column; gap: 10px; }

  /* Contact */
  .contact-item { width: 100%; }

  /* Section dots hidden */
  .section-dots { display: none; }
  #kbd-toast { display: none; }
}

@media (max-width: 500px) {
  .hero-layout { gap: 24px; }
  .hero-photo-wrap { justify-content: center; margin-bottom: -56px; }
  .hero-photo-frame { width: 220px; height: 290px; }
  h1 { font-size: 2.4rem; }
  .hero-cta { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 20px; }
  footer .container { flex-direction: column; gap: 10px; align-items: flex-start; }
  .community-list li { flex-direction: column; gap: 2px; }
  .skills-grid { grid-template-columns: 1fr; }
  .about-stats { flex-wrap: wrap; gap: 16px; }
}

/* ── Dark mode: fix role tag colors for teal / green ── */
[data-theme="dark"] .tag.teal {
  color: #38bdf8;
  background: rgba(56,189,248,0.08);
  border-color: rgba(56,189,248,0.2);
}
[data-theme="dark"] .tag.green {
  color: #34d399;
  background: rgba(52,211,153,0.08);
  border-color: rgba(52,211,153,0.2);
}

/* ── Reduced motion: respect OS preference ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .type-cursor { animation: none; opacity: 1; }
  .nav-logo, .nav-resume, .hero-badge-mark { animation: none; }
}
