/* =====================================================
   IEEE RAS SMU — Home Page
   ===================================================== */

/* ── ORB GLOWS ── */
.orb {
  position: absolute; border-radius: 50%; filter: blur(100px);
  pointer-events: none; opacity: .25; animation: orb-float 8s ease-in-out infinite;
}
.o1 { width: 700px; height: 700px; background: radial-gradient(var(--pm), transparent 70%); top: -300px; right: -200px; }
.o2 { width: 550px; height: 550px; background: radial-gradient(var(--pd), transparent 70%); bottom: -200px; left: -200px; animation-delay: 4s; }
@keyframes orb-float { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-28px) scale(1.05); } }

/* ═══════════════════════════════════════════════════
   HERO — two-column split
   left: text  |  right: animated robot
   ═══════════════════════════════════════════════════ */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  position: relative;
  overflow: hidden;
  z-index: 2;
  padding: 0;
}

/* ── LEFT COLUMN ── */
#div1_left {
  width: 52%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 5vw 80px 8vw;
  position: relative;
  z-index: 3;
  flex-shrink: 0;
}

/* Badge */
.hbadge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255,110,255,.35); background: rgba(255,110,255,.08);
  border-radius: 100px; padding: 7px 20px;
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--pm); margin-bottom: 2rem;
  width: fit-content;
  /* entrance animation */
  animation: fade-up .8s ease both;
  animation-delay: .1s;
}
.hbdot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--pm); box-shadow: 0 0 12px var(--pm);
  animation: blink 2s infinite;
  flex-shrink: 0;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* Headline */
.hh {
  font-family: var(--fd);
  font-size: clamp(2.6rem, 4.2vw, 5.6rem);
  font-weight: 800; line-height: .92; letter-spacing: -.04em;
  margin-bottom: 1.6rem;
  animation: fade-up .8s ease both;
  animation-delay: .22s;
}
.hh span { display: block; }
.hh .g {
  background: linear-gradient(135deg, var(--pl), var(--pm) 50%, var(--pd));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 28px rgba(255,110,255,.32));
}

/* Sub-headline */
.hsb {
  font-size: clamp(.95rem, 1.4vw, 1.15rem);
  color: var(--muted); font-weight: 300;
  margin-bottom: .9rem;
  max-width: 480px;
  animation: fade-up .8s ease both;
  animation-delay: .34s;
}
.hsb strong { color: var(--pl); font-weight: 600; }

/* Description */
.hint {
  font-size: .9rem; color: var(--subtle);
  max-width: 440px; font-weight: 300; line-height: 1.75;
  margin-bottom: 2.8rem;
  animation: fade-up .8s ease both;
  animation-delay: .46s;
}

/* CTA buttons */
.hbtns {
  display: flex; gap: 1rem; flex-wrap: wrap;
  animation: fade-up .8s ease both;
  animation-delay: .58s;
}

/* ── RIGHT COLUMN ── */
#div1_right {
  width: 48%;
  min-height: 100vh;
  padding-top: 180px;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  /* subtle right-side fade */
  mask-image: linear-gradient(to right, transparent 0%, black 8%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%);
}

/* the SVG illustration */
.svg-box {
  position: absolute;
  z-index: 1;
  /* responsive sizing via clamp on width */
  width: min(800px, 96%);
  height: auto;
  aspect-ratio: 800 / 600;
  margin-top: 40px;
}
.svg-box svg {
  width: 100%;
  height: 100%;
}

/* Three.js canvas covers entire right column */
canvas.webgl2 {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 2;
  pointer-events: none;
}

#robot { cursor: pointer; }

