/* ============================================================
   COMPONENTS
   ============================================================ */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.94rem;
  padding: 13px 24px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: var(--ink-900);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--navy-700);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
[data-theme="dark"] .btn-primary {
  background: var(--accent);
  color: var(--text-on-accent);
}
[data-theme="dark"] .btn-primary:hover {
  background: var(--accent-strong);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 0.84rem;
}

/* ---------- Top navbar (desktop) ---------- */
.navbar {
  position: fixed;
  inset: var(--sp-4) var(--sp-4) auto var(--sp-4);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: 10px 10px 10px 22px;
  border-radius: var(--r-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--dur-mid) var(--ease-out), background var(--dur-mid) var(--ease-out);
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.navbar__brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--navy-700), var(--ink-950));
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--surface-muted);
  border-radius: var(--r-pill);
  padding: 4px;
}

.navbar__link {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.navbar__link svg { width: 18px; height: 18px; }

.navbar__link:hover {
  color: var(--text-primary);
}

.navbar__link.is-active {
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: var(--shadow-sm);
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.navbar__cta {
  flex-shrink: 0;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-muted);
  border: 1px solid transparent;
  color: var(--text-primary);
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}
.icon-btn:hover {
  transform: translateY(-2px);
  border-color: var(--border);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.navbar__menu-btn {
  display: none;
}

/* ---------- Mobile bottom tab bar ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: space-around;
  height: var(--tabbar-h);
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--glass-bg);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

.tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--r-md);
  transition: color var(--dur-fast) var(--ease-out);
}
.tabbar__item svg {
  width: 20px;
  height: 20px;
}
.tabbar__item.is-active {
  color: var(--accent-strong);
}

/* ---------- Hero ---------- */
.hero {
  padding-top: calc(var(--nav-h) + 32px);
  padding-bottom: var(--sp-7);
  position: relative;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}

/* ---- Decorative fill (replaces floating badge chips) ---- */
.hero-shell__deco {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  z-index: 0;
  pointer-events: none;
}
.hero-shell__deco--a {
  width: 320px;
  height: 320px;
  top: -130px;
  right: -90px;
  background: var(--amber-400);
  opacity: 0.3;
}
.hero-shell__deco--b {
  width: 260px;
  height: 260px;
  bottom: -110px;
  left: -70px;
  background: var(--teal-500);
  opacity: 0.22;
}
.hero-shell__deco-grid {
  position: absolute;
  bottom: 18px;
  right: 18px;
  width: 96px;
  height: 96px;
  background-image: radial-gradient(var(--border) 1.6px, transparent 1.6px);
  background-size: 13px 13px;
  opacity: 0.7;
  z-index: 0;
  pointer-events: none;
}
[data-theme="dark"] .hero-shell__deco--a { opacity: 0.16; }
[data-theme="dark"] .hero-shell__deco--b { opacity: 0.14; }

.hero-shell__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}
.hero-shell__top .eyebrow {
  margin-bottom: 0;
}

.hero-shell__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--sp-7);
  align-items: center;
}

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.hero__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2fbf71;
  box-shadow: 0 0 0 4px rgba(47, 191, 113, 0.18);
  animation: pulse-dot 2.4s var(--ease-in-out) infinite;
}

.hero__title {
  margin-bottom: 10px;
}
.hero__title .line {
  display: block;
  overflow: hidden;
}
.hero__title span {
  display: inline-block;
  transform: translateY(110%);
  animation: rise-in var(--dur-slow) var(--ease-out) forwards;
}
.hero__title .accent-text {
  background: linear-gradient(100deg, var(--accent-strong), var(--amber-400) 60%, var(--teal-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__role-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-4);
}

.hero__tagline {
  font-size: clamp(1.02rem, 1.1vw + 0.6rem, 1.25rem);
  color: var(--text-primary);
  max-width: 46ch;
  margin-bottom: var(--sp-6);
  font-weight: 500;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-7);
}

.hero__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
  max-width: 560px;
}

.fact-chip {
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface-muted);
}
.fact-chip__label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.fact-chip__value {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ---- Hero avatar ---- */
.hero__avatar-wrap {
  display: flex;
  justify-content: center;
}

.hero-avatar-lg {
  width: clamp(150px, 17vw, 210px);
  height: clamp(150px, 17vw, 210px);
  border-radius: 50%;
  object-fit: cover;
  background: transparent;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 4vw, 3rem);
  box-shadow: 0 16px 36px -12px rgba(15, 30, 55, 0.4);
  position: relative;
}
.hero-avatar-lg::after {
  display: none;
}

