/* ── Shared page content ──────────────────────────────────── */
.page-content {
  width: 100%; max-width: 960px; margin: 0 auto;
  padding: 40px 24px 60px;
}
.page-title {
  font-size: 22px; font-weight: 400; letter-spacing: .05em;
  margin-bottom: 32px; color: var(--accent);
}
.page-loading, .page-error {
  text-align: center; color: var(--muted2); padding: 60px 24px;
}
.sec-title {
  font-size: 15px; font-weight: 400; letter-spacing: .1em;
  color: var(--muted2); margin-bottom: 8px; text-transform: uppercase;
}
.sec-desc {
  font-size: 13px; color: var(--muted); margin-bottom: 24px;
}

/* ── Hero: Imperial Tech ──────────────────────────────────── */
.hero-imperial { text-align: center; padding: 200px 0 48px; }
.hi-mark {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 11px; font-weight: 600; letter-spacing: .35em;
  color: var(--accent); margin-bottom: 28px;
}
.hi-num {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-variant-numeric: lining-nums;
}
.hi-name {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 38px; font-weight: 500; letter-spacing: .12em;
  color: var(--text); margin-bottom: 20px; line-height: 1.25;
}
.hi-roles { margin-bottom: 16px; }
.hi-role-line {
  font-size: 13px; font-weight: 400; letter-spacing: .06em;
  color: var(--muted2); line-height: 1.7;
}
.hi-divider {
  width: 40px; height: 1px; margin: 20px auto;
  background: var(--accent); opacity: .5;
}
.hi-subtitle {
  font-size: 12px; font-weight: 400; letter-spacing: .12em;
  color: var(--accent2); opacity: 1;
  text-shadow: 0 0 20px rgba(102, 217, 255, .45), 0 0 40px rgba(102, 217, 255, .2);
}