/* ── ENTRANCE ANIMATION ── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* robot panel fades in */
#div1_right {
  animation: fade-in-right .9s ease both;
  animation-delay: .3s;
}
@keyframes fade-in-right {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ═══════════════════════════════════════════════════
   IMPACT STATS
   ═══════════════════════════════════════════════════ */
#impact {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border); position: relative; z-index: 2;
}
.st {
  background: rgba(8,0,13,.72); padding: 3.5rem 2rem; text-align: center;
  position: relative; overflow: hidden; transition: background .3s;
  backdrop-filter: blur(10px);
}
.st::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,110,255,.09), transparent 65%);
  opacity: 0; transition: opacity .3s;
}
.st:hover { background: rgba(95,1,128,.22); }
.st:hover::before { opacity: 1; }
.stn {
  font-family: var(--fd); font-size: clamp(2.5rem, 4.5vw, 4rem); font-weight: 800;
  background: linear-gradient(135deg, var(--pl), var(--pm));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  line-height: 1; margin-bottom: .4rem;
  filter: drop-shadow(0 0 16px var(--glow3));
}
.stl { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

/* ═══════════════════════════════════════════════════
   WHO WE ARE
   ═══════════════════════════════════════════════════ */
.wi { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; align-items: center; }
.wt p { color: var(--muted); font-size: .95rem; line-height: 1.85; font-weight: 300; margin-bottom: 1.4rem; }
.wt p strong { color: var(--pl); font-weight: 500; }
.who-title {
  font-family: var(--fd); font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 800; letter-spacing: -.03em; margin-bottom: 1.5rem; line-height: 1.1;
}
.wic { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 2.5rem; }
.wv { position: relative; display: flex; align-items: center; justify-content: center; }
.vr {
  width: 340px; height: 340px;
  border: 1px solid var(--border); border-radius: 50%;
  position: relative; display: flex; align-items: center; justify-content: center;
  animation: spin 35s linear infinite;
  box-shadow: 0 0 60px rgba(255,110,255,.12);
}
@keyframes spin { to { transform: rotate(360deg); } }
.vr2 {
  width: 240px; height: 240px;
  border: 1px solid rgba(255,110,255,.20); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  animation: spin 20s linear infinite reverse;
  background: radial-gradient(rgba(95,1,128,.15), transparent);
}
.vc {
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,110,255,.20), rgba(95,1,128,.10) 50%, transparent);
  border: 1px solid rgba(255,110,255,.40);
  display: flex; align-items: center; justify-content: center; font-size: 2.8rem;
  animation: spin 12s linear infinite;
  box-shadow: 0 0 60px rgba(255,110,255,.28), inset 0 0 30px rgba(255,110,255,.12);
}
.rd {
  position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: var(--pm); box-shadow: 0 0 18px var(--pm);
}
.rd:nth-child(1) { top: -4px;  left: 50%;  transform: translateX(-50%); }
.rd:nth-child(2) { bottom: -4px; left: 50%; transform: translateX(-50%); }
.rd:nth-child(3) { left: -4px;  top: 50%;  transform: translateY(-50%); }
.rd:nth-child(4) { right: -4px; top: 50%;  transform: translateY(-50%); }

/* ═══════════════════════════════════════════════════
   WHY JOIN
   ═══════════════════════════════════════════════════ */
