/* ==========================================================================
   ACHIEVEMENTS — page styles
   Builds on styles.css tokens and shared gx-* parts from glimpse.css
   (stats row, index chips, photo buttons, badges, lightbox, reveal).
   ========================================================================== */

/* ---------- Section shell ---------- */
.ac-section {
  position: relative;
  background: var(--paper-glass);
  border: 1px solid var(--walnut-border);
  border-radius: 24px;
  padding: 30px 32px 32px;
  margin-bottom: 2.25rem;
  box-shadow: var(--shadow-md);
  scroll-margin-top: 190px;
  overflow: hidden;
}

.ac-section::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(213, 133, 31, 0.13), transparent 70%);
  pointer-events: none;
}

.ac-section:nth-of-type(even)::before {
  background: radial-gradient(circle, rgba(135, 169, 107, 0.18), transparent 70%);
}

.ac-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 1.4rem;
}

.ac-icon {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #E39A3B, var(--amber));
  box-shadow: 0 10px 22px -10px rgba(213, 133, 31, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.ac-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--walnut-deep);
}

.ac-icon--sage {
  background: linear-gradient(145deg, #9BBB80, var(--sage));
  box-shadow: 0 10px 22px -10px rgba(135, 169, 107, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.ac-icon--walnut {
  background: linear-gradient(145deg, #74533B, var(--walnut));
  box-shadow: 0 10px 22px -10px rgba(90, 62, 43, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.ac-icon--walnut svg {
  stroke: var(--cream);
}

.ac-kicker {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-ink);
  margin-bottom: 2px;
}

.ac-head h3 {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--walnut);
}

.ac-lead {
  position: relative;
  color: var(--text-dim);
  font-size: 0.98rem;
  line-height: 1.7;
  max-width: 820px;
  margin-bottom: 1.4rem;
}

/* ---------- 1. CEH ---------- */
.ac-ceh {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.ac-spotlight {
  border-radius: 20px;
  padding: 26px 22px;
  text-align: center;
  color: var(--cream);
  background:
    radial-gradient(circle at 20% 10%, rgba(213, 133, 31, 0.45), transparent 55%),
    radial-gradient(circle at 90% 95%, rgba(135, 169, 107, 0.45), transparent 55%),
    linear-gradient(160deg, #5A3E2B, #3B2A1E);
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 200px;
}

.ac-spotlight img {
  width: 120px;
  height: 120px;
  margin: 0 auto 14px;
  border-radius: 18px;
  background: #fff;
  padding: 8px;
  box-shadow: 0 0 0 6px rgba(251, 247, 239, 0.12), 0 16px 34px -12px rgba(0, 0, 0, 0.6);
}

.ac-big {
  display: block;
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  color: var(--amber-soft);
}

.ac-spotlight strong {
  display: block;
  font-size: 1.05rem;
  margin: 6px 0 12px;
}

.ac-spotlight .ac-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(251, 247, 239, 0.12);
  border: 1px solid rgba(251, 247, 239, 0.25);
  font-size: 0.8rem;
  font-weight: 600;
}

.ac-roster-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--sage-ink);
  margin-bottom: 12px;
}

.ac-roster {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
  counter-reset: roster;
}

.ac-roster li {
  counter-increment: roster;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px 7px 7px;
  background: var(--paper);
  border: 1px solid var(--walnut-border);
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--walnut-ink);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.ac-roster li::before {
  content: counter(roster, decimal-leading-zero);
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--sage-tint);
  color: var(--sage-ink);
}

.ac-roster li:hover {
  border-color: var(--amber-border);
  background: #FFF8EC;
}

.ac-roster li:hover::before {
  background: var(--amber);
  color: var(--walnut-deep);
}

/* ---------- 2. Toppers (tabs + podium) ---------- */
.ac-tabs {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  border-radius: var(--radius-full);
  background: var(--paper);
  border: 1px solid var(--walnut-border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.6rem;
}

.ac-tab {
  border: 0;
  background: transparent;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--walnut-ink);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.ac-tab:hover {
  background: var(--amber-tint);
}

.ac-tab[aria-selected="true"] {
  background: linear-gradient(180deg, #E39A3B, var(--amber));
  color: var(--walnut-deep);
  box-shadow: 0 6px 16px -6px rgba(213, 133, 31, 0.7);
}

.ac-tab:focus-visible {
  outline: 2px solid var(--walnut);
  outline-offset: 2px;
}

.ac-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.ac-panel[hidden] {
  display: none;
}

.ac-panel--solo {
  grid-template-columns: 1fr;
}

.ac-panel-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--walnut);
  margin-bottom: 4px;
}

.ac-panel-sub {
  font-size: 0.86rem;
  color: var(--text-dim);
  margin-bottom: 1.2rem;
}

/* Podium */
.ac-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
}

.ac-place {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ac-place--1 { order: 2; }
.ac-place--2 { order: 1; }
.ac-place--3 { order: 3; }

.ac-medal {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 10px;
  position: relative;
}

.ac-medal::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed currentColor;
  opacity: 0.35;
}

.ac-place--1 .ac-medal {
  width: 78px;
  height: 78px;
  font-size: 1.6rem;
  background: radial-gradient(circle at 35% 30%, #F6C77E, var(--amber) 60%, #B86D12);
  color: var(--walnut-deep);
  box-shadow: 0 12px 26px -10px rgba(213, 133, 31, 0.9);
}

.ac-place--2 .ac-medal {
  background: radial-gradient(circle at 35% 30%, #C9DBB8, var(--sage) 65%, #6A8C51);
  color: #233019;
  box-shadow: 0 10px 22px -10px rgba(135, 169, 107, 0.9);
}

.ac-place--3 .ac-medal {
  background: radial-gradient(circle at 35% 30%, #A07A5C, var(--walnut) 65%, #3B2A1E);
  color: var(--cream);
  box-shadow: 0 10px 22px -10px rgba(90, 62, 43, 0.9);
}

.ac-place-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--walnut);
  line-height: 1.25;
}

.ac-place-usn {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--sage-ink);
  margin: 2px 0 6px;
}

.ac-place-score {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--walnut-deep);
}

