@layer components {
  .profile-page {
    max-width: 560px;
  }

  .profile-page .page-header {
    margin-bottom: 28px;
  }

  .profile-page .page-title {
    font-family: var(--font-display);
    font-size: 39px;
    font-weight: 400;
    color: var(--ink-950);
    line-height: 1.0;
  }

  .profile-page .section-label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-400);
    margin-bottom: 10px;
    margin-top: 28px;
  }

  .profile-page .section-label:first-of-type {
    margin-top: 0;
  }

  /* ── Identity block ── */
  .profile-identity {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
  }

  .profile-avatar {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: var(--r-md);
    overflow: hidden;
  }

  .profile-avatar .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--forest-100);
    color: var(--forest-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 29px;
    font-weight: 500;
    border-radius: var(--r-md);
  }

  .avatar-placeholder.sm {
    font-size: 19px;
  }

  .profile-fullname {
    font-size: 21px;
    font-weight: 600;
    color: var(--ink-950);
    font-family: var(--font-ui);
  }

  .profile-email {
    font-size: 15px;
    color: var(--ink-400);
    margin-top: 2px;
  }

  /* ── Detail card ── */
  .profile-card {
    background: #fff;
    border: 1px solid var(--ink-100);
    border-radius: var(--r-lg);
    overflow: hidden;
  }

  .profile-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--ink-50);
  }

  .profile-row:last-child {
    border-bottom: none;
  }

  .profile-key {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-400);
    min-width: 110px;
    flex-shrink: 0;
  }

  .profile-val {
    font-size: 15px;
    color: var(--ink-900);
    font-weight: 500;
  }

  .profile-val a {
    color: var(--forest-700);
    text-decoration: none;
  }

  .profile-val a:hover {
    text-decoration: underline;
  }

  /* ── Bio ── */
  .profile-bio {
    padding: 16px 20px;
    font-size: 15px;
    color: var(--ink-700);
    line-height: 1.65;
  }

  .profile-bio p {
    margin: 0;
  }

  .profile-bio p + p {
    margin-top: 8px;
  }

  /* ── Note ── */
  .profile-note {
    margin-top: 20px;
    font-size: 14px;
    color: var(--ink-400);
    line-height: 1.5;
  }

  /* ── Actions ── */
  .profile-actions {
    margin-top: 20px;
  }

  .profile-actions .btn svg {
    width: 14px;
    height: 14px;
  }

  /* ── Edit form ── */
  .profile-form-card {
    background: #fff;
    border: 1px solid var(--ink-100);
    border-radius: var(--r-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .profile-photo-upload {
    display: flex;
    align-items: flex-start;
    gap: 20px;
  }

  .profile-avatar-sm {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: var(--r-md);
    overflow: hidden;
  }

  .profile-avatar-sm .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .profile-photo-upload .form-group {
    flex: 1;
  }

  .profile-form-actions {
    margin-top: 24px;
    display: flex;
    gap: 10px;
  }

  @media (max-width: 768px) {
    .profile-page .section-label { margin-top: var(--s5); }

    .profile-identity { gap: var(--s4); margin-bottom: var(--s6); }

    .profile-row { padding: var(--s3) var(--s4); }

    .profile-bio { padding: var(--s3) var(--s4); }

    .profile-form-card { padding: var(--s4); gap: var(--s4); }

    .profile-form-card input,
    .profile-form-card select,
    .profile-form-card textarea { width: 100%; }

    .profile-form-actions { margin-top: var(--s4); }
  }

  @media (max-width: 480px) {
    .profile-page .page-title { font-size: 29px; }

    .profile-identity { gap: var(--s3); }

    .profile-avatar { width: 60px; height: 60px; }

    .profile-key { min-width: 90px; }

    .profile-row { padding: var(--s2) var(--s3); }

    .profile-form-card { padding: var(--s3); }

    .profile-photo-upload { flex-direction: column; }
  }
}
