:root {
  --bg: #f4f5fa;
  --surface: #ffffff;
  --surface-soft: #f8f9fd;
  --line: rgba(31, 41, 55, 0.08);
  --line-strong: rgba(31, 41, 55, 0.14);
  --ink: #1f2433;
  --muted: #6b7280;
  --muted-dim: #9aa1b0;
  --accent: #ff6b57;
  --accent-strong: #ec5240;
  --accent-soft: rgba(255, 107, 87, 0.12);
  --accent-2: #4f63d2;
  --shadow: 0 18px 45px rgba(31, 41, 51, 0.08);
  --shadow-sm: 0 8px 20px rgba(31, 41, 51, 0.06);
  --max-width: 1180px;
  --radius: 18px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Poppins", var(--sans);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  transform: translateY(-100%);
  transition: transform 140ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid transparent;
  background: rgba(244, 245, 250, 0.7);
  backdrop-filter: blur(14px);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(var(--max-width), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.98rem;
}

.brand-mark {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 700;
}

.brand-name {
  color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span {
  width: 1.05rem;
  height: 2px;
  background: var(--ink);
  border-radius: 999px;
  transition: transform 160ms ease, opacity 160ms ease;
}

.site-header.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.nav a {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 150ms ease, background 150ms ease;
}

.nav a:hover {
  color: var(--ink);
  background: var(--surface-soft);
}


/* ---------- layout helpers ---------- */

main,
.site-footer {
  width: min(var(--max-width), calc(100% - 2.5rem));
  margin: 0 auto;
}

.section {
  padding: 4.5rem 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 2.4rem;
  text-align: center;
  margin-inline: auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.section-tag-icon {
  display: inline-flex;
  width: 1.1rem;
  height: 1.1rem;
}

.section-tag-icon svg {
  width: 100%;
  height: 100%;
}

h1, h2, h3, p, ul {
  margin-top: 0;
}

h1, h2, h3 {
  font-family: var(--display);
  color: var(--ink);
}

h1 {
  max-width: 760px;
  margin-bottom: 1.2rem;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  font-weight: 700;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 700;
}

h3 {
  margin-bottom: 0.7rem;
  font-size: 1.05rem;
  font-weight: 600;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 5rem) 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.7fr);
  gap: 2.5rem;
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  color: var(--accent-strong);
  font-size: 0.95rem;
  font-weight: 700;
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero-headline-inline {
  display: inline;
  color: var(--muted);
  font-size: 0.55em;
  font-weight: 500;
  vertical-align: middle;
}

.hero-text {
  max-width: 560px;
  margin-bottom: 1.8rem;
  color: var(--muted);
  font-size: clamp(0.96rem, 1.4vw, 1.05rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 1.3rem;
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 14px 28px rgba(255, 107, 87, 0.32);
}

.button.primary:hover {
  background: var(--accent-strong);
}

.button.secondary {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.button.outline {
  border-color: var(--line-strong);
  color: var(--muted);
  background: transparent;
}

.button.outline:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.stat-stack {
  display: grid;
  gap: 0.7rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.95rem 1.15rem;
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.stat-card strong {
  display: flex;
  flex-shrink: 0;
  align-items: baseline;
  gap: 0.05em;
  color: var(--accent-strong);
  font-family: var(--display);
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  line-height: 1;
}

.stat-card > span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

/* ---------- profile ---------- */

.lede {
  max-width: 760px;
  margin-inline: auto;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  text-align: center;
}

.lede strong,
#profile-experience-years {
  color: var(--accent-strong);
  font-weight: 700;
}

/* ---------- skills ---------- */

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.skill-card {
  --card-a: var(--accent);
  --card-b: #f97316;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.7rem 1.5rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--card-a), var(--card-b));
}

.skill-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--card-a) 35%, var(--line));
  box-shadow: var(--shadow);
}

.skill-card-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.2rem;
}

.skill-card-icon {
  display: inline-grid;
  flex-shrink: 0;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--card-a), var(--card-b));
  color: #fff;
  box-shadow: 0 8px 16px -4px color-mix(in srgb, var(--card-a) 55%, transparent);
}