.ac-place-rank {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--amber-tint);
  border: 1px solid var(--amber-border);
  color: var(--amber-ink);
  font-size: 0.72rem;
  font-weight: 800;
}

.ac-step {
  width: 100%;
  margin-top: 12px;
  border-radius: 14px 14px 6px 6px;
  border: 1px solid var(--walnut-border);
  background: linear-gradient(180deg, #FFFDF8, #F3ECDD);
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.6rem;
  color: rgba(90, 62, 43, 0.28);
}

.ac-place--1 .ac-step { height: 110px; background: linear-gradient(180deg, #FCE9CC, #F3D6A6); color: rgba(154, 90, 12, 0.5); }
.ac-place--2 .ac-step { height: 80px;  background: linear-gradient(180deg, #EEF4E8, #DCE7D1); color: rgba(79, 107, 58, 0.5); }
.ac-place--3 .ac-step { height: 60px; }

/* Runners-up list */
.ac-runners {
  list-style: none;
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.ac-runners li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px solid var(--walnut-border);
  border-radius: 12px;
  font-size: 0.88rem;
}

.ac-runners b {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sage-tint);
  color: var(--sage-ink);
  font-size: 0.8rem;
}

.ac-runners span {
  color: var(--walnut-ink);
  font-weight: 700;
}

.ac-runners span small {
  display: block;
  font-weight: 600;
  color: var(--sage-ink);
  font-size: 0.74rem;
}

.ac-runners em {
  font-style: normal;
  font-weight: 800;
  color: var(--walnut);
  text-align: right;
}

.ac-runners em small {
  display: block;
  font-size: 0.72rem;
  color: var(--amber-ink);
}

/* Banner photo inside a panel */
.ac-banner.gx-photo img {
  height: auto;
}

/* Sem 4: spotlight + rank distribution */
.ac-rankholder {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, #FCE9CC, #FFFDF8 70%);
  border: 1px solid var(--amber-border);
  margin-bottom: 1.2rem;
}

.ac-rankholder .ac-medal {
  margin: 0;
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  background: radial-gradient(circle at 35% 30%, #A07A5C, var(--walnut) 65%, #3B2A1E);
  color: var(--cream);
  font-size: 1.15rem;
  line-height: 1;
  text-align: center;
}

.ac-rankholder .ac-medal small {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-soft);
}

.ac-rankholder strong {
  display: block;
  font-size: 1.15rem;
  color: var(--walnut);
}

.ac-rankholder span {
  font-size: 0.86rem;
  color: var(--text-dim);
}

.ac-bars {
  list-style: none;
  display: grid;
  gap: 10px;
}

.ac-bars li {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 12px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--walnut-ink);
}

.ac-bar {
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--walnut-tint);
  overflow: hidden;
}

.ac-bar i {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sage), var(--amber));
}

.ac-bars em {
  font-style: normal;
  text-align: right;
  color: var(--walnut);
}