.wjg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.wjc { padding: 2.5rem 2rem; }
.wji {
  width: 50px; height: 50px; border-radius: 10px;
  background: rgba(255,110,255,.10); border: 1px solid rgba(255,110,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 1.6rem;
}
.wjt { font-family: var(--fd); font-size: 1.1rem; font-weight: 700; margin-bottom: .75rem; }
.wjd { font-size: .88rem; color: var(--muted); line-height: 1.7; font-weight: 300; }

/* ═══════════════════════════════════════════════════
   PROJECTS
   ═══════════════════════════════════════════════════ */
.pg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

/* ═══════════════════════════════════════════════════
   CTA
   ═══════════════════════════════════════════════════ */
#cta-home { text-align: center; padding: 140px 6vw; position: relative; overflow: hidden; z-index: 2; }
.cta-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 700px; height: 500px;
  background: radial-gradient(ellipse, rgba(255,110,255,.14), transparent 70%);
  pointer-events: none; animation: cta-pulse 5s ease-in-out infinite;
}
@keyframes cta-pulse { 0%,100% { transform: translate(-50%,-50%) scale(1); } 50% { transform: translate(-50%,-50%) scale(1.15); } }
.cta-title {
  font-family: var(--fd); font-size: clamp(2.4rem, 5vw, 4.5rem);
  font-weight: 800; letter-spacing: -.03em; margin-bottom: 1.5rem; position: relative;
}
.cta-desc { color: var(--muted); max-width: 500px; margin: 0 auto 3rem; font-size: 1rem; font-weight: 300; position: relative; }
.cta-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; position: relative; }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  #div1_left { width: 55%; padding-left: 5vw; }
  #div1_right { width: 45%; }
}
@media (max-width: 900px) {
  #hero {
    flex-direction: column;
    align-items: center;
  }
  #div1_left {
    width: 100%;
    min-height: auto;
    padding: 130px 8vw 0;
    align-items: flex-start;
  }
  #div1_right {
    width: 100%;
    min-height: 480px;
    height: 480px;
    -webkit-mask-image: none; mask-image: none;
  }
  .svg-box { width: min(600px, 90%); }
  .wi  { grid-template-columns: 1fr; gap: 3rem; }
  .wjg { grid-template-columns: repeat(2, 1fr); }
  .pg  { grid-template-columns: 1fr; }
  .vr  { width: 260px; height: 260px; }
  .vr2 { width: 180px; height: 180px; }
  .vc  { width: 100px; height: 100px; font-size: 2rem; }
}
@media (max-width: 600px) {
  #div1_left { padding: 110px 6vw 0; }
  #div1_right { min-height: 360px; height: 360px; }
  .svg-box { width: min(420px, 95%); }
  .wjg   { grid-template-columns: 1fr; }
  #impact { grid-template-columns: repeat(2, 1fr); }
  .hbtns { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 400px) {
  #impact { grid-template-columns: 1fr; }
}

/* ===== LIGHT MODE: HOME ===== */
[data-theme="light"] .o1,
[data-theme="light"] .o2 { opacity: .12; }

[data-theme="light"] .hbadge {
  border-color: rgba(160,32,200,.25);
  background: rgba(160,32,200,.07);
}
[data-theme="light"] .hint { color: rgba(26,0,58,.50); }

[data-theme="light"] #impact { background: rgba(124,34,184,.10); }
[data-theme="light"] .st { background: rgba(245,240,255,.85); }

[data-theme="light"] .vr { border-color: rgba(124,34,184,.20); box-shadow: 0 0 40px rgba(124,34,184,.08); }
[data-theme="light"] .vr2 { border-color: rgba(160,32,200,.15); background: radial-gradient(rgba(147,51,234,.08),transparent); }
[data-theme="light"] .vc { background: radial-gradient(circle, rgba(160,32,200,.12), rgba(124,34,184,.06) 50%, transparent); border-color: rgba(160,32,200,.30); box-shadow: 0 0 40px rgba(160,32,200,.16), inset 0 0 20px rgba(160,32,200,.06); }
[data-theme="light"] .rd { background: var(--pm); box-shadow: 0 0 12px var(--pm); }

[data-theme="light"] .wjc { background: rgba(255,255,255,.55); border-color: rgba(124,34,184,.12); }
[data-theme="light"] .wji { background: rgba(160,32,200,.08); border-color: rgba(160,32,200,.18); }

[data-theme="light"] .cta-glow { background: radial-gradient(ellipse, rgba(160,32,200,.10), transparent 70%); }

[data-theme="light"] #cta-home { background: rgba(220,200,255,.18); }


/* ===== LIGHT MODE: HERO TEXT ===== */
[data-theme="light"] .hh .g {
  background: linear-gradient(135deg, #7C22B8, #B026D4 50%, #5C0F9A);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(176,38,212,.18));
}
[data-theme="light"] .hh span:not(.g) { color: #1a003a; }

[data-theme="light"] .wt p strong { color: var(--pl); }
[data-theme="light"] .who-title { color: var(--text); }

/* ===== Icons ===== */
/* ===== home: rocket ===== */
#rocket1
{
  width: 12px;
  height: 12px;
}

#robot1
{
  width: 25px;
  height: 25px;
  margin-left: 5px;
}
#ai1,#automation1,#network1,#competition1,#career_growth1
{
  width: 30px;
  height: 30px;
  padding-right: 5px;
}
#automation2
{
  width: 50px;
  height: 50px;
}

#workshop3,#network3,#competition3,#leadership3,#career_development3,#robot3
{
  width: 30px;
  height: 30px;
}

#rocket4
{
  width: 17px;
  height: 17px;
}

