:root {
  --azure: #1686e8;
  --azure-dark: #0868c2;
  --azure-soft: #eef7ff;
  --navy: #12233e;
  --text: #27364c;
  --muted: #6d7a8e;
  --line: #dfe8f2;
  --page: #f8fbfe;
  --white: #ffffff;
  --shadow: 0 8px 28px rgba(30, 79, 125, .07);
  --radius: 14px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #fff 0, var(--page) 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: var(--azure-dark); }
.shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
[id] { scroll-margin-top: 88px; }

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  color: var(--white);
  background: linear-gradient(180deg, rgba(6, 24, 48, .48) 0%, rgba(6, 24, 48, .2) 55%, transparent 100%);
}
.nav-wrap { min-height: 86px; display: flex; align-items: flex-start; justify-content: flex-end; padding-top: 26px; }
nav { display: flex; gap: 28px; }
nav a { color: var(--white); text-decoration: none; font-size: .92rem; font-weight: 600; text-shadow: 0 1px 8px rgba(0, 20, 48, .55); border-bottom: 2px solid transparent; padding-bottom: 5px; }
nav a:hover, nav a:focus-visible { color: var(--white); border-bottom-color: currentColor; }

.hero-photo { height: clamp(320px, 37vw, 560px); overflow: hidden; background: #cfeaff; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }

.profile { position: relative; min-height: 160px; display: flex; align-items: center; padding: 26px 0 30px 300px; }
.portrait {
  position: absolute;
  left: 34px;
  bottom: 26px;
  width: 225px;
  height: 260px;
  object-fit: cover;
  object-position: center 35%;
  border: 5px solid #fff;
  border-radius: 18px;
  box-shadow: 0 10px 32px rgba(18,35,62,.18);
}
.profile-copy h1 { margin: 0 0 2px; color: var(--navy); font-size: clamp(2.1rem, 4vw, 3.5rem); line-height: 1.05; letter-spacing: -.045em; }
.role { margin: 6px 0; color: var(--azure); font-size: 1.3rem; font-weight: 650; }
.positioning { max-width: 760px; margin: 8px 0 0; color: var(--muted); font-size: 1.02rem; }
.positioning span { padding: 0 5px; color: #aab6c4; }

.section-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 34px; }
.about-card { margin-top: 18px; }
.section-block { padding-top: 42px; }
.section-title { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.section-title h2 { margin: 0; color: var(--navy); font-size: 1.35rem; letter-spacing: -.02em; }
.icon { width: 22px; height: 22px; color: var(--azure); flex: 0 0 22px; }
.icon svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.about-text { padding-left: 26px; }
.about-text p { margin: 0 0 15px; }
.about-text p:last-child { margin-bottom: 0; }

.timeline { position: relative; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 18px; bottom: 18px; width: 2px; background: #d7ebfb; }
.job { position: relative; margin-bottom: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 16px rgba(30,79,125,.045); overflow: hidden; }
.job::before { content: ""; position: absolute; z-index: 2; left: -31px; top: 25px; width: 9px; height: 9px; border-radius: 50%; background: var(--azure); box-shadow: 0 0 0 5px var(--page); }
.job summary { cursor: pointer; list-style: none; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 17px 48px 17px 22px; position: relative; }
.job summary::-webkit-details-marker { display: none; }
.job summary::after { content: "⌄"; position: absolute; right: 20px; top: 50%; transform: translateY(-54%); color: var(--azure-dark); font-size: 1.3rem; transition: transform .2s ease; }
.job[open] summary::after { transform: translateY(-40%) rotate(180deg); }
.job summary strong { display: block; color: var(--navy); font-size: 1rem; }
.job summary small { display: block; margin-top: 2px; color: var(--muted); font-size: .91rem; }
.job time { color: var(--muted); font-size: .86rem; white-space: nowrap; }
.job[open] summary { border-bottom: 1px solid var(--line); background: linear-gradient(90deg, var(--azure-soft), #fff 52%); }
.job-body { padding: 18px 26px 22px; color: #425269; }
.job-body ul { margin: 0; padding-left: 20px; }
.job-body li { margin: 0 0 10px; }
.job-body li:last-child { margin-bottom: 0; }
.compact-history p { margin: 0 0 12px; }
.compact-history p:last-child { margin-bottom: 0; }

.lower-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding-top: 42px; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chips span { padding: 7px 12px; border-radius: 999px; background: var(--azure-soft); color: #145c9d; font-size: .88rem; border: 1px solid #dceeff; }
.education-item + .education-item { margin-top: 20px; }
.education-item strong { color: var(--navy); }
.education-item p { margin: 4px 0 0; color: var(--muted); }

.contact { margin-top: 42px; padding: 34px 0 50px; border-top: 1px solid var(--line); display: flex; align-items: baseline; gap: 28px; flex-wrap: wrap; }
.contact h2 { margin: 0 18px 0 0; color: var(--navy); }
.contact p { margin: 0; }
.contact a { text-decoration: none; }
.contact a:hover { text-decoration: underline; }
footer { background: #edf7ff; color: var(--muted); padding: 22px 0; font-size: .86rem; }

@media (max-width: 780px) {
  .nav-wrap { min-height: 68px; width: 100%; padding: 18px 14px 0; overflow-x: auto; }
  nav { min-width: max-content; gap: 16px; }
  nav a { font-size: .8rem; }
  .hero-photo { height: 300px; }
  .profile { min-height: 0; display: block; padding: 92px 0 26px; }
  .portrait { left: 0; bottom: auto; top: -88px; width: 150px; height: 170px; border-radius: 15px; }
  .profile-copy h1 { font-size: 2.35rem; }
  .positioning span { display: none; }
  .positioning { line-height: 1.7; }
  .section-card { padding: 24px 20px; }
  .about-text { padding-left: 0; }
  .timeline { padding-left: 25px; }
  .timeline::before { left: 5px; }
  .job::before { left: -24px; }
  .job summary { grid-template-columns: 1fr; gap: 8px; padding: 15px 42px 15px 17px; }
  .job time { white-space: normal; }
  .job-body { padding: 16px 18px 20px; }
  .lower-grid { grid-template-columns: 1fr; }
  .contact { display: block; }
  .contact h2, .contact p { margin-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .job summary::after { transition: none; }
}