/* ── Feed widget on main page ──────────────────────────────── */
.main-feed { margin-top: 48px; }
.feed-widget-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.feed-widget-card {
  display: flex; gap: 12px; padding: 12px;
  border: 0.5px solid rgba(255,255,255,.05); border-radius: 10px;
  background: rgba(255,255,255,.02); text-decoration: none; color: inherit;
  transition: border-color .2s, background .2s;
}
.feed-widget-card:hover { border-color: rgba(102,217,255,.18); background: rgba(255,255,255,.035); }
.feed-widget-thumb {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: 8px;
  overflow: hidden; border: 0.5px solid rgba(255,255,255,.08);
}
.feed-widget-thumb img { width: 100%; height: 100%; object-fit: cover; }
.feed-widget-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.feed-widget-date { font-size: 10px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.feed-widget-title {
  font-size: 13px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.feed-widget-author { font-size: 11px; color: var(--muted2); }
.feed-widget-footer { margin-top: 16px; text-align: center; }
.feed-widget-link {
  font-size: 12px; color: var(--accent2); text-decoration: none;
  letter-spacing: .04em; transition: color .2s;
}
.feed-widget-link:hover { color: var(--text); }

/* ── Project cards ────────────────────────────────────────── */
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  width: 100%; max-width: 960px;
}
.proj-card, .proj-card-full {
  display: block; padding: 24px;
  border: 0.5px solid rgba(255,255,255,.05); border-radius: 6px;
  background: rgba(255,255,255,.025); text-decoration: none; color: inherit;
  transition: border-color .2s, background .2s;
}
.proj-card-full {
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.proj-logo {
  width: 200px; height: 200px; max-width: 100%;
  border-radius: 50%;
  object-fit: cover; object-position: center;
  margin-bottom: 18px;
  border: 0.5px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  box-shadow: 0 0 0 1px rgba(102,217,255,.08), 0 8px 24px rgba(0,0,0,.4);
}
.proj-card:hover, .proj-card-full:hover {
  border-color: rgba(102, 217, 255, .15); background: rgba(255,255,255,.04);
}
.proj-card h3, .proj-card-full h2 {
  font-size: 14px; font-weight: 400; margin-bottom: 6px;
  letter-spacing: .04em;
}
.proj-card p, .proj-card-full p {
  font-size: 12px; color: var(--muted2); line-height: 1.5;
}
.proj-link {
  display: inline-block; margin-top: 8px;
  font-size: 11px; color: var(--accent2); text-decoration: none;
  transition: color .15s;
}
.proj-link:hover { color: #88E5FF; }

/* ── Bio timeline ─────────────────────────────────────────── */
.bio-timeline { display: flex; flex-direction: column; gap: 20px; }
.bio-event {
  padding: 16px 20px;
  border-left: 1px solid var(--border); margin-left: 8px;
}
.bio-date {
  display: inline-block; font-size: 11px; color: var(--accent);
  letter-spacing: .08em; margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.bio-text { font-size: 13px; line-height: 1.6; color: var(--muted2); }

/* ── Lineage tree ─────────────────────────────────────────── */
.lineage-tree { display: flex; flex-direction: column; align-items: center; gap: 0; }
.lineage-member { display: flex; flex-direction: column; align-items: center; }
.lm-arrow { color: var(--muted); font-size: 18px; padding: 4px 0; }
.lm-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 24px; min-width: 200px;
  border: 0.5px solid rgba(255,255,255,.05); border-radius: 6px;
  background: rgba(255,255,255,.025); text-align: center;
}
.lm-relation { font-size: 10px; color: var(--accent); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.lm-name { font-size: 14px; color: var(--text); margin-bottom: 2px; }
.lm-year { font-size: 11px; color: var(--muted); }

/* ── Life stages ──────────────────────────────────────────── */
.stages-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.stage-card {
  padding: 24px; border: 0.5px solid rgba(255,255,255,.05); border-radius: 6px;
  background: rgba(255,255,255,.025);
}
.stage-period { font-size: 10px; color: var(--accent); letter-spacing: .1em; text-transform: uppercase; }
.stage-card h3 { font-size: 15px; font-weight: 400; margin: 6px 0; }
.stage-loc { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.stage-desc { font-size: 12px; color: var(--muted2); line-height: 1.5; }

/* ── Islam page ───────────────────────────────────────────── */
.page-islam {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex: 1;
  padding: 60px 24px 40px;
}
.page-islam .page-title { text-align: center; margin-bottom: 28px; }
.page-projects {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex: 1;
  padding: 60px 24px 40px;
}
.page-projects .page-title { text-align: center; margin-bottom: 28px; }
.islam-book {
  display: flex; gap: 36px; align-items: center;
  padding: 36px;
  border: 0.5px solid rgba(255,255,255,.05); border-radius: 6px;
  background: rgba(255,255,255,.025);
  max-width: 720px; width: 100%;
}
.islam-book-cover-wrap {
  position: relative; cursor: pointer; flex-shrink: 0;
}
.islam-book-cover {
  display: block; width: 260px; border-radius: 6px;
  border: 0.5px solid rgba(255,255,255,.08);
  transition: border-color .2s;
}
.islam-book-cover-wrap:hover .islam-book-cover {
  border-color: rgba(102, 217, 255, .3);
}
.islam-book-zoom {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; opacity: 0;
  background: rgba(0,0,0,.45); border-radius: 6px;
  transition: opacity .2s;
}
.islam-book-cover-wrap:hover .islam-book-zoom { opacity: 1; }
.islam-book-info {
  flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center;
}
.islam-book-heading {
  font-size: 16px; font-weight: 400; margin-bottom: 12px;
  letter-spacing: .04em; color: var(--text);
}
.islam-book-desc {
  font-size: 13px; line-height: 1.7; color: var(--muted2); margin-bottom: 20px;
}
.islam-book-dl {
  display: inline-block; padding: 10px 24px;
  border: 0.5px solid rgba(102, 217, 255, .25); border-radius: 6px;
  background: rgba(102, 217, 255, .06); color: var(--accent2);
  font-size: 13px; text-decoration: none; letter-spacing: .03em;
  transition: background .2s, border-color .2s;
}
.islam-book-dl:hover {
  background: rgba(102, 217, 255, .12); border-color: rgba(102, 217, 255, .4);
}

/* ── Islam lightbox ───────────────────────────────────────── */
.niiv-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  opacity: 0; transition: opacity .3s ease;
}
.niiv-lightbox.show { opacity: 1; }
.niiv-lb-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.92); cursor: pointer;
}
.niiv-lb-content {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90vw; max-height: 90vh;
  display: flex; align-items: center; justify-content: center;
}
.niiv-lb-content img {
  max-width: 90vw; max-height: 85vh;
  object-fit: contain; border-radius: 8px;
  border: 1px solid rgba(102, 217, 255, .3);
  box-shadow: 0 0 60px rgba(102, 217, 255, .15);
}
.niiv-lb-close {
  position: absolute; top: -40px; right: -12px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.6);
  color: #fff; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, background .2s;
}
.niiv-lb-close:hover {
  border-color: rgba(102,217,255,.5); background: rgba(102,217,255,.1);
}

/* ── Referrals ────────────────────────────────────────────── */
.ref-card-detail {
  border: 0.5px solid rgba(255,255,255,.06); border-radius: 8px;
  background: rgba(255,255,255,.03); padding: 28px;
  max-width: 520px;
}
.ref-card-title { font-size: 18px; font-weight: 600; margin-bottom: 20px; }
.ref-card-section { margin-bottom: 18px; }
.ref-card-section h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted2); margin-bottom: 8px; }
.ref-feats { list-style: none; padding: 0; margin: 0; }
.ref-feats li {
  font-size: 13px; color: var(--muted2);
  padding: 3px 0 3px 14px; position: relative;
}
.ref-feats li::before { content: '·'; position: absolute; left: 0; color: var(--accent); }
.ref-bonus { padding: 12px 16px; border-radius: 6px; background: rgba(102,217,255,.05); border: 0.5px solid rgba(102,217,255,.12); }
.ref-bonus p { font-size: 13px; color: var(--accent2); }
.ref-card-cta {
  display: inline-block; margin-top: 8px; padding: 10px 24px;
  border: 0.5px solid rgba(102,217,255,.25); border-radius: 6px;
  background: rgba(102,217,255,.06); color: var(--accent2);
  font-size: 13px; text-decoration: none; letter-spacing: .03em;
  transition: background .2s, border-color .2s;
}
.ref-card-cta:hover { background: rgba(102,217,255,.12); border-color: rgba(102,217,255,.4); }

