:root {
    --ink: #151e2f;
    --muted: #52627a;
    --faint: #8090a9;
    --blue: #2587eb;
    --line: #d9e5f3;
    --services: #f5f8fd;
    --reviews: #f7fafd;
    --contact-bg: #fffaf0;
    --contact-line: #eee0c4;
    --radius: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: #fff;
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, a { -webkit-tap-highlight-color: transparent; }
a { color: #1180ef; text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 3px solid #105db8; outline-offset: 3px; }
[hidden] { display: none !important; }

.cover { width: 100%; height: clamp(250px, 29vw, 390px); overflow: hidden; }
.cover-image { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 60%; }
.page-container { width: calc(100% - 60px); max-width: 1200px; margin: 0 auto; }

/* Profile photo overlaps the cover exactly as in the reference mockup. */
.profile {
    position: relative;
    display: grid;
    grid-template-columns: 202px minmax(0, 1fr);
    align-items: start;
    column-gap: 20px;
    min-height: 260px;
    padding: 0 15px;
    margin-top: -94px;
    margin-bottom: 36px;
}
.profile-photo {
    display: block;
    width: 202px;
    height: auto;
    aspect-ratio: 1097 / 1434;
    border: 6px solid #fff;
    border-radius: var(--radius);
    box-shadow: 0 7px 25px rgba(21, 30, 47, .13);
    background: #fff;
}
.profile-description { padding-top: 126px; min-width: 0; }
.profile h1 {
    margin: 0 0 1px;
    font-size: clamp(36px, 4.4vw, 50px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.025em;
}
.profile-description p { margin: 0; color: var(--muted); font-size: clamp(15px, 1.65vw, 18px); line-height: 1.5; }
.accent-line { width: 55px; height: 5px; background: var(--blue); border-radius: var(--radius); margin-top: 11px; }
.profile .accent-line { width: 63px; margin-top: 15px; }

.summary-grid { display: grid; grid-template-columns: minmax(0, 2.58fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); }
.panel h2 { margin: 0; font-size: 29px; line-height: 1.2; letter-spacing: -.035em; font-weight: 700; }
.services, .contact { min-height: 327px; padding: 30px; }
.services { background: var(--services); }
.services-list { margin: 27px 0 0; padding-left: 30px; font-size: 18px; line-height: 2.05; }
.services-list li { padding-left: 0; }
.services-list li::marker { color: var(--blue); font-size: 16px; }
.contact { background: var(--contact-bg); border-color: var(--contact-line); }
.contact-list { margin: 23px 0 0; font-size: 14px; line-height: 1.35; }
.contact-list > div + div { margin-top: 0; }
.contact-list dt { font-weight: 700; }
.contact-list dd { margin: 0; color: var(--muted); }
.contact-list a { overflow-wrap: anywhere; }

.reviews { background: var(--reviews); margin-top: 18px; padding: 26px 26px 12px; }
.reviews h2 { font-size: 28px; }
.reviews > .accent-line { margin-top: 12px; }
.review-list { display: grid; row-gap: 6px; margin-top: 13px; }
.review-item {
    display: grid;
    grid-template-columns: 42px 173px minmax(0, 1fr);
    column-gap: 15px;
    align-items: center;
    min-height: 60px;
    padding: 8px 18px;
    background: #fff;
    border: 1px solid #e0e9f5;
    border-radius: var(--radius);
}
.review-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: #e0edfc;
    color: #4a5b72;
    font-weight: 700;
    font-size: 16px;
    font-variant-numeric: tabular-nums;
}
.review-item:nth-child(5n+2) .review-number { background: #e8e7fa; }
.review-item:nth-child(5n+3) .review-number { background: #e0f2eb; }
.review-item:nth-child(5n+4) .review-number { background: #fceddf; }
.review-item:nth-child(5n+5) .review-number { background: #e6edf6; }
.review-meta { min-width: 0; }
.review-meta h3 { margin: 0; font-size: 14px; line-height: 1.45; font-weight: 700; }
.review-meta p { margin: 1px 0 0; color: var(--faint); font-size: 12px; }
.review-body { margin: 0; color: var(--faint); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.more-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 205px;
    height: 38px;
    margin: 15px auto 0;
    color: #fff;
    background: var(--blue);
    border: 1px solid var(--blue);
    border-radius: var(--radius);
    font: 700 14px Arial, Helvetica, sans-serif;
    cursor: pointer;
    transition: background-color .15s ease;
}
.more-button:hover { background: #106dcd; }
.more-button span { font-size: 19px; font-weight: 400; line-height: 1; }
.no-reviews { margin: 16px 0; color: var(--muted); }

@media (max-width: 850px) {
    .summary-grid { grid-template-columns: minmax(0, 1.7fr) minmax(235px, 1fr); }
    .services, .contact { padding: 23px; }
    .profile { grid-template-columns: 172px minmax(0, 1fr); }
    .profile-photo { width: 172px; }
    .profile-description { padding-top: 110px; }
    .services-list { padding-left: 25px; font-size: 17px; }
    .panel h2 { font-size: 26px; }
    .review-item { grid-template-columns: 40px 120px minmax(0, 1fr); gap: 12px; }
}
@media (max-width: 660px) {
    .cover { height: 220px; }
    .page-container { width: calc(100% - 32px); }
    .profile {
        grid-template-columns: 118px minmax(0, 1fr);
        gap: 15px;
        padding: 0 3px;
        min-height: 154px;
        margin-top: -48px;
        margin-bottom: 24px;
    }
    .profile-photo { width: 118px; border-width: 4px; }
    .profile-description { padding-top: 55px; }
    .profile h1 { font-size: clamp(28px, 6vw, 36px); }
    .profile-description p { font-size: 13px; line-height: 1.35; margin-top: 3px; }
    .profile .accent-line { height: 4px; width: 48px; margin-top: 10px; }
    .summary-grid { grid-template-columns: 1fr; gap: 12px; }
    .services, .contact { min-height: 0; padding: 23px; }
    .services-list { margin-top: 18px; line-height: 1.9; }
    .contact-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; margin-top: 20px; }
    .contact-list > div + div { margin: 0; }
    .reviews { padding: 23px 16px 16px; margin-top: 12px; }
    .reviews h2 { font-size: 23px; }
    .review-list { margin-top: 16px; }
    .review-item { grid-template-columns: 36px minmax(0, 1fr); gap: 3px 12px; align-items: start; padding: 11px; }
    .review-number { grid-row: 1 / span 2; width: 36px; height: 36px; }
    .review-meta h3 { font-size: 14px; }
    .review-body { grid-column: 2; margin-top: 3px; font-size: 13px; }
}
@media (max-width: 375px) {
    .cover { height: 190px; }
    .profile { grid-template-columns: 98px minmax(0, 1fr); gap: 12px; min-height: 130px; }
    .profile-photo { width: 98px; }
    .profile-description { padding-top: 53px; }
    .profile h1 { font-size: 27px; }
    .profile-description p { font-size: 12px; }
    .contact-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .more-button { transition: none; }
}