.ac-total {
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.ac-total b {
  color: var(--amber-ink);
  font-size: 1.05rem;
}

/* ---------- 3. Hackathon ---------- */
.ac-facts {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 1.4rem;
}

.ac-fact {
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--walnut-border);
  border-radius: 14px;
}

.ac-fact small {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage-ink);
  margin-bottom: 4px;
}

.ac-fact b {
  font-size: 0.95rem;
  color: var(--walnut);
  line-height: 1.35;
}

.ac-fact--accent {
  background: linear-gradient(145deg, #5A3E2B, #3B2A1E);
  border-color: transparent;
}

.ac-fact--accent small { color: var(--amber-soft); }
.ac-fact--accent b { color: var(--cream); font-size: 1.15rem; }

.ac-split {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
}

.ac-team {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ac-team li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--paper);
  border: 1px solid var(--walnut-border);
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--walnut-ink);
  line-height: 1.2;
}

.ac-team li small {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--sage-ink);
  letter-spacing: 0.03em;
}

.ac-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--cream);
  background: linear-gradient(135deg, var(--walnut), #7A5A3A 60%, var(--amber) 140%);
}

.ac-team li:nth-child(3n+2) .ac-avatar { background: linear-gradient(135deg, #6A8C51, var(--sage)); color: #fff; }
.ac-team li:nth-child(3n) .ac-avatar { background: linear-gradient(135deg, #B86D12, var(--amber)); color: var(--walnut-deep); }

.ac-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ac-gallery .gx-photo {
  aspect-ratio: 4 / 3;
}

.ac-gallery--3 {
  grid-template-columns: 1.3fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.ac-gallery--3 .gx-photo:first-child {
  grid-row: span 2;
  aspect-ratio: auto;
}

/* ---------- 4. Research ---------- */
.ac-research {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 26px 28px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 0% 0%, rgba(213, 133, 31, 0.3), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(135, 169, 107, 0.35), transparent 55%),
    linear-gradient(140deg, #5A3E2B, #3B2A1E);
  color: var(--cream);
}

.ac-research .ac-big {
  font-size: 4.4rem;
}

.ac-research .ac-big + span {
  display: block;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(251, 247, 239, 0.8);
}

.ac-research h4 {
  color: var(--cream);
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.ac-research p {
  color: rgba(251, 247, 239, 0.86);
  font-size: 0.95rem;
  line-height: 1.7;
}

.ac-research .gx-highlights li {
  background: rgba(251, 247, 239, 0.1);
  border-color: rgba(251, 247, 239, 0.25);
  color: var(--cream);
}

/* ---------- 5. IIT Hyderabad ---------- */
.ac-visit-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1rem;
}

.ac-visit-text p {
  color: var(--text-dim);
  font-size: 0.96rem;
  line-height: 1.7;
  margin-bottom: 0.8rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .ac-ceh,
  .ac-panel,
  .ac-split {
    grid-template-columns: 1fr;
  }
  .ac-spotlight {
    position: static;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 6px 18px;
    text-align: left;
  }
  .ac-spotlight img {
    grid-row: span 3;
    width: 96px;
    height: 96px;
    margin: 0;
  }
  .ac-spotlight strong { margin: 0; }
  .ac-spotlight .ac-date { justify-self: start; }
  .ac-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ac-fact--accent {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .ac-section {
    padding: 20px 16px 22px;
    border-radius: 18px;
    margin-bottom: 1.5rem;
    scroll-margin-top: 90px;
  }
  .ac-head {
    gap: 12px;
  }
  .ac-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }
  .ac-head h3 {
    font-size: 1.18rem;
  }
  .ac-lead {
    font-size: 0.9rem;
    line-height: 1.6;
  }
  .ac-big { font-size: 3rem; }
  .ac-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    border-radius: 14px;
  }
  .ac-tab {
    flex: 1 0 auto;
    padding: 8px 12px;
  }
  .ac-podium { gap: 6px; }
  .ac-medal { width: 50px; height: 50px; font-size: 1.05rem; }
  .ac-place--1 .ac-medal { width: 60px; height: 60px; font-size: 1.25rem; }
  .ac-place-name { font-size: 0.8rem; }
  .ac-place-score { font-size: 1rem; }
  .ac-place--1 .ac-step { height: 80px; }
  .ac-place--2 .ac-step { height: 58px; }
  .ac-place--3 .ac-step { height: 42px; }
  .ac-team { grid-template-columns: 1fr; }
  .ac-research {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 22px 18px;
    gap: 14px;
  }
  .ac-research .gx-highlights { justify-content: center; }
  .ac-bars li { grid-template-columns: 84px minmax(0, 1fr) 24px; }
}
