/* ============================
   FACULTY PAGE — STYLES
   ============================ */

.section {
  text-align: center;
}

/* ---- GLOW EFFECT SYSTEM ---- */

/* Every [data-glow] card gets a mouse-tracking radial glow */
[data-glow] {
  position: relative;
  overflow: hidden;
}

[data-glow]::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
  /* This gets updated by JS with mouse position */
  background: radial-gradient(
    600px circle at var(--glow-x, 50%) var(--glow-y, 50%),
    var(--glow-color, rgba(74, 222, 128, 0.12)),
    transparent 40%
  );
}

[data-glow]:hover::before {
  opacity: 1;
}

/* Glow border effect — a subtle luminous border on hover */
[data-glow]::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
  border: 1px solid transparent;
  background: radial-gradient(
    400px circle at var(--glow-x, 50%) var(--glow-y, 50%),
    var(--glow-border-color, rgba(74, 222, 128, 0.35)),
    transparent 40%
  ) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

[data-glow]:hover::after {
  opacity: 1;
}

/* Light mode glow colors */
:root,
[data-theme="light"] {
  --glow-color: rgba(24, 69, 59, 0.08);
  --glow-border-color: rgba(24, 69, 59, 0.25);
}

[data-theme="dark"] {
  --glow-color: rgba(74, 222, 128, 0.1);
  --glow-border-color: rgba(74, 222, 128, 0.3);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --glow-color: rgba(74, 222, 128, 0.1);
    --glow-border-color: rgba(74, 222, 128, 0.3);
  }
}

/* Make sure card children are above glow layers */
[data-glow] > * {
  position: relative;
  z-index: 2;
}

/* ---- FACULTY HERO ---- */

.fac-hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-bg);
  color: #e5e7eb;
  padding: clamp(var(--space-16), 10vw, var(--space-32)) 0 clamp(var(--space-12), 8vw, var(--space-20));
}

.fac-hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.fac-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 20%, transparent 70%);
}

.fac-hero-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
}

.fac-hero-glow-orb--1 {
  width: 500px;
  height: 500px;
  background: #4ade80;
  top: -100px;
  right: 10%;
  animation: orb-float-1 12s ease-in-out infinite;
}

.fac-hero-glow-orb--2 {
  width: 350px;
  height: 350px;
  background: #86efac;
  bottom: -50px;
  left: 5%;
  animation: orb-float-2 15s ease-in-out infinite;
}

@keyframes orb-float-1 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-30px, 20px); }
  66% { transform: translate(20px, -15px); }
}

@keyframes orb-float-2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(25px, -20px); }
}

.fac-hero-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-8);
  position: relative;
  z-index: 2;
}

/* Portrait */
.fac-hero-portrait {
  position: relative;
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  cursor: default;
}

.fac-portrait-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(74, 222, 128, 0.3);
  transition: all 0.6s ease;
}

.fac-hero-portrait:hover .fac-portrait-ring {
  border-color: rgba(74, 222, 128, 0.7);
  box-shadow: 0 0 40px rgba(74, 222, 128, 0.25), 0 0 80px rgba(74, 222, 128, 0.1);
  inset: -8px;
}

.fac-portrait-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(74, 222, 128, 0.15);
  transition: all 0.6s ease;
}

.fac-hero-portrait:hover .fac-portrait-photo {
  box-shadow: 0 0 60px rgba(74, 222, 128, 0.15) inset;
}

.fac-portrait-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.06);
  border: 1px solid rgba(74, 222, 128, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  transition: all 0.6s ease;
}

.fac-hero-portrait:hover .fac-portrait-placeholder {
  background: rgba(74, 222, 128, 0.1);
  box-shadow: 0 0 60px rgba(74, 222, 128, 0.15) inset;
}

.fac-portrait-initials {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: #86efac;
  letter-spacing: 0.05em;
}

/* Hero info */
.fac-hero-info {
  flex: 1;
}

.fac-hero-badge {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #86efac;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.2);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: var(--space-4);
}

.fac-hero-name {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-3);
}

.fac-hero-role {
  font-size: var(--text-lg);
  font-weight: 600;
  color: #86efac;
  margin-bottom: var(--space-1);
}

.fac-hero-dept {
  font-size: var(--text-sm);
  color: #9ca3af;
  line-height: 1.6;
  margin-bottom: var(--space-1);
}

.fac-hero-affiliation {
  font-size: var(--text-sm);
  color: #6b7280;
  margin-bottom: var(--space-6);
}

.fac-hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

.fac-link-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 500;
  color: #d1d5db;
  padding: var(--space-2) var(--space-3);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.3s ease;
}

.fac-link-chip img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 3px;
  flex-shrink: 0;
}

.fac-link-chip:hover {
  color: #ffffff;
  border-color: rgba(74, 222, 128, 0.5);
  background: rgba(74, 222, 128, 0.1);
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.15);
}

/* ---- STATS BAR ---- */

.fac-stats-bar {
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
  padding: var(--space-8) 0;
}

.fac-stats-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-8);
}

.fac-stat-item {
  flex: 1;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-5) var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-divider);
  background: var(--color-surface);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fac-stat-item:hover {
  transform: translateY(-2px);
}