/* ── Contacts dropdown (legacy) ────────────────────────────── */
/* kept in contacts.css */

/* ── HYC hidden page ──────────────────────────────────────── */
.page-hyc { text-align: center; max-width: 600px; }
.hyc-logo {
  display: block; width: 180px; height: 180px;
  margin: 0 auto 32px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 0 40px rgba(102,217,255,.1);
}
.hyc-title {
  font-size: 24px; font-weight: 500; letter-spacing: .08em;
  color: var(--accent); margin-bottom: 8px;
}
.hyc-subtitle {
  font-size: 13px; color: var(--muted2); letter-spacing: .04em;
  margin-bottom: 28px; line-height: 1.6;
}
.hyc-facts {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 6px;
  font-size: 12px; color: var(--muted); letter-spacing: .06em;
  margin-bottom: 36px;
}
.hyc-sep { color: var(--border-h); }
.hyc-section { margin-bottom: 28px; text-align: left; }
.hyc-heading {
  font-size: 12px; font-weight: 400; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent2); margin-bottom: 12px;
}
.hyc-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.hyc-list li {
  font-size: 13px; color: var(--muted2); line-height: 1.5;
  padding-left: 14px; position: relative;
}
.hyc-list li::before {
  content: '·'; position: absolute; left: 0; color: var(--accent);
}
.hyc-list li strong { color: var(--text); font-weight: 500; }
.hyc-links {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 12px;
  margin-bottom: 36px;
}
.hyc-link {
  display: inline-block; padding: 10px 20px;
  border: 0.5px solid rgba(102,217,255,.25); border-radius: 6px;
  background: rgba(102,217,255,.06); color: var(--accent2);
  font-size: 12px; text-decoration: none; letter-spacing: .04em;
  transition: background .2s, border-color .2s;
}
.hyc-link:hover {
  background: rgba(102,217,255,.12); border-color: rgba(102,217,255,.4);
}
.hyc-disclaimer {
  font-size: 10px; color: var(--muted); line-height: 1.6;
  margin-bottom: 16px; max-width: 480px; margin-left: auto; margin-right: auto;
}
.hyc-copyright {
  font-size: 10px; color: var(--muted); letter-spacing: .08em;
}

