:root {
  /* dark theme defaults */
  --bg: #020617;
  --bg-alt: #0b1020;
  --card-bg: #0f172a;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.15);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #1f2937;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.85);
  --shadow-chip: 0 12px 30px rgba(15, 23, 42, 0.7);
  --max-width: 1080px;
}

/* Light theme overrides if system is light */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f9fafb;
    --bg-alt: #eef2ff;
    --card-bg: #ffffff;
    --accent: #0369a1;
    --accent-soft: rgba(56, 189, 248, 0.08);
    --text: #111827;
    --muted: #4b5563;
    --border: #e5e7eb;
    --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.15);
    --shadow-chip: 0 10px 24px rgba(15, 23, 42, 0.12);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg); /* solid background = no harsh section lines */
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

/* Optional but recommended */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
}
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid rgba(31, 41, 55, 0.7);
}

@media (prefers-color-scheme: light) {
  .nav {
    background: rgba(249, 250, 251, 0.98);
    border-bottom: 1px solid rgba(148, 163, 184, 0.4);
  }
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.7rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.nav-logo {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  overflow: hidden;
  margin-right: 8px;
}
.nav-logo:active {
  transform: scale(0.94);
  transition: transform 0.08s ease-out;
}
.nav-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nav-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
}

.nav-title {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Desktop nav links row */
.nav-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.9rem;
}

/* MENU TOGGLE ANIMATION */
.nav-toggle {
  display: none;
  background: var(--bg-alt);
  border: 1px solid rgba(148, 163, 184, 0.7);
  cursor: pointer;
  padding: 0.45rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease-out;
}

.nav-toggle-icon {
  position: relative;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.25s ease-out;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.25s ease-out, opacity 0.2s ease-out;
}

.nav-toggle-icon::before {
  top: -6px;
}

.nav-toggle-icon::after {
  top: 6px;
}

/* Light/Dark theme color */
.nav-toggle,
.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  color: #e5e7eb;
}

@media (prefers-color-scheme: light) {
  .nav-toggle,
  .nav-toggle-icon,
  .nav-toggle-icon::before,
  .nav-toggle-icon::after {
    color: #0f172a;
  }
}

/* OPEN (show X animation) */
.nav-toggle.open .nav-toggle-icon {
  background: transparent;
}

.nav-toggle.open .nav-toggle-icon::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.open .nav-toggle-icon::after {
  transform: translateY(-6px) rotate(-45deg);
}
.nav-toggle:active {
  transform: scale(0.92);
}

/* Desktop nav link look */
.nav-links a {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.18s ease-out;
  white-space: nowrap;
}

.nav-links a:hover {
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.9);
  color: #e5f0ff;
}

@media (prefers-color-scheme: light) {
  .nav-links a:hover {
    background: #0f172a;
    color: #e5f0ff;
  }
}

.nav-links .primary-link {
  border-color: rgba(56, 189, 248, 0.5);
  background: radial-gradient(
    circle at top left,
    rgba(56, 189, 248, 0.3),
    rgba(15, 23, 42, 0.97)
  );
  color: #e5faff;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.6);
  font-weight: 500;
}

.nav-links .primary-link:hover {
  border-color: rgba(56, 189, 248, 0.9);
  transform: translateY(-1px);
}

/* Mobile nav behavior */
@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-title {
    font-size: 0.75rem;
    
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0 auto;
    max-width: var(--max-width);
    padding: 0.45rem 0.9rem 0.75rem;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    background: rgba(15, 23, 42, 0.98);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    border-top: 1px solid rgba(31, 41, 55, 0.9);
  }

  @media (prefers-color-scheme: light) {
    .nav-links {
      background: rgba(249, 250, 251, 0.98);
      border-top-color: rgba(148, 163, 184, 0.5);
    }
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 0.45rem 0.7rem;
  }

  /* hamburger animation */
  .nav-toggle.open .nav-toggle-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
  }
  .nav-toggle.open .nav-toggle-line:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.open .nav-toggle-line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
  }
}

/* Layout */
.content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.6rem 1.1rem 2.4rem;
  flex: 1;
  width: 100%;
}

section {
  margin-bottom: 2.3rem;
}

.section-heading {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: #f9fafb;
}

@media (prefers-color-scheme: light) {
  .section-title {
    color: #0f172a;
  }
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
  gap: 1.75rem;
  align-items: center;
  margin-bottom: 2.4rem;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Hero avatar and header */
.hero-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.hero-avatar-wrapper {
  flex-shrink: 0;
}

.hero-avatar {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  border: 2px solid rgba(148, 163, 184, 0.6);
  overflow: hidden;
  background: radial-gradient(circle at 30% 30%, #38bdf8, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-heading-block {
  flex: 1;
}

.hero-main-title {
  font-size: clamp(2.1rem, 3vw, 2.6rem);
  line-height: 1.1;
  margin-bottom: 0.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-tagline {
  font-size: 0.95rem;
  color: #cbd5f5;
  margin-bottom: 0.2rem;
}

@media (prefers-color-scheme: light) {
  .hero-tagline {
    color: #4b5563;
  }
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.hero-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.9);
}

.hero-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.hero-highlight {
  color: #e5f2ff;
  font-weight: 500;
}

@media (prefers-color-scheme: light) {
  .hero-highlight {
    color: #0f172a;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.8rem;
}

/* Hero mobile layout */
@media (max-width: 640px) {
  .hero-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease-out;
  white-space: nowrap;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.7);
}

.btn-primary {
  background: radial-gradient(
    circle at top left,
    rgba(56, 189, 248, 0.28),
    rgba(15, 23, 42, 0.98)
  );
  color: #e5faff;
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: var(--shadow-soft);
  font-weight: 500;
}

.btn-primary:hover {
  border-color: rgba(56, 189, 248, 0.95);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--bg-alt);
  border-color: rgba(148, 163, 184, 0.5);
  color: var(--muted);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 1);
  color: var(--text);
  transform: translateY(-1px);
}