.fac-stat-num {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.fac-stat-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: var(--space-1);
}

/* ---- BIO SECTION ---- */

.fac-bio-section {
  background: var(--color-bg);
}

.fac-bio-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.fac-bio-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.fac-bio-text p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.8;
  text-align: center;
}

.fac-bio-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.fac-info-card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fac-info-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.fac-info-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-divider);
  color: var(--color-text);
}

.fac-edu-item,
.fac-exp-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: var(--space-4);
}
.fac-edu-item:last-child,
.fac-exp-item:last-child {
  margin-bottom: 0;
}

.fac-edu-degree,
.fac-exp-role {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.fac-edu-school,
.fac-exp-company {
  font-size: var(--text-sm);
  color: var(--color-accent);
}

.fac-edu-year,
.fac-exp-period {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ---- RESEARCH INTERESTS ---- */

.fac-interests-section {
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}

.fac-interest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.fac-interest-card {
  padding: var(--space-6);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  background: var(--color-bg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fac-interest-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.fac-interest-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--color-accent-highlight);
  color: var(--color-accent);
  margin-bottom: var(--space-4);
  transition: all 0.4s ease;
}

.fac-interest-card:hover .fac-interest-icon {
  box-shadow: 0 0 30px var(--glow-color);
}

.fac-interest-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.fac-interest-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ---- PUBLICATIONS ---- */

.fac-pubs-section {
  background: var(--color-bg);
}

.fac-pub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.fac-pub-card {
  padding: var(--space-6);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fac-pub-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.fac-pub-card--highlight {
  border-color: var(--color-accent);
  background: var(--color-accent-highlight);
}

.fac-pub-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.fac-pub-venue {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-highlight);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}

.fac-pub-card--highlight .fac-pub-venue {
  background: var(--color-surface);
}

.fac-pub-citations {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.fac-pub-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.fac-pub-authors {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.fac-pub-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

.fac-pub-links {
  display: flex;
  gap: var(--space-2);
}

.fac-pub-links a {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-interactive);
}

.fac-pub-links a:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-highlight);
  box-shadow: 0 0 15px var(--glow-color);
}

.fac-pub-more {
  margin-top: var(--space-8);
  text-align: center;
}

/* ---- TEACHING ---- */

.fac-teaching-section {
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
}

.fac-course-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.fac-course-card {
  padding: var(--space-6);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  background: var(--color-bg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fac-course-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.fac-course-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.fac-course-code {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-highlight);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}

.fac-course-type {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.fac-course-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.fac-course-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-3);
}

.fac-course-tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.fac-course-tools span {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-accent);
  background: var(--color-accent-highlight);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
}

/* ---- VENTURES ---- */

.fac-ventures-section {
  background: var(--color-bg);
}

.fac-venture-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

.fac-venture-card {
  padding: var(--space-6);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fac-venture-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.fac-venture-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--color-accent-highlight);
  color: var(--color-accent);
  margin-bottom: var(--space-4);
  transition: all 0.4s ease;
}

.fac-venture-card:hover .fac-venture-icon {
  box-shadow: 0 0 30px var(--glow-color);
}

.fac-venture-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.fac-venture-role {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.fac-venture-card p:last-child {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ---- CTA BANNER ---- */

.fac-cta-section {
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
}

.fac-cta-banner {
  background: var(--color-accent-highlight);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  transition: box-shadow 0.4s ease;
}

.fac-cta-banner:hover {
  box-shadow: 0 0 50px var(--glow-color), 0 0 100px rgba(74, 222, 128, 0.05);
}

.fac-cta-text h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.fac-cta-text p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
}

.fac-cta-actions {
  display: flex;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* ---- GRADUATE STUDENTS ---- */

.fac-student-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}

.fac-student-group h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fac-student-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.fac-student-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-divider);
}

.fac-student-name {
  font-weight: 600;
  font-size: var(--text-sm);
}

.fac-student-info {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

/* ---- PROFESSIONAL SERVICE ---- */

.fac-service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

/* ---- EDUCATION DETAIL ---- */

.fac-edu-detail {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-style: italic;
  display: block;
  margin-top: 2px;
}

/* ---- RESPONSIVE ---- */

@media (max-width: 768px) {
  .fac-hero-layout {
    flex-direction: column;
    text-align: center;
  }

  .fac-hero-portrait {
    width: 150px;
    height: 150px;
  }

  .fac-hero-links {
    justify-content: center;
  }

  .fac-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fac-bio-layout {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .fac-interest-grid {
    grid-template-columns: 1fr;
  }

  .fac-pub-grid {
    grid-template-columns: 1fr;
  }

  .fac-course-grid {
    grid-template-columns: 1fr;
  }

  .fac-venture-grid {
    grid-template-columns: 1fr;
  }

  .fac-student-grid {
    grid-template-columns: 1fr;
  }

  .fac-service-grid {
    grid-template-columns: 1fr;
  }

  .fac-student-item {
    flex-direction: column;
    gap: 2px;
  }

  .fac-cta-banner {
    flex-direction: column;
    text-align: center;
  }

  .fac-cta-actions {
    flex-direction: column;
    width: 100%;
  }

  .fac-cta-actions .btn {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .fac-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }
}
