.profile-site {
  --ink: #102a43;
  --muted: #52616f;
  --line: #d8e2ec;
  --paper: #ffffff;
  --soft: #f7f9fb;
  --blue: #0b4f6c;
  --teal: #087f8c;
  --green: #1f7a4d;
  --gold: #b7791f;
  --red: #9b2c2c;
  color: var(--ink);
  background: var(--paper);
}

.profile-site * {
  box-sizing: border-box;
}

.profile-site a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.profile-hero {
  position: relative;
  display: flex;
  min-height: calc(82vh - 64px);
  align-items: flex-end;
  overflow: hidden;
  background-image:
    linear-gradient(90deg, rgba(16, 42, 67, 0.94) 0%, rgba(16, 42, 67, 0.82) 43%, rgba(16, 42, 67, 0.24) 100%),
    url("/images/profile.jpg");
  background-position: center;
  background-size: cover;
}

.profile-hero__inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 52px 0 40px;
}

.profile-kicker {
  margin: 0 0 12px;
  color: #a7f3d0;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-hero h1 {
  max-width: 820px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.profile-hero__lead {
  max-width: 760px;
  margin: 22px 0 0;
  color: #e6f1f5;
  font-size: clamp(1.02rem, 2.1vw, 1.28rem);
  line-height: 1.48;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.profile-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 6px;
  padding: 10px 16px;
  color: #ffffff !important;
  font-weight: 700;
  text-decoration: none;
}

.profile-button--solid {
  border-color: #f6ad55;
  background: #b7791f;
}

.profile-metrics {
  display: grid;
  width: min(1120px, calc(100% - 40px));
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 auto;
  border: 1px solid var(--line);
  background: var(--line);
  transform: translateY(-24px);
}

.profile-metric {
  min-height: 112px;
  padding: 20px;
  background: var(--paper);
}

.profile-metric strong {
  display: block;
  color: var(--teal);
  font-size: 2rem;
  line-height: 1;
}

.profile-metric span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.profile-section {
  padding: 54px 0;
}

.profile-section--soft {
  background: var(--soft);
}

.profile-wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.profile-section__head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr);
  gap: 36px;
  margin-bottom: 28px;
}

.profile-section__head h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.profile-section__head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

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

.profile-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--paper);
}

.profile-card h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.3;
}

.profile-card p,
.profile-card li {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.62;
}

.profile-card p {
  margin: 0 0 12px;
}

.profile-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
}

.profile-label {
  display: block;
  margin-bottom: 9px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-timeline {
  display: grid;
  gap: 16px;
}

.profile-role {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.profile-role__date {
  color: var(--teal);
  font-size: 0.92rem;
  font-weight: 800;
}

.profile-role h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.profile-role p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.66;
}

.profile-tech {
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 800;
}

.profile-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-list li {
  border-left: 3px solid var(--teal);
  padding-left: 14px;
}

.profile-project-table,
.profile-cv table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 0.94rem;
}

.profile-project-table th,
.profile-project-table td,
.profile-cv th,
.profile-cv td {
  border-bottom: 1px solid var(--line);
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
}

.profile-project-table th,
.profile-cv th {
  color: var(--ink);
  background: #edf4f7;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.profile-project-table td,
.profile-cv td {
  color: var(--muted);
}

.profile-cv {
  max-width: 980px;
  margin: 0 auto;
}

.profile-cv h2 {
  margin-top: 42px;
  border-bottom: 2px solid var(--teal);
  padding-bottom: 8px;
  color: var(--ink);
}

.profile-cv h3 {
  margin-bottom: 8px;
  color: var(--ink);
}

.profile-cv p,
.profile-cv li {
  color: var(--muted);
  line-height: 1.65;
}

.profile-note {
  border-left: 4px solid var(--gold);
  padding: 14px 18px;
  background: #fffaf0;
  color: #5f370e;
}

.article-list {
  display: grid;
  gap: 28px;
  margin-top: 34px;
}

.article-card {
  position: relative;
  border: 1px solid #cbd8e3;
  border-left: 6px solid var(--teal);
  border-radius: 8px;
  padding: 26px 28px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(16, 42, 67, 0.08);
}

.profile-cv .article-card h2 {
  margin: 0 0 14px;
  border: 0;
  padding: 0;
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1.25;
}

.profile-cv .article-card h2 a {
  color: var(--ink);
  text-decoration: none;
}

.profile-cv .article-card h2 a:hover {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.article-card p {
  max-width: 860px;
  margin: 0 0 18px;
}

.article-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--blue);
  border-radius: 6px;
  padding: 8px 14px;
  background: var(--blue);
  color: #ffffff !important;
  font-weight: 800;
  text-decoration: none !important;
}

.article-link:hover {
  background: var(--teal);
  border-color: var(--teal);
}

.article-index .profile-label {
  display: inline-flex;
  width: auto;
  margin-bottom: 14px;
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff7e6;
  color: #8a560f;
  font-size: 0.72rem;
}

.article-index .profile-note {
  font-size: 1rem;
  line-height: 1.65;
}

.article-page {
  max-width: 1040px;
}

.article-page h1 {
  margin-top: 34px;
  color: var(--ink);
}

.article-page h2 {
  scroll-margin-top: 84px;
}

.article-page h3,
.article-page h4 {
  scroll-margin-top: 84px;
}

.article-page pre {
  overflow-x: auto;
  border-radius: 8px;
  padding: 16px;
  background: #0f172a;
  color: #e2e8f0;
}

.article-page code {
  font-size: 0.92em;
}

.article-page :not(pre) > code {
  border-radius: 4px;
  padding: 2px 5px;
  background: #edf4f7;
  color: var(--ink);
}

@media (max-width: 900px) {
  .profile-metrics,
  .profile-grid,
  .profile-grid--two,
  .profile-section__head,
  .profile-role {
    grid-template-columns: 1fr;
  }

  .profile-metrics {
    transform: none;
    margin-top: 0;
  }

  .profile-role {
    gap: 8px;
  }
}

@media (max-width: 640px) {
  .profile-hero {
    min-height: auto;
    background-image:
      linear-gradient(180deg, rgba(16, 42, 67, 0.92) 0%, rgba(16, 42, 67, 0.72) 54%, rgba(16, 42, 67, 0.34) 100%),
      url("/images/profile.jpg");
  }

  .profile-hero__inner,
  .profile-wrap,
  .profile-metrics {
    width: min(100% - 28px, 1120px);
  }

  .profile-hero__inner {
    padding: 46px 0 34px;
  }

  .profile-actions {
    flex-direction: column;
  }

  .profile-button {
    width: 100%;
  }

  .profile-project-table,
  .profile-cv table {
    display: block;
    overflow-x: auto;
  }

  .article-card {
    padding: 18px;
  }

}
