:root {
  --bg: #f5efe4;
  --bg-deep: #e6d6bc;
  --panel: rgba(255, 251, 245, 0.9);
  --panel-strong: #fffaf2;
  --text: #221b17;
  --muted: #6b5b51;
  --accent: #9d4f2f;
  --accent-soft: #d7a56d;
  --line: rgba(34, 27, 23, 0.12);
  --shadow: 0 24px 60px rgba(63, 34, 17, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Gill Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(157, 79, 47, 0.18), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(215, 165, 109, 0.28), transparent 24%),
    linear-gradient(180deg, #f9f4eb 0%, var(--bg) 54%, #efe2cf 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(34, 27, 23, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 27, 23, 0.025) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 80%);
}

.page-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
  position: relative;
}

.main-content {
  position: relative;
}

.hero,
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero {
  padding: 34px;
  border-radius: 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 248, 238, 0.88), rgba(245, 239, 228, 0.9)),
    url("./tree-social.webp") center center / contain no-repeat;
  opacity: 1;
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker,
.timeline-date,
.timeline-subtitle,
.compact-note,
.identity-card span {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
}

.hero-grid,
.content-grid {
  display: grid;
  gap: 24px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.9fr);
  align-items: start;
}

.focus-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  line-height: 1.02;
}

h1 {
  font-size: clamp(2.7rem, 5vw, 5rem);
  max-width: 10ch;
}

.role {
  margin: 18px 0 8px;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  color: var(--accent);
  max-width: 32rem;
}

.summary {
  max-width: 42rem;
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.button-primary {
  background: var(--text);
  color: #fff7ee;
  box-shadow: 0 12px 24px rgba(34, 27, 23, 0.2);
}

.button-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--line);
}

.identity-card {
  padding: 22px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.95), rgba(246, 233, 210, 0.92));
  border: 1px solid rgba(157, 79, 47, 0.16);
}

.profile-photo-shell {
  margin-bottom: 18px;
}

.profile-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(157, 79, 47, 0.16);
  background: linear-gradient(135deg, rgba(157, 79, 47, 0.08), rgba(215, 165, 109, 0.18));
}

.profile-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 700;
}

.identity-card p {
  margin: 0;
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid rgba(34, 27, 23, 0.08);
}

.identity-card p:last-child {
  border-bottom: 0;
}

.identity-card span,
.timeline-date,
.timeline-subtitle,
.compact-note {
  font-size: 0.72rem;
  color: var(--muted);
}

.identity-card a {
  color: inherit;
  text-decoration: none;
}

.panel-highlight {
  padding: 28px;
  border-radius: 28px;
  margin-bottom: 24px;
  background:
    linear-gradient(135deg, rgba(255, 249, 240, 0.95), rgba(246, 229, 195, 0.92)),
    var(--panel);
}

.qualities {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.qualities article,
.timeline-item,
.compact-list article {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(34, 27, 23, 0.08);
}

.qualities p,
.timeline-item p,
.compact-list p {
  margin: 8px 0 0;
  line-height: 1.7;
  color: var(--muted);
}

.content-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(280px, 0.78fr);
  align-items: start;
}

.panel {
  padding: 28px;
  border-radius: 28px;
}

.panel-education {
  position: sticky;
  top: 24px;
  align-self: start;
}

.skills-sidebar {
  display: none;
}

.skills-panel {
  padding: 24px;
}

.sidebar-divider {
  height: 1px;
  margin: 22px 0;
  background: rgba(34, 27, 23, 0.08);
}

.panel-heading-inline {
  margin-bottom: 16px;
}

.stack {
  display: grid;
  gap: 24px;
}

.panel-heading {
  margin-bottom: 20px;
}

h2 {
  font-size: clamp(1.9rem, 3vw, 2.8rem);
}

h3 {
  font-size: 1.18rem;
}

.timeline,
.compact-list {
  display: grid;
  gap: 14px;
}

.compact-list-scroll {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.timeline-item ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.skill-list {
  display: grid;
  gap: 12px;
}

.skill-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(34, 27, 23, 0.08);
}

.skill-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.skill-list span {
  line-height: 1.5;
}

.skill-list strong {
  white-space: nowrap;
  color: var(--accent);
}

.rating-block {
  display: inline-flex;
  align-items: center;
}

.rating-stars {
  position: relative;
  display: inline-block;
  line-height: 1;
  letter-spacing: 0.12em;
}

.rating-base {
  color: rgba(157, 79, 47, 0.22);
}

.rating-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--rating);
  overflow: hidden;
  white-space: nowrap;
  color: var(--accent);
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.interest-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(157, 79, 47, 0.08);
  border: 1px solid rgba(157, 79, 47, 0.14);
  color: var(--text);
  font-weight: 700;
}

.interest-tags-sidebar span {
  width: 100%;
  justify-content: center;
}

.interest-tags-wide span {
  background: rgba(255, 255, 255, 0.6);
}

@media (min-width: 1280px) {
  .page-shell {
    width: calc(100% - 48px);
    max-width: 1720px;
  }

  .main-content {
    padding-left: 356px;
  }

  .skills-sidebar {
    display: block;
    position: fixed;
    top: 32px;
    left: max(24px, calc((100vw - min(1720px, calc(100% - 48px))) / 2));
    width: 300px;
    z-index: 10;
  }

  .skills-panel {
    max-height: calc(100vh - 64px);
    overflow: auto;
  }

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

  .stack {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .hero-grid,
  .content-grid,
  .qualities,
  .focus-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .panel,
  .panel-highlight {
    padding: 22px;
    border-radius: 24px;
  }

  .skills-sidebar {
    display: block;
    position: static;
    margin-bottom: 24px;
  }

  .main-content {
    padding-left: 0;
  }

  .panel-education {
    position: static;
  }

  .compact-list-scroll {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 18px, 100%);
    padding-top: 16px;
    padding-bottom: 28px;
  }

  h1 {
    font-size: 2.5rem;
  }

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

  .button {
    width: 100%;
  }

  .skill-list div {
    flex-direction: column;
  }
}