/* ── Feed / Wall — TG-style ────────────────────────────────── */
.feed-wall { display: flex; flex-direction: column; gap: 20px; }
.feed-card {
  position: relative;
  border: 0.5px solid rgba(255,255,255,.06); border-radius: 12px;
  background: rgba(255,255,255,.025); overflow: hidden;
  transition: border-color .25s;
}
.feed-card:hover { border-color: rgba(102, 217, 255, .2); }
.feed-pinned { border-color: rgba(202,188,136,.25); }
.feed-pin-label {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); padding: 8px 20px 0; font-weight: 500;
}
.feed-date-badge {
  position: absolute; top: 12px; right: 12px;
  display: flex; flex-direction: column; align-items: center;
  min-width: 42px; padding: 6px 10px;
  background: rgba(10,10,15,.85); border: 0.5px solid rgba(255,255,255,.12);
  border-radius: 10px; backdrop-filter: blur(6px); z-index: 2;
}
.feed-date-day {
  font-size: 18px; font-weight: 600; line-height: 1.1; color: var(--text);
}
.feed-date-month {
  font-size: 9px; font-weight: 500; letter-spacing: .12em; color: var(--accent2);
}
.feed-media-single { width: 100%; }
.feed-image, .feed-video {
  display: block; width: 100%; max-height: 480px;
  object-fit: cover; border-bottom: 0.5px solid rgba(255,255,255,.06);
}
.feed-carousel { position: relative; }
.feed-carousel-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.feed-carousel-track::-webkit-scrollbar { display: none; }
.feed-carousel-slide {
  flex: 0 0 250px; scroll-snap-align: start;
  border-right: 0.5px solid rgba(255,255,255,.06);
}
.feed-carousel-slide .feed-image, .feed-carousel-slide .feed-video {
  height: 200px; max-height: 200px; width: 250px; object-fit: cover;
}
.feed-carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(10,10,15,.8); border: 0.5px solid rgba(255,255,255,.15);
  color: var(--text); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.feed-carousel-btn:hover { background: rgba(10,10,15,.95); }
.feed-carousel-prev { left: 8px; }
.feed-carousel-next { right: 8px; }
.feed-body { padding: 16px 20px 20px; }
.feed-author { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.feed-author-avatar {
  width: 32px; height: 32px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center;
  background: rgba(102,217,255,.12); color: var(--accent2);
  font-size: 11px; font-weight: 600; letter-spacing: .04em;
}
.feed-author-name { font-size: 13px; font-weight: 500; color: var(--muted2); }
.feed-title {
  font-size: 16px; font-weight: 500; letter-spacing: .03em;
  margin-bottom: 8px; color: var(--text);
}
.feed-body-inner {
  font-size: 13px; line-height: 1.65; color: var(--muted2);
  margin-bottom: 12px;
  max-height: 100px; overflow: hidden;
  transition: max-height .3s ease;
}
.feed-body-inner.feed-expanded { max-height: 2000px; }
.feed-body-inner p { margin-bottom: 8px; }
.feed-read-more {
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: var(--accent2); letter-spacing: .04em;
  padding: 0; margin-bottom: 12px; font-weight: 500;
  transition: color .2s;
}
.feed-read-more:hover { color: var(--text); }
.feed-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.feed-tag {
  font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px;
  border: 0.5px solid var(--border); color: var(--accent2);
  background: rgba(255,255,255,.03);
}

/* ── Feed masonry on desktop ────────────────────────────────── */
@media (min-width: 768px) {
  .feed-wall {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px; align-items: start;
  }
}

@media (max-width: 767px) {
  .page-content { padding: 24px 16px 40px; }
  .hi-name { font-size: 26px; letter-spacing: .08em; }
  .hero-imperial { padding: 100px 0 32px; }
  .projects-grid, .stages-grid, .ref-grid { grid-template-columns: 1fr; }
  .bio-event { padding: 12px 16px; }
  .feed-wall { grid-template-columns: 1fr; }
  .feed-image, .feed-video { max-height: 300px; }
  .feed-carousel-slide { flex: 0 0 200px; }
  .feed-carousel-slide .feed-image, .feed-carousel-slide .feed-video { height: 160px; max-height: 160px; width: 200px; }
  .islam-book { flex-direction: column; max-width: 100%; padding: 24px; }
  .islam-book-cover { width: 200px; }
  .hyc-logo { width: 140px; height: 140px; }
  .hyc-title { font-size: 20px; }
  .hyc-links { flex-direction: column; align-items: center; }
}