@media (prefers-color-scheme: light) {
  .btn-ghost {
    background: #ffffff;
    color: #4b5563;
  }
  .btn-ghost:hover {
    background: #0f172a;
    color: #e5f1ff;
  }
}
.btn:active {
  transform: translateY(1px) scale(0.98);
}

a:hover {
  text-decoration: underline;
}

.contact-details a,
.footer-link {
  text-underline-offset: 2px;
}

/* Hero right (current role) */
.hero-secondary {
  background: var(--card-bg);
  border-radius: 24px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  box-shadow: var(--shadow-soft);
  padding: 1.2rem 1.15rem;
  position: relative;
  overflow: hidden;
}

.hero-secondary::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(
      circle at 0% 10%,
      rgba(56, 189, 248, 0.13),
      transparent 55%
    ),
    radial-gradient(
      circle at 110% 90%,
      rgba(96, 165, 250, 0.1),
      transparent 50%
    );
  opacity: 0.9;
  pointer-events: none;
}

@media (prefers-color-scheme: light) {
  .hero-secondary {
    background: #f9fafb;
    border-color: #e5e7eb;
  }
  .hero-secondary::before {
    display: none;
  }
}

.hero-secondary-inner {
  position: relative;
  z-index: 1;
}

.hero-meta-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.hero-meta-value {
  font-size: 0.9rem;
  color: #e5f2ff;
  margin-bottom: 0.35rem;
}

@media (prefers-color-scheme: light) {
  .hero-meta-value {
    color: #0f172a;
  }
}

.hero-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.chip {
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: #d1d5db;
  box-shadow: var(--shadow-chip);
}

@media (prefers-color-scheme: light) {
  .chip {
    background: #e5f0ff;
    color: #0f172a;
  }
}

.chip-accent {
  background: var(--accent-soft);
  border-color: rgba(56, 189, 248, 0.7);
  color: #e0f2fe;
}

@media (prefers-color-scheme: light) {
  .chip-accent {
    background: #dbeafe;
    color: #0f172a;
  }
}

.hero-role-note {
  margin-top: 0.7rem;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Cards & grids */
.card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: 1.5rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1rem 1rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.9);
}

@media (prefers-color-scheme: light) {
  .card {
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.12);
  }
}

.card + .card {
  margin-top: 0.9rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 0.98rem;
  font-weight: 500;
  color: #e5e7eb;
}

@media (prefers-color-scheme: light) {
  .card-title {
    color: #0f172a;
  }
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
}

.card-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: var(--muted);
}

.card-body {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 0.35rem;
}

.card-list {
  margin-top: 0.35rem;
  padding-left: 1.05rem;
  list-style: disc;
}

.card-list li {
  margin-bottom: 0.25rem;
}

@media (max-width: 960px) {
  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Education */
.education-card {
  border-radius: 20px;
}

.education-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.edu-item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.4rem;
  border-radius: 10px;
  background: var(--bg-alt);
  border: 1px solid rgba(31, 41, 55, 0.9);
}

@media (prefers-color-scheme: light) {
  .edu-item {
    border-color: rgba(148, 163, 184, 0.7);
  }
}

.edu-main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.edu-degree {
  font-size: 0.9rem;
  font-weight: 500;
  color: #e5e7eb;
}

@media (prefers-color-scheme: light) {
  .edu-degree {
    color: #0f172a;
  }
}

.edu-inst {
  font-size: 0.8rem;
  color: var(--muted);
}

.edu-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.edu-year {
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: var(--bg-alt);
}

.edu-score {
  font-weight: 500;
  color: #e5f2ff;
}

@media (prefers-color-scheme: light) {
  .edu-score {
    color: #0f172a;
  }
}

.edu-note {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Skills */
.skill-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.skill-group {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 0.8rem 0.9rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.85);
}

@media (prefers-color-scheme: light) {
  .skill-group {
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.12);
  }
}

.skill-group-title {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #e5e7eb;
}

@media (prefers-color-scheme: light) {
  .skill-group-title {
    color: #0f172a;
  }
}

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

.skill-chip {
  font-size: 0.76rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid rgba(55, 65, 81, 0.85);
  color: var(--muted);
}

@media (max-width: 900px) {
  .skill-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .skill-groups {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Contact section */
.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.5rem;
  align-items: center;
}

@media (max-width: 860px) {
  .contact-card {
    grid-template-columns: minmax(0, 1fr);
  }
}

.contact-meta {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0.7rem;
}

.contact-details {
  font-size: 0.86rem;
  color: var(--muted);
}

.contact-details div {
  margin-bottom: 0.25rem;
}

/* Footer */
.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.8rem 1.1rem 1.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  background: #020617;
}

@media (prefers-color-scheme: light) {
  .footer {
    border-top: 1px solid rgba(148, 163, 184, 0.6);
    background: #f3f4f6;
  }
}

.footer span {
  color: var(--accent);
}
.footer-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.footer-link:hover {
  text-decoration: underline;
}