.skill-card-icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.skill-card h3 {
  position: relative;
  margin: 0;
  color: var(--ink);
  font-size: 1.04rem;
}

.skill-rows {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-rows li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 0.35rem 0.7rem 0.35rem 0.55rem;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
  transition: border-color 160ms ease, background 160ms ease;
}

.skill-card:hover .skill-rows li {
  border-color: color-mix(in srgb, var(--card-a) 25%, var(--line));
}

.skill-dot {
  flex-shrink: 0;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--card-a), var(--card-b));
}

/* ---------- experience timeline ---------- */

.timeline {
  display: grid;
  gap: 0;
  position: relative;
  margin-left: 0.3rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  bottom: 0.4rem;
  left: 0;
  width: 2px;
  background: var(--line-strong);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 0 0 2.2rem 1.75rem;
}

.timeline-item:last-of-type {
  padding-bottom: 0;
}

.timeline-end-marker {
  position: absolute;
  left: 0.25rem;
  bottom: 0;
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  transform: translate(-50%, 50%);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 0 0 4px var(--surface);
}

.timeline-end-marker svg {
  width: 0.95rem;
  height: 0.95rem;
}

.timeline-rail {
  position: relative;
}

.timeline-dot {
  position: absolute;
  top: 0.3rem;
  left: -1.95rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--accent-soft);
}

.timeline-rail small {
  display: block;
  color: var(--muted-dim);
  font-size: 0.8rem;
  font-weight: 600;
}

.timeline-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.timeline-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.timeline-card-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.timeline-card-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.15rem;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.impact-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.96rem;
}

.impact-list li::marker {
  color: var(--accent);
}

.progression-note {
  margin: 1.1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  color: var(--muted-dim);
  font-size: 0.84rem;
  font-weight: 600;
}

/* ---------- education ---------- */

.education-list {
  display: grid;
  gap: 0.85rem;
}

.education-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.3rem 1.6rem;
  box-shadow: var(--shadow-sm);
}

.education-card h3 {
  flex: 1 0 100%;
  margin: 0 0 0.3rem;
  color: var(--ink);
  font-size: 1.05rem;
}

.education-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

/* ---------- awards ---------- */

.award-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.award-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.05rem 1.2rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.award-list li::before {
  content: "✓";
  flex-shrink: 0;
  display: inline-grid;
  width: 1.4rem;
  height: 1.4rem;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 800;
}

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.2rem 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

a.contact-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.contact-label {
  color: var(--muted-dim);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.contact-card > span:last-child {
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* ---------- footer ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 3rem;
  color: var(--muted-dim);
  font-size: 0.86rem;
}

.site-footer a {
  color: var(--accent-strong);
  font-weight: 700;
}

/* ---------- responsive ---------- */

@media (max-width: 920px) {
  .header-inner {
    flex-wrap: wrap;
  }

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

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    margin-top: 0.5rem;
    border-radius: var(--radius);
  }

  .site-header.nav-open .nav {
    display: flex;
  }

  .nav a {
    padding: 0.75rem 0.9rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-copy h1,
  .hero-copy .hero-text {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .section {
    padding: 3.25rem 0;
  }

  .section-head {
    margin-bottom: 1.8rem;
  }

  .stat-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 480px;
    margin-inline: auto;
  }

  .skill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  main,
  .header-inner,
  .site-footer {
    width: min(100% - 2rem, var(--max-width));
  }

  .section {
    padding: 2.5rem 0;
  }

  .section-head {
    margin-bottom: 1.4rem;
  }

  .timeline-end-marker {
    display: none;
  }

  .stat-stack,
  .skill-grid,
  .contact-grid,
  .award-list {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .timeline::before {
    display: none;
  }

  .timeline-item {
    padding-left: 1.4rem;
  }

  .timeline-rail {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .timeline-dot {
    position: static;
    box-shadow: 0 0 0 4px var(--accent-soft);
  }

  .hero-actions,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions {
    align-items: center;
  }

  .button {
    width: 100%;
  }
}
