/* ============================================================
   Campus photo wall + personal profile
   ============================================================ */
.photo-wall-card {
  position: relative;
  margin-top: 12px;
  padding: 16px;
  background: var(--cine-panel, rgba(6, 28, 22, .72));
  border: 1px solid var(--cine-line, rgba(224, 237, 226, .15));
  border-radius: 20px;
  box-shadow: var(--cine-shadow, 0 24px 60px rgba(0, 0, 0, .34));
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
}
.photo-wall-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.photo-wall-head h2 {
  margin: 0;
  color: var(--cine-cream, #f2ecdf);
  font-family: var(--font-display, sans-serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.photo-wall-head p {
  margin: 3px 0 0;
  color: var(--cine-muted, #a9b9ab);
  font-size: 7.5px;
  letter-spacing: .08em;
}
.photo-wall-upload {
  flex: none;
  padding: 8px 12px;
  color: #061b15;
  background: linear-gradient(135deg, #f2ecdf, #d7b878);
  border: 0;
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 700;
  cursor: pointer;
}
.photo-wall-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.photo-tile {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(224, 237, 226, .12);
  border-radius: 12px;
}
.photo-tile > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}
.photo-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(2, 13, 10, .82) 100%);
  pointer-events: none;
}
.photo-tile:hover > img { transform: scale(1.04); }
.photo-tile-meta {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 7px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: #f2ecdf;
  font-size: 7px;
  line-height: 1.3;
}
.photo-tile-meta img,
.photo-tile-meta .initial {
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  color: #061b15;
  background: #d7b878;
  font-size: 7px;
  font-weight: 700;
}
.photo-tile-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.photo-wall-empty {
  padding: 24px 12px;
  color: var(--cine-muted, #a9b9ab);
  border: 1px dashed var(--cine-line, rgba(224, 237, 226, .15));
  border-radius: 14px;
  font-size: 8px;
  text-align: center;
  line-height: 1.8;
}
.photo-wall-more {
  display: flex;
  justify-content: center;
  margin-top: 9px;
}
.photo-wall-more a {
  color: var(--cine-gold, #d7b878);
  font-size: 8px;
  text-decoration: none;
}

/* Composer */
.photo-composer {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(1, 8, 6, .72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.photo-composer-card {
  width: min(100%, 390px);
  padding: 14px;
  color: #1b2e28;
  background: #f7f3e9;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .42);
}
.photo-composer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: #1b3b31;
  font-size: 11px;
  font-weight: 700;
}
.photo-composer-close {
  width: 26px;
  height: 26px;
  color: #6e7d70;
  background: rgba(0,0,0,.05);
  border: 0;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.photo-composer-preview {
  aspect-ratio: 1;
  overflow: hidden;
  margin-bottom: 10px;
  background: #e8e4da;
  border-radius: 13px;
}
.photo-composer-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.photo-composer-label {
  display: block;
  margin-bottom: 4px;
  color: #6e7d70;
  font-size: 7px;
  font-weight: 600;
}
.photo-composer textarea {
  width: 100%;
  resize: none;
  padding: 9px 10px;
  color: #20332c;
  background: #fffdf7;
  border: 1px solid #ded8c8;
  border-radius: 9px;
  outline: none;
  font: inherit;
  font-size: 10px;
  line-height: 1.6;
}
.photo-composer textarea:focus { border-color: #b58d4d; }
.photo-composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
}
.photo-composer-hint {
  color: #9a9a8c;
  font-size: 6.5px;
  line-height: 1.5;
}
.photo-composer-publish {
  flex: none;
  padding: 8px 15px;
  color: #f8f4e9;
  background: #123e31;
  border: 0;
  border-radius: 9px;
  font-size: 8.5px;
  font-weight: 700;
  cursor: pointer;
}
.photo-composer-publish:disabled { opacity: .6; }

/* ============================================================
   Profile page
   ============================================================ */
.profile-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 0 var(--gutter, 14px) 88px;
}
.profile-cover {
  position: relative;
  overflow: hidden;
  min-height: 198px;
  margin-top: 12px;
  background:
    linear-gradient(180deg, rgba(4, 20, 15, .26), rgba(3, 16, 12, .88)),
    url("./campus-main.jpg") center 38% / cover no-repeat;
  border: 1px solid var(--cine-line, rgba(224, 237, 226, .15));
  border-radius: 22px;
  box-shadow: var(--cine-shadow, 0 24px 60px rgba(0, 0, 0, .34));
}
.profile-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 22%, rgba(215, 184, 120, .16), transparent 18rem);
  pointer-events: none;
}
.profile-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 13px;
  padding: 92px 16px 15px;
}
.profile-avatar {
  width: 82px;
  height: 82px;
  flex: none;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #061b15;
  background: linear-gradient(145deg, #f2ecdf, #d7b878);
  border: 3px solid rgba(255, 255, 255, .82);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
  font-family: var(--font-display, sans-serif);
  font-size: 28px;
  font-weight: 800;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-identity { min-width: 0; flex: 1; }
.profile-kicker {
  margin: 0 0 3px;
  color: rgba(215, 184, 120, .8);
  font-size: 6.5px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.profile-name {
  margin: 0;
  color: var(--cine-cream, #f2ecdf);
  font-family: var(--font-display, sans-serif);
  font-size: clamp(23px, 5.6vw, 32px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.04em;
}
.profile-account {
  margin: 4px 0 0;
  color: rgba(190, 209, 194, .72);
  font-size: 8px;
  letter-spacing: .06em;
}
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}
.profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 11px;
  color: var(--cine-cream, #f2ecdf);
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--cine-line, rgba(224, 237, 226, .15));
  border-radius: 999px;
  font-size: 8px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.profile-btn.primary {
  color: #061b15;
  background: linear-gradient(135deg, #f2ecdf, #d7b878);
  border-color: transparent;
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0 12px 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
}
.profile-stat {
  padding: 10px 6px;
  text-align: center;
  background: rgba(3, 18, 13, .22);
}
.profile-stat strong {
  display: block;
  color: var(--cine-cream, #f2ecdf);
  font-family: var(--font-display, sans-serif);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
}
.profile-stat span {
  display: block;
  margin-top: 3px;
  color: rgba(181, 200, 185, .62);
  font-size: 6.5px;
  letter-spacing: .1em;
}
.profile-bio {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 0 16px 15px;
  color: rgba(216, 228, 214, .76);
  font-size: 8.5px;
  line-height: 1.75;
}
.profile-tabs {
  display: flex;
  gap: 4px;
  margin: 13px 0 10px;
  padding: 3px;
  background: rgba(6, 28, 22, .55);
  border: 1px solid var(--cine-line, rgba(224, 237, 226, .15));
  border-radius: 12px;
}
.profile-tab {
  flex: 1;
  min-height: 32px;
  color: var(--cine-muted, #a9b9ab);
  background: transparent;
  border: 0;
  border-radius: 9px;
  font-size: 8.5px;
  font-weight: 600;
  cursor: pointer;
}
.profile-tab.is-active {
  color: #061b15;
  background: linear-gradient(135deg, #f2ecdf, #d7b878);
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.profile-photo {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(224, 237, 226, .12);
  border-radius: 10px;
  cursor: pointer;
}
.profile-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}
.profile-photo:hover img { transform: scale(1.045); }
.profile-photo > span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 7px 6px;
  color: #f4eadc;
  background: linear-gradient(180deg, transparent, rgba(2, 12, 9, .8));
  font-size: 6.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-empty {
  padding: 34px 14px;
  color: var(--cine-muted, #a9b9ab);
  background: rgba(6, 28, 22, .5);
  border: 1px dashed var(--cine-line, rgba(224, 237, 226, .15));
  border-radius: 16px;
  text-align: center;
  font-size: 8.5px;
  line-height: 1.9;
}
.profile-empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--cine-cream, #f2ecdf);
  font-family: var(--font-display, sans-serif);
  font-size: 14px;
}
.profile-post-list { display: grid; gap: 8px; }
.profile-post {
  display: flex;
  gap: 10px;
  padding: 10px;
  color: var(--cine-soft, #d8e4d4);
  background: rgba(6, 28, 22, .55);
  border: 1px solid var(--cine-line, rgba(224, 237, 226, .15));
  border-radius: 13px;
  text-decoration: none;
}
.profile-post img { width: 54px; height: 54px; flex: none; object-fit: cover; border-radius: 8px; }
.profile-post div { min-width: 0; }
.profile-post strong { display: block; color: var(--cine-cream, #f2ecdf); font-size: 9px; line-height: 1.4; }
.profile-post span { display: block; margin-top: 3px; color: var(--cine-muted, #a9b9ab); font-size: 7px; line-height: 1.5; }
.profile-lightbox {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(1, 8, 6, .9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.profile-lightbox img { max-width: 100%; max-height: 78vh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.profile-lightbox p { max-width: 90vw; margin: 10px 0 0; color: #f2ecdf; font-size: 9px; text-align: center; line-height: 1.6; }
.profile-lightbox button { position: absolute; top: 22px; right: 18px; width: 34px; height: 34px; color: #f2ecdf; background: rgba(255,255,255,.1); border: 0; border-radius: 50%; font-size: 22px; cursor: pointer; }

@media (max-width: 380px) {
  .photo-wall-grid, .profile-grid { gap: 5px; }
  .profile-avatar { width: 68px; height: 68px; font-size: 23px; }
  .profile-head { padding-top: 82px; }
  .profile-cover { min-height: 178px; }
  .photo-wall-card { padding: 12px; }
}

.photo-tile-meta .photo-follow {
  margin-left: auto;
  flex: none;
  padding: 4px 7px;
  color: #6b3d62;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .96);
  border-radius: 999px;
  font-size: 6.5px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.photo-tile-meta .photo-follow:active { transform: translateY(1px); }

/* four stats + social tabs */
.profile-stats { grid-template-columns: repeat(4, 1fr) !important; }
.profile-tabs { overflow-x: auto; scrollbar-width: none; }
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tab { min-width: 0; padding-inline: 4px; font-size: 7.5px; white-space: nowrap; }
.profile-person-list { display: grid; gap: 7px; }
.profile-person {
  display: flex; align-items: center; gap: 9px; padding: 9px 10px;
  color: #4f3d62; background: rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.96); border-radius: 12px;
  box-shadow: 0 8px 20px rgba(97,70,132,.06); text-decoration: none;
}
.profile-person-avatar { width: 34px; height: 34px; flex: none; overflow: hidden; border-radius: 50%; background: #ffe4ef; }
.profile-person-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.profile-person-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.profile-person-copy strong { color: #3b2a50; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-person-copy small { margin-top: 1px; color: #9a83a6; font-size: 6.5px; }
.profile-person em { flex: none; color: #b0528b; font-size: 6.5px; font-style: normal; }

/* private messages */
.dm-modal { position: fixed; inset: 0; z-index: 14000; display: grid; place-items: center; padding: 14px; background: rgba(45,28,58,.58); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.dm-card { width: min(100%, 390px); max-height: 82vh; display: flex; flex-direction: column; overflow: hidden; background: #fffafd; border: 1px solid #fff; border-radius: 20px; box-shadow: 0 26px 70px rgba(55,31,70,.3); }
.dm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #f1dce9; }
.dm-head strong { color: #3b2a50; font-size: 10px; font-weight: 800; }
.dm-close { width: 28px; height: 28px; color: #8d718f; background: #fff2f9; border: 0; border-radius: 50%; font-size: 19px; line-height: 1; cursor: pointer; }
.dm-body { min-height: 120px; overflow-y: auto; padding: 10px 12px; }
.dm-thread { display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow-y: auto; }
.dm-bubble { max-width: 82%; display: flex; flex-direction: column; gap: 2px; padding: 7px 9px; border-radius: 11px; font-size: 8.5px; line-height: 1.6; overflow-wrap: anywhere; }
.dm-bubble span { white-space: pre-wrap; }
.dm-bubble small { color: rgba(80,55,95,.55); font-size: 5.5px; }
.dm-bubble.mine { align-self: flex-end; color: #fff; background: linear-gradient(135deg, #ff87bf, #a57fff); border-bottom-right-radius: 3px; }
.dm-bubble.mine small { color: rgba(255,255,255,.72); }
.dm-bubble.theirs { align-self: flex-start; color: #4e3b61; background: #fff0f8; border-bottom-left-radius: 3px; }
.dm-compose { display: flex; gap: 6px; margin-top: 9px; }
.dm-compose textarea { flex: 1; min-width: 0; min-height: 38px; max-height: 90px; resize: none; padding: 7px 9px; color: #3b2a50; background: #fff; border: 1px solid #efd7e7; border-radius: 9px; outline: none; font: inherit; font-size: 8.5px; }
.dm-send { flex: none; min-width: 52px; color: #fff; background: linear-gradient(135deg, #ff87bf, #a57fff); border: 0; border-radius: 9px; font-size: 8px; font-weight: 700; cursor: pointer; }
.dm-hint { margin: 5px 0 0; color: #a28fa8; font-size: 5.8px; text-align: center; }
.dm-empty, .dm-loading { padding: 22px 10px; color: #9b87a3; text-align: center; font-size: 8px; line-height: 1.7; }
.dm-inbox { display: grid; gap: 6px; }
.dm-thread-row { display: flex; align-items: center; gap: 7px; width: 100%; padding: 8px; color: #4f3d62; background: #fff7fb; border: 1px solid #f2dce9; border-radius: 10px; text-align: left; cursor: pointer; }
.dm-avatar { width: 31px; height: 31px; flex: none; overflow: hidden; border-radius: 50%; background: #ffe4ef; }
.dm-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dm-thread-row > span:nth-child(2) { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.dm-thread-row strong { color: #3b2a50; font-size: 8.5px; }
.dm-thread-row small { color: #9a83a6; font-size: 6.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-thread-row em { flex: none; color: #b084a7; font-size: 5.5px; font-style: normal; }
@media (max-width: 380px) {
  .profile-stat strong { font-size: 15px; }
  .profile-tab { font-size: 7px; }
  .dm-card { max-height: 88vh; }
}

.profile-meta { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 0; }
.profile-meta span {
  padding: 3px 7px; color: #7d5b82;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 999px; font-size: 6.5px; line-height: 1.3;
}
