:root {
  --bg: #ECEEF2;
  --tile: #FFFFFF;
  --ink: #14161A;
  --ink-soft: #23262D;
  --muted: #5A6070;
  --soft: #8B92A3;
  --chip: #F1F2F5;
  --line: #EEF0F3;
  --radius: 28px;
  --gap: 16px;
  --orange: linear-gradient(140deg, #FF7A3D, #FF4E6A);
  --violet: linear-gradient(140deg, #7C5CFF, #4B3BD6);
  --blue: linear-gradient(140deg, #1F9BFF, #1360E2);
  --green: linear-gradient(140deg, #19B37A, #0E8A70);
  --brand: linear-gradient(135deg, #FF8A4C, #E8467C 55%, #7C5CFF);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 110px; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

.icon { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 40px 40px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 28px 0;
  padding: 12px 12px 12px 26px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(20, 22, 26, .06);
}
.logo { font-weight: 800; font-size: 18px; }
.nav-links { display: flex; gap: 30px; font-size: 15px; font-weight: 500; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-light { background: var(--chip); color: var(--ink); }
.btn-light:hover { background: #E4E6EB; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--chip); padding: 8px 13px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.chip::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--dot, var(--soft));
  vertical-align: middle;
}

.label { font-size: 13px; font-weight: 600; color: var(--soft); text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Bento grid ---------- */
.section { margin-top: 52px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 20px; padding: 0 6px; }
.section-head h2 { font-size: 36px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin-top: 6px; }

.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(200px, auto); gap: var(--gap); }
.s2 { grid-column: span 2; }
.r2 { grid-row: span 2; }

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 30px;
  background: var(--tile);
  border-radius: var(--radius);
  overflow: hidden;
}
.bg-dark { background: var(--ink); color: #fff; }
.bg-orange { background: var(--orange); color: #fff; }
.bg-violet { background: var(--violet); color: #fff; }
.bg-blue { background: var(--blue); color: #fff; }
.bg-green { background: var(--green); color: #fff; }
[class*="bg-"] .label { color: rgba(255, 255, 255, .72); }
a.tile { transition: transform .25s, box-shadow .25s; }
a.tile:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(20, 22, 26, .12); }

/* ---------- Hero ---------- */
.avatar { width: 104px; height: 104px; padding: 3px; border-radius: 50%; background: var(--brand); object-fit: cover; }
.intro h1 { font-size: 48px; line-height: 1.08; letter-spacing: -.035em; font-weight: 800; }
.intro h1 span { color: var(--soft); }
.profile { display: flex; align-items: center; gap: 20px; }
.profile-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.profile-stack { margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.pulse {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: #E6F7EE;
  color: #17804A;
  font-size: 14px;
  font-weight: 700;
}
.pulse i { width: 9px; height: 9px; border-radius: 50%; background: #22B566; animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 181, 102, .45); }
  100% { box-shadow: 0 0 0 9px rgba(34, 181, 102, 0); }
}
.big { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.meta { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin-top: 8px; }

/* ---------- Stats ---------- */
.stat-num { font-size: 72px; font-weight: 800; letter-spacing: -.05em; line-height: .9; }
.stat-num small { font-size: .45em; letter-spacing: -.02em; }
.stat-text { font-size: 15px; line-height: 1.5; max-width: 360px; }
.tile:not([class*="bg-"]) .stat-text { color: var(--muted); }

/* ---------- Experience timeline (vertical on small screens) ---------- */
.hint { display: none; margin-top: 6px; font-size: 14px; color: var(--muted); }
.timeline { position: relative; display: flex; flex-direction: column; justify-content: flex-start; gap: 0; }
.timeline::before { content: ''; position: absolute; left: 53px; top: 60px; bottom: 40px; width: 2px; background: linear-gradient(180deg, #DCDFE6, #FF7A3D); }
.job { position: relative; display: grid; grid-template-columns: 48px 1fr; column-gap: 16px; padding: 14px 0; border-radius: 22px; outline: none; }
.job-logo {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 3px solid var(--tile);
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(20, 22, 26, .14);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.job-date { font-size: 13px; font-weight: 700; color: #E8602C; }
.job-date span { white-space: nowrap; }
.job h3 { margin-top: 4px; font-size: 17px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.job-place { margin-top: 2px; font-size: 13px; color: var(--muted); }
.job-details { list-style: none; display: grid; gap: 10px; margin-top: 16px; font-size: 14.5px; color: var(--muted); }
.job-details li { position: relative; padding-left: 18px; }
.job-details li::before { content: ''; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: #FF7A3D; }
.job-details b { color: var(--ink); font-weight: 700; }

/* Horizontal accordion: only logos show until a job is hovered, then it grows and opens */
@media (min-width: 1025px) {
  .hint { display: block; }
  .timeline { flex-direction: row; gap: 12px; padding: 18px; container-type: inline-size; }
  .timeline::before { left: 18px; right: 18px; top: 61px; bottom: auto; width: auto; height: 2px; background: linear-gradient(90deg, #DCDFE6, #FF7A3D); }
  .job { display: block; flex: 1 1 0; min-width: 0; padding: 20px; overflow: hidden; cursor: pointer; transition: flex-grow .45s ease, background .3s ease; }
  .job.is-active { flex-grow: 2.6; background: var(--ink); color: #fff; cursor: default; }
  .job-body { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .45s ease, opacity .2s ease; }
  .job.is-active .job-body { grid-template-rows: 1fr; opacity: 1; transition: grid-template-rows .45s ease, opacity .3s ease .2s; }
  .job-body > div { width: calc((100cqw - 248px) / 6.6 * 2.6); min-height: 0; overflow: hidden; }
  .job-date { display: block; margin-top: 18px; color: #FF9A6B; }
  .job-place { color: rgba(255, 255, 255, .65); }
  .job-details { color: rgba(255, 255, 255, .78); }
  .job-details b { color: #fff; }
}

/* ---------- Recommendations carousel ---------- */
.recs { gap: 26px; }
.recs-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.recs-head h2 { font-size: 36px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin-top: 6px; }
.recs-controls { display: flex; gap: 10px; }
.arrow-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--ink-soft);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: background .2s;
}
.arrow-btn:hover { background: #343844; }

.recs-track {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.recs-track::-webkit-scrollbar { display: none; }

.rec {
  position: relative;
  flex: 0 0 calc((100% - 2 * var(--gap)) / 3);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border-radius: 22px;
  background: var(--ink-soft);
}
.rec::after {
  content: '\201D';
  position: absolute;
  top: 4px;
  right: 22px;
  font-family: Georgia, serif;
  font-size: 96px;
  line-height: 1;
  color: rgba(255, 255, 255, .08);
}
.rec blockquote {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .85);
}
.rec-author { display: flex; gap: 12px; align-items: center; }
.rec-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-weight: 800; font-size: 15px; flex-shrink: 0; background: var(--orange); }
.rec:nth-child(4n + 2) .rec-avatar { background: var(--violet); }
.rec:nth-child(4n + 3) .rec-avatar { background: var(--blue); }
.rec:nth-child(4n + 4) .rec-avatar { background: var(--green); }
.rec-name { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.01em; color: #fff; }
.rec-role { display: block; font-size: 13px; color: rgba(255, 255, 255, .6); line-height: 1.4; }
.rec-company {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 3px 10px 3px 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.rec-company:not(:has(img)) { padding-left: 10px; }
.rec-company img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.rec-relation { margin-top: auto; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }

.recs-foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 14px; color: rgba(255, 255, 255, .6); }
.recs-foot a { color: #fff; font-weight: 600; }
.progress { flex: 1; max-width: 320px; height: 4px; border-radius: 4px; background: var(--ink-soft); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--brand); transition: width .3s; }

/* ---------- Projects ---------- */
.proj h3 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.proj p { font-size: 15px; opacity: .88; margin-top: 8px; max-width: 380px; }
.proj .go {
  position: absolute;
  top: 26px;
  right: 26px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  font-size: 18px;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; padding-right: 56px; }
.tags span { background: rgba(255, 255, 255, .2); padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.featured p { max-width: 300px; }

.csv {
  position: absolute;
  right: -24px;
  top: 84px;
  width: 330px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  color: var(--ink);
  font-size: 12px;
  transform: rotate(-5deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .2);
}
.csv div { display: grid; grid-template-columns: 1.6fr 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.csv div:last-child { border: 0; }
.csv div:first-child { font-weight: 700; color: var(--soft); text-transform: uppercase; letter-spacing: .06em; font-size: 10px; }

/* ---------- Education & contact ---------- */
.list { list-style: none; display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.list b { color: var(--ink); }
.contact .big { font-size: 34px; }
.contact-row { display: flex; flex-wrap: wrap; gap: 10px; }
.mail {
  display: flex;
  flex: 1;
  min-width: 240px;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--ink-soft);
  font-size: 15px;
}
.mail button { border: 0; background: none; color: rgba(255, 255, 255, .7); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.mail button:hover { color: #fff; }
.social { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--ink-soft); transition: background .2s; }
.social:hover { background: #343844; }

.footer { display: flex; justify-content: space-between; margin-top: 40px; padding: 0 6px; font-size: 14px; color: var(--soft); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .rec { flex-basis: calc((100% - var(--gap)) / 2); }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px 32px; }
  .nav { margin: 16px 0 20px; padding-left: 20px; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .s2, .r2 { grid-column: auto; grid-row: auto; }
  .tile { padding: 24px; min-height: 180px; }
  .intro h1 { font-size: 36px; }
  .profile { gap: 16px; }
  .avatar { width: 84px; height: 84px; }
  .profile-title { font-size: 19px; }
  .section { margin-top: 40px; }
  .section-head h2, .recs-head h2 { font-size: 28px; }
  .stat-num { font-size: 60px; }
  .timeline::before { left: 47px; }
  .rec { flex-basis: 88%; padding: 22px; }
  .featured { min-height: 420px; }
  .csv { width: 280px; top: 76px; }
  .recs-foot { flex-direction: column; align-items: start; }
  .progress { width: 100%; max-width: none; }
  .footer { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse i { animation: none; }
}