.hero__scroll-cue {
  position: relative;
  margin-top: var(--sp-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.hero__scroll-cue .cue-line {
  width: 1px;
  height: 28px;
  background: linear-gradient(var(--text-muted), transparent);
  animation: cue-move 1.8s var(--ease-in-out) infinite;
}

/* ---------- Generic cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-mid) var(--ease-out), box-shadow var(--dur-mid) var(--ease-out), border-color var(--dur-mid) var(--ease-out);
}

.card--hover:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}

/* ---------- About section ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
  gap: var(--sp-7);
  align-items: start;
}

.about__text p + p {
  margin-top: var(--sp-4);
}

.about__facts {
  display: grid;
  gap: var(--sp-3);
}

.mini-fact {
  padding: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.mini-fact__icon {
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.mini-fact__icon svg { width: 20px; height: 20px; }

.mini-fact__label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.mini-fact__value {
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--text-primary);
}

/* ---------- Section shell (big white card wrapping a section) ---------- */
.shell-card {
  padding: clamp(24px, 4vw, 44px);
}

.shell-card__head {
  max-width: 640px;
  margin-bottom: var(--sp-6);
}

.shell-panel {
  background: var(--surface-muted);
  border-radius: var(--r-lg);
  padding: clamp(12px, 2.4vw, 20px);
  display: grid;
  gap: 8px;
}

.shell-panel--groups {
  gap: 0;
}

/* ---------- List row (reused by Skills / Career / Projects / Education / Certifications / Activities) ---------- */
.list-row {
  display: grid;
  align-items: center;
  column-gap: 14px;
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.list-row:hover {
  box-shadow: var(--shadow-md);
}

.list-row--icon-chev { grid-template-columns: auto 1fr auto; }
.list-row--icon-only { grid-template-columns: auto 1fr; }
.list-row--chev-only { grid-template-columns: 1fr auto; }
.list-row--plain { grid-template-columns: 1fr; }

.list-row__icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.list-row__icon svg { width: 19px; height: 19px; }
.list-row__icon--a { background: linear-gradient(135deg, var(--navy-600), var(--ink-950)); }
.list-row__icon--b { background: linear-gradient(135deg, var(--teal-500), var(--teal-600)); }
.list-row__icon--c { background: linear-gradient(135deg, var(--amber-500), var(--amber-600)); }
.list-row__icon--d { background: linear-gradient(135deg, var(--plum-500), var(--plum-600)); }

.list-row__body { min-width: 0; }

.list-row__title-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.list-row__title {
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.list-row__meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.list-row__right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.list-row__subtitle {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.list-row__extra {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.list-row__level {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.badge-current {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.64rem;
  font-family: var(--font-mono);
  color: #2fbf71;
  background: rgba(47, 191, 113, 0.12);
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-weight: 700;
}
.badge-current::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: #2fbf71;
}

.list-row__chevron-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-muted);
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.list-row__chevron-btn:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.list-row__chevron-btn svg {
  width: 14px;
  height: 14px;
  transition: transform var(--dur-fast) var(--ease-out);
}
.list-row.is-open .list-row__chevron-btn svg {
  transform: rotate(180deg);
}

.list-row__detail {
  grid-column: 1 / -1;
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--dur-mid) var(--ease-in-out), margin var(--dur-mid) var(--ease-in-out);
}
.list-row.is-open .list-row__detail {
  max-height: 640px;
  margin-top: 12px;
}

.list-row__detail-inner {
  padding-left: 56px;
}
.list-row--icon-only .list-row__detail-inner,
.list-row--chev-only .list-row__detail-inner,
.list-row--plain .list-row__detail-inner {
  padding-left: 0;
}

.list-row__detail p {
  font-size: 0.86rem;
  margin-bottom: 10px;
}
.list-row__detail ul {
  display: grid;
  gap: 8px;
}
.list-row__detail li {
  font-size: 0.86rem;
  color: var(--text-secondary);
  padding-left: 16px;
  position: relative;
}
.list-row__detail li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 5px;
  height: 5px;
  background: var(--accent);
  transform: rotate(45deg);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid transparent;
}

/* ---------- Skills (grouped list rows inside the shell panel) ---------- */
.skill-group {
  padding: clamp(10px, 2vw, 16px);
}
.skill-group + .skill-group {
  margin-top: 4px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.skill-group__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-inline: 4px;
}

.skill-group__icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}
.skill-group__icon svg { width: 15px; height: 15px; }
.skill-group:nth-of-type(1) .skill-group__icon { background: linear-gradient(135deg, var(--navy-600), var(--ink-950)); }
.skill-group:nth-of-type(2) .skill-group__icon { background: linear-gradient(135deg, var(--teal-500), var(--teal-600)); }
.skill-group:nth-of-type(3) .skill-group__icon { background: linear-gradient(135deg, var(--amber-500), var(--amber-600)); }

.skill-group__title {
  font-family: var(--font-display);
  font-size: 0.94rem;
  color: var(--text-primary);
}

.skill-group__rows {
  display: grid;
  gap: 8px;
}

/* ---------- Working style ---------- */
.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-4);
}

.style-card {
  padding: var(--sp-5);
  position: relative;
}

.style-card__title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.style-card__title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
  transform: rotate(45deg);
}

.style-card p {
  font-size: 0.88rem;
}

/* ---------- Education ---------- */
.edu-row__detail {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- Contact / Footer ---------- */
.contact-card {
  padding: clamp(32px, 5vw, 64px);
  text-align: center;
  background: linear-gradient(160deg, var(--ink-950), var(--navy-700));
  color: #fff;
  border: none;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(480px 260px at 85% 0%, rgba(255, 138, 61, 0.28), transparent 65%);
}
.contact-card > * { position: relative; z-index: 1; }

.contact-card h2 { color: #fff; margin-bottom: var(--sp-3); }
.contact-card p { color: rgba(255, 255, 255, 0.72); max-width: 50ch; margin: 0 auto var(--sp-6); }

.contact-card .btn-primary {
  background: var(--accent);
  color: var(--text-on-accent);
}
.contact-card .btn-primary:hover { background: var(--amber-400); }
.contact-card .btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.contact-card .btn-ghost:hover { border-color: rgba(255, 255, 255, 0.5); }

.contact-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.contact-info__item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: #fff;
}
.contact-info__item svg {
  width: 15px;
  height: 15px;
  color: var(--amber-400);
  flex-shrink: 0;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: center;
}

.site-footer {
  padding: var(--sp-6) 0 calc(var(--sp-6) + var(--tabbar-h));
  text-align: center;
}
.site-footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.site-footer .footer-brand {
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-bottom: 6px;
}

@media (min-width: 761px) {
  .site-footer { padding-bottom: var(--sp-6); }
}
